/* ==========================================================================
   XivraGames - Jogos de Habilidade Mental Online Gratis
   Sistema de Design e Estilos Globais
   ========================================================================== */

/* CSS Custom Properties (Design Tokens)
   ========================================================================== */
:root {
  /* Colors - Dark Theme with Emerald Accents */
  --color-bg-primary: #0f1419;
  --color-bg-secondary: #1a1f2e;
  --color-bg-tertiary: #242b3d;
  --color-bg-card: #1e2433;
  --color-bg-hover: #2a3245;

  --color-accent-primary: #10b981;
  --color-accent-secondary: #059669;
  --color-accent-tertiary: #06b6d4;
  --color-accent-success: #10b981;
  --color-accent-warning: #f59e0b;
  --color-accent-error: #ef4444;

  --accent-rgb: 16, 185, 129;

  --color-text-primary: #f8fafc;
  --color-text-secondary: #94a3b8;
  --color-text-tertiary: #64748b;
  --color-text-muted: #475569;

  --color-border: #334155;
  --color-border-light: #1e293b;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --gradient-secondary: linear-gradient(135deg, #06b6d4 0%, #10b981 100%);
  --gradient-card: linear-gradient(145deg, #1e2433 0%, #242b3d 100%);
  --gradient-hero: linear-gradient(180deg, #0f1419 0%, #1a1f2e 100%);

  /* Typography */
  --font-family-base: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-family-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace;

  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;
  --font-size-5xl: 3rem;
  --font-size-6xl: 3.75rem;

  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;

  --line-height-tight: 1.25;
  --line-height-base: 1.5;
  --line-height-relaxed: 1.75;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Border Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.3);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.3);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.5), 0 8px 10px -6px rgb(0 0 0 / 0.4);
  --shadow-glow: 0 0 20px rgb(16 185 129 / 0.3);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 350ms ease;

  /* Z-Index */
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-modal-backdrop: 300;
  --z-modal: 400;
  --z-toast: 500;

  /* Container */
  --container-max: 1200px;
  --container-narrow: 800px;
}

/* Reset & Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; font-size: 16px; }
body {
  font-family: var(--font-family-base);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--color-text-primary);
  background-color: var(--color-bg-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
main { flex: 1; }
img, picture, video, canvas, svg { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
a { color: var(--color-accent-primary); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--color-accent-secondary); }
a:focus-visible { outline: 2px solid var(--color-accent-primary); outline-offset: 2px; border-radius: var(--radius-sm); }
ul, ol { list-style: none; }
h1, h2, h3, h4, h5, h6 { font-weight: var(--font-weight-bold); line-height: var(--line-height-tight); color: var(--color-text-primary); }
h1 { font-size: var(--font-size-4xl); }
h2 { font-size: var(--font-size-3xl); }
h3 { font-size: var(--font-size-2xl); }
h4 { font-size: var(--font-size-xl); }
p { margin-bottom: var(--space-4); color: var(--color-text-secondary); }
strong { font-weight: var(--font-weight-semibold); }

/* Skip Link
   ========================================================================== */
.skip-link {
  position: absolute; top: -100%; left: var(--space-4);
  background: var(--color-accent-primary); color: var(--color-text-primary);
  padding: var(--space-3) var(--space-4); border-radius: var(--radius-md);
  z-index: var(--z-toast); font-weight: var(--font-weight-semibold);
}
.skip-link:focus { top: var(--space-4); }

/* Container
   ========================================================================== */
.container { width: 100%; max-width: var(--container-max); margin: 0 auto; padding: 0 var(--space-4); }
.container--narrow { max-width: var(--container-narrow); }

/* Header & Nav
   ========================================================================== */
