* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  width: 100%;
}

body {
  min-height: 100vh;
  font-family: Georgia, "Times New Roman", serif;
  color: #f7f3ea;
  background:
    linear-gradient(rgba(2, 8, 12, 0.30), rgba(2, 8, 12, 0.52)),
    url("assets/welcome-reference.png") center center / cover fixed no-repeat;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 35%, rgba(255,255,255,0.08), transparent 34%),
    linear-gradient(rgba(0,0,0,0.10), rgba(0,0,0,0.28));
  z-index: -1;
}

button {
  font: inherit;
}

.screen {
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.hidden {
  display: none !important;
}

.card {
  width: min(720px, 100%);
  padding: 28px 22px;
  border: 1px solid rgba(255, 255, 255, 0.20);
  border-radius: 24px;
  background: rgba(4, 12, 16, 0.68);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
  text-align: center;
  animation: fadeIn 0.7s ease;
}

.step-counter {
  margin-bottom: 18px;
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

h1,
h2 {
  margin: 0 0 18px;
  line-height: 1.25;
  font-weight: 600;
}

h1 {
  font-size: clamp(1.8rem, 7vw, 3rem);
}

h2 {
  font-size: clamp(1.55rem, 6vw, 2.35rem);
}

p {
  line-height: 1.75;
  font-size: 1.04rem;
}

#step-content {
  margin-bottom: 18px;
}

.message {
  white-space: pre-line;
  text-align: left;
  margin: 0 auto;
  max-width: 650px;
}

button {
  border: 0;
  border-radius: 999px;
  padding: 12px 22px;
  margin: 8px 5px;
  cursor: pointer;
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.28);
  transition: transform 0.2s ease, background 0.2s ease;
}

button:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.23);
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.primary-button {
  margin-top: 18px;
}

.choice-button {
  display: block;
  width: min(560px, 100%);
  margin: 10px auto;
  text-align: left;
}

.question {
  margin: 24px auto 14px;
  font-size: 1.15rem;
  line-height: 1.6;
}

.feedback {
  margin: 18px auto;
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  text-align: left;
  line-height: 1.7;
  white-space: pre-line;
}

.media-block {
  margin: 20px auto;
}

.media-block img,
.media-block video {
  display: block;
  width: 100%;
  max-height: 65vh;
  object-fit: contain;
  border-radius: 18px;
  margin: 0 auto 14px;
  background: rgba(0, 0, 0, 0.25);
}

.media-block audio {
  width: 100%;
  margin: 10px auto;
}

.caption {
  margin: 0 auto;
  line-height: 1.65;
  font-style: italic;
  color: rgba(255, 255, 255, 0.88);
}

.transition-text {
  margin: 24px auto;
  line-height: 1.8;
  font-size: 1.08rem;
}

.error-message {
  padding: 16px;
  border-radius: 16px;
  background: rgba(120, 20, 20, 0.35);
  line-height: 1.6;
}

.fade-out {
  animation: fadeOut 0.35s ease forwards;
}

.fade-in {
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

@media (max-width: 600px) {
  .screen {
    padding: 14px;
  }

  .card {
    padding: 24px 16px;
    border-radius: 20px;
  }

  p {
    font-size: 0.98rem;
  }

  button {
    width: 100%;
    margin: 7px 0;
  }

  .choice-button {
    width: 100%;
  }
}
