/* ── RESET & BASE ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --font-ui: 'Nunito', system-ui, -apple-system, sans-serif;
  /* Light theme (default) */
  --color-bg: #faf8f5;
  --color-surface: #ffffff;
  --color-surface-hover: #f5f3f0;
  --color-border: rgba(0,0,0,0.08);
  --color-text: #2d2a26;
  --color-text-muted: #6b6560;
  --color-primary: #6c5ce7;
  --color-primary-hover: #5a4bd6;
  --color-primary-light: rgba(108,92,231,0.08);
  --color-primary-btn-text: #fff;
  --color-easy: #00b894;
  --color-easy-light: rgba(0,184,148,0.08);
  --color-easy-text: #00a381;
  --color-medium: #fdcb6e;
  --color-medium-light: rgba(253,203,110,0.12);
  --color-medium-text: #c89a20;
  --color-hard: #e17055;
  --color-hard-light: rgba(225,112,85,0.08);
  --color-hard-text: #c5513a;
  --color-header-bg: rgba(250,248,245,0.92);
  --color-loading-bg: rgba(250,248,245,0.9);
  --color-ghost-hover-bg: rgba(0,0,0,0.06);
  --color-number-bg: rgba(0,0,0,0.04);
  --hero-bg: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
  --hero-btn-color: #6c5ce7;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.1);
  --footer-bg: #1e1e22;
  --footer-bottom-bg: transparent;
  --radius: 12px;
  --radius-lg: 18px;
  --t: 0.25s ease;
  --max-w: 1100px;
}

/* Dark theme */
[data-theme="dark"] {
  --color-bg: #121216;
  --color-surface: #1c1c24;
  --color-surface-hover: #24242e;
  --color-border: rgba(255,255,255,0.08);
  --color-text: #e8e6e3;
  --color-text-muted: #8a8690;
  --color-primary: #a78bfa;
  --color-primary-hover: #c4b5fd;
  --color-primary-light: rgba(167,139,250,0.12);
  --color-primary-btn-text: #1a1a2e;
  --color-easy: #34d399;
  --color-easy-light: rgba(52,211,153,0.1);
  --color-easy-text: #6ee7b7;
  --color-medium: #fbbf24;
  --color-medium-light: rgba(251,191,36,0.1);
  --color-medium-text: #fcd34d;
  --color-hard: #f87171;
  --color-hard-light: rgba(248,113,113,0.1);
  --color-hard-text: #fca5a5;
  --color-header-bg: rgba(18,18,22,0.88);
  --color-loading-bg: rgba(18,18,22,0.85);
  --color-ghost-hover-bg: rgba(255,255,255,0.06);
  --color-number-bg: rgba(255,255,255,0.04);
  --hero-bg: linear-gradient(135deg, #2e1065 0%, #4c1d95 50%, #6d28d9 100%);
  --hero-btn-color: #4c1d95;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.35);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.45);
  --footer-bg: #0d0d11;
}

html {
  scroll-behavior: smooth;
  color-scheme: light;
}
[data-theme="dark"] { color-scheme: dark; }

body {
  font-family: var(--font-ui);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  transition: background 0.35s ease, color 0.35s ease;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; color: inherit; }
img { display: block; max-width: 100%; }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ── HEADER ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-header-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--color-border);
  transition: background 0.35s ease;
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--color-primary);
}

.header-logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: contain;
  background: var(--color-primary-light);
  padding: 4px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text-muted);
  transition: background var(--t), color var(--t);
}
.nav-link:hover { background: var(--color-primary-light); color: var(--color-primary); }
.nav-link--random { color: var(--color-primary); }
.nav-link.active { background: var(--color-primary-light); color: var(--color-primary); }