.header {
  background: var(--color-bg-secondary); border-bottom: 1px solid var(--color-border-light);
  position: sticky; top: 0; z-index: var(--z-sticky); backdrop-filter: blur(10px);
}
.header__inner { display: flex; align-items: center; justify-content: space-between; padding: var(--space-4) 0; gap: var(--space-4); }
.header__logo {
  display: flex; align-items: center; gap: var(--space-3);
  font-size: var(--font-size-xl); font-weight: var(--font-weight-bold);
  color: var(--color-text-primary); text-decoration: none;
}
.header__logo:hover { color: var(--color-accent-primary); }
.header__logo svg { width: 36px; height: 36px; fill: var(--color-accent-primary); }
.nav { display: flex; align-items: center; gap: var(--space-2); }
.nav__link {
  padding: var(--space-2) var(--space-4); border-radius: var(--radius-md);
  color: var(--color-text-secondary); font-weight: var(--font-weight-medium);
  transition: all var(--transition-fast);
}
.nav__link:hover { color: var(--color-text-primary); background: var(--color-bg-hover); }
.nav__link--active { color: var(--color-accent-primary); background: rgba(16, 185, 129, 0.1); }
.nav__toggle { display: none; background: transparent; border: none; cursor: pointer; padding: var(--space-2); color: var(--color-text-primary); }
.nav__toggle svg { width: 24px; height: 24px; }
.nav__close { display: none; }

@media (max-width: 768px) {
  .nav__toggle { display: block; }
  .nav__close { display: block; position: absolute; top: var(--space-4); right: var(--space-4); background: transparent; border: none; cursor: pointer; color: var(--color-text-secondary); padding: var(--space-2); }
  .nav__close svg { width: 24px; height: 24px; }
  .nav {
    position: fixed; top: 0; right: -100%; width: 280px; height: 100vh;
    background: var(--color-bg-secondary); flex-direction: column; align-items: stretch;
    padding: var(--space-8) var(--space-4); gap: var(--space-2);
    transition: right var(--transition-base); box-shadow: var(--shadow-xl); z-index: var(--z-modal);
  }
  .nav--open { right: 0; }
  .nav__link { padding: var(--space-4); font-size: var(--font-size-lg); }
}

/* Hero
   ========================================================================== */
