* {
  margin: 0;
  padding: 0;
  font-family: "Roboto Mono", monospace;
  scroll-behavior: smooth;
}

body {
  background: #314D63;
}

.modal {
  display: none;
  position: fixed;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: black;
  background-color: rgba(0,0,0,0.4);
}

.modal-content {
  background-color: #F3EDDF;
  margin: 15% auto;
  padding: 20px;
  width: 50%;
  text-align: center;
  border-radius: 2em;
  line-height: 3em;
}

.x-button {
  color: black;
  float: right;
  font-size: 1.5em;
  font-weight: bold;
}

#new-username {
  padding: 0.5em;
  margin: 1em 0;
  text-align: center;
}

.modal-close:hover, .modal-close:focus {
  color: #f08976;
  text-decoration: none;
  cursor: pointer;
}

.container {
  display: flex;
  flex-flow: row nowrap;
  margin: 1em 10em;
  max-height: 100%;
}

.main {
  display: flex;
  flex-flow: column nowrap;
  flex: 5 1 0;
  min-width: 500px;
}

.sidebar {
  display: flex;
  flex-flow: column nowrap;
  flex: 2 3 0;
}

h1, h2, p, li, select {
  margin: 0;
}

h1 {
  font-size: 1.5em;
}

h2 {
  color: #ffcf81;
  font-size: 1.17em;
}

.tips {
  font-size: 0.8em;
  color: gray;
  font-style: italic;
}

#change-username {
  text-decoration: underline;
}

.chatbox, .todo-list, .day-summary, .header, .credit {
  background: #F3EDDF;
  border-radius: 1em;
  margin: 1em 1em;
}

.header {
  padding: 1.5em;
  display: flex;
  flex-flow: row nowrap;
  align-items: center;
  gap: 1em;
}

.main-profile-pic {
  width: 7em;
  height: 7em;
  background: #8FB9AB;
  border-radius: 50%;
}

.chat-content {
  overflow-y: scroll;
  min-height: 100px;
  height: calc(100vh - 460px);
  padding: 1.5em;
}

.todo-content {
  height: calc(100vh - 750px);
  min-height: 100px;
  padding: 1.5em;
}

.scrollable-list {
  height: calc(100vh - 800px);
  min-height: 50px;
  overflow-y: scroll;
}

.summary-content {
  padding: 1.5em;
}

.summary-content ul {
  padding-left: 1em;
}

.chat-header, #config, .todo-header, #date-time-display, .summary-header{
  border-radius: 1em;
  padding: 1em;
  background: #f08976;
  color: #FCF8E8;
}

#sound-toggle {
  cursor: pointer;
}

.buddy-message {
  display: flex;
  flex-flow: row nowrap;
  max-width: 800px;
  gap: 0.7em;
  align-items: flex-start;
  padding: 0.5em 0;
}

.buddy-message-content {
  position: relative;
  background: lightblue;
  border-radius: 0.4em;
  padding: 0.7em 1.2em 1.4em 0.7em;
  display: flex;
  flex-flow: column nowrap;
  word-wrap: break-word;
  max-width: 100%;
}

.reaction-emoji {
  position: absolute;
  bottom: -0.5em;
  right: -0.5em;
  font-size: 2rem;
  opacity: 0.9;
  pointer-events: none;
  animation: popIn 0.3s ease-out;
}

@keyframes popIn {
  0% { transform: scale(0); opacity: 0; }
  80% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(1); }
}

.user-input {
  display: flex;
  flex-flow: row nowrap;
  gap: 0.5em;
  justify-content: center;
  padding-bottom: 0.7em;
}

.buddy-chat-profile-pic {
  width: 3em;
  height: 3em;
  background: #8FB9AB;
  border-radius: 0.5em;
}

button {
  background: #8FB9AB;
  color: #FCF8E8;
  border: none;
  margin-bottom: 0;
  padding: 0.5em;
  border-radius: 0.4em;
  font-size: 1em;
}

button:hover {
  background: #428b73;
  transition: 0.3s;
  cursor: pointer;
}

#config, .todo-list, #date-time-display, .day-summary, .shortcuts  {
  margin: 1em 0.7em;
}

.date-display, .time-display {
  font-weight: bold;
}

#config-frequency, #end-time-input {
  font-weight: bold;
  color: black;
  border: none;
  border-radius: 5px;
  height: 1.5em;
  background: rgb(253, 249, 249);
  padding: 0;
}