/* Theme toggle */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  background: var(--color-primary-light);
  color: var(--color-primary);
  border-radius: 10px;
  transition: all var(--t);
  flex-shrink: 0;
}
.theme-toggle:hover { background: var(--color-primary); color: #fff; }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .icon-moon { display: block; }
.theme-toggle .icon-sun  { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun  { display: block; }

.header-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 6px;
}
.header-menu-btn span {
  display: block;
  width: 22px;
  height: 2.5px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform var(--t), opacity var(--t);
}
.header-menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.header-menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.header-menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ── HERO ── */
.hero {
  background: var(--hero-bg);
  color: #fff;
  text-align: center;
  padding: 4.5rem 1.25rem 4rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 80%, rgba(167,139,250,0.15) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 20%, rgba(139,92,246,0.1) 0%, transparent 50%);
  pointer-events: none;
}

/* Floating animated elements */
.hero-floats {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-float {
  position: absolute;
  left: var(--x);
  top: var(--y);
  font-size: var(--size);
  font-weight: 800;
  color: rgba(255,255,255,0.12);
  animation:
    heroFloat var(--dur) ease-in-out var(--delay) infinite,
    heroFade  var(--dur) ease-in-out var(--delay) infinite;
  will-change: transform, opacity;
  user-select: none;
  line-height: 1;
  text-shadow: 0 0 20px rgba(255,255,255,0.06);
}

.hero-float--icon {
  color: rgba(255,255,255,0.1);
  filter: grayscale(1) brightness(2);
}

@keyframes heroFloat {
  0%, 100% { transform: translateY(0) rotate(0deg) scale(1); }
  25%      { transform: translateY(-18px) rotate(8deg) scale(1.05); }
  50%      { transform: translateY(-8px) rotate(-5deg) scale(0.97); }
  75%      { transform: translateY(-22px) rotate(4deg) scale(1.03); }
}

@keyframes heroFade {
  0%, 100% { opacity: 0.4; }
  30%      { opacity: 0.85; }
  60%      { opacity: 0.5; }
  80%      { opacity: 0.9; }
}

.hero-inner { max-width: 640px; margin: 0 auto; position: relative; }

.hero-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  opacity: 0.9;
  margin-bottom: 2rem;
  font-weight: 400;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── GAME HUD (hero) ── */
.game-hud {
  margin-top: 2rem;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.game-hud-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem 1.25rem;
  max-width: 520px;
  margin: 0 auto;
}

.game-hud-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  min-width: 3.5rem;
}

.game-hud-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.85;
}

.game-hud-level {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1;
}

.game-hud-xp-block {
  flex: 1;
  min-width: 160px;
  max-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.game-hud-xp-bar {
  height: 8px;
  border-radius: 99px;
  background: rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

.game-hud-xp-fill {
  height: 100%;
  width: 0%;
  border-radius: 99px;
  background: linear-gradient(90deg, #fff, rgba(255, 255, 255, 0.85));
  transition: width 0.45s ease;
}

.game-hud-xp-text {
  font-size: 0.75rem;
  font-weight: 600;
  opacity: 0.9;
  text-align: center;
}

.hero .game-hud-btn {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
  padding: 0.45rem 0.9rem;
  font-size: 0.82rem;
}
.hero .game-hud-btn:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

/* ── GAME MODAL ── */
.game-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.game-modal[hidden] { display: none !important; }

.game-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
}

.game-modal-panel {
  position: relative;
  width: 100%;
  max-width: 420px;
  max-height: min(80vh, 560px);
  overflow: auto;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 1.25rem 1.25rem 1.5rem;
  animation: fadeIn 0.25s ease;
}

.game-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.game-modal-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--color-text);
}

.game-modal-close {
  width: 36px;
  height: 36px;
  border: none;
  background: var(--color-primary-light);
  color: var(--color-primary);
  border-radius: 10px;
  font-size: 1.5rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--t);
}
.game-modal-close:hover { background: var(--color-primary); color: #fff; }

.game-modal-hint {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

.game-achievements-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.game-achievement {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  transition: opacity var(--t), filter var(--t);
}

.game-achievement--locked {
  opacity: 0.55;
  filter: grayscale(0.4);
}

.game-achievement-icon {
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
}

.game-achievement-body {
  flex: 1;
  min-width: 0;
}

.game-achievement-name {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--color-text);
  margin-bottom: 0.15rem;
}

.game-achievement-desc {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  line-height: 1.35;
}

.game-achievement-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-primary);
  flex-shrink: 0;
  align-self: center;
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.9rem;
  border: 2px solid transparent;
  border-radius: 10px;
  padding: 0.6rem 1.25rem;
  transition: all var(--t);
  white-space: nowrap;
}

