/* ============================================================
   Play Salad Bowl — Party Pop theme
   Coral #FF5A5F · Electric Teal #00C2CB · Sun Yellow #FFC93C
   Night bg #2D2B55
   ============================================================ */

:root {
  --coral: #FF5A5F;
  --coral-dark: #E04347;
  --teal: #00C2CB;
  --teal-dark: #00A2AA;
  --yellow: #FFC93C;
  --night: #2D2B55;
  --night-2: #3A3770;
  --cream: #FFF8E7;
  --white: #FFFFFF;
  --ink: #1A1830;
  --muted: #8B88B5;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 8px 0 rgba(0,0,0,0.12);
  --shadow-soft: 0 10px 30px rgba(45,43,85,0.18);
  --font-display: 'Fredoka', 'Baloo 2', system-ui, sans-serif;
  --font-body: 'Nunito', 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--night);
  background-image:
    radial-gradient(circle at 15% 20%, rgba(255,90,95,0.18), transparent 40%),
    radial-gradient(circle at 85% 15%, rgba(0,194,203,0.18), transparent 40%),
    radial-gradient(circle at 50% 90%, rgba(255,201,60,0.12), transparent 45%);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  color: var(--white);
}

a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 960px; margin: 0 auto; padding: 0 20px; }

/* ---------- Top nav ---------- */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; max-width: 960px; margin: 0 auto;
}
.brand {
  font-family: var(--font-display); font-weight: 700; font-size: 1.5rem;
  color: var(--white); display: flex; align-items: center; gap: 8px;
}
.brand .bowl { font-size: 1.6rem; }
.nav-links { display: flex; gap: 22px; align-items: center; }
.nav-links a { color: var(--cream); font-weight: 600; font-size: 0.98rem; }

