@import url('https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,opsz,wght@0,6..12,300..1000;1,6..12,300..1000&display=swap');
/* ============================================================
   CONTEXTO — site theme (colours, borders, shadows, shared components)
   Loaded AFTER home.css / unlimited.css / navbar.css / battle.css.
   Page-specific panels and modal headers live in panels.css.
   ============================================================ */

:root {
  --ink: #140c08;                 /* near-black used for borders + hard shadows */
  --gold-top: #fff6b0;
  --gold-bottom: #f9d548;

  --bg: #f5ecd0;
  --card-bg: #ffffff;
  --card-alt: #fbe9a8;
  --tint-yellow: #fbe38a;
  --tint-gold: #fff3b8;
  --box-bg: #fff8dc;
  --modal-bg: #fffaf0;
  --modal-header-bg: #f5d76e;
  --pill-bg: #fbe9a8;

  --text-primary: #140c08;
  --text-secondary: #5c4a32;
  --text-muted: #8a7a62;
  --yellow-text: #140c08;

  --border-subtle: rgba(20, 12, 8, 0.15);
  --border-strong: #140c08;
  --overlay-hover: rgba(20, 12, 8, 0.08);
  --overlay-hover-soft: rgba(20, 12, 8, 0.05);

  --navbar-bg: #f9d548;
  --accent: #f9d548;
  --accent-hover: #f6c630;
  --accent-soft: rgba(249, 213, 72, 0.3);
  --archive-available: #fff3b8;

  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 8px;

  --shadow-xs: 0 1px 0 rgba(20, 12, 8, 0.4);
  --shadow-sm: 3px 3px 0 var(--ink);
  --shadow-md: 4px 4px 0 var(--ink);
  --shadow-lg: 6px 6px 0 var(--ink);
  --shadow-xl: 6px 6px 0 var(--ink);
  --shadow-modal: 8px 8px 0 var(--ink);
  --shadow-inset-top: 0 0 0 transparent;
  --modal-highlight-line: transparent;
  --navbar-height: 3rem;
}

body.dark-mode {
  --bg: #262c38;
  --card-bg: #111a22;
  --card-alt: #2f3747;
  --tint-yellow: #2c3444;
  --tint-gold: #1d2530;
  --box-bg: #1a232d;
  --modal-bg: #141d27;
  --modal-header-bg: #232c3a;
  --pill-bg: #2f3747;

  --text-primary: #f7eed3;
  --text-secondary: #b9b09a;
  --text-muted: #8791a3;
  --yellow-text: #140c08;

  --border-subtle: rgba(247, 238, 211, 0.14);
  --border-strong: #000000;
  --overlay-hover: rgba(247, 238, 211, 0.1);
  --overlay-hover-soft: rgba(247, 238, 211, 0.07);

  --navbar-bg: #323a4b;
  --accent: #f9d548;
  --accent-hover: #f6c630;
  --accent-soft: rgba(249, 213, 72, 0.2);
  --archive-available: #1d2530;

  --ink: #000000;
  --shadow-xs: 0 1px 0 rgba(0, 0, 0, 0.6);
  --shadow-sm: 3px 3px 0 #000;
  --shadow-md: 4px 4px 0 #000;
  --shadow-lg: 6px 6px 0 #000;
  --shadow-xl: 6px 6px 0 #000;
  --shadow-modal: 8px 8px 0 #000;
  --shadow-inset-top: 0 0 0 transparent;
  --modal-highlight-line: transparent;
}

body { background: var(--bg); color: var(--text-primary); }

/* ---------- 3D panels ---------- */
.info-card,
.win-card,
.other-games-card,
.stat-box,
.rating-section {
  border: 3px solid var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: 6px 6px 0 var(--ink);
}
.info-card { background: var(--card-bg); }

.modal-content,
.mode-modal-content {
  background: var(--modal-bg);
  border: 3px solid var(--ink);
  border-radius: var(--radius-lg);
}
.modal-content::before { display: none; }
/* click-open modals have no outer shadow (inner shadows stay) */
html body .modal-content,
html body .mode-modal-content,
html body .launch-modal-content { box-shadow: none; }

