/* === Football Games - Pitch Green Theme === */
:root {
  --primary: #1a5632;
  --primary-light: #2d8a4e;
  --accent: #f5a623;
  --accent-hover: #e69510;
  --bg: #f7f9f7;
  --surface: #ffffff;
  --text: #1a1a2e;
  --text-muted: #555;
  --border: #dde4dd;
  --pitch: #2ecc71;
  --pitch-stripe: #27ae60;
  --danger: #e74c3c;
  --radius: 10px;
  --shadow: 0 2px 12px rgba(0,0,0,.08);
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
[data-theme="dark"] {
  --bg: #121a15;
  --surface: #1a2a1f;
  --text: #e8ece9;
  --text-muted: #99a89e;
  --border: #2a3a2f;
  --shadow: 0 2px 12px rgba(0,0,0,.3);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background .3s, color .3s;
  min-height: 100vh;
}
a { color: var(--primary-light); text-decoration: none; }
a:hover { text-decoration: underline; }
/* Nav */
.navbar {
  background: var(--primary);
  color: #fff;
  padding: 0 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
  position: sticky; top: 0; z-index: 100;
}
.nav-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 56px;
}
.logo {
  font-size: 1.25rem; font-weight: 700; color: #fff !important;
  letter-spacing: -.02em; text-decoration: none !important;
}
.logo .ball { display: inline-block; animation: spin 3s linear infinite; margin-right: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }
.nav-right { display: flex; align-items: center; gap: 12px; }
.lang-switch { position: relative; }
.lang-btn {
  background: rgba(255,255,255,.15); color: #fff; border: 1px solid rgba(255,255,255,.25);
  padding: 6px 14px; border-radius: 6px; cursor: pointer; font-size: .85rem;
  transition: background .2s;
}
.lang-btn:hover { background: rgba(255,255,255,.25); }
.lang-dropdown {
  display: none; position: absolute; right: 0; top: 100%; margin-top: 4px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; box-shadow: var(--shadow); min-width: 150px;
  z-index: 200; list-style: none; padding: 4px 0;
  max-height: 300px; overflow-y: auto;
}
.lang-switch:hover .lang-dropdown, .lang-dropdown:hover { display: block; }
.lang-dropdown li a {
  display: block; padding: 6px 16px; color: var(--text) !important;
  font-size: .85rem; transition: background .15s;
}
.lang-dropdown li a:hover { background: var(--pitch); color: #fff !important; text-decoration: none; }
.theme-toggle {
  background: none; border: 1px solid rgba(255,255,255,.25); color: #fff;
  font-size: 1.1rem; cursor: pointer; padding: 4px 8px; border-radius: 6px;
  transition: background .2s;
}
.theme-toggle:hover { background: rgba(255,255,255,.15); }
/* Hero */
.hero {
  text-align: center; padding: 40px 20px 24px;
  max-width: 1100px; margin: 0 auto;
}
.hero h1 {
  font-size: 2.2rem; font-weight: 800; color: var(--primary);
  margin-bottom: 8px; letter-spacing: -.03em;
}
[data-theme="dark"] .hero h1 { color: var(--pitch); }
.hero-sub {
  max-width: 700px; margin: 0 auto 24px; color: var(--text-muted);
  font-size: .95rem; line-height: 1.7;
}
/* Game Container */
.game-container {
  background: var(--surface); border-radius: 16px;
  box-shadow: var(--shadow); border: 1px solid var(--border);
  padding: 16px; max-width: 720px; margin: 0 auto 32px;
  position: relative; overflow: hidden;
}
.game-container::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 4px; background: linear-gradient(90deg, var(--pitch), var(--pitch-stripe), var(--pitch));
}
canvas#footballPitch {
  display: block; margin: 0 auto;
  border-radius: 8px; touch-action: manipulation;
  max-width: 100%; height: auto;
}
.game-info {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 4px 0; font-size: .9rem; color: var(--text-muted);
  flex-wrap: wrap; gap: 8px;
}
.game-info span { font-weight: 600; }
#score { color: var(--accent); font-size: 1.1rem; }
/* Highlights */
.highlights, .faq, .about-page, .privacy-page {
  max-width: 1100px; margin: 0 auto; padding: 32px 20px;
}
.highlights h2, .faq h2 {
  text-align: center; font-size: 1.5rem; font-weight: 700;
  color: var(--primary); margin-bottom: 28px;
}
.highlights-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.highlights-grid > div {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
}
.highlights-grid > div:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.1); }
.highlights-grid h3 { font-size: 1.05rem; margin-bottom: 6px; color: var(--primary); }
.highlights-grid p { font-size: .9rem; color: var(--text-muted); }
/* FAQ */
.faq-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
  overflow: hidden;
}
.faq-item summary {
  padding: 14px 18px; font-weight: 600; cursor: pointer;
  font-size: .95rem; list-style: none; display: flex; justify-content: space-between;
}
.faq-item summary::after { content: '+'; font-size: 1.2rem; color: var(--primary-light); }
.faq-item[open] summary::after { content: '−'; }
.faq-answer { padding: 0 18px 14px; font-size: .9rem; color: var(--text-muted); line-height: 1.7; }
/* Footer */
footer {
  background: var(--primary); color: #fff; padding: 28px 20px; margin-top: 40px;
  text-align: center; font-size: .85rem;
}
.footer-inner { max-width: 1100px; margin: 0 auto; }
.footer-inner nav { margin: 8px 0; }
.footer-inner nav a {
  color: rgba(255,255,255,.8); margin: 0 8px; transition: color .2s;
}
.footer-inner nav a:hover { color: #fff; }
/* Cookie */
.cookie-banner {
  display: none; position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--surface); border-top: 1px solid var(--border);
  padding: 12px 20px; text-align: center; font-size: .85rem;
  z-index: 300; box-shadow: 0 -2px 8px rgba(0,0,0,.1);
}
.cookie-banner.visible { display: block; }
.cookie-banner button {
  background: var(--accent); color: #fff; border: none;
  padding: 6px 18px; border-radius: 6px; cursor: pointer; margin-left: 10px;
  font-weight: 600;
}
/* About / Privacy / 404 */
.about-page h1, .privacy-page h1, .error-page h1 {
  font-size: 2rem; margin-bottom: 16px; color: var(--primary);
}
.about-page p, .privacy-page p, .privacy-page li {
  margin-bottom: 12px; line-height: 1.7;
}
.error-page { text-align: center; padding: 80px 20px; }
.back-home {
  display: inline-block; margin-top: 20px; background: var(--accent);
  color: #fff !important; padding: 10px 24px; border-radius: 8px;
  font-weight: 600; text-decoration: none !important;
}
/* Responsive */
@media (max-width: 640px) {
  .hero h1 { font-size: 1.6rem; }
  .highlights-grid { grid-template-columns: 1fr; }
  .game-info { font-size: .8rem; }
  canvas#footballPitch { width: 100% !important; height: auto !important; }
}