.btn--primary {
  background: var(--color-primary);
  color: var(--color-primary-btn-text);
  border-color: var(--color-primary);
}
.btn--primary:hover { background: var(--color-primary-hover); border-color: var(--color-primary-hover); }

.btn--outline {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
}
.btn--outline:hover { border-color: var(--color-primary); color: var(--color-primary); }

.btn--ghost {
  background: transparent;
  color: var(--color-text-muted);
  border: none;
  padding: 0.4rem;
  border-radius: 8px;
}
.btn--ghost:hover { background: var(--color-ghost-hover-bg); color: var(--color-text); }
.btn--ghost:disabled { opacity: 0.3; pointer-events: none; }

.btn--lg { padding: 0.85rem 1.75rem; font-size: 1rem; border-radius: 12px; }
.btn--sm { padding: 0.35rem 0.6rem; font-size: 0.85rem; }

.hero .btn--primary { background: #fff; color: var(--hero-btn-color); border-color: #fff; }
.hero .btn--primary:hover { background: rgba(255,255,255,0.9); }
.hero .btn--outline { background: transparent; color: #fff; border-color: rgba(255,255,255,0.35); }
.hero .btn--outline:hover { border-color: #fff; background: rgba(255,255,255,0.1); }

/* ── CATEGORIES ── */
.categories {
  padding: 3.5rem 0;
}

.section-title {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 2rem;
  color: var(--color-text);
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.category-card {
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--t);
  position: relative;
  overflow: hidden;
  color: var(--color-text);
}
.category-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.category-card--facil { border-color: rgba(0,184,148,0.2); }
.category-card--facil:hover { border-color: var(--color-easy); background: var(--color-easy-light); }
.category-card--media { border-color: rgba(253,203,110,0.25); }
.category-card--media:hover { border-color: var(--color-medium); background: var(--color-medium-light); }
.category-card--dificil { border-color: rgba(225,112,85,0.2); }
.category-card--dificil:hover { border-color: var(--color-hard); background: var(--color-hard-light); }

.category-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }

.category-name {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
  color: var(--color-text);
}

.category-count {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
}

.category-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  background: var(--color-primary-light);
  color: var(--color-text-muted);
}

.category-card--facil .category-tag { background: var(--color-easy-light); color: var(--color-easy-text); }
.category-card--media .category-tag { background: var(--color-medium-light); color: var(--color-medium-text); }
.category-card--dificil .category-tag { background: var(--color-hard-light); color: var(--color-hard-text); }

/* ── CHARADA SECTION ── */
.charada-section {
  padding: 2.5rem 0 4rem;
  display: none;
}
.charada-section.visible { display: block; }

.charada-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.charada-header .section-title {
  margin-bottom: 0;
  text-align: left;
  font-size: 1.3rem;
}

.charada-nav-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.charada-counter {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-muted);
  min-width: 80px;
  text-align: center;
}

/* ── VIEW TOGGLE ── */
.view-toggle {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 4px;
}

.view-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--color-text-muted);
  padding: 0.4rem 0.7rem;
  border-radius: 7px;
  font-size: 0.82rem;
  font-weight: 600;
  gap: 0.35rem;
  transition: all var(--t);
}
.view-toggle-btn:hover { color: var(--color-text); }
.view-toggle-btn.active {
  background: var(--color-primary-light);
  color: var(--color-primary);
}
.view-toggle-btn svg { width: 16px; height: 16px; }