.dropdown-content {
  border: 3px solid var(--ink);
  border-radius: var(--radius-md);
  box-shadow: 4px 4px 0 var(--ink);
}

.game-card,
.other-game-item,
.closest-word-item {
  border: 2px solid var(--ink);
  border-radius: var(--radius-md);
  box-shadow: 3px 3px 0 var(--ink);
}
.game-card:hover,
.other-game-item:hover {
  transform: translate(-1px, -2px);
  border-color: var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
}

/* ---------- Guess input (the "guess bar") ---------- */
.guess-wrapper {
  background: var(--card-bg);
  border: 3px solid var(--ink);
  border-radius: 14px;
  box-shadow: 5px 5px 0 var(--ink);
  padding: 0.3rem 0.35rem 0.3rem 0;   /* room between the Guess button and the bar's border */
}
body.dark-mode .guess-wrapper { border-color: var(--ink); }
.guess-btn { padding: 0.3rem 0.9rem; }
.guess-wrapper:focus-within { transform: translate(-1px, -1px); box-shadow: 6px 6px 0 var(--ink); }

/* ---------- Result rows (guess bars) ---------- */
.card {
  background: var(--card-bg);
  border: 2px solid var(--ink);
  border-radius: 12px;
  box-shadow: 3px 3px 0 var(--ink);
  margin-bottom: 0.55rem;
}
.card:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.card .result-fill {
  border-radius: 9px 0 0 9px;
  /* soft top-light gives the bar a slightly raised, 3D look */
  background-image: linear-gradient(rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0) 55%, rgba(0, 0, 0, 0.1));
}
.card .result-fill[style*="width: 100%"],
.card .result-fill[style*="width:100%"] { border-radius: 9px; }
.card .word, .card .rank { text-shadow: none; }
.highlight { border: 3px solid var(--ink); }

/* ---------- Chunky 3D yellow buttons ---------- */
.guess-btn,
body.dark-mode .guess-btn,
.create-game-submit-btn,
.closest-words-btn,
.stats-signin-btn,
.copy-link-btn,
.hint-btn,
.bottom-action-btn {
  background: linear-gradient(var(--gold-top), var(--gold-bottom));
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 10px;
  box-shadow: 0 3px 0 var(--ink);
  font-weight: 900;
  transform: none;
}
body.dark-mode .create-game-submit-btn,
body.dark-mode .stats-signin-btn,
body.dark-mode .copy-link-btn {
  background: linear-gradient(var(--gold-top), var(--gold-bottom));
  color: var(--ink);
}
.guess-btn:hover:not(.disabled),
.create-game-submit-btn:hover:not(:disabled),
.closest-words-btn:hover,
.stats-signin-btn:hover,
.copy-link-btn:hover,
.hint-btn:hover,
.bottom-action-btn:hover {
  background: linear-gradient(#fffbd0, #fbdc62);
  transform: translateY(-2px);
  box-shadow: 0 5px 0 var(--ink);
}
.guess-btn:active,
.create-game-submit-btn:active,
.closest-words-btn:active,
.stats-signin-btn:active,
.copy-link-btn:active,
.hint-btn:active,
.bottom-action-btn:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--ink);
}

/* ---------- Form fields ---------- */
.create-game-input,
.game-link-input {
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: var(--card-bg);
  color: var(--text-primary);
}

/* ---------- Calendar / archive ---------- */
.calendar-day { border-radius: 8px; }
.calendar-day.available { background: var(--tint-gold); }

/* ---------- Mobile bottom ad strip ---------- */
@media (max-width: 600px) {
  .mobile-bottom-banner-container { background: rgba(245, 236, 208, 0.85); }
  body.dark-mode .mobile-bottom-banner-container { background: rgba(38, 44, 56, 0.85); }
}

/* ---------- Battle page bits ---------- */
.battle-matchup-vs { background: var(--accent); border: 2px solid var(--ink); }

/* ---------- Smaller shadows on phones so nothing is clipped ---------- */
@media (max-width: 600px) {
  .info-card, .win-card, .other-games-card, .stat-box, .rating-section { box-shadow: 4px 4px 0 var(--ink); }
  .guess-wrapper { box-shadow: 4px 4px 0 var(--ink); }
}

