﻿:root {
  --bg-cream: #fff8ef;
  --bg-peach: #ffe5cc;
  --ink: #20313a;
  --accent-coral: #f16a5d;
  --accent-teal: #1f8f8d;
  --accent-gold: #f6b548;
  --card: #ffffff;
  --shadow: 0 18px 40px rgba(32, 49, 58, 0.14);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100dvh;
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 15%, rgba(246, 181, 72, 0.35), transparent 26%),
    radial-gradient(circle at 85% 20%, rgba(31, 143, 141, 0.2), transparent 30%),
    linear-gradient(140deg, var(--bg-cream), var(--bg-peach));
  padding: 24px 16px;
  overflow-x: hidden;
}

.bg-shape {
  position: fixed;
  z-index: -1;
  filter: blur(1px);
}

.bg-shape-a {
  width: 220px;
  height: 220px;
  border-radius: 42% 58% 38% 62%;
  background: rgba(241, 106, 93, 0.2);
  top: -60px;
  right: -40px;
}

.bg-shape-b {
  width: 280px;
  height: 280px;
  border-radius: 64% 36% 57% 43%;
  background: rgba(31, 143, 141, 0.16);
  bottom: -95px;
  left: -60px;
}

.app {
  width: min(720px, 100%);
  margin: 0 auto;
  position: relative;
}

.eyebrow {
  margin: 0;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.76rem;
  color: rgba(32, 49, 58, 0.74);
}

h1,
h2 {
  font-family: "Fraunces", Georgia, serif;
  line-height: 1.1;
  margin: 0;
}

#mainTitle {
  margin-top: 8px;
  font-size: clamp(2rem, 5vw, 3.1rem);
}

.subtitle {
  margin: 10px 0 0;
  font-size: 1rem;
  color: rgba(32, 49, 58, 0.84);
}

.intro-photos {
  margin-top: 12px;
  display: flex;
  gap: 10px;
}

.mini-photo {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border-radius: 14px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 16px rgba(24, 46, 68, 0.22);
  background: rgba(255, 255, 255, 0.72);
}

.stage {
  position: relative;
  margin-top: 28px;
  min-height: 360px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(8px);
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--shadow);
  overflow: hidden;
  isolation: isolate;
}

.stage::before {
  content: "";
  position: absolute;
  inset: -30%;
  background: conic-gradient(
    from 120deg,
    rgba(241, 106, 93, 0.2),
    rgba(246, 181, 72, 0.2),
    rgba(31, 143, 141, 0.2),
    rgba(241, 106, 93, 0.2)
  );
  filter: blur(34px);
  opacity: 0.9;
  animation: stageAura 12s linear infinite;
  z-index: 0;
}

.stage::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 90% 8%, rgba(255, 255, 255, 0.5), transparent 28%),
    radial-gradient(circle at 10% 95%, rgba(255, 255, 255, 0.35), transparent 30%);
  z-index: 0;
  pointer-events: none;
}

.stage > * {
  position: relative;
  z-index: 1;
}

.stage-topline {
  display: grid;
  gap: 10px;
}

.step-indicator {
  margin: 0;
  width: fit-content;
  font-size: 0.86rem;
  font-weight: 700;
  color: #0e4f95;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(14, 79, 149, 0.25);
  border-radius: 999px;
  padding: 7px 12px;
  box-shadow: 0 6px 16px rgba(14, 79, 149, 0.15);
}

.step-progress {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(31, 143, 141, 0.2);
  overflow: hidden;
}

#stepProgressFill {
  display: block;
  width: 25%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f16a5d, #f6b548, #1f8f8d);
  box-shadow: 0 0 18px rgba(31, 143, 141, 0.55);
}

.motivation-line {
  margin: 12px 0 0;
  font-size: 0.98rem;
  font-weight: 600;
  color: rgba(10, 59, 109, 0.94);
  letter-spacing: 0.01em;
}

.card-stack {
  position: relative;
  height: 220px;
  margin-top: 18px;
}

