@keyframes slideIn {
  0% {
    letter-spacing: -1ch;
    color: transparent;
  }
  100% {
    letter-spacing: 0ch;
    color: var(--text-highlight);
  }
}

html, body {
  height: 100%;
  width: 100%;
  display: flex;
  background-color: var(--bg-main);
  color: var(--text-main);
  overflow: hidden;
  font-family: Trebuchet MS, Tahoma, Arial;
}

article {
  height: 85%;
  width: 50%;
  margin: 2rem auto;
  text-align: center;
  overflow-y: hidden;
  background-color: var(--surface-card);
  box-shadow: 8px 8px 0 var(--line-neutral);
  
  h1 {
    padding: 0 1.5rem;
  }

  hr {
    margin: 2rem 0 1rem 0;
    border: 2px solid var(--line-neutral);
  }
}

.slide-out {
  letter-spacing: 0ch;
  color: var(--text-highlight);
  animation: 0.3s ease-in 0s 1 reverse forwards slideIn;
}

.slide-in {
  letter-spacing: -1ch;
  color: transparent;
  animation: 0.6s ease-out 0.2s 1 forwards slideIn;
}

.slide-in-fast {
  letter-spacing: -1ch;
  color: transparent;
  animation: 0.3s ease-out 0.2s 1 forwards slideIn;
}

button {
  padding: 0.4rem 0.6rem;
  font-size: 1rem;
  background-color: var(--buttons-background);
}

#titles {
  display: flex;
  justify-content: center;
  height: 28px;
  overflow: hidden;
  margin-bottom: 1rem;
}

#title1, #title2 {
  margin: 0;
  text-wrap: nowrap;
  font-weight: normal;
}

#title-list-section {
  overflow-y: auto;
  height: var(--title-list-height);
  margin-top: -15px;
  scrollbar-color: #C04242 var(--buttons-background);
  scrollbar-width: thin;
}

#title-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-flow: column;
  color: var(--text-muted);

  li {
    margin: 5px auto;
  }
}

@media screen and (max-width: 740px) {
  html, body {
    font-size: 0.9rem;
  }

  article {
    height: 95%;
    width: 95%;
    margin: 0 auto;
    
    hr {
      margin: 1rem 0;
      border: 1px solid var(--line-neutral);
    }
  }

  #title1, #title2 {
    font-size: 14px;
  }

  #title-list-section {
    height: var(--title-list-height-mobile);
  }

  button {
    padding: 0.2rem 0.3rem;
  }
}

:root {
  --title-list-height: 445px;
  --title-list-height-mobile: 360px;
  --bg-main: #FFF5E4;
  --surface-card: #FFE3E1;
  --line-neutral: #FF9494;
  --buttons-background: #FFD1D1;
  --text-main: #3F2A2A;
  --text-highlight: #BA0D0D;
  --text-muted: #735858;
}