/* ============================================================
   MODE TABS (Daily / Unlimited / Battle) — compact
   ============================================================ */
.mode-tabs { display: flex; align-items: center; gap: 0.15rem; margin: 0 0 0.6rem; }
.mode-tab {
  padding: 0.3rem 0.75rem;
  border-radius: 9px;
  font-weight: 800;
  font-size: 0.9rem;
  line-height: 1.2;
  color: var(--text-primary);
  text-decoration: none;
  border: 2px solid transparent;
  transition: background var(--transition-fast);
}
.mode-tab:hover { background: var(--overlay-hover); }
.mode-tab.active { background: #140c08; color: #fff8e1; box-shadow: 0 2px 0 rgba(0, 0, 0, 0.3); }
body.dark-mode .mode-tab.active { background: #fff; color: #140c08; box-shadow: 0 2px 0 #000; }
.mode-tab.active:hover { background: #140c08; }
body.dark-mode .mode-tab.active:hover { background: #fff; }

/* ============================================================
   GAME BAR — [calendar GAME #n] [eye GUESSES] ......... [Hint] [Give Up]   (always one row)
   ============================================================ */
.game-bar {
  font-size: 0.72rem;
  font-weight: 800;
  margin: 0 0 0.8rem;
  gap: 0.65rem;
  flex-wrap: nowrap;
}
.game-bar > span { flex: 0 0 auto; text-align: left; display: inline-flex; align-items: center; gap: 0.3rem; white-space: nowrap; }
.game-bar > span:first-child::before,
#guesses-submitted::before {
  content: "";
  width: 0.9rem; height: 0.9rem; flex-shrink: 0;
  background: currentColor;
  -webkit-mask: var(--bar-icon) center / contain no-repeat;
  mask: var(--bar-icon) center / contain no-repeat;
}
.game-bar > span:first-child {
  --bar-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4.5' width='18' height='16' rx='2'/%3E%3Cpath d='M3 9.5h18M8 2.5v4M16 2.5v4'/%3E%3C/svg%3E");
}
#guesses-submitted {
  --bar-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M12 5C6.5 5 2.7 9 1 12c1.7 3 5.5 7 11 7s9.3-4 11-7c-1.7-3-5.5-7-11-7zm0 11.5a4.5 4.5 0 110-9 4.5 4.5 0 010 9zm0-7a2.5 2.5 0 100 5 2.5 2.5 0 000-5z'/%3E%3C/svg%3E");
  padding: 0;
  background: none;
  color: inherit;
}
.bar-actions { display: flex; align-items: center; gap: 0.2rem; margin-left: auto; }
/* Hint / Give Up: padded hover box, cancelled out by the negative margin so the layout doesn't move */
.bar-btn {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.4rem 0.65rem;
  margin: -0.22rem -0.25rem;
  border-radius: 10px;
  color: var(--text-primary);
  font-weight: 800;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--transition-fast);
}
.bar-btn:hover { background: var(--overlay-hover); }
.bar-btn i { font-size: 0.75rem; }
.game-bar > .dropdown { flex: 0 0 auto; }
.game-bar .menu-button { width: 1.8rem; height: 1.8rem; }
.game-bar.game-over > span, .game-bar.game-pending > span,
.game-bar.game-over #guesses-submitted, .game-bar.game-pending #guesses-submitted,
.game-bar.game-over .bar-actions, .game-bar.game-pending .bar-actions { display: none; }
.game-bar.game-over > .dropdown { margin-left: auto; }
@media (max-width: 480px) {
  .game-bar { gap: 0.35rem; }
  .game-bar > span { gap: 0.2rem; }
  .bar-actions { gap: 0; }
  .bar-btn { padding: 0.35rem 0.45rem; margin: -0.2rem; gap: 0.2rem; letter-spacing: 0; }
  .bar-btn i { font-size: 0.76rem; }
}

/* ---------- Mode row: tabs on the left, menu on the right ---------- */
.mode-row { display: flex; align-items: center; justify-content: space-between; margin: 0 0 0.8rem; }
.mode-row .mode-tabs { margin: 0; }
.mode-row .menu-button { width: 1.9rem; height: 1.9rem; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; font-size: 1.1rem; line-height: 1; }
.mode-row .dropdown-content { top: 100%; margin-top: 0.35rem; }
/* nothing left to show in the info bar once the game is over */
.game-bar.game-over, .game-bar.game-pending { display: none; }

/* ---------- Win screen: Closest Words / Play Archive / Play Again share one 3D style ---------- */
.wins-previous-games,
.wins-new-game-btn {
  background: linear-gradient(var(--gold-top), var(--gold-bottom));
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 10px;
  box-shadow: 0 3px 0 var(--ink);
  font-weight: 900;
  font-size: 1rem;
  padding: 0.45rem 1rem;
}
.wins-previous-games:hover,
.wins-new-game-btn:hover {
  background: linear-gradient(#fffbd0, #fbdc62);
  transform: translateY(-2px);
  box-shadow: 0 5px 0 var(--ink);
}
.wins-previous-games:active,
.wins-new-game-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.win-card #closest-words-section.hidden { display: none; }

/* ---------- Win card: even vertical rhythm ---------- */
.win-card { display: flex; flex-direction: column; align-items: center; gap: 0.9rem; }
.win-card > * { margin: 0; }
.win-card h2, .win-card p { margin: 0; }
.win-card .next-game-timer { padding: 0; }
.win-card .timer-title { margin-bottom: 0.3rem; }
.win-card .wins-previous-games,
.win-card .wins-new-game-btn,
.win-card #closest-words-section,
.win-card .play-again-section { margin: 0; }
/* guess-colour squares + count: block centred horizontally, count right next to its squares */
.win-card .guess-distribution { display: flex; justify-content: center; margin: 0; padding: 0; width: 100%; }
.win-card .distribution-container { width: fit-content; max-width: none; margin: 0 auto; }
.win-card .distribution-row { width: auto; justify-content: flex-start; align-items: center; gap: 0.6rem; }
.win-card .distribution-boxes { width: auto; flex: 0 0 auto; justify-content: flex-start; }
.win-card .distribution-count { min-width: 1.5rem; text-align: left; }
.win-card .hidden, .win-card #guess-distribution[style*="display: none"] { display: none; }

/* ---------- "Your Guesses" divider under the win card ---------- */
.guesses-divider {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin: 1.4rem 0 0.4rem;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-primary);
}
.guesses-divider::before,
.guesses-divider::after { content: ""; flex: 1; height: 2px; background: var(--ink); border-radius: 2px; }
/* only while the win card is showing */
#win-screen.hidden ~ .guesses-divider { display: none; }

/* readable win title on the new card colour */
.win-card h2 { background: none; -webkit-text-fill-color: var(--text-primary); color: var(--text-primary); }

/* ---------- Unlimited: "New Game" button replaces the game number ---------- */
.bar-new-game {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.22rem 0.7rem;
  background: linear-gradient(var(--gold-top), var(--gold-bottom));
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 9px;
  box-shadow: 0 2px 0 var(--ink);
  font-family: var(--font);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
}
.bar-new-game:hover { background: linear-gradient(#fffbd0, #fbdc62); transform: translateY(-1px); box-shadow: 0 3px 0 var(--ink); }
.bar-new-game:active { transform: translateY(1px); box-shadow: 0 1px 0 var(--ink); }
.bar-new-game i { font-size: 0.7rem; }
.game-bar.game-over > .bar-new-game, .game-bar.game-pending > .bar-new-game { display: none; }
@media (max-width: 480px) { .bar-new-game { font-size: 0.66rem; padding: 0.18rem 0.5rem; } }

/* ---------- Confirmation modals (Give up / New game): 3D buttons ---------- */
.confirm-actions { display: flex; justify-content: center; gap: 0.8rem; margin-top: 1.4rem; }
.giveup-btn,
body.dark-mode .giveup-btn {
  margin-top: 0;
  min-width: 5rem;
  padding: 0.45rem 1.2rem;
  background: linear-gradient(var(--gold-top), var(--gold-bottom));
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 10px;
  box-shadow: 0 3px 0 var(--ink);
  font-weight: 900;
}
.giveup-btn:hover,
body.dark-mode .giveup-btn:hover { background: linear-gradient(#fffbd0, #fbdc62); transform: translateY(-2px); box-shadow: 0 5px 0 var(--ink); }
.giveup-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
#newgame-no-btn, #giveup-no-btn,
body.dark-mode #newgame-no-btn, body.dark-mode #giveup-no-btn { background: var(--card-bg); color: var(--text-primary); }

/* ---------- Battle: menu sits in the mode row, no big header ---------- */
.mode-row .header-controls { position: static; display: flex; align-items: center; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* ---------- Latest guess: bold word + a left-pointing arrow just outside the bar's right end ---------- */
.card.highlight { overflow: visible; }
.card.highlight .word { font-weight: 900; }
.card.highlight::after {
  content: "\f0a8";                       /* Font Awesome: circle-arrow-left */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  right: -1.95rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.3rem;
  line-height: 1;
  color: var(--text-primary);
}
@media (max-width: 600px) {
  .card.highlight::after { right: -1.6rem; font-size: 1.1rem; }
}

#input-section { margin-bottom: 0.9rem; }

/* ---------- Footer + .info-block: black in light AND dark; "© 2025-2026 NVS Games · Privacy Policy" ---------- */
html body .info-block,
html body footer {
  --text-primary: #f7eed3;
  --text-secondary: #b9b09a;
  background: #000;
  color: #f7eed3;
}
html body footer { padding: 1.1rem 1rem; border-top: 0; }
html body .info-block-header,
html body .info-block-rules { color: #f7eed3; }
html body .info-block-rules a { color: #f9d548; text-decoration: underline; }
.footer-links { margin-top: 0; font-size: 0.95rem; }
html body .footer-links .footer-copy,
html body .footer-links a { color: #a39a86; font-weight: 600; }
html body .footer-links a { text-decoration: underline; }
html body .footer-links a:hover { color: #f9d548; }
html body footer .affiliation-note {
  margin: 0 auto 0.7rem;
  max-width: 34rem;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.4;
  color: #f7eed3;
}

/* rating card: no border / shadow / rounded corners (sits flush above the footer) */
html body .rating-section { border: 0; border-radius: 0; box-shadow: none; }

/* ============================================================
   PROFILE POPOVER (signed-in users) - user details, past 7 days, sign out
   ============================================================ */
.profile-pop {
  display: none;
  position: fixed;
  top: calc(var(--navbar-height) + 0.5rem);
  right: 0.75rem;
  width: min(340px, calc(100vw - 1.5rem));
  padding: 1.1rem 1.2rem 0.8rem;
  background: #000;
  color: #f7eed3;
  border: 3px solid #2a1d14;
  border-radius: 18px;
  z-index: 10000;
  font-family: var(--font);
}
.profile-pop.open { display: block; }
.pp-user { display: flex; align-items: center; gap: 0.8rem; }
.pp-avatar {
  flex: 0 0 auto;
  width: 2.8rem; height: 2.8rem; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #8b93a7; color: #fff; font-weight: 900; font-size: 1rem;
}
.pp-user-text { min-width: 0; }
.pp-name { font-weight: 900; font-size: 1.1rem; line-height: 1.2; overflow-wrap: anywhere; }
.pp-email { font-size: 0.82rem; color: #a39a86; overflow-wrap: anywhere; }
.pp-section-title {
  margin: 1.1rem 0 0.55rem;
  font-size: 0.75rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: #b9b09a;
}
.pp-days { display: flex; justify-content: space-between; gap: 0.35rem; min-height: 2.5rem; align-items: center; }
.pp-loading { font-size: 0.85rem; color: #a39a86; }
.pp-day {
  flex: 1 1 0; max-width: 2.6rem; aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: #2a1d14; color: #a39a86;
  font-weight: 900; font-size: 0.85rem;
}
.pp-day.is-completed { background: #64b6ab; color: #140c08; }
.pp-day.is-in_progress { background: #f9c935; color: #140c08; }
.pp-day.is-given_up { background: #F59069; color: #140c08; }
.pp-day.is-today { outline: 2px solid #f9c935; outline-offset: 2px; }
.pp-legend { display: flex; flex-wrap: wrap; gap: 0.3rem 0.9rem; margin-top: 0.7rem; font-size: 0.72rem; color: #a39a86; }
.pp-legend span { display: inline-flex; align-items: center; gap: 0.35rem; }
.pp-dot { width: 0.6rem; height: 0.6rem; border-radius: 50%; display: inline-block; }
.pp-dot.is-completed { background: #64b6ab; }
.pp-dot.is-in_progress { background: #f9c935; }
.pp-dot.is-given_up { background: #F59069; }
.pp-divider { height: 1px; background: rgba(247, 238, 211, 0.16); margin: 0.9rem 0 0.4rem; }
.pp-item {
  display: flex; align-items: center; gap: 0.8rem;
  padding: 0.65rem 0.4rem;
  color: #f7eed3; font-weight: 800; text-decoration: none; border-radius: 10px;
}
.pp-item i { color: #f9c935; width: 1.3rem; text-align: center; font-size: 1.1rem; }
.pp-item:hover { background: rgba(247, 238, 211, 0.08); }

/* ============================================================
   Profile popover: light theme in light mode (dark in dark mode)
   ============================================================ */
body:not(.dark-mode) .profile-pop { background: #fff; color: #140c08; border-color: #140c08; }
body:not(.dark-mode) .pp-email,
body:not(.dark-mode) .pp-section-title,
body:not(.dark-mode) .pp-loading,
body:not(.dark-mode) .pp-legend { color: #6e6450; }
body:not(.dark-mode) .pp-day.is-none { background: #efe6c8; color: #8a7a62; }
body:not(.dark-mode) .pp-day.is-today { outline-color: #140c08; }
body:not(.dark-mode) .pp-divider { background: rgba(20, 12, 8, 0.15); }
body:not(.dark-mode) .pp-item { color: #140c08; }
body:not(.dark-mode) .pp-item i { color: #140c08; }
body:not(.dark-mode) .pp-item:hover { background: rgba(20, 12, 8, 0.07); }

/* ---------- Nunito Sans for all text (icons + the navbar wordmark keep their own fonts) ---------- */
html body,
html body button,
html body input,
html body select,
html body textarea,
html body .mode-selector,
html body .timer-display { font-family: 'Nunito Sans', sans-serif; }

/* ---------- Keep the page from shifting when a modal hides/shows the scrollbar ---------- */
html { scrollbar-gutter: stable; }

/* ---------- Dark theme: guess word + rank text in white ---------- */
html body.dark-mode .card .word,
html body.dark-mode .card .rank { color: #fff; }

/* ---------- Modals sit below the navbar (their dark header bar looks like the navbar otherwise) ---------- */
html body .modal { padding-top: calc(var(--navbar-height, 68px) + 1.5rem); padding-bottom: 1.5rem; }
html body .modal .modal-content { max-height: calc(100vh - var(--navbar-height, 68px) - 3rem); }

/* ---------- Battle result: Play again / Rematch use the same 3D gold style as Closest Words ---------- */
#screen-result .battle-btn:not(.secondary):not(.danger):not(.whatsapp) {
  background: linear-gradient(var(--gold-top), var(--gold-bottom));
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 10px;
  box-shadow: 0 3px 0 var(--ink);
  font-weight: 900;
  transform: none;
}
#screen-result .battle-btn:not(.secondary):not(.danger):not(.whatsapp):hover:not(:disabled) {
  background: linear-gradient(#fffbd0, #fbdc62);
  box-shadow: 0 4px 0 var(--ink);
  transform: none;
}

/* ---------- Mobile: nothing may push the page wider than the screen ---------- */
html, body { overflow-x: clip; }

/* ---------- Mobile: tighter space between the navbar and the mode row ---------- */
@media (max-width: 600px) {
  html body .container { padding-top: 0.1rem; }
}