/* ── CHARADA CARD ── */
.charada-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-md);
  text-align: center;
  position: relative;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.charada-difficulty {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
}
.charada-difficulty[data-level="facil"] { background: var(--color-easy-light); color: var(--color-easy-text); }
.charada-difficulty[data-level="media"] { background: var(--color-medium-light); color: var(--color-medium-text); }
.charada-difficulty[data-level="dificil"] { background: var(--color-hard-light); color: var(--color-hard-text); }

.charada-pergunta {
  font-size: clamp(1.15rem, 2.5vw, 1.45rem);
  font-weight: 700;
  line-height: 1.5;
  max-width: 600px;
  color: var(--color-text);
}

.charada-resposta-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-top: 0.5rem;
}

.btn--reveal {
  padding: 0.7rem 2rem;
  font-size: 0.95rem;
}

.charada-resposta {
  animation: fadeIn 0.4s ease;
  margin-top: 0.75rem;
  padding: 1.25rem 1.5rem;
  background: var(--color-primary-light);
  border: 1px solid rgba(108,92,231,0.1);
  border-radius: var(--radius);
  width: 100%;
  max-width: min(500px, 100%);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.resposta-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  margin-bottom: 0.4rem;
}

.resposta-text {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--color-primary);
}

.charada-actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

/* ── LIST VIEW ── */
.charada-list-view {
  display: none;
}
.charada-list-view.visible { display: block; }

.list-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.list-search {
  flex: 1;
  min-width: 200px;
  max-width: 400px;
  padding: 0.6rem 1rem 0.6rem 2.5rem;
  border-radius: 10px;
  border: 2px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  font-family: var(--font-ui);
  font-size: 0.9rem;
  transition: border-color var(--t);
  outline: none;
}
.list-search:focus { border-color: var(--color-primary); }
.list-search::placeholder { color: var(--color-text-muted); }

.list-search-wrapper {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 400px;
}
.list-search-wrapper svg {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--color-text-muted);
  pointer-events: none;
}
.list-search-wrapper .list-search {
  max-width: 100%;
  width: 100%;
}

.list-count {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  font-weight: 600;
  white-space: nowrap;
}

.charada-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.list-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  cursor: pointer;
  transition: all var(--t);
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  text-align: left;
}
.list-item:hover {
  border-color: var(--color-primary);
  background: var(--color-surface-hover);
  transform: translateX(4px);
}

.list-item-number {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-text-muted);
  background: var(--color-number-bg);
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  min-width: 42px;
  text-align: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.list-item-content {
  flex: 1;
  min-width: 0;
}

.list-item-pergunta {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.45;
}

.list-item-resposta {
  font-size: 0.85rem;
  color: var(--color-primary);
  font-weight: 600;
  margin-top: 0.35rem;
  display: none;
}
.list-item.expanded .list-item-resposta { display: block; }

.list-item-toggle {
  flex-shrink: 0;
  color: var(--color-text-muted);
  transition: transform var(--t);
  margin-top: 4px;
}
.list-item.expanded .list-item-toggle { transform: rotate(180deg); }

.list-pagination {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 2rem;
}

.btn--load-more {
  padding: 0.75rem 2rem;
  font-size: 0.95rem;
  border-radius: 12px;
}

.list-remaining {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  font-weight: 600;
}

.list-load-progress {
  text-align: center;
  padding: 2rem;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.list-load-progress .loading-spinner {
  margin: 0 auto 1rem;
}

/* ── LOADING ── */
.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--color-loading-bg);
  backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}
.loading-overlay[hidden] { display: none; }

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--color-primary-light);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

/* ── TOAST ── */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  z-index: 200;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
}
.toast[hidden] { display: none; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); display: block; }

/* ── LEVEL UP + CONFETE ── */
.level-up-splash {
  position: fixed;
  inset: 0;
  z-index: 340;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  animation: levelSplashFade 2.4s ease forwards;
}

.level-up-splash__inner {
  text-align: center;
  padding: 1.5rem 2.5rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(20, 25, 40, 0.92), rgba(35, 40, 60, 0.88));
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 215, 0, 0.15);
  animation: levelSplashPop 0.65s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.level-up-splash__label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(255, 215, 120, 0.95);
  margin-bottom: 0.35rem;
}

