:root {
  --maroon-950: #0a1220;
  --maroon-900: #121a2c;
  --maroon-800: #1a2740;
  --gold-500: #1BA9E1;
  --gold-400: #6FD3F7;
  --gold-100: #dcf3fc;
  --cream: #f2f6fb;
  --cream-dim: #a9b8cc;
  --text-dark: #0a1220;
  --text-muted: #6b7a92;
  --shadow: 0 10px 30px rgba(4, 10, 20, 0.4);
  --radius-lg: 20px;
  --radius-md: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background: radial-gradient(circle at top, #16233a 0%, var(--maroon-950) 60%);
  color: var(--cream);
  min-height: 100vh;
}

h1, h2, h3, .display {
  font-family: 'Baloo 2', sans-serif;
}

a { color: inherit; }

/* ---------- Wall page ---------- */

.wall-hero {
  padding: 40px 20px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.wall-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 10%, rgba(27,169,225,0.25), transparent 40%),
    radial-gradient(circle at 80% 0%, rgba(27,169,225,0.18), transparent 45%);
  pointer-events: none;
  animation: hero-glow-shift 9s ease-in-out infinite alternate;
}
@keyframes hero-glow-shift {
  from { opacity: 0.75; transform: translateY(0); }
  to { opacity: 1; transform: translateY(8px); }
}