.scene-card {
  position: absolute;
  inset: 0;
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(255, 250, 243, 0.9)),
    var(--card);
  padding: 22px;
  border: 1px solid rgba(31, 143, 141, 0.18);
  box-shadow: 0 12px 26px rgba(32, 49, 58, 0.1);
  opacity: 0;
  transform: translateY(28px) scale(0.98);
  pointer-events: none;
}

.scene-card::before {
  content: "";
  position: absolute;
  right: 16px;
  top: 14px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(241, 106, 93, 0.32), rgba(241, 106, 93, 0));
  filter: blur(0.2px);
}

.scene-card::after {
  content: "";
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 14px;
  height: 4px;
  border-radius: 99px;
  background: linear-gradient(to right, var(--accent-coral), var(--accent-gold));
  opacity: 0.72;
}

.scene-card h2 {
  font-size: clamp(1.45rem, 4vw, 2rem);
}

.scene-card p {
  margin: 12px 0 0;
  font-size: 1.04rem;
  line-height: 1.45;
  max-width: 45ch;
}

.scene-card.is-active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.cta {
  margin-top: 16px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--accent-coral), #f98b57);
  color: #fff;
  padding: 12px 20px;
  font: 700 0.98rem/1 "Manrope", "Segoe UI", sans-serif;
  letter-spacing: 0.02em;
  cursor: pointer;
}

.cta-alt {
  background: linear-gradient(120deg, var(--accent-teal), #2ea4a2);
}

.finale {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  margin: 0;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: #0b3d91;
  overflow: hidden;
  z-index: 80;
}

.surprise-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: center center;
}

.video-tint {
  position: absolute;
  inset: 0;
  background: linear-gradient(130deg, rgba(6, 29, 90, 0.3), rgba(5, 85, 183, 0.36), rgba(6, 29, 90, 0.4));
  background-size: 180% 180%;
  animation: tintDrift 9s ease-in-out infinite;
}

.scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.06) 0,
    rgba(255, 255, 255, 0.06) 1px,
    rgba(0, 0, 0, 0.02) 1px,
    rgba(0, 0, 0, 0.02) 3px
  );
  mix-blend-mode: soft-light;
  opacity: 0.45;
  pointer-events: none;
}

.xp-desktop {
  position: relative;
  z-index: 3;
  width: 100%;
  height: 100%;
  padding: 14px 12px 54px;
}

.xp-desktop::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 8%, rgba(255, 255, 255, 0.16), transparent 38%);
  pointer-events: none;
}

.xp-photo-strip {
  position: absolute;
  right: 14px;
  top: 10px;
  z-index: 11;
  display: flex;
  gap: 8px;
}

.xp-mini-photo {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 8px 14px rgba(7, 28, 66, 0.45);
  animation: photoFloat 2.2s ease-in-out infinite;
}

.xp-mini-photo:nth-child(2) {
  animation-delay: 0.2s;
}

.xp-boot {
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  width: min(420px, calc(100vw - 24px));
  border: 2px solid #0a2f95;
  background: rgba(236, 233, 216, 0.95);
  box-shadow: 0 18px 40px rgba(5, 22, 66, 0.46);
  border-radius: 10px;
  z-index: 20;
}

.xp-boot p {
  margin: 0;
  padding: 18px 14px;
  color: #0a2f95;
  text-align: center;
  font: 700 1rem/1.2 Tahoma, "Segoe UI", sans-serif;
}

.desktop-icons {
  position: relative;
  z-index: 8;
}