.hero { background: var(--gradient-hero); padding: var(--space-16) 0; text-align: center; position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(16, 185, 129, 0.1) 0%, transparent 70%); pointer-events: none; }
.hero__content { position: relative; z-index: 1; }
.hero__badge {
  display: inline-flex; align-items: center; gap: var(--space-2);
  background: rgba(16, 185, 129, 0.2); color: var(--color-accent-primary);
  padding: var(--space-2) var(--space-4); border-radius: var(--radius-full);
  font-size: var(--font-size-sm); font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-6); border: 1px solid rgba(16, 185, 129, 0.3);
}
.hero__title {
  font-size: var(--font-size-5xl); font-weight: var(--font-weight-extrabold);
  margin-bottom: var(--space-6); background: var(--gradient-primary);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero__subtitle { font-size: var(--font-size-xl); color: var(--color-text-secondary); max-width: 600px; margin: 0 auto var(--space-8); }
.hero__actions { display: flex; gap: var(--space-4); justify-content: center; flex-wrap: wrap; }

@media (max-width: 768px) {
  .hero { padding: var(--space-12) 0; }
  .hero__title { font-size: var(--font-size-3xl); }
  .hero__subtitle { font-size: var(--font-size-lg); }
}

/* Buttons
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  padding: var(--space-3) var(--space-6); border-radius: var(--radius-lg);
  font-weight: var(--font-weight-semibold); font-size: var(--font-size-base);
  cursor: pointer; border: none; transition: all var(--transition-fast); text-decoration: none; white-space: nowrap;
}
.btn:focus-visible { outline: 2px solid var(--color-accent-primary); outline-offset: 2px; }
.btn--primary { background: var(--gradient-primary); color: var(--color-text-primary); box-shadow: var(--shadow-md), var(--shadow-glow); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg), var(--shadow-glow); }
.btn--secondary { background: var(--color-bg-tertiary); color: var(--color-text-primary); border: 1px solid var(--color-border); }
.btn--secondary:hover { background: var(--color-bg-hover); border-color: var(--color-accent-primary); }
.btn--ghost { background: transparent; color: var(--color-text-secondary); }
.btn--ghost:hover { background: var(--color-bg-hover); color: var(--color-text-primary); }
.btn--success { background: var(--color-accent-success); color: var(--color-text-primary); }
.btn--danger { background: var(--color-accent-error); color: var(--color-text-primary); }
.btn--lg { padding: var(--space-4) var(--space-8); font-size: var(--font-size-lg); }
.btn--sm { padding: var(--space-2) var(--space-4); font-size: var(--font-size-sm); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }
.btn svg { width: 20px; height: 20px; }

/* Cards
   ========================================================================== */
.card {
  background: var(--gradient-card); border: 1px solid var(--color-border-light);
  border-radius: var(--radius-xl); overflow: hidden; transition: all var(--transition-base);
}
.card:hover { border-color: var(--color-border); box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.card__image { aspect-ratio: 16/10; object-fit: cover; width: 100%; background: var(--color-bg-tertiary); }
.card__content { padding: var(--space-6); }
.card__title { font-size: var(--font-size-xl); margin-bottom: var(--space-2); }
.card__description { color: var(--color-text-secondary); margin-bottom: var(--space-4); }
.card__footer { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding-top: var(--space-4); border-top: 1px solid var(--color-border-light); }

/* Game Cards Grid
   ========================================================================== */
.games-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: var(--space-8); padding: var(--space-12) 0; }
.game-card { position: relative; }
.game-card__badge { position: absolute; top: var(--space-4); right: var(--space-4); background: var(--color-accent-success); color: var(--color-text-primary); padding: var(--space-1) var(--space-3); border-radius: var(--radius-full); font-size: var(--font-size-xs); font-weight: var(--font-weight-semibold); z-index: 1; }
.game-card__stats { display: flex; gap: var(--space-4); font-size: var(--font-size-sm); color: var(--color-text-tertiary); }
.game-card__stat { display: flex; align-items: center; gap: var(--space-1); }
.game-card__stat svg { width: 16px; height: 16px; }

/* Section
   ========================================================================== */
.section { padding: var(--space-16) 0; }
.section--alt { background: var(--color-bg-secondary); }
.section__header { text-align: center; margin-bottom: var(--space-12); }
.section__title { font-size: var(--font-size-3xl); margin-bottom: var(--space-4); }
.section__subtitle { font-size: var(--font-size-lg); color: var(--color-text-secondary); max-width: 600px; margin: 0 auto; }

/* Trust Badges
   ========================================================================== */
.trust-badges { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-6); padding: var(--space-8) 0; }
.trust-badge { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-4) var(--space-6); background: var(--color-bg-tertiary); border-radius: var(--radius-xl); border: 1px solid var(--color-border-light); }
.trust-badge svg { width: 24px; height: 24px; color: var(--color-accent-success); }
.trust-badge__text { font-weight: var(--font-weight-semibold); color: var(--color-text-primary); }
.trust-badge__subtext { font-size: var(--font-size-sm); color: var(--color-text-tertiary); }

/* Steps
   ========================================================================== */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--space-8); }
.step { text-align: center; padding: var(--space-6); }
.step__number { width: 48px; height: 48px; border-radius: var(--radius-full); background: var(--gradient-primary); color: var(--color-text-primary); font-weight: var(--font-weight-bold); font-size: var(--font-size-xl); display: flex; align-items: center; justify-content: center; margin: 0 auto var(--space-4); }
.step__title { font-size: var(--font-size-lg); margin-bottom: var(--space-2); }
.step__description { color: var(--color-text-secondary); font-size: var(--font-size-sm); }

/* Footer
   ========================================================================== */