.confetti-field { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.confetti-bit {
  position: absolute;
  top: -20px;
  width: 8px; height: 8px;
  border-radius: 2px;
  background: var(--gold-500);
  opacity: 0.7;
  animation: confetti-fall linear infinite;
}
.confetti-bit.c0 { left: 6%;  background: var(--gold-500); animation-duration: 7s;  animation-delay: 0s; }
.confetti-bit.c1 { left: 18%; background: #D9E6F2; animation-duration: 9s;  animation-delay: 1.2s; }
.confetti-bit.c2 { left: 32%; background: var(--gold-400); animation-duration: 6.5s; animation-delay: 2.1s; }
.confetti-bit.c3 { left: 55%; background: var(--gold-500); animation-duration: 8s;  animation-delay: 0.6s; }
.confetti-bit.c4 { left: 74%; background: #D9E6F2; animation-duration: 7.5s; animation-delay: 1.8s; }
.confetti-bit.c5 { left: 90%; background: var(--gold-400); animation-duration: 9.5s; animation-delay: 0.3s; }
@keyframes confetti-fall {
  from { transform: translateY(-20px) rotate(0deg); opacity: 0.8; }
  to   { transform: translateY(340px) rotate(340deg); opacity: 0; }
}

.wall-badge {
  display: inline-block;
  background: var(--gold-500);
  color: var(--maroon-950);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.wall-title {
  font-size: clamp(28px, 6vw, 48px);
  font-weight: 800;
  margin: 0 0 8px;
  color: var(--cream);
}

.wall-sub {
  color: var(--gold-400);
  font-size: 15px;
  margin: 0 0 22px;
}

.wall-counter {
  font-size: 14px;
  color: var(--cream-dim);
  margin-bottom: 18px;
}
.wall-counter strong { color: var(--gold-500); font-size: 18px; }

.cta-btn {
  display: inline-block;
  background: linear-gradient(135deg, var(--gold-500), #0C5C86);
  color: var(--maroon-950);
  font-weight: 700;
  font-size: 16px;
  padding: 14px 30px;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(27,169,225,0.35);
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease;
  animation: cta-pulse 2.6s ease-in-out infinite;
  position: relative;
  z-index: 1;
}
.cta-btn:active { transform: scale(0.97); }
@keyframes cta-pulse {
  0%, 100% { box-shadow: 0 8px 22px rgba(27,169,225,0.35); }
  50% { box-shadow: 0 8px 30px rgba(27,169,225,0.65); }
}

.wall-counter strong { display: inline-block; animation: count-pop 0.4s ease; }
@keyframes count-pop { from { transform: scale(0.7); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* Live ticker */
.ticker-wrap {
  overflow: hidden;
  white-space: nowrap;
  border-top: 1px solid rgba(27,169,225,0.25);
  border-bottom: 1px solid rgba(27,169,225,0.25);
  background: rgba(0,0,0,0.15);
  padding: 10px 0;
  margin-top: 24px;
}
.ticker-track {
  display: inline-flex;
  gap: 48px;
  animation: ticker-scroll 40s linear infinite;
  padding-left: 100%;
}
.ticker-item { font-size: 14px; color: var(--cream-dim); }
.ticker-item b { color: var(--gold-400); }
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}

/* The wall itself — a corkboard-like panel the sticky-note cards are pinned to */
.wall-board {
  position: relative;
  max-width: 1200px;
  margin: 18px auto 0;
  padding: 0 10px 90px;
  overflow: hidden;
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,0.035) 0 2px, transparent 2px 26px),
    #17324d;
  border-top: 1px solid rgba(111,211,247,0.4);
  border-bottom: 1px solid rgba(111,211,247,0.2);
  box-shadow: inset 0 12px 30px rgba(0,0,0,0.35);
}
.wall-board::before {
  content: "";
  position: absolute;
  inset: -10% -10%;
  background:
    radial-gradient(circle at 30% 0%, rgba(27,169,225,0.22), transparent 45%),
    radial-gradient(circle at 75% 15%, rgba(111,211,247,0.14), transparent 40%);
  animation: board-glow-drift 12s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes board-glow-drift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(3%, 4%) scale(1.06); }
}

.board-twinkles { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.twinkle {
  position: absolute;
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--gold-400);
  animation: twinkle-pulse ease-in-out infinite;
  opacity: 0.15;
}
.twinkle.t0 { top: 8%;  left: 12%; animation-duration: 3.2s; animation-delay: 0s; }
.twinkle.t1 { top: 22%; left: 34%; animation-duration: 4s;   animation-delay: 0.6s; }
.twinkle.t2 { top: 15%; left: 58%; animation-duration: 3.6s; animation-delay: 1.1s; }
.twinkle.t3 { top: 30%; left: 78%; animation-duration: 4.4s; animation-delay: 0.3s; }
.twinkle.t4 { top: 40%; left: 20%; animation-duration: 3.8s; animation-delay: 1.6s; }
.twinkle.t5 { top: 12%; left: 90%; animation-duration: 3s;   animation-delay: 0.9s; }
@keyframes twinkle-pulse {
  0%, 100% { opacity: 0.1; transform: scale(1); }
  50% { opacity: 0.9; transform: scale(1.8); }
}

.wall-board-title {
  text-align: center;
  margin: 0;
  padding: 26px 0 18px;
}
.wall-board-title span {
  display: inline-block;
  font-size: clamp(20px, 4vw, 28px);
  font-weight: 700;
  color: var(--cream);
  background: rgba(27,169,225,0.12);
  border: 1px solid rgba(27,169,225,0.4);
  padding: 8px 22px;
  border-radius: 10px;
  transform: rotate(-1.5deg);
  box-shadow: 0 6px 18px rgba(0,0,0,0.35);
}

/* Dense sticky-note-style tile wall */
.tile-wall {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 14px 10px;
  padding: 6px 6px 0;
}
@media (min-width: 700px) {
  .tile-wall { grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 20px 14px; padding: 10px 10px 0; }
}

.tile {
  aspect-ratio: 4 / 5;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0,0,0,0.4);
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px) scale(0.9) rotate(var(--r, 0deg));
  animation: tile-in 0.4s ease forwards;
  position: relative;
  transition: transform 0.25s cubic-bezier(.2,.8,.3,1.3), box-shadow 0.25s ease, z-index 0s;
  will-change: transform;
  border: 1px solid rgba(255,255,255,0.08);
}
.tile.tile-new { animation: tile-in 0.4s ease forwards, tile-flash 1.2s ease 0.4s; }
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile::before {
  content: "";
  position: absolute;
  top: -3px; left: 50%;
  width: 8px; height: 8px;
  margin-left: -4px;
  background: radial-gradient(circle at 35% 35%, #dff1fb, var(--gold-500));
  border-radius: 50%;
  box-shadow: 0 2px 3px rgba(0,0,0,0.5);
  z-index: 2;
  transition: opacity 0.2s ease;
}
.tile:hover::before { opacity: 0; }

.tile:hover {
  transform: scale(2.6) translateY(-6px) rotate(0deg);
  z-index: 5;
  box-shadow: 0 18px 40px rgba(0,0,0,0.6);
}

@keyframes tile-in {
  to { opacity: 1; transform: translateY(0) scale(1) rotate(var(--r, 0deg)); }
}
@keyframes tile-flash {
  0% { box-shadow: 0 0 0 3px var(--gold-500), 0 4px 10px rgba(0,0,0,0.4); }
  100% { box-shadow: 0 4px 10px rgba(0,0,0,0.4); }
}

.empty-wall {
  text-align: center;
  color: var(--cream-dim);
  padding: 60px 20px;
}

/* Video tribute banner — sits below the wall, closing section */
.video-banner {
  position: relative;
  max-width: 720px;
  margin: 36px auto 60px;
  aspect-ratio: 16/9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 14px 34px rgba(0,0,0,0.45);
  border: 1px solid rgba(111,211,247,0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.video-banner:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(0,0,0,0.55); }
.video-banner.playing { cursor: default; }
.video-banner.playing:hover { transform: none; box-shadow: 0 14px 34px rgba(0,0,0,0.45); }
.video-banner iframe { width: 100%; height: 100%; border: none; display: block; }
.video-banner-thumb { width: 100%; height: 100%; display: block; object-fit: cover; }
.video-banner-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px;
  background: linear-gradient(180deg, rgba(10,18,32,0.15) 0%, rgba(10,18,32,0.75) 100%);
  text-align: center;
  padding: 16px;
}
.video-play-btn {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: var(--gold-500);
  border: 3px solid rgba(255,255,255,0.85);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(27,169,225,0.5);
  cursor: pointer;
}
.video-play-btn svg { margin-left: 3px; }
.video-banner-label { color: var(--cream); font-weight: 700; font-size: 17px; }
.video-banner-tag { color: var(--cream-dim); font-size: 13px; }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(4,8,15,0.88);
  display: none;
  align-items: center; justify-content: center;
  z-index: 50;
  padding: 24px;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: min(92vw, 420px);
  max-height: 86vh;
  border-radius: var(--radius-md);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  animation: lb-in 0.25s ease;
}
@keyframes lb-in { from { transform: scale(0.9); opacity:0; } to { transform: scale(1); opacity:1; } }
.lightbox-close {
  position: absolute; top: 18px; right: 20px;
  background: rgba(255,255,255,0.12);
  border: none; color: var(--cream);
  width: 40px; height: 40px; border-radius: 50%;
  font-size: 20px; cursor: pointer;
}
.lightbox-actions {
  position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 10px;
}
.lightbox-actions button {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  color: var(--cream);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
}
.lightbox-actions button:hover { background: rgba(255,255,255,0.22); }

/* ---------- Create flow ---------- */

.create-wrap {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 18px 18px 40px;
}

.progress-dots {
  display: flex;
  gap: 6px;
  margin-bottom: 22px;
}
.progress-dots span {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: rgba(27,169,225,0.2);
}
.progress-dots span.done { background: var(--gold-500); }

.step { display: none; flex: 1; flex-direction: column; animation: step-in 0.3s ease; }
.step.active { display: flex; }
@keyframes step-in { from { opacity: 0; transform: translateX(12px); } to { opacity:1; transform: translateX(0);} }

.step h2 { font-size: 24px; margin: 0 0 6px; }
.step p.hint { color: var(--cream-dim); font-size: 14px; margin: 0 0 22px; }

label.field-label {
  display: block;
  font-size: 13px;
  color: var(--gold-400);
  font-weight: 600;
  margin: 16px 0 6px;
}

input[type=text], input[type=tel], textarea {
  width: 100%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(27,169,225,0.3);
  border-radius: var(--radius-md);
  padding: 13px 14px;
  color: var(--cream);
  font-size: 15px;
  font-family: inherit;
}
input::placeholder, textarea::placeholder { color: rgba(253,246,227,0.4); }
input:focus, textarea:focus { outline: none; border-color: var(--gold-500); }

.toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(255,255,255,0.05);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-top: 14px;
}
.toggle-row span { font-size: 14px; }