.notif {
  background: rgb(236, 236, 236);
  font-size: 0.8em;
  font-style: italic;
  text-align: center;
  color: lightslategray;
  border-radius: 0.5em;
  margin: 0.5em 0;
  padding: 0.5em 0;
}

#submit-end-time, #submit-todo {
  padding: 2px 10px;
}

.new-todo-input {
  display: flex;
  flex-flow: row nowrap;
  gap: 0.5em;
  padding-bottom: 1em;
}

#new-todo-item {
  flex: 1 0 0;
  padding-left: 5px;
  border: none;
}

.todo-item {
  display: flex;
  flex-flow: row nowrap;
  margin: 0.3em ;
  justify-content: space-between;
  align-items: center;
}

/* The switch - the box around the slider */
.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 20px;
}
  
  /* Hide default HTML checkbox */
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
  
  /* The slider */

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  -webkit-transition: .4s;
  transition: .4s;
}
  
.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  -webkit-transition: .4s;
  transition: .4s;
}
  
input:checked + .slider {
  background-color: lightblue;
}
  
input:focus + .slider {
  box-shadow: 0 0 1px lightblue;
}
  
input:checked + .slider:before {
  -webkit-transform: translateX(20px);
  -ms-transform: translateX(20px);
  transform: translateX(20px);
}
  
  /* Rounded sliders */
.slider.round {
  border-radius: 34px;
}
  
.slider.round:before {
  border-radius: 50%;
}

.user-buttons {
  display: flex;
  flex-flow: row nowrap;
  gap: 0.5em;
  justify-content: center;
  margin: 1.5em;
}

.user-buttons button {
  font-size: 1.2em;
  padding: 0.5em 0.8em;
  border-radius: 0.4em;
}

.meme-pic {
  max-width: 90%;
  max-height: calc(100vh - 500px);
  height: auto;
  width: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.bold {
  font-weight: bold;
}

.highlighted {
  color: #f08976;
}

.hidden {
  display: none;
}

#blinking {
  animation: blinker 1s linear infinite;
}

@keyframes blinker {
  50% {
    opacity: 0;
  }
}

.credit {
  background: none;
  font-style: italic;
  font-size: 0.8em;
  color: #F4D096;
  display: flex;
  justify-content: center;
}

.credit a {
  text-decoration: none;
  color: #F4D096;
}

.credit a:hover {
  text-decoration: underline;
  transition: 0.3s;
}

.displayed-on-mobile {
  display: none;
}

@media screen and (max-width: 1500px) {
  .container {
    margin: 0 4em;
  }
}

@media screen and (max-width: 1300px) {
  .container {
    margin: 0 2em;
  }
}

@media screen and (max-width: 940px) {
  .displayed-on-mobile {
    display: flex;
  }

  .shortcuts {
    display: flex;
    flex-flow: row nowrap;
    justify-content: space-between;
    gap: 0.7em;
    align-items: center;
  }
  
  .shortcuts > * {
    flex: 1 1 0;
    text-align: center;
    background:#F4D096;
    padding: 0.2em;
    border-radius: 0.3em;
    color: black;
  }

  .shortcuts a {
    text-decoration: none;
  }

  .container {
    margin: 0 0.3em;
    flex-flow: column nowrap;
  }

  .main {
    min-width: 0px;
  }

  .main-profile-pic {
    width: 3em;
    height: 3em;
  }

  .chatbox, .todo-list, .day-summary, .header, .user-buttons {
    margin: 1em 1em;
  }

  .credit {
    margin: 0;
  }

  .chat-header, #config, .todo-header, #date-time-display, .summary-header {
    padding: 0.7em;
  }

  .summary-content {
    padding: 0.7em;
  }
  
  #config, .todo-list, #date-time-display, .day-summary {
    margin: 0.7em 0.7em;
  }

  .user-buttons button {
    font-size: 1em;
    padding: 0.5em 0.5em;
    border-radius: 0.4em;
  }

  .header {
    padding: 0.7em
  }

  .chat-content {
    height: calc(100vh - 350px);
    padding: 0.7em;
  }

  .hidden-on-mobile {
    display: none;
  }

  .sidebar {
    flex: 3 0 100%;
  }

  .todo-content {
    padding: 0.7em;
    height: calc(100vh - 750px);
  }

  .scrollable-list {
    height: calc(100vh - 800px);
  }

  #back-to-top-button {
    display: none;
    position: fixed;
    bottom: 1em;
    right: 1em;
    z-index: 99;
  }

  .modal-content {
    width: 80%;
  }

  .tips {
    font-size: 0.7em;
  }

}