* {
  box-sizing: border-box;
}

:root {
  --background: #070714;
  --panel: rgba(28, 16, 43, 0.88);
  --pink: #efa5e8;
  --purple: #a86bc9;
  --burgundy: #6c174d;
  --white: #fff5ff;
  --muted: #c1a7d0;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--white);
  background:
    radial-gradient(ellipse at 20% 20%, #32133f 0%, transparent 40%),
    radial-gradient(ellipse at 80% 70%, #35112e 0%, transparent 45%),
    linear-gradient(145deg, #070714, #100b24, #080714);
  font-family: Georgia, "Times New Roman", serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(2px 2px at 20% 30%, white 50%, transparent),
    radial-gradient(2px 2px at 70% 60%, #f5a8ef 50%, transparent),
    radial-gradient(1px 1px at 40% 80%, white 50%, transparent),
    radial-gradient(2px 2px at 90% 15%, #c5a5ff 50%, transparent);
  background-size: 180px 180px, 230px 230px, 150px 150px, 250px 250px;
  animation: starDrift 30s linear infinite;
}

@keyframes starDrift {
  from { background-position: 0 0; }
  to { background-position: 180px 360px; }
}

#app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

.screen {
  width: 100%;
  max-width: 700px;
  min-height: 100vh;
  margin: auto;
  padding: 30px 22px 55px;
  animation: appear 0.6s ease;
}

.hidden {
  display: none !important;
}

@keyframes appear {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

h1, h2 {
  font-weight: normal;
}

h1 {
  font-size: clamp(32px, 8vw, 48px);
  line-height: 1.3;
}

h2 {
  color: var(--pink);
}

p {
  line-height: 1.8;
}

button {
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

button:active {
  transform: scale(0.97);
}

.primary-btn,
.secondary-btn,
.back-btn {
  padding: 15px 23px;
  border-radius: 40px;
  font-size: 16px;
}

.primary-btn {
  color: white;
  border: 1px solid #ed94e6;
  background: linear-gradient(120deg, #812253, #49206d);
  box-shadow: 0 0 22px #b33d9c40;
}

.primary-btn:hover {
  box-shadow: 0 0 25px #e77adf80;
}

.secondary-btn,
.back-btn {
  color: var(--pink);
  background: #171127;
  border: 1px solid #9b64b9;
}

.back-btn {
  margin-bottom: 25px;
}

.welcome-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 85vh;
  text-align: center;
}

.moon {
  font-size: 65px;
  color: #efb2ff;
  text-shadow: 0 0 30px #bd65ff;
}

.welcome-content h1,
#finalPage h1 {
  color: #f4c2ee;
  font-style: italic;
  text-shadow: 0 0 25px #c64ebc65;
}

.dedication {
  color: var(--pink);
  font-style: italic;
}

.intro {
  max-width: 420px;
  color: var(--muted);
  margin: 20px 0 35px;
}

/* GALAXY */

.top-header {
  text-align: center;
}

.top-header p {
  color: var(--muted);
}

.galaxy-container {
  position: relative;
  width: min(88vw, 500px);
  height: min(88vw, 500px);
  max-height: 500px;
  margin: 30px auto;
  border-radius: 50%;

  background:
    radial-gradient(circle, #5b347a20 0%, transparent 65%),
    radial-gradient(circle, #211139 0%, #0c0a1d 70%);
}

.galaxy-ring {
  position: absolute;
  inset: 15%;
  border: 1px solid #d69ce42a;
  border-radius: 50%;
  transform: rotate(-25deg) scaleY(0.65);
}

.ring-two {
  inset: 5%;
  transform: rotate(35deg) scaleY(0.65);
}

#planetField {
  position: absolute;
  inset: 0;
}

.planet {
  position: absolute;
  width: 37px;
  height: 37px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 12px;
  color: white;
  border: 1px solid #e7b6ff;
  background: radial-gradient(circle at 30% 25%, #f7c4ff, #8a48ad 55%, #241139);
  box-shadow: 0 0 15px #bc74f5a0;
  transform: translate(-50%, -50%);
}

.planet.completed {
  background: radial-gradient(circle at 30% 25%, #fff4e5, #b95c9f 55%, #481746);
  box-shadow: 0 0 20px #f4a3e9;
}

.planet.locked {
  filter: grayscale(0.8);
  opacity: 0.45;
}

#progressText {
  text-align: center;
  color: var(--pink);
}

/* DAILY PAGE */

.day-heading {
  text-align: center;
  margin: 20px 0 35px;
}

#dayNumber {
  font-size: 34px;
  color: #f5c5ef;
  font-style: italic;
  margin-bottom: 5px;
}

.small-star {
  color: #f6c8ff;
  font-size: 24px;
  text-shadow: 0 0 20px #f39bff;
}

.letter-card,
.memory-card,
.music-card,
.voice-card,
.final-card {
  margin-bottom: 30px;
  padding: 25px 22px;
  border: 1px solid #995db6;
  border-radius: 22px;
  background: var(--panel);
  box-shadow: 0 0 24px #a348ba12;
}

.letter-card h2 {
  margin-top: 0;
  font-style: italic;
}

.letter-text {
  color: #fff1ff;
  font-size: 19px;
  line-height: 2;
  white-space: pre-line;
}

label {
  display: block;
  color: var(--pink);
  font-size: 25px;
  font-style: italic;
  margin-bottom: 20px;
}

textarea,
input[type="url"] {
  display: block;
  width: 100%;
  color: white;
  background: #171023;
  border: 1px solid #a45fc0;
  border-radius: 15px;
  padding: 18px;
  font-family: inherit;
  font-size: 17px;
  outline: none;
}

textarea {
  min-height: 145px;
  resize: vertical;
}

textarea:focus,
input[type="url"]:focus {
  border-color: #ffb1ef;
  box-shadow: 0 0 12px #e98ce533;
}

textarea::placeholder,
input::placeholder {
  color: #ad93bb;
}

#songLink {
  display: inline-block;
  color: var(--pink);
  margin-top: 22px;
  line-height: 1.8;
}

input[type="file"] {
  display: block;
  width: 100%;
  color: #ddc4ed;
  margin: 12px 0;
  font-size: 15px;
}

.small-text {
  color: var(--muted);
  font-size: 14px;
}

.audio-player {
  display: block;
  width: 100%;
  margin-top: 18px;
}

.day-navigation {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 40px;
}

.status-message {
  color: #f2b6ec;
  text-align: center;
  line-height: 1.8;
  white-space: pre-line;
}

/* QUIZ */

#quizPage h1 {
  color: #f4b9ee;
  font-style: italic;
}

.quiz-description {
  color: var(--muted);
}

.quiz-question {
  margin: 24px 0;
  padding: 20px;
  border: 1px solid #87549d;
  border-radius: 18px;
  background: var(--panel);
}

.quiz-question p {
  color: var(--pink);
}

.quiz-question label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: var(--white);
  font-size: 16px;
  font-style: normal;
  margin: 15px 0;
}

.quiz-question input {
  margin-top: 5px;
  accent-color: #dc7ee6;
}

#continueQuiz {
  display: block;
  margin: 20px auto;
}

/* FINAL PAGE */

#finalPage {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.final-card {
  font-size: 18px;
  line-height: 2;
}

.signature {
  color: var(--pink);
  font-style: italic;
}

@media (max-width: 400px) {
  .screen {
    padding: 24px 16px 40px;
  }

  .letter-card,
  .memory-card,
  .music-card,
  .voice-card {
    padding: 20px 16px;
  }

  .planet {
    width: 32px;
    height: 32px;
    font-size: 10px;
  }

  .day-navigation button {
    padding: 13px 15px;
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}