/* ============================================================
   DecideJogo — Claymation / plasticine skin, Brazilian look
   Scoped to body.decidejogo so nothing else is affected.
   Soft rounded "clay" panels, warm tropical palette, Fredoka type.
   Same screens restyled: character select + game over.
   In-game view untouched (only header logo + bottom controls).
   ============================================================ */

:root {
  --cj-sky: #8fd3ec;
  --cj-sand: #f7e4b8;
  --cj-cream: #fff7e8;
  --cj-cream-edge: #e9d3a6;
  --cj-green: #1fa85a;
  --cj-green-d: #17833f;
  --cj-yellow: #ffcf33;
  --cj-blue: #2b6fd0;
  --cj-red: #e8593b;
  --cj-ink: #4a3320;          /* warm brown, clay shadow/text */
  --cj-soft: rgba(74,51,32,0.22);
}

body.decidejogo { font-family: 'Fredoka', system-ui, sans-serif; image-rendering: auto; }

/* ---- Screen background: soft tropical clay diorama, no scanlines ---- */
body.decidejogo .character-select,
body.decidejogo #resultsScreen {
  background: linear-gradient(180deg, #8fd3ec 0%, #bfe3a6 55%, #f7e4b8 100%) !important;
}
body.decidejogo .character-select::after { display: none !important; }
body.decidejogo #resultsScreen::before { background: rgba(0,0,0,0.12) !important; }

/* ---- Start screen: same diorama background as the home screen, different copy ---- */
body.decidejogo .start-screen {
  background: linear-gradient(180deg, #8fd3ec 0%, #bfe3a6 55%, #f7e4b8 100%) !important;
}
body.decidejogo .start-cta {
  font-family: 'Fredoka', sans-serif;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #fff;
  margin: 0;
  padding: 14px 28px;
  border-radius: 999px;
  background: linear-gradient(180deg, #29c06e 0%, #1fa85a 100%);
  box-shadow: 0 8px 18px rgba(0,0,0,0.18);
  text-shadow: 2px 3px 0 rgba(74,51,32,0.35);
  animation: startPulse 1.6s ease-in-out infinite;
}
body.decidejogo .start-hint {
  font-family: 'Fredoka', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--cj-ink);
  margin: 0;
  max-width: 320px;
}

@keyframes startPulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.06); }
}

@media (prefers-reduced-motion: reduce) {
  body.decidejogo .start-cta { animation: none; }
}