.desktop-icon {
  width: min(390px, calc(100vw - 28px));
  min-height: 98px;
  border: 2px solid rgba(255, 255, 255, 0.7);
  border-radius: 14px;
  background: linear-gradient(to bottom, rgba(58, 131, 230, 0.93), rgba(22, 83, 178, 0.93));
  box-shadow: 0 14px 24px rgba(5, 22, 66, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  color: #fff;
  padding: 12px;
  display: grid;
  grid-template-columns: 56px 1fr;
  grid-template-rows: auto auto;
  column-gap: 10px;
  row-gap: 4px;
  align-items: center;
  text-align: left;
  cursor: pointer;
}

.person-launch {
  animation: giftPulse 1.1s ease-in-out infinite;
}

.desktop-icon.is-used {
  animation: none;
  opacity: 0.85;
}

.icon-avatar {
  grid-row: 1 / span 2;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid #fff;
  display: inline-grid;
  place-items: center;
  background: linear-gradient(to bottom, #66d06b, #2f9b3c);
  font: 700 1.5rem/1 Tahoma, "Segoe UI", sans-serif;
}

.icon-label {
  font: 700 1.14rem/1.2 Tahoma, "Segoe UI", sans-serif;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.icon-sub {
  font: 600 0.78rem/1.2 "Manrope", "Segoe UI", sans-serif;
  opacity: 0.92;
}

.typed-thanks {
  position: absolute;
  top: 124px;
  left: 16px;
  right: 16px;
  min-height: 24px;
  margin: 0;
  color: #fff;
  font: 700 1rem/1.3 "Manrope", "Segoe UI", sans-serif;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
  z-index: 9;
}

.typed-thanks::after {
  content: "|";
  margin-left: 2px;
  opacity: 0.95;
  animation: cursorBlink 0.85s steps(1, end) infinite;
}

.error-counter {
  position: absolute;
  top: 158px;
  left: 16px;
  margin: 0;
  color: #d8e8ff;
  font: 600 0.9rem/1.2 "Manrope", "Segoe UI", sans-serif;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
  z-index: 9;
}

.error-field {
  position: absolute;
  inset: 190px 0 48px;
  pointer-events: none;
  z-index: 10;
}

.xp-error {
  position: absolute;
  width: min(286px, calc(100vw - 18px));
  border: 2px solid #0a2f95;
  box-shadow: 0 14px 26px rgba(10, 47, 149, 0.56);
  background: rgba(236, 233, 216, 0.97);
  backdrop-filter: blur(1px);
}

.xp-error-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(to right, #0058ee, #2e8dff);
  color: #fff;
  padding: 5px 7px;
  font: 700 0.77rem/1.2 Tahoma, "Segoe UI", sans-serif;
}

.xp-error-title p {
  margin: 0;
}

.xp-error-title span {
  background: #d84b37;
  border: 1px solid #fff;
  width: 19px;
  height: 17px;
  display: inline-grid;
  place-items: center;
  border-radius: 2px;
  font: 700 0.72rem/1 Tahoma, "Segoe UI", sans-serif;
}

.xp-error-content {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: start;
  padding: 12px 10px 6px;
  color: #101010;
  font: 400 0.8rem/1.35 Tahoma, "Segoe UI", sans-serif;
}

.xp-error-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: #ffd500;
  border: 1px solid #997e00;
  font: 700 0.86rem/1 Tahoma, "Segoe UI", sans-serif;
}

.xp-error-content p {
  margin: 0;
}

.xp-error-actions {
  padding: 0 10px 9px;
  text-align: right;
}

.xp-error-actions button {
  min-width: 64px;
  background: #ece9d8;
  border: 1px solid #4f4f4f;
  color: #111;
  padding: 3px 12px;
  font: 400 0.78rem/1 Tahoma, "Segoe UI", sans-serif;
  box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 #a7a7a7;
}

.wish-banner {
  position: absolute;
  left: 50%;
  top: 56%;
  transform: translate(-50%, -50%);
  width: min(560px, 92vw);
  background: rgba(255, 255, 255, 0.94);
  border: 2px solid #0a2f95;
  border-radius: 14px;
  padding: 18px 16px;
  text-align: center;
  box-shadow: 0 20px 40px rgba(7, 30, 84, 0.35);
  z-index: 14;
}

.wish-banner h2 {
  font-size: clamp(2rem, 5vw, 3rem);
}

.wish-banner p {
  margin: 12px auto 0;
  font-size: 1rem;
  max-width: 46ch;
}

.wish-by {
  margin: 8px auto 0;
  font-size: 0.86rem;
  font-weight: 700;
  color: #0b3d91;
}

.xp-taskbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 46px;
  background: linear-gradient(to bottom, #2675d9, #0f4dac);
  border-top: 2px solid #77aef5;
  display: grid;
  grid-template-columns: 88px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 0 8px;
  z-index: 15;
}

.start-btn {
  height: 34px;
  border: 1px solid #2f5f06;
  border-radius: 17px;
  background: linear-gradient(to bottom, #6bc64f, #3f9125);
  color: #fff;
  font: 700 1rem/1 Tahoma, "Segoe UI", sans-serif;
  cursor: default;
  animation: startGlow 1.8s ease-in-out infinite;
}

.task-label {
  margin: 0;
  color: #fff;
  font: 600 0.84rem/1.1 Tahoma, "Segoe UI", sans-serif;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.clock {
  margin: 0;
  min-width: 62px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 4px;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  text-align: center;
  font: 700 0.82rem/1 Tahoma, "Segoe UI", sans-serif;
}

.confetti-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 30;
}

.confetti-piece {
  position: absolute;
  width: 10px;
  height: 14px;
  border-radius: 2px;
  top: -16px;
}

@keyframes tintDrift {
  0% { background-position: 0% 40%; }
  50% { background-position: 100% 60%; }
  100% { background-position: 0% 40%; }
}

@keyframes stageAura {
  0% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.08); }
  100% { transform: rotate(360deg) scale(1); }
}

@keyframes giftPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.04); }
  100% { transform: scale(1); }
}