.footer { background: var(--color-bg-secondary); border-top: 1px solid var(--color-border-light); padding: var(--space-12) 0 var(--space-6); }
.footer__grid { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: var(--space-8); margin-bottom: var(--space-8); }
@media (max-width: 768px) { .footer__grid { grid-template-columns: 1fr; } }
.footer__brand { max-width: 300px; }
.footer__logo { display: flex; align-items: center; gap: var(--space-3); font-size: var(--font-size-xl); font-weight: var(--font-weight-bold); color: var(--color-text-primary); margin-bottom: var(--space-4); }
.footer__logo svg { width: 32px; height: 32px; fill: var(--color-accent-primary); }
.footer__description { font-size: var(--font-size-sm); color: var(--color-text-secondary); margin-bottom: var(--space-4); }
.footer__column-title { font-size: var(--font-size-sm); font-weight: var(--font-weight-semibold); text-transform: uppercase; letter-spacing: 0.05em; color: var(--color-text-primary); margin-bottom: var(--space-4); }
.footer__links { display: flex; flex-direction: column; gap: var(--space-3); }
.footer__link { font-size: var(--font-size-sm); color: var(--color-text-secondary); }
.footer__link:hover { color: var(--color-accent-primary); }
.footer__bottom { padding-top: var(--space-6); border-top: 1px solid var(--color-border-light); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--space-4); }
.footer__copyright { font-size: var(--font-size-sm); color: var(--color-text-tertiary); }
.footer__compliance { text-align: center; padding: var(--space-4); background: var(--color-bg-tertiary); border-radius: var(--radius-lg); margin-top: var(--space-6); }
.footer__compliance-text { font-size: var(--font-size-sm); color: var(--color-text-secondary); margin: 0; }
.footer__compliance-text strong { color: var(--color-accent-success); }

/* Forms
   ========================================================================== */
.form-group { margin-bottom: var(--space-4); }
.form-label { display: block; font-size: var(--font-size-sm); font-weight: var(--font-weight-medium); color: var(--color-text-secondary); margin-bottom: var(--space-2); }
.form-input, .form-textarea, .form-select {
  width: 100%; padding: var(--space-3) var(--space-4);
  background: var(--color-bg-tertiary); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); color: var(--color-text-primary);
  font-size: var(--font-size-base); transition: all var(--transition-fast);
}
.form-input:focus, .form-textarea:focus, .form-select:focus { outline: none; border-color: var(--color-accent-primary); box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2); }
.form-input::placeholder, .form-textarea::placeholder { color: var(--color-text-muted); }
.form-textarea { min-height: 120px; resize: vertical; }
.form-hint { font-size: var(--font-size-xs); color: var(--color-text-tertiary); margin-top: var(--space-1); }

/* Tables
   ========================================================================== */