/* ---------- Buttons ---------- */
.btn {
  font-family: var(--font-display); font-weight: 600;
  font-size: 1.1rem; padding: 14px 30px; border: none;
  border-radius: var(--radius); cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
  display: inline-flex; align-items: center; gap: 10px;
}
.btn:active { transform: translateY(4px); box-shadow: none !important; }
.btn-primary { background: var(--coral); color: #fff; box-shadow: 0 6px 0 var(--coral-dark); }
.btn-primary:hover { text-decoration: none; }
.btn-teal { background: var(--teal); color: #06333a; box-shadow: 0 6px 0 var(--teal-dark); }
.btn-yellow { background: var(--yellow); color: #5c4700; box-shadow: 0 6px 0 #d6a41f; }
.btn-ghost { background: rgba(255,255,255,0.12); color: #fff; box-shadow: none; }
.btn-lg { font-size: 1.3rem; padding: 18px 44px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- Hero ---------- */
.hero { text-align: center; padding: 40px 20px 30px; }
.hero h1 { font-size: clamp(2.4rem, 6vw, 4rem); margin-bottom: 14px; }
.hero h1 .pop { color: var(--yellow); }
.hero .sub { color: var(--cream); font-size: 1.2rem; max-width: 620px; margin: 0 auto 28px; }
.hero-cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ---------- Card / panel ---------- */
.card {
  background: var(--white); color: var(--ink);
  border-radius: var(--radius); padding: 28px;
  box-shadow: var(--shadow-soft); margin: 20px 0;
}
.panel {
  background: var(--night-2); border-radius: var(--radius);
  padding: 26px; margin: 18px 0;
  border: 2px solid rgba(255,255,255,0.06);
}

/* ---------- Game stage ---------- */
.stage { min-height: 60vh; }
.hidden { display: none !important; }

.setup-grid { display: grid; gap: 16px; }
/* stop the browser from auto-scrolling when chips/Start button change height */
#screen-setup { overflow-anchor: none; }
.setup-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-weight: 700; color: var(--cream); font-size: 0.95rem; }
.field input, .field select, .field textarea {
  padding: 12px 14px; border-radius: var(--radius-sm);
  border: 2px solid rgba(255,255,255,0.14); background: rgba(255,255,255,0.06);
  color: #fff; font-family: var(--font-body); font-size: 1rem;
  width: 100%; max-width: 100%; min-width: 0;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--teal); }
.stepper { display: flex; align-items: center; gap: 12px; }
.stepper button {
  width: 42px; height: 42px; border-radius: 50%; border: none;
  background: var(--teal); color: #06333a; font-size: 1.4rem; font-weight: 700;
  cursor: pointer;
}
.stepper .val { font-family: var(--font-display); font-size: 1.6rem; color: #fff; min-width: 40px; text-align: center; }

/* word chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip {
  background: var(--yellow); color: #5c4700; padding: 6px 14px;
  border-radius: 20px; font-weight: 700; font-size: 0.9rem;
  display: inline-flex; align-items: center; gap: 6px;
}
.chip button { background: none; border: none; cursor: pointer; font-weight: 900; color: #5c4700; }

/* round banner */
.round-banner { text-align: center; margin-bottom: 18px; }
.round-tag {
  display: inline-block; background: var(--coral); color: #fff;
  padding: 6px 18px; border-radius: 20px; font-family: var(--font-display);
  font-weight: 600; letter-spacing: 0.5px; margin-bottom: 10px;
}
.round-banner h2 { font-size: 2rem; }
.round-rule { color: var(--cream); margin-top: 6px; }

/* timer + score bar */
.game-topbar {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; margin-bottom: 20px; flex-wrap: wrap;
}
.timer {
  font-family: var(--font-display); font-size: 3rem; font-weight: 700;
  color: var(--yellow); min-width: 100px; text-align: center;
}
.timer.low { color: var(--coral); animation: pulse 0.6s infinite alternate; }
@keyframes pulse { to { transform: scale(1.08); } }
.team-score {
  background: var(--night-2); border-radius: var(--radius-sm);
  padding: 10px 18px; text-align: center; flex: 1; min-width: 120px;
  border: 3px solid transparent;
}
.team-score.active { border-color: var(--teal); }
.team-score .name { color: var(--cream); font-weight: 700; font-size: 0.9rem; }
.team-score .pts { font-family: var(--font-display); font-size: 2rem; color: #fff; }

/* the word being guessed */
.word-card {
  background: var(--white); color: var(--ink); text-align: center;
  border-radius: var(--radius); padding: 50px 20px; margin: 20px 0;
  box-shadow: var(--shadow-soft);
}
.word-card .word { font-family: var(--font-display); font-size: 2.6rem; font-weight: 700; color: var(--ink); }
.word-card .remaining { color: var(--muted); font-weight: 700; margin-top: 10px; }

.action-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* scoreboard */
.final-score { text-align: center; }
.final-score .winner { font-size: 2.4rem; color: var(--yellow); margin: 14px 0; }
.score-cols { display: flex; gap: 20px; justify-content: center; margin: 24px 0; flex-wrap: wrap; }
.score-col { background: var(--night-2); border-radius: var(--radius); padding: 20px 30px; }
.score-col .big { font-family: var(--font-display); font-size: 3rem; color: #fff; }

/* ---------- Sections / content ---------- */
.section { padding: 40px 0; }
.section h2 { font-size: 2rem; text-align: center; margin-bottom: 8px; }
.section .lead { text-align: center; color: var(--cream); margin-bottom: 26px; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); gap: 18px; }
.feature { background: var(--night-2); border-radius: var(--radius); padding: 24px; }
.feature .ico { font-size: 2.2rem; }
.feature h3 { font-size: 1.25rem; margin: 10px 0 6px; }
.feature p { color: var(--cream); font-size: 0.98rem; }

.rounds-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 16px; }
.round-step { background: var(--white); color: var(--ink); border-radius: var(--radius); padding: 22px; }
.round-step .num { display:inline-block; width:36px;height:36px;line-height:36px;text-align:center; border-radius:50%; background:var(--coral); color:#fff; font-family:var(--font-display); font-weight:700; }
.round-step h3 { color: var(--ink); margin: 12px 0 6px; }

/* FAQ */
.faq details { background: var(--night-2); border-radius: var(--radius-sm); padding: 16px 20px; margin-bottom: 10px; }
.faq summary { font-family: var(--font-display); font-weight: 600; color: #fff; cursor: pointer; font-size: 1.1rem; }
.faq p { color: var(--cream); margin-top: 10px; }

/* ---------- Footer ---------- */
.footer { text-align: center; padding: 40px 20px; color: var(--muted); border-top: 1px solid rgba(255,255,255,0.08); margin-top: 40px; }
.footer a { color: var(--cream); margin: 0 10px; }

/* ---------- Highlight reel ---------- */
.hl-item { display: flex; gap: 14px; align-items: center; background: var(--night-2); border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 10px; }
.hl-ico { font-size: 1.8rem; flex-shrink: 0; }
.hl-item strong { color: #fff; font-family: var(--font-display); }
.hl-item p { color: var(--cream); margin: 2px 0 0; font-size: 0.95rem; }
.hl-words { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.hl-word { background: var(--yellow); color: #5c4700; padding: 3px 10px; border-radius: 14px; font-size: 0.82rem; font-weight: 700; }

/* ---------- Battle card modal ---------- */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.75); display: none; align-items: center; justify-content: center; z-index: 999; padding: 20px; }
.modal-overlay.open { display: flex; }
.modal-box { background: var(--night-2); border-radius: var(--radius); padding: 22px; max-width: 420px; width: 100%; text-align: center; }
.modal-box canvas, .modal-box img { max-width: 100%; border-radius: var(--radius-sm); }
.modal-close { background: none; border: none; color: var(--cream); font-size: 1.6rem; cursor: pointer; float: right; }

/* ---------- Ad slots ---------- */
.ad-slot { display: flex; justify-content: center; margin: 24px 0; min-height: 90px; }

/* word-input + Add button row: input flexes, button never shrinks/overflows */
.add-word-row { display: flex; gap: 10px; align-items: stretch; }
.add-word-row input { flex: 1 1 auto; min-width: 0; }
.add-word-row .btn { flex: 0 0 auto; white-space: nowrap; }

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  .nav-links { gap: 14px; font-size: 0.85rem; }
  .nav-links a.hide-sm { display: none; }
  .word-card .word { font-size: 2rem; }
  .timer { font-size: 2.4rem; }
  .hero h1 { font-size: 2.2rem; }
  .card { padding: 20px 16px; }
  .setup-2col { grid-template-columns: 1fr; }
  #screen-setup .btn-lg { width: 100%; }
  /* keep the Start button reachable without scrolling to the very bottom */
  #screen-setup .start-btn {
    position: sticky; bottom: 12px; z-index: 30;
    box-shadow: 0 6px 20px rgba(45,43,85,.35);
  }
  #screen-setup { padding-bottom: 8px; }
}