.level-up-splash__level {
  font-size: clamp(2.5rem, 8vw, 3.5rem);
  font-weight: 800;
  color: #fff;
  text-shadow: 0 4px 24px rgba(255, 200, 80, 0.35);
  line-height: 1.1;
}

.confetti-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 330;
}

@keyframes levelSplashPop {
  0% { opacity: 0; transform: scale(0.85); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes levelSplashFade {
  0%, 70% { opacity: 1; }
  100% { opacity: 0; }
}

/* ── PS-STYLE TROPHY TOAST ── */
.ps-trophy-host {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 360;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.65rem;
  max-width: calc(100vw - 2rem);
  pointer-events: none;
}

.ps-trophy-toast {
  display: flex;
  align-items: stretch;
  gap: 0;
  max-width: 360px;
  background: linear-gradient(135deg, #1a1d28 0%, #0d0f14 100%);
  border-radius: 4px;
  overflow: hidden;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transform: translateX(120%);
  opacity: 0;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease;
}

.ps-trophy-toast--visible {
  transform: translateX(0);
  opacity: 1;
}

.ps-trophy-toast--exit {
  transform: translateX(115%);
  opacity: 0;
  transition: transform 0.45s ease, opacity 0.35s ease;
}

.ps-trophy-toast__accent {
  width: 4px;
  flex-shrink: 0;
  background: linear-gradient(180deg, #c9a227 0%, #8b6914 100%);
}

.ps-trophy-toast--silver .ps-trophy-toast__accent {
  background: linear-gradient(180deg, #e8e8e8 0%, #9ca3af 100%);
}

.ps-trophy-toast--bronze .ps-trophy-toast__accent {
  background: linear-gradient(180deg, #cd7f32 0%, #8b4513 100%);
}

.ps-trophy-toast__icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 0.65rem;
  background: rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
}

.ps-trophy-toast__icon {
  font-size: 2.25rem;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

.ps-trophy-toast__body {
  padding: 0.75rem 1rem 0.85rem 0.65rem;
  min-width: 0;
  flex: 1;
}

.ps-trophy-toast__brand {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 0.25rem;
}

.ps-trophy-toast__title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.25;
  margin-bottom: 0.2rem;
}

.ps-trophy-toast__desc {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 480px) {
  .ps-trophy-host {
    right: 0.65rem;
    bottom: 0.65rem;
    left: 0.65rem;
    align-items: stretch;
  }
  .ps-trophy-toast {
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ps-trophy-toast {
    transform: translateX(0);
    transition: opacity 0.35s ease;
  }
  .ps-trophy-toast--visible {
    opacity: 1;
  }
  .ps-trophy-toast--exit {
    transform: translateX(0);
    opacity: 0;
  }
  .level-up-splash {
    animation: none;
    opacity: 1;
  }
  .level-up-splash__inner {
    animation: none;
  }
}

/* ── FOOTER ── */
.site-footer {
  background: var(--footer-bg);
  color: rgba(255,255,255,0.55);
  margin-top: auto;
  max-width: 100%;
  overflow-x: clip;
}

.footer-main {
  max-width: min(1200px, 100%);
  margin: 0 auto;
  padding: 3rem 1.5rem 2.5rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto 1.3fr;
  gap: 2rem 2.5rem;
  min-width: 0;
}

.footer-col-spacer { height: 1em; margin-bottom: 0.85rem; }

.footer-copyright-block {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  text-align: right;
}

.footer-copyright-line {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.38);
  line-height: 1.45;
}

.footer-col--copyright .footer-by {
  display: block;
  text-align: right;
}

.footer-col--social {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer-col-title--contact {
  width: 100%;
  text-align: center;
  margin: 0 0 0.85rem 0;
}

.footer-social-nav {
  display: grid;
  grid-template-columns: repeat(3, 2.1rem);
  grid-template-rows: repeat(3, 2.1rem);
  gap: 0.32rem 0.45rem;
  justify-content: center;
  justify-items: center;
  align-items: center;
  margin: 0 auto;
}

.footer-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  color: rgba(255,255,255,0.52);
  border-radius: 6px;
  transition: color var(--t), background var(--t);
}
.footer-social-link:hover { color: #fff; background: rgba(255,255,255,0.08); }
.footer-social-link svg { width: 1.05rem; height: 1.05rem; fill: currentColor; }

.footer-brand-col {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-di-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.footer-di-logo-img {
  height: 40px;
  width: auto;
  max-width: 58px;
  object-fit: contain;
  display: block;
  opacity: 0.65;
  transition: opacity var(--t);
}

.footer-di-nome {
  font-size: 1.2rem;
  font-weight: 800;
  color: rgba(255,255,255,0.55);
  transition: opacity var(--t);
}

.footer-di-brand:hover .footer-di-logo-img,
.footer-di-brand:hover .footer-di-nome { opacity: 0.85; }

.footer-contacts {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.footer-contact-link {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  transition: color var(--t);
}
.footer-contact-link:hover { color: #fff; }

.footer-col-title {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.3);
  margin: 0 0 0.85rem 0;
}

.footer-col-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.footer-col-list a {
  font-size: 0.84rem;
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  transition: color var(--t);
}
.footer-col-list a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.06);
}

.footer-bottom-inner {
  max-width: min(1200px, 100%);
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: nowrap;
  min-width: 0;
  box-sizing: border-box;
}

.footer-by {
  font-size: 0.73rem;
  color: rgba(255,255,255,0.25);
}

.footer-bottom-badges {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.35rem;
  flex: 1;
  min-width: 0;
  justify-content: flex-start;
}

.footer-store-link {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  opacity: 0.7;
  transition: opacity var(--t);
}
.footer-store-link:hover { opacity: 1; }

.footer-badge {
  height: auto;
  width: auto;
  max-width: 100%;
  max-height: 48px;
  display: block;
  object-fit: contain;
}

.footer-bottom-inner .footer-virtues-link { flex-shrink: 0; }

.footer-virtues-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 700;
  transition: opacity var(--t);
}
.footer-virtues-link:hover { opacity: 0.85; color: #fff; }

.footer-virtues-logo {
  height: 30px;
  width: auto;
  object-fit: contain;
}
.footer-virtues-text { font-family: var(--font-ui); letter-spacing: 0.02em; }

/* ── RESPONSIVE ── */

@media (max-width: 840px) {
  .header-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    padding: 0.75rem 1.25rem;
    box-shadow: var(--shadow-md);
  }
  .header-nav.open { display: flex; }
  .header-menu-btn { display: flex; }
  .nav-link { padding: 0.75rem 0.85rem; }

  .categories-grid { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }

  .charada-card { padding: 2rem 1.25rem; }

  .footer-main {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }

  .footer-col--copyright {
    grid-column: 1 / -1;
  }
  .footer-copyright-block { text-align: center; }
  .footer-col--copyright .footer-by { text-align: center; }

  .footer-bottom-inner {
    flex-wrap: wrap;
    justify-content: center;
  }
  .footer-bottom-badges {
    flex-wrap: wrap;
    justify-content: center;
  }

  .list-controls { flex-direction: column; align-items: stretch; }
  .list-search-wrapper { max-width: 100%; }
}

@media (max-width: 540px) {
  .hero { padding: 3rem 1rem 2.5rem; }
  .hero-actions { flex-direction: column; align-items: stretch; }

  .charada-header { flex-direction: column; align-items: flex-start; }

  .footer-main { grid-template-columns: 1fr; gap: 1.5rem; }
  .footer-col--social { align-items: flex-start; }
  .footer-col-title--contact { text-align: left; }
  .footer-social-nav { margin: 0; }

  .footer-bottom-badges {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
  }
  .footer-store-link { flex: unset; }

  .view-toggle { width: 100%; justify-content: center; }
}