.table-wrapper { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--color-border-light); }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: var(--space-4); text-align: left; border-bottom: 1px solid var(--color-border-light); }
.table th { background: var(--color-bg-tertiary); font-weight: var(--font-weight-semibold); font-size: var(--font-size-sm); color: var(--color-text-secondary); text-transform: uppercase; letter-spacing: 0.05em; }
.table td { background: var(--color-bg-secondary); }
.table tbody tr:hover td { background: var(--color-bg-hover); }
.table tbody tr:last-child td { border-bottom: none; }
.table__rank { font-weight: var(--font-weight-bold); color: var(--color-accent-primary); }
.table__rank--gold { color: #fbbf24; }
.table__rank--silver { color: #9ca3af; }
.table__rank--bronze { color: #d97706; }

/* Tabs
   ========================================================================== */
.tabs { display: flex; gap: var(--space-2); padding: var(--space-2); background: var(--color-bg-tertiary); border-radius: var(--radius-lg); margin-bottom: var(--space-6); overflow-x: auto; }
.tab { padding: var(--space-3) var(--space-6); border-radius: var(--radius-md); font-weight: var(--font-weight-medium); color: var(--color-text-secondary); background: transparent; border: none; cursor: pointer; transition: all var(--transition-fast); white-space: nowrap; }
.tab:hover { color: var(--color-text-primary); background: var(--color-bg-hover); }
.tab--active { color: var(--color-text-primary); background: var(--color-bg-primary); box-shadow: var(--shadow-sm); }
.tab-content { display: none; }
.tab-content--active { display: block; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Rating Widget
   ========================================================================== */
.rating-widget { padding: var(--space-6); background: var(--color-bg-tertiary); border-radius: var(--radius-xl); border: 1px solid var(--color-border-light); }
.rating-widget__title { font-size: var(--font-size-lg); margin-bottom: var(--space-4); }
.rating-number-buttons { display: flex; gap: var(--space-2); flex-wrap: wrap; margin-bottom: var(--space-4); }
.rating-number-btn { width: 40px; height: 40px; border-radius: var(--radius-md); background: var(--color-bg-secondary); border: 1px solid var(--color-border); color: var(--color-text-secondary); font-weight: var(--font-weight-semibold); cursor: pointer; transition: all var(--transition-fast); }
.rating-number-btn:hover { border-color: var(--color-accent-primary); color: var(--color-accent-primary); }
.rating-number-btn--active { background: var(--color-accent-primary); border-color: var(--color-accent-primary); color: var(--color-text-primary); }
.rating-display { display: flex; align-items: center; gap: var(--space-3); }
.rating-display__average { font-size: var(--font-size-3xl); font-weight: var(--font-weight-bold); color: var(--color-accent-warning); }
.rating-display__info { font-size: var(--font-size-sm); color: var(--color-text-tertiary); }

/* Modal
   ========================================================================== */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.7); backdrop-filter: blur(4px); z-index: var(--z-modal-backdrop); align-items: center; justify-content: center; padding: var(--space-4); }
.modal-overlay--visible { display: flex; }
.modal { background: var(--color-bg-secondary); border: 1px solid var(--color-border); border-radius: var(--radius-xl); max-width: 500px; width: 100%; max-height: 90vh; overflow-y: auto; z-index: var(--z-modal); animation: modalIn 0.3s ease; }
@keyframes modalIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
.modal__header { display: flex; align-items: center; justify-content: space-between; padding: var(--space-6); border-bottom: 1px solid var(--color-border-light); }
.modal__title { font-size: var(--font-size-xl); font-weight: var(--font-weight-semibold); }
.modal__close { background: transparent; border: none; cursor: pointer; color: var(--color-text-secondary); padding: var(--space-2); border-radius: var(--radius-md); transition: all var(--transition-fast); }
.modal__close:hover { background: var(--color-bg-hover); color: var(--color-text-primary); }
.modal__close svg { width: 24px; height: 24px; }
.modal__body { padding: var(--space-6); }
.modal__footer { display: flex; gap: var(--space-3); justify-content: flex-end; padding: var(--space-6); border-top: 1px solid var(--color-border-light); }

/* Toast
   ========================================================================== */
.toast-container { position: fixed; bottom: var(--space-6); right: var(--space-6); z-index: var(--z-toast); display: flex; flex-direction: column; gap: var(--space-3); max-width: 400px; }
.toast { padding: var(--space-4) var(--space-6); background: var(--color-bg-secondary); border: 1px solid var(--color-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: var(--space-3); animation: toastIn 0.3s ease; }
@keyframes toastIn { from { opacity: 0; transform: translateX(100%); } to { opacity: 1; transform: translateX(0); } }
.toast--success { border-color: var(--color-accent-success); }
.toast--error { border-color: var(--color-accent-error); }
.toast--warning { border-color: var(--color-accent-warning); }
.toast svg { width: 20px; height: 20px; flex-shrink: 0; }
.toast__message { flex: 1; font-size: var(--font-size-sm); }
.toast__close { background: transparent; border: none; cursor: pointer; color: var(--color-text-tertiary); padding: var(--space-1); }

/* Game Container
   ========================================================================== */
.game-container { max-width: 800px; margin: 0 auto; }
.game-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--space-4); margin-bottom: var(--space-6); padding: var(--space-4); background: var(--color-bg-tertiary); border-radius: var(--radius-lg); }
.game-info { display: flex; gap: var(--space-6); }
.game-stat { text-align: center; }
.game-stat__label { font-size: var(--font-size-xs); color: var(--color-text-tertiary); text-transform: uppercase; letter-spacing: 0.05em; }
.game-stat__value { font-size: var(--font-size-xl); font-weight: var(--font-weight-bold); color: var(--color-text-primary); }
.game-controls { display: flex; gap: var(--space-2); }
.game-board { background: var(--color-bg-tertiary); border-radius: var(--radius-xl); padding: var(--space-4); margin-bottom: var(--space-6); }
.game-status { text-align: center; padding: var(--space-4); background: var(--color-bg-secondary); border-radius: var(--radius-lg); margin-bottom: var(--space-4); font-weight: var(--font-weight-semibold); }
.game-status--success { background: rgba(16, 185, 129, 0.2); color: var(--color-accent-success); }

/* Sudoku
   ========================================================================== */
.sudoku-board { display: grid; grid-template-columns: repeat(9, 1fr); gap: 1px; max-width: 450px; margin: 0 auto; background: var(--color-border); border: 3px solid var(--color-text-primary); }
.sudoku-cell { aspect-ratio: 1; background: var(--color-bg-secondary); display: flex; align-items: center; justify-content: center; font-size: 1.25rem; font-weight: var(--font-weight-bold); cursor: pointer; transition: background var(--transition-fast); user-select: none; }
.sudoku-cell:hover { background: var(--color-bg-hover); }
.sudoku-cell--selected { background: rgba(var(--accent-rgb), 0.3) !important; }
.sudoku-cell--fixed, .sudoku-cell--given { color: var(--color-text-primary); cursor: default; }
.sudoku-cell--user { color: var(--color-accent-primary); }
.sudoku-cell--error, .sudoku-cell--conflict { color: var(--color-accent-error); background: rgba(239, 68, 68, 0.1); }
.sudoku-cell--highlight, .sudoku-cell--highlighted { background: rgba(var(--accent-rgb), 0.1); }
.sudoku-cell--notes { display: grid; grid-template-columns: repeat(3, 1fr); font-size: 0.55rem; color: var(--color-text-tertiary); padding: 2px; }
.sudoku-cell--notes span { display: flex; align-items: center; justify-content: center; }
.sudoku-cell:nth-child(3n) { border-right: 2px solid var(--color-text-primary); }
.sudoku-cell:nth-child(9n) { border-right: none; }
.sudoku-board > .sudoku-cell:nth-child(n+19):nth-child(-n+27),
.sudoku-board > .sudoku-cell:nth-child(n+46):nth-child(-n+54) { border-bottom: 2px solid var(--color-text-primary); }
.number-pad { display: flex; gap: var(--space-2); justify-content: center; margin-top: var(--space-4); flex-wrap: wrap; }
.number-pad__btn { width: 44px; height: 44px; border-radius: var(--radius-md); background: var(--color-bg-tertiary); border: 1px solid var(--color-border); color: var(--color-text-primary); font-weight: var(--font-weight-bold); cursor: pointer; transition: all var(--transition-fast); }
.number-pad__btn:hover { border-color: var(--color-accent-primary); color: var(--color-accent-primary); }

/* Minesweeper
   ========================================================================== */
.minesweeper-board { display: inline-grid; gap: 1px; background: var(--color-border); border: 2px solid var(--color-border); border-radius: var(--radius-md); margin: 0 auto; }
.mine-cell { width: 32px; height: 32px; background: var(--color-bg-tertiary); display: flex; align-items: center; justify-content: center; font-size: 0.875rem; font-weight: var(--font-weight-bold); cursor: pointer; transition: background var(--transition-fast); user-select: none; }
.mine-cell:hover:not(.mine-cell--revealed) { background: var(--color-bg-hover); }
.mine-cell--revealed { background: var(--color-bg-secondary); cursor: default; }
.mine-cell--mine { background: var(--color-accent-error); color: var(--color-text-primary); }
.mine-cell--exploded { background: #dc2626; }
.mine-cell--flagged { color: var(--color-accent-error); }
.mine-cell[data-count="1"] { color: #3b82f6; }
.mine-cell[data-count="2"] { color: #10b981; }
.mine-cell[data-count="3"] { color: #ef4444; }
.mine-cell[data-count="4"] { color: #6366f1; }
.mine-cell[data-count="5"] { color: #b91c1c; }

/* Word Search
   ========================================================================== */
.wordsearch-board { display: inline-grid; gap: 2px; margin: 0 auto; }
.ws-cell { width: 36px; height: 36px; background: var(--color-bg-tertiary); display: flex; align-items: center; justify-content: center; font-size: 1rem; font-weight: var(--font-weight-bold); cursor: pointer; border-radius: var(--radius-sm); transition: all var(--transition-fast); user-select: none; text-transform: uppercase; }
.ws-cell:hover { background: var(--color-bg-hover); }
.ws-cell--selected, .ws-cell--selecting { background: rgba(var(--accent-rgb), 0.3); color: var(--color-accent-primary); }
.ws-cell--found { background: rgba(16, 185, 129, 0.2); color: var(--color-accent-success); }
.ws-words, .word-list { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-4); justify-content: center; }
.ws-word { padding: var(--space-1) var(--space-3); background: var(--color-bg-tertiary); border-radius: var(--radius-full); font-size: var(--font-size-sm); }
.ws-word--found { text-decoration: line-through; opacity: 0.5; background: rgba(16, 185, 129, 0.2); }

/* Score Form
   ========================================================================== */
.score-form { background: var(--color-bg-tertiary); border-radius: var(--radius-xl); padding: var(--space-6); border: 1px solid var(--color-border-light); }
.score-form__title { font-size: var(--font-size-lg); margin-bottom: var(--space-4); }

/* Leaderboard Preview
   ========================================================================== */
.leaderboard-preview { background: var(--color-bg-tertiary); border-radius: var(--radius-xl); padding: var(--space-6); border: 1px solid var(--color-border-light); }
.leaderboard-preview__header { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--space-4); }

/* Page Header
   ========================================================================== */
.page-header { padding: var(--space-12) 0 var(--space-8); text-align: center; background: var(--gradient-hero); }
.page-header__title { font-size: var(--font-size-4xl); margin-bottom: var(--space-4); }
.page-header__subtitle { font-size: var(--font-size-lg); color: var(--color-text-secondary); max-width: 600px; margin: 0 auto; }
.breadcrumb { display: flex; align-items: center; gap: var(--space-2); font-size: var(--font-size-sm); color: var(--color-text-tertiary); margin-bottom: var(--space-4); }
.breadcrumb a { color: var(--color-text-tertiary); }
.breadcrumb a:hover { color: var(--color-accent-primary); }
.breadcrumb__separator { color: var(--color-text-muted); }

/* Policy Pages
   ========================================================================== */
.policy-content { max-width: var(--container-narrow); margin: 0 auto; padding: var(--space-12) var(--space-4); }
.policy-content h2 { font-size: var(--font-size-2xl); margin-top: var(--space-8); margin-bottom: var(--space-4); padding-bottom: var(--space-2); border-bottom: 1px solid var(--color-border-light); }
.policy-content h3 { font-size: var(--font-size-xl); margin-top: var(--space-6); margin-bottom: var(--space-3); }
.policy-content p { margin-bottom: var(--space-4); line-height: var(--line-height-relaxed); }
.policy-content ul, .policy-content ol { margin-bottom: var(--space-4); padding-left: var(--space-6); }
.policy-content li { margin-bottom: var(--space-2); color: var(--color-text-secondary); list-style: disc; }
.policy-content ol li { list-style: decimal; }
.policy-meta { background: var(--color-bg-tertiary); padding: var(--space-4); border-radius: var(--radius-lg); margin-bottom: var(--space-8); font-size: var(--font-size-sm); color: var(--color-text-tertiary); }

/* Contact
   ========================================================================== */
.contact-section { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-12); padding: var(--space-12) 0; }
@media (max-width: 768px) { .contact-section { grid-template-columns: 1fr; gap: var(--space-8); } }
.contact-info { display: flex; flex-direction: column; gap: var(--space-6); }
.contact-item { display: flex; gap: var(--space-4); padding: var(--space-4); background: var(--color-bg-tertiary); border-radius: var(--radius-lg); }
.contact-item__icon { width: 48px; height: 48px; border-radius: var(--radius-md); background: var(--gradient-primary); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.contact-item__icon svg { width: 24px; height: 24px; color: white; }
.contact-item__label { font-size: var(--font-size-sm); color: var(--color-text-tertiary); margin-bottom: var(--space-1); }
.contact-item__value { font-weight: var(--font-weight-semibold); color: var(--color-text-primary); }

/* Utilities
   ========================================================================== */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.text-center { text-align: center; }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.hidden { display: none !important; }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* Print */
@media print { .header, .footer, .nav, .btn, .game-controls { display: none !important; } body { background: white; color: black; } }
