/* ================= RESET ================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial;
}

/* ================= BODY ================= */
body {
  background: linear-gradient(180deg, #f7f7f9 0%, #ececf1 100%);
  min-height: 100vh;

  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px;
}

/* ================= CONTAINER ================= */
.container {
  width: 100%;
  max-width: 420px;
  height: 92vh;
  position: relative;
}

/* ================= CARD ================= */
.card {
  width: 100%;
  height: 100%;

  background: rgba(255, 255, 255, 0.96);
  border-radius: 20px;
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.08),
    0 2px 8px rgba(0, 0, 0, 0.04);

  display: none;
  flex-direction: column;

  padding: 24px 20px;
  overflow: hidden;

  border: 1px solid rgba(0, 0, 0, 0.04);
  backdrop-filter: blur(4px);
}

.card.active {
  display: flex;
  animation: cardFade 0.32s ease;
}

@keyframes cardFade {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.992);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ================= TITLE ================= */
.card h1 {
  text-align: center;
  font-size: 21px;
  line-height: 1.3;
  margin-bottom: 18px;
  flex-shrink: 0;
  letter-spacing: -0.3px;
  color: #111;
}

/* ================= CONTENT ================= */
.card-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;

  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  gap: 14px;

  padding-right: 6px;
  padding-top: 4px;
  padding-bottom: 4px;

  scroll-behavior: smooth;
}

/* ================= HEADINGS ================= */
.card-content h2 {
  font-size: 16px;
  text-align: center;
  line-height: 1.35;
  margin-top: 8px;
  margin-bottom: 2px;
  color: #161616;
  font-weight: 700;
}

/* ================= TEXT ================= */
.card-content p {
  font-size: 13.5px;
  line-height: 1.9;
  color: #2f2f2f;
}

/* Optional subtle divider feel between sections */
.card-content h2:not(:first-child) {
  padding-top: 10px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* ================= BUTTON AREA ================= */
.card-buttons {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  flex-shrink: 0;
}

.card-buttons button:only-child {
  margin-left: auto;
}

/* ================= BUTTON ================= */
button {
  padding: 10px 15px;
  border: none;
  background: #111;
  color: white;
  border-radius: 10px;
  font-size: 13px;
  cursor: pointer;

  transition:
    transform 0.18s ease,
    background 0.18s ease,
    opacity 0.18s ease,
    box-shadow 0.18s ease;
}

button:hover {
  background: #222;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.14);
}

button:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

/* ================= SCROLLBAR ================= */
.card-content::-webkit-scrollbar {
  width: 5px;
}

.card-content::-webkit-scrollbar-track {
  background: transparent;
}

.card-content::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.18);
  border-radius: 999px;
}

.card-content::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.28);
}

/* ================= CARD DIRECTION ANIMATION ================= */
.card.active.slide-next {
  animation: cardSlideNext 0.32s ease;
}

.card.active.slide-prev {
  animation: cardSlidePrev 0.32s ease;
}

@keyframes cardSlideNext {
  from {
    opacity: 0;
    transform: translateX(16px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes cardSlidePrev {
  from {
    opacity: 0;
    transform: translateX(-16px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ================= PROGRESS DOTS ================= */
.progress-dots {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 20;
  pointer-events: none;
}

.progress-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.18);
  transition: all 0.25s ease;
}

.progress-dot.active {
  width: 22px;
  background: rgba(0, 0, 0, 0.75);
}

/* ================= SCROLL HINT ================= */
.scroll-hint {
  align-self: center;
  width: fit-content;

  text-align: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2px;
  color: rgba(0, 0, 0, 0.52);

  margin-top: 8px;
  margin-bottom: 2px;
  padding: 6px 12px;

  background: linear-gradient(
    to top,
    rgba(242, 206, 206, 0.98),
    rgba(255, 255, 255, 0.84)
  );

  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 999px;
  backdrop-filter: blur(3px);

  opacity: 0.95;
  transform: translateY(0);
  transition:
    opacity 0.22s ease,
    transform 0.22s ease,
    visibility 0.22s ease;

  animation: scrollHintFloat 1.8s ease-in-out infinite;
}

.scroll-hint.hidden {
  opacity: 0;
  transform: translateY(4px);
  visibility: hidden;
  pointer-events: none;
  animation: none;
}

@keyframes scrollHintFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(3px);
  }
}

/* ================= MOBILE TWEAKS ================= */
@media (max-width: 420px) {
  .container {
    height: 94vh;
  }

  .card {
    padding: 22px 16px;
    border-radius: 18px;
  }

  .card h1 {
    font-size: 19px;
  }

  .card-content h2 {
    font-size: 15px;
  }

  .card-content p {
    font-size: 13px;
    line-height: 1.8;
  }
}

/* ================= REDUCED MOTION ================= */
@media (prefers-reduced-motion: reduce) {
  .card.active {
    animation: none;
  }

  button,
  .card-content,
  .progress-dot,
  .scroll-hint {
    transition: none;
    scroll-behavior: auto;
  }

  .scroll-hint {
    animation: none;
  }
}