@keyframes cursorBlink {
  0%, 49% { opacity: 0; }
  50%, 100% { opacity: 1; }
}

@keyframes startGlow {
  0% { filter: brightness(1); }
  50% { filter: brightness(1.2); }
  100% { filter: brightness(1); }
}

@keyframes photoFloat {
  0% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
  100% { transform: translateY(0); }
}

@media (max-width: 700px) {
  body {
    padding: 0;
  }

  .bg-shape {
    display: none;
  }

  .app {
    width: 100vw;
    min-height: 100dvh;
    padding: 12px;
  }

  .intro-photos {
    gap: 8px;
  }

  .mini-photo {
    width: 50px;
    height: 50px;
    border-radius: 12px;
  }

  .stage {
    margin-top: 14px;
    border-radius: 18px;
    padding: 16px;
    min-height: calc(100dvh - 170px);
  }

  .card-stack {
    height: clamp(260px, 47vh, 380px);
  }

  .scene-card p {
    font-size: 0.98rem;
  }

  .motivation-line {
    margin-top: 10px;
    font-size: 0.9rem;
  }

  .xp-desktop {
    padding: 10px 8px 50px;
  }

  .xp-photo-strip {
    right: 8px;
    top: 8px;
    gap: 6px;
  }

  .xp-mini-photo {
    width: 42px;
    height: 42px;
    border-radius: 10px;
  }

  .desktop-icon {
    width: calc(100vw - 16px);
    min-height: 94px;
    padding: 10px;
    grid-template-columns: 50px 1fr;
  }

  .icon-avatar {
    width: 50px;
    height: 50px;
    font-size: 1.3rem;
  }

  .icon-label {
    font-size: 1rem;
  }

  .icon-sub {
    font-size: 0.72rem;
  }

  .typed-thanks {
    top: 118px;
    left: 10px;
    right: 10px;
    font-size: 0.9rem;
  }

  .error-counter {
    top: 150px;
    left: 10px;
    font-size: 0.82rem;
  }

  .error-field {
    inset: 182px 0 48px;
  }

  .wish-banner {
    width: calc(100vw - 20px);
    padding: 16px 12px;
  }

  .wish-banner p {
    font-size: 0.92rem;
  }

  .xp-taskbar {
    grid-template-columns: 80px 1fr auto;
    gap: 8px;
    padding: 0 6px;
  }

  .start-btn {
    height: 32px;
    font-size: 0.92rem;
  }

  .task-label {
    font-size: 0.76rem;
  }

  .clock {
    min-width: 56px;
    font-size: 0.76rem;
  }

  .xp-error {
    width: min(248px, calc(100vw - 12px));
  }
}