/* ---- Loading ---- */
body.decidejogo .loading-screen { background: linear-gradient(180deg, #8fd3ec, #bfe3a6 60%, #f7e4b8); }
body.decidejogo .loading-title { font-family: 'Fredoka', sans-serif; color: #fff; text-shadow: 2px 3px 0 var(--cj-soft); }
body.decidejogo .loading-progress-bar { background: var(--cj-green) !important; }
body.decidejogo .loading-text, body.decidejogo .loading-percentage { font-family: 'Fredoka', sans-serif; color: var(--cj-ink); }

/* ---- Header (clay green band with rounded bottom) ---- */
body.decidejogo .character-select-header {
  background: linear-gradient(180deg, #29c06e 0%, #1fa85a 100%) !important;
  border-radius: 0 0 26px 26px !important;
  box-shadow: 0 8px 18px rgba(0,0,0,0.18);
  padding: 10px 15px 12px !important;
}
body.decidejogo .character-select-header .brand-logo-horizontal { max-width: 120px !important; margin-bottom: 4px !important; }
body.decidejogo .select-title {
  font-family: 'Fredoka', sans-serif !important;
  font-weight: 700 !important;
  font-size: 30px !important;
  letter-spacing: 0.5px !important;
  color: #fff !important;
  text-shadow: 2px 3px 0 rgba(74,51,32,0.35), 0 3px 6px rgba(0,0,0,0.15) !important;
}
body.decidejogo .select-slogan {
  font-family: 'Fredoka', sans-serif !important;
  font-size: 12px !important; font-weight: 500 !important;
  color: #eafff2 !important; letter-spacing: 0.5px !important; text-transform: none !important;
  margin: 4px 0 0 0 !important;
}

/* ---- Instructions + scoreboard ---- */
body.decidejogo .selection-instructions { margin: 8px 0 4px !important; }
body.decidejogo .selection-text {
  font-family: 'Fredoka', sans-serif !important;
  font-size: 13px !important; font-weight: 600 !important;
  color: var(--cj-ink) !important; text-transform: none !important; letter-spacing: 0 !important;
}
body.decidejogo .total-nacional {
  font-family: 'Fredoka', sans-serif !important;
  background: var(--cj-cream) !important;
  color: var(--cj-green-d) !important;
  border: none !important;
  border-radius: 999px !important;
  box-shadow: 0 4px 0 var(--cj-cream-edge), 0 8px 14px rgba(0,0,0,0.12) !important;
  padding: 8px 18px !important;
  margin: 6px auto 4px !important;
  font-weight: 600 !important;
}

/* ============================================================
   Roster grid — compact so all candidates show without scrolling
   ============================================================ */
body.decidejogo .character-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)) !important;
  gap: 12px !important;
  max-width: 900px !important;
  width: 100% !important;
  padding: 8px 16px 20px !important;
  margin-top: 6px !important;
}
@media (max-width: 520px) {
  body.decidejogo .character-grid { grid-template-columns: repeat(3, 1fr) !important; gap: 9px !important; }
}
body.decidejogo .character-select { padding-top: 12px !important; padding-bottom: 14px !important; }

/* --- Clay candidate tile --- */
body.decidejogo .character-card,
body.decidejogo .character-card:nth-child(1),
body.decidejogo .character-card:nth-child(2),
body.decidejogo .character-card:nth-child(n+3) {
  flex-direction: column !important;
  align-items: stretch !important;
  padding: 0 !important;
  gap: 0 !important;
  min-height: 0 !important;
  max-height: none !important;
  background: var(--cj-cream) !important;
  border-radius: 20px !important;
  overflow: hidden !important;
  box-shadow: 0 5px 0 var(--cj-cream-edge), 0 12px 20px rgba(0,0,0,0.18) !important;
  transition: transform 0.12s ease, box-shadow 0.12s ease !important;
}
body.decidejogo .character-card:hover,
body.decidejogo .character-card:focus {
  transform: translateY(-5px) !important;
  outline: none !important;
  box-shadow: 0 7px 0 var(--cj-yellow), 0 16px 26px rgba(0,0,0,0.24) !important;
}
body.decidejogo .character-card:active { transform: translateY(-1px) scale(0.98) !important; }

/* --- Big clay face --- */
body.decidejogo .character-preview,
body.decidejogo .character-card:nth-child(n+3) .character-preview {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 1 / 1 !important;
  min-height: 0 !important;
  max-height: none !important;
  image-rendering: auto !important;
  object-fit: cover !important;
  background: radial-gradient(circle at 50% 35%, #cfeee0 0%, #a9d9c4 100%) !important;
  border-bottom: 3px solid var(--cj-cream-edge) !important;
  border-radius: 0 !important;
}

/* --- Name + party plate --- */
body.decidejogo .character-info {
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  padding: 7px 4px 9px !important;
  background: var(--cj-cream) !important;
}
body.decidejogo .character-name-container { align-items: center !important; flex: none !important; gap: 4px !important; }
body.decidejogo .character-name,
body.decidejogo .character-card:nth-child(1) .character-name,
body.decidejogo .character-card:nth-child(2) .character-name {
  font-family: 'Fredoka', sans-serif !important;
  text-align: center !important;
  font-size: 13px !important; font-weight: 600 !important;
  color: var(--cj-ink) !important; letter-spacing: 0 !important; text-shadow: none !important;
}
body.decidejogo .character-party,
body.decidejogo .character-card:nth-child(1) .character-party,
body.decidejogo .character-card:nth-child(2) .character-party {
  font-family: 'Fredoka', sans-serif !important;
  text-align: center !important;
  font-size: 9px !important; font-weight: 600 !important;
  color: #fff !important;
  background: var(--cj-green) !important;
  border: none !important;
  padding: 2px 9px !important;
  border-radius: 999px !important;
  box-shadow: 0 2px 0 var(--cj-green-d) !important;
}

/* ============================================================
   GAME OVER / results — clay language
   ============================================================ */
body.decidejogo .results-game-over-text {
  font-family: 'Fredoka', sans-serif !important;
  color: var(--cj-red) !important;
  font-size: 44px !important; font-weight: 700 !important; letter-spacing: 1px !important;
  text-shadow: 3px 4px 0 rgba(74,51,32,0.3), 0 4px 10px rgba(0,0,0,0.15) !important;
}
@media (max-width: 520px) { body.decidejogo .results-game-over-text { font-size: 30px !important; } }

body.decidejogo .results-character-container {
  background: radial-gradient(circle at 50% 35%, #ffffff 0%, #ffe9c2 100%) !important;
  border: none !important;
  border-radius: 28px !important;
  box-shadow: 0 8px 0 var(--cj-cream-edge), 0 16px 28px rgba(0,0,0,0.2) !important;
  padding: 12px 26px !important;
  width: auto !important; max-width: 90%; margin: 0 auto !important;
}
body.decidejogo .results-character-image { max-height: 240px !important; image-rendering: auto !important; filter: drop-shadow(3px 6px 4px rgba(0,0,0,0.25)); }

body.decidejogo .results-score-text { font-family: 'Fredoka', sans-serif !important; color: var(--cj-green-d) !important; }
body.decidejogo .results-motivational-text { font-family: 'Fredoka', sans-serif !important; color: #5a6b3a !important; }
body.decidejogo .results-question-text { font-family: 'Fredoka', sans-serif !important; color: var(--cj-ink) !important; }
body.decidejogo .results-share-text { font-family: 'Fredoka', sans-serif !important; color: #5a4a34 !important; }

/* --- Clay pill buttons --- */
body.decidejogo .results-btn {
  font-family: 'Fredoka', sans-serif !important;
  font-weight: 600 !important;
  border: none !important;
  border-radius: 999px !important;
  color: #fff !important;
  box-shadow: 0 5px 0 rgba(0,0,0,0.22) !important;
  transition: transform 0.08s ease, box-shadow 0.08s ease !important;
}
body.decidejogo .play-again-btn { background: var(--cj-green) !important; }
body.decidejogo .home-btn { background: var(--cj-blue) !important; }
body.decidejogo .results-btn:hover { transform: translateY(-2px) !important; box-shadow: 0 7px 0 rgba(0,0,0,0.22) !important; }
body.decidejogo .results-btn:active { transform: translateY(3px) !important; box-shadow: 0 2px 0 rgba(0,0,0,0.22) !important; }

/* pause menu clay buttons */
body.decidejogo .pause-title { font-family: 'Fredoka', sans-serif !important; }
body.decidejogo .pause-btn { font-family: 'Fredoka', sans-serif !important; border-radius: 999px !important; }

/* ============================================================
   In-game: show DecideJogo logo (with a soft pill for contrast on sky)
   ============================================================ */
body.decidejogo .game-header.game-header-logo {
  display: flex !important;
  justify-content: center !important;
  align-items: flex-start !important;
  padding: 12px 15px 8px !important;
}
body.decidejogo .game-header.game-header-logo .brand-logo-horizontal {
  max-width: 150px !important;
  background: rgba(31,168,90,0.85);
  border-radius: 0 0 18px 18px;
  padding: 8px 16px 10px;
  box-shadow: 0 5px 12px rgba(0,0,0,0.2);
}

/* ---- Pause + volume together at the bottom (clay round buttons) ---- */
body.decidejogo .mute-btn-game-bottom,
body.decidejogo .pause-btn-game-top {
  position: absolute !important;
  top: auto !important;
  bottom: 14px !important;
  width: 50px !important;
  height: 50px !important;
  min-width: 50px !important;
  min-height: 50px !important;
  padding: 9px !important;
  background: var(--cj-green) !important;
  border: none !important;
  border-radius: 999px !important;
  box-shadow: 0 4px 0 var(--cj-green-d), 0 6px 12px rgba(0,0,0,0.25) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
body.decidejogo .mute-btn-game-bottom { right: 14px !important; }
body.decidejogo .pause-btn-game-top   { right: 78px !important; }
body.decidejogo .mute-btn-game-bottom img,
body.decidejogo .pause-btn-game-top img { width: 24px !important; height: 24px !important; }

/* ---- In-game HUD text ----
   styles.css styles .status with 'Press Start 2P', which this build never loads,
   so it fell back to the browser serif. The canvas HUD is handled by
   canvasFont() in js/constants.js — this covers the one HTML text in-game. */
body.decidejogo .status {
  font-family: 'Fredoka', system-ui, sans-serif !important;
  font-weight: 600 !important;
  letter-spacing: 1px !important;
  text-shadow: 2px 3px 0 rgba(74,51,32,0.45) !important;
}
