/* first the universal css */
* {
  margin: 0;
  padding: 0;
  font-size: 16px;
}

body {
  font-family: "Lato";
  font-weight: 300;
  display: flex;
  justify-content: center;
  width: 100vw;
  height: 100vh;

  background: rgb(241, 241, 241);
}
button {
  cursor: pointer;
  font-size: 1.3rem;
  border: none;
  font-weight: bold;
  border-radius: 8px;
  padding: 0 2%;
  outline: none;
  min-height: 15%;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
button:hover {
  filter: brightness(120%);
}

button:active {
  transform: translate(0, 0.1rem);
}

input {
  font-family: "Lato";
}
p{
  display: flex;
  word-wrap: break-word;
  padding: 0.5% 1%;
}

/***********now the homepage css************/
#home-page {
  display: flex;
  align-items: center;
  justify-content: space-around;
  width: 100%;
  height: 100%;
}

.card {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  height: 60% ;
  width: 30%;
  padding: 0.5% 3%;
  border: 2px solid grey;
  border-radius: 8px;
  transition: 0.3s linear;
}

.card:hover{
  transform: scale(1.1,1.1);
  border: 4px solid #00c59a;
}

h1{
  padding: 5%;
  margin-bottom: 5%;
  color: white;
  background-color: #00c59a;
  border-radius: 8px;
  font-size: 3rem;
}

#input-wrapper{
  display: flex;
  width: 100%;
  height: 25%;
  flex-direction: column;
  align-items: center;
  justify-content: space-around;
}

label{
  font-size: 1.2rem;
  text-align: center;
  margin-bottom: 1%;
  font-weight: bold;
}

#name-input {
  width: 20ch;
}

#fibo-input{
  width: 8ch;
  margin: 0;
  /* appearance:none; */
}
#fibo-input::-webkit-outer-spin-button,
#fibo-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;

}
.homepage-input{
  margin: auto;
  text-align: center;
  min-height: 1.2rem;
  font-size: 1.3rem;
  border-radius: 8px;
  border: 2px solid grey;
}

.homepage-input:focus {
  outline: none;
  border: 2px solid #ff9800;
}

.invalid-input{
  animation: erorr 0.5s ease-out;
}

@keyframes erorr {
  0%   {transform: translateX(2%);}
  10%  {transform: translateX(-2%);}
  20%  {transform: translateX(2%);}
  30%  {transform: translateX(-2%);}
  40%   {transform: translateX(2%);}
  50%  {transform: translateX(-2%);}
  60%  {transform: translateX(2%);}
  70%  {transform: translateX(-2%);}
  80%   {transform: translateX(2%);}
  100%  {transform: translateX(0%);}
}

#enter-button {
  margin-top: 5%;
  font-size: 1.8rem;
  background: #ff9800;
  width: 50%;
  color: white;
  padding: 0% 3%;
}

#compute-button {
  margin-top: 2%;
  font-size: 1.8rem;
  background: #ff9800;
  width: 60%;
  color: white;
  padding: 0% 3%;
}

#fibo-result {
  padding-top: 2%;
  margin: 0;
  font-size: 1.3rem;
  font-weight: bold;
  color:dodgerblue;
}
/***********now the chatpage css************/
#wrapper {
  width: 85%;
  height: 100%;
}

#menu {
  padding: 1% 0;
  display: flex;
  justify-content: space-between;
  height: 10%;
}

#welcome {
  /* display: flex; */
  padding: 1% 0%;
  font-size: 1.5rem;
  font-weight: bold;
  max-width: 60%;
}

#exit {
  color: white;
  font-size: 120%; /* 1.3rem*/
  max-width: 30%;
  background: #c62828;
  padding: 1% 2%;
  border: none;
  text-decoration: none;
  font-weight: bold;
}

#chatbox {
  text-align: left;
  margin: 1% auto 0 auto;
  background: #fff;
  height: 60%;
  width: 100%;
  border: 1px solid #a7a7a7;
  overflow: auto;
  border-radius: 4px;
  border-bottom: 4px solid #a7a7a7;
}

#chatbox .msg:nth-child(odd) {
  background-color: rgb(228, 244, 255);
}

.msg-time {
  color: #666;
  font-size: 0.7rem;
  vertical-align: super;
}

.msg-username {
  background: #546e7a;
  margin: 0% 1%; 
  color: white;
  font-weight: bold;
  padding: 0.5% 0.5%;
  font-size: 1rem;
  border-radius: 4px;
}

.msg-content{
  font-size: 1.2rem;
  font-weight: bold;
  margin-left: 1%;
}

.msg-outcome,
.msg-outcome .msg-time {
  flex-direction: row-reverse;
  background-color: rgb(255, 237, 230);
  color: orangered;
}

.msg-outcome .msg-username {
  background-color: orangered;
}

#form {
  display: flex;
  margin: auto;
  height: 10%;
  justify-content: space-between;
  padding: 2% 0%;
}

#message-input {
  text-align: center;
  min-width: 80%;
  height: 160%;
  resize: none;
  font-size: 1.6rem;
  border-radius: 8px;
  border: 2px solid grey;
}

#message-input::marker{
  position: relative;
  top: 20%;
}
#message-input:focus {
  outline: none;
  border: 2px solid #ff9800;
}

#send-button {
  background: #ff9800;
  height: 150%;
  color: white;
  padding: 0% 3%;
}

/***********now the media query css************/

@media screen and (max-width: 480px) {
  #wrapper,
  #loginform {
    width: 95%;
  }

  #home-page{
    flex-direction: column;
    justify-content: center;
  }

  .card{
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 30%;
    width: 80%;
  }
  #fibo {
    height:40%;
    margin-top: 15%;
  }

  h1{
    font-size: 2rem;
    margin: 0;
  }

  #compute-button, #enter-button{
    margin: 0;
  }

  label {
    font-size: 1.2rem;
  }

  #welcome {
    font-size: 135%;
  }

  #exit {
    font-size: 1.5rem;
    height: 60%;
    min-width: 35%;
  }

  #chatbox {
    margin: 0 auto;
    height:60%;
  }

  .msg-content{
    font-size: 1.5rem;
    margin-left: 1%;
  }
  .msg-time {
    font-size: 0.7rem;
    font-weight: bold;
  }
  .msg-username-income {
    font-size: 1.2rem;
  }

  #form {
    margin: auto;
    height: 12%;
    padding: 2% 0%;
  }

  #message-input {
    width: 80%;
    height: 100%;
    line-height: 2rem;
    font-size: 1.8rem;
  }

  #send-button {
    background: #ff9800;
    height: 100%;
    color: white;
    padding: 0% 3%;
  }

  button:hover {
    filter: none;
  }
}