* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  height: 100vh;
  background: linear-gradient(to right, #4B0082 0%, #D8BFD8 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  font-family: 'Montserrat', sans-serif;
  overflow-y: auto;
  margin: 0;
  transition: filter 0.3s ease;
}

.container {
  text-align: center;
  position: relative;
  margin: 20vh auto 0 auto;
  transition: margin-top 1s ease-out;
}

.glow-text {
  font-size: 4rem;
  color: #fff;
  font-weight: 300;
  animation: fadeInGlow 3s ease-out forwards;
  opacity: 0;
}

@keyframes fadeInGlow {
  0% {
    opacity: 0;
    text-shadow: none;
  }
  50% {
    opacity: 0.5;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
  }
  100% {
    opacity: 1;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.6),
                 0 0 30px rgba(255, 255, 255, 0.5),
                 0 0 40px rgba(255, 255, 255, 0.4);
  }
}

.container.moved-up {
  margin-top: 2vh;
}

#indexContent {
  margin-top: 200px;
  margin-bottom: 250px;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  height: 850px;
  pointer-events: none; 
  margin: 0 auto;
  width: auto; 
}

.container.moved-up + #indexContent {
  opacity: 1;
  max-height: 5000px; 
  pointer-events: auto;
  margin-top: 140px;
}

.center-box {
  height: 530px;
  width: 800px;
  color: white;
  background-color: rgba(0, 0, 0, 0.3);
  align-content: center;
  text-align: center;
  padding: 1rem;
  box-sizing: border-box;
  z-index: 1;
}

.writing-box {
  height: auto;
  width: auto;
  
  max-width: 100%;
  color: white;
  background-color: rgba(0, 0, 0, 0.3);
  margin: 0 auto;
  padding: 0.8rem;
  font-size: 18px;
}

.input {
  width: 500px;
  padding: 0.5rem;
  margin-top: 1px;
  border: none;
  border-radius: 5px;
  font-size: 1rem;
}

#timeSelector {
  width: 500px;
  padding: 0.5rem;
  font-size: 1rem;
  border-radius: 5px;
  border: none;
  margin-top: 10px;
  background-color: white;
  color: #4B0082;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%204%205'%3E%3Cpath%20fill='%234B0082'%20d='M2%200L0%202h4L2%200zM2%205l2-2H0l2%202z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 0.65em auto;
}

.reset {
  text-align: center;
  margin-top: 1rem;
}

.reset button,
.scoreCheck {
  padding: 0.5rem 1rem;
  margin: 0.25rem;
  font-size: 1rem;
  margin-top: 5px;
  border: none;
  border-radius: 5px;
  background-color: white;
  color: #4B0082;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.reset button:hover,
.scoreCheck:hover {
  background-color: #ddd;
}

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(75, 0, 130, 0.85);
  color: white;
  padding: 2rem;
  border-radius: 10px;
  z-index: 999;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
  text-align: center;
  width: 400px;
}

.hidden {
  display: none;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 1.5rem;
  color: white;
  cursor: pointer;
  font-weight: bold;
  z-index: 1000;
}

#loginBtn,
#logoutBtn {
  padding: 0.6rem 1.2rem;
  margin: 0.5rem;
  font-size: 1rem;
  border: none;
  border-radius: 5px;
  background-color: #fff;
  color: #4B0082;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.2);
}

#loginBtn:hover,
#logoutBtn:hover {
  background-color: #eee;
  transform: scale(1.03);
}

#userInfo {
  margin-top: 0.5rem;
  font-size: 1rem;
  color: #fff;
}

    #toggleSlider {
      position: absolute;
      width: 24px;
      height: 24px;
      background-color: white;
      border-radius: 50%;
      top: 3px;
      left: 3px;
      transition: left 0.3s ease;
      z-index: 1;
      box-shadow: 0 0 3px rgba(0,0,0,0.2);
    }

    #toggleContainer.active #toggleSlider {
      left: 73px; 
    }

    #toggleLabels {
      display: flex;
      justify-content: space-between;
      align-items: center;
      width: 100%;
      padding: 0 10px;
      font-size: 14px;
      z-index: 2;
      user-select: none;
      pointer-events: none;
    }