.switch { position: relative; width: 44px; height: 26px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: absolute; inset: 0; background: rgba(255,255,255,0.2);
  border-radius: 999px; cursor: pointer; transition: 0.2s;
}
.switch .slider::before {
  content: ""; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px;
  background: var(--cream); border-radius: 50%; transition: 0.2s;
}
.switch input:checked + .slider { background: var(--gold-500); }
.switch input:checked + .slider::before { transform: translateX(18px); }

.pill-group { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.pill {
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid rgba(27,169,225,0.35);
  background: rgba(255,255,255,0.05);
  color: var(--cream);
  font-size: 14px;
  cursor: pointer;
}
.pill.selected { background: var(--gold-500); color: var(--maroon-950); font-weight: 700; border-color: var(--gold-500); }

.theme-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.theme-card {
  border: 1px solid rgba(27,169,225,0.3);
  border-radius: var(--radius-md);
  padding: 14px 12px;
  cursor: pointer;
  background: rgba(255,255,255,0.04);
}
.theme-card.selected { border-color: var(--gold-500); background: rgba(27,169,225,0.15); }
.theme-card .t-name { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.theme-card .t-one { font-size: 12px; color: var(--cream-dim); line-height: 1.35; }

.photo-drop {
  border: 2px dashed rgba(27,169,225,0.4);
  border-radius: var(--radius-lg);
  padding: 30px 16px;
  text-align: center;
  color: var(--cream-dim);
  cursor: pointer;
  margin-top: 10px;
}
.photo-drop img { max-width: 140px; max-height: 140px; border-radius: 12px; margin-top: 10px; }

.quote-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.quote-option {
  border: 1px solid rgba(27,169,225,0.3);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 14px;
  cursor: pointer;
  background: rgba(255,255,255,0.04);
}
.quote-option.selected { border-color: var(--gold-500); background: rgba(27,169,225,0.15); }

.word-counter { text-align: right; font-size: 12px; color: var(--cream-dim); margin-top: 4px; }
.word-counter.over { color: #ff9d9d; }

.step-actions {
  margin-top: auto;
  display: flex; gap: 10px;
  padding-top: 22px;
}
.btn-primary {
  flex: 1;
  background: linear-gradient(135deg, var(--gold-500), #0C5C86);
  color: var(--maroon-950);
  border: none;
  border-radius: 999px;
  padding: 14px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
}
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-secondary {
  background: transparent;
  border: 1px solid rgba(27,169,225,0.4);
  color: var(--cream);
  border-radius: 999px;
  padding: 14px 18px;
  font-size: 15px;
  cursor: pointer;
}

.error-text { color: #ff9d9d; font-size: 13px; margin-top: 10px; min-height: 16px; }

/* Generating animation */
.generating-wrap { text-align: center; padding: 40px 10px; }
.card-skeleton {
  width: 200px; height: 250px; margin: 0 auto 20px;
  border-radius: var(--radius-lg);
  background: linear-gradient(120deg, rgba(27,169,225,0.08), rgba(27,169,225,0.25), rgba(27,169,225,0.08));
  background-size: 200% 100%;
  animation: shimmer 1.6s ease infinite;
  position: relative;
  border: 1px solid rgba(27,169,225,0.3);
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.generating-caption { color: var(--gold-400); font-size: 14px; min-height: 20px; }

/* Results / picker */
.result-preview { text-align: center; }
.result-preview img { width: 100%; max-width: 320px; border-radius: var(--radius-lg); box-shadow: var(--shadow); }

.attempts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.attempt-thumb { border-radius: 12px; overflow: hidden; cursor: pointer; border: 2px solid transparent; }
.attempt-thumb img { width: 100%; display: block; }
.attempt-thumb:hover { border-color: var(--gold-500); }

.report-link { font-size: 12px; color: var(--cream-dim); text-decoration: underline; cursor: pointer; }
