/* ===================================================
   Happy Wheels — Style
   Theme: Danger Red + Dark Asphalt
   =================================================== */

*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}

:root {
  --bg: #141010;
  --bg2: #1a1515;
  --card-bg: rgba(255,255,255,0.035);
  --text: #f0e8e0;
  --text2: #a89080;
  --accent: #FF4500;
  --accent2: #ff6b35;
  --accent-glow: rgba(255,69,0,0.2);
  --gold: #FFD700;
  --blue: #3A86FF;
  --surface: #1e1818;
  --border: rgba(255,255,255,0.07);
  --radius: 12px;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Bebas Neue', 'Impact', sans-serif;
}

[data-theme="light"] {
  --bg: #faf5f0;
  --bg2: #f0e8de;
  --card-bg: #ffffff;
  --text: #1a1212;
  --text2: #6b5545;
  --surface: #ffffff;
  --border: rgba(0,0,0,0.08);
}

html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  background-image: radial-gradient(ellipse at 50% 0%, rgba(255,69,0,0.04) 0%, transparent 60%);
}

/* ── Navbar ──────────────────────────────────── */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(20,16,16,0.94); border-bottom: 2px solid rgba(255,69,0,0.15);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
[data-theme="light"] .navbar { background: rgba(250,245,240,0.94); }
.navbar-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; height: 56px;
}
.nav-logo {
  font-family: var(--font-display); font-size: 1.5rem;
  font-weight: 700; color: var(--accent); text-decoration: none;
  display: flex; align-items: center; gap: 8px; letter-spacing: 1px;
}
.logo-icon { font-size: 1.4rem; }
.nav-links { display: flex; align-items: center; gap: 12px; }

.lang-dropdown { position: relative; }
.lang-btn {
  background: var(--card-bg); border: 1px solid var(--border);
  color: var(--text); padding: 6px 14px; border-radius: 8px;
  cursor: pointer; font-size: 0.85rem; font-family: var(--font);
  display: flex; align-items: center; gap: 4px;
}
.lang-btn .arrow { font-size: 0.7rem; margin-left: 2px; }
.lang-menu {
  display: none; position: absolute; top: 100%; right: 0; margin-top: 6px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  min-width: 160px; box-shadow: 0 8px 32px rgba(0,0,0,0.6); overflow: hidden;
  z-index: 200; max-height: 360px; overflow-y: auto;
}
.lang-dropdown.open .lang-menu { display: block; }
.lang-menu a {
  display: block; padding: 9px 16px; color: var(--text); text-decoration: none;
  font-size: 0.85rem; transition: background 0.15s;
}
.lang-menu a:hover, .lang-menu a.active { background: rgba(255,69,0,0.12); color: var(--accent); }

.theme-toggle {
  background: var(--card-bg); border: 1px solid var(--border);
  color: var(--text); font-size: 1.1rem; padding: 6px 10px;
  border-radius: 8px; cursor: pointer;
}

/* ── Hero ─────────────────────────────────────── */
.hero {
  padding: 48px 24px 32px; text-align: center;
  background: linear-gradient(180deg, var(--bg) 0%, #1a1010 50%, var(--bg2) 100%);
  border-bottom: 2px solid rgba(255,69,0,0.1);
}
.hero-inner { max-width: 900px; margin: 0 auto; }
.hero h1 {
  font-family: var(--font-display); font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700; color: var(--accent); letter-spacing: 2px;
  text-shadow: 0 0 40px rgba(255,69,0,0.2); margin-bottom: 12px;
}
.hero-subtitle {
  font-size: 1.05rem; color: var(--text2); max-width: 700px;
  margin: 0 auto 28px; line-height: 1.7;
}
.game-container {
  background: var(--surface); border-radius: 16px; border: 1px solid var(--border);
  overflow: hidden; box-shadow: 0 4px 24px rgba(0,0,0,0.5);
}
.game-canvas-wrap {
  width: 100%; aspect-ratio: 16/9; max-height: 460px; position: relative;
  background: linear-gradient(135deg, #0d0909 0%, #1a1212 50%, #0d0909 100%);
}
.game-canvas-wrap canvas { display: block; width: 100%; height: 100%; }
.game-controls {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  padding: 14px 20px; background: rgba(0,0,0,0.3); flex-wrap: wrap;
}

/* ── Buttons ──────────────────────────────────── */
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #cc3700);
  color: #fff; border: none; padding: 10px 24px; border-radius: 10px;
  font-size: 0.95rem; font-weight: 600; cursor: pointer;
  font-family: var(--font); transition: all 0.2s;
  box-shadow: 0 2px 12px var(--accent-glow);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 20px var(--accent-glow); }
.btn-secondary {
  background: rgba(255,255,255,0.06); color: var(--text);
  border: 1px solid var(--border); padding: 10px 20px; border-radius: 10px;
  font-size: 0.95rem; font-weight: 500; cursor: pointer;
  font-family: var(--font); transition: all 0.2s;
}
.btn-secondary:hover { background: rgba(255,69,0,0.1); border-color: var(--accent); }
.score-display {
  font-size: 0.95rem; font-weight: 600; color: var(--text);
  padding: 8px 14px; background: rgba(255,255,255,0.04); border-radius: 8px;
}

/* ── Sections ─────────────────────────────────── */
.section { padding: 56px 24px; }
.section-alt { background: var(--bg2); }
.section-inner { max-width: 1080px; margin: 0 auto; }
.section-title {
  font-family: var(--font-display); font-size: 2rem; font-weight: 700;
  text-align: center; color: var(--accent); margin-bottom: 8px;
  letter-spacing: 1px;
}
.section-desc {
  text-align: center; color: var(--text2); margin-bottom: 36px;
  font-size: 0.95rem; max-width: 600px; margin-left: auto; margin-right: auto;
}

/* ── Highlights Grid ──────────────────────────── */
.highlights-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.highlight-card {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; transition: all 0.25s;
}
.highlight-card:hover {
  border-color: var(--accent); transform: translateY(-2px);
  box-shadow: 0 4px 16px var(--accent-glow);
}
.highlight-icon { font-size: 2rem; display: block; margin-bottom: 10px; }
.highlight-card h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 6px; color: var(--accent); }
.highlight-card p { font-size: 0.9rem; color: var(--text2); line-height: 1.55; }

/* ── FAQ ──────────────────────────────────────── */
.faq-list { max-width: 760px; margin: 0 auto; }
.faq-item {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 10px; margin-bottom: 10px; overflow: hidden;
  transition: border-color 0.2s;
}
.faq-item:hover { border-color: var(--accent); }
.faq-item summary {
  padding: 16px 20px; font-weight: 600; font-size: 0.95rem;
  cursor: pointer; list-style: none; display: flex;
  justify-content: space-between; align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 1.3rem; color: var(--accent); transition: transform 0.2s; }
.faq-item[open] summary::after { content: '−'; }
.faq-answer {
  padding: 0 20px 18px; font-size: 0.9rem; color: var(--text2); line-height: 1.65;
}

/* ── Footer ───────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border); padding: 32px 24px;
  text-align: center; color: var(--text2); font-size: 0.85rem;
  background: var(--bg);
}
.footer-inner { max-width: 1080px; margin: 0 auto; }
.footer-links { display: flex; justify-content: center; gap: 20px; margin-bottom: 10px; flex-wrap: wrap; }
.footer-links a { color: var(--text2); text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: var(--accent); }
.footer-email { margin-bottom: 4px; font-weight: 500; }
.footer-copy { font-size: 0.8rem; opacity: 0.7; }

/* ── Cookie ───────────────────────────────────── */
.cookie-banner {
  display: none; position: fixed; bottom: 0; left: 0; right: 0;
  z-index: 999; background: var(--surface); border-top: 1px solid var(--border);
  padding: 14px 24px; align-items: center; justify-content: center;
  gap: 16px; flex-wrap: wrap; font-size: 0.85rem;
  box-shadow: 0 -2px 16px rgba(0,0,0,0.5);
}
.cookie-banner.visible { display: flex; }
.cookie-banner p { color: var(--text2); }

/* ── Animations ───────────────────────────────── */
.fade-in { animation: fadeIn 0.6s ease-out; }
.fade-in-1 { animation: fadeIn 0.6s 0.1s ease-out both; }
.fade-in-2 { animation: fadeIn 0.6s 0.2s ease-out both; }
.fade-in-3 { animation: fadeIn 0.6s 0.3s ease-out both; }
.fade-in-4 { animation: fadeIn 0.6s 0.4s ease-out both; }
.fade-in-5 { animation: fadeIn 0.6s 0.5s ease-out both; }
.fade-in-6 { animation: fadeIn 0.6s 0.6s ease-out both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* ── Responsive ───────────────────────────────── */
@media (max-width: 640px) {
  .navbar-inner { padding: 0 12px; }
  .hero { padding: 32px 16px 24px; }
  .hero h1 { font-size: 2rem; }
  .section { padding: 40px 16px; }
  .highlights-grid { grid-template-columns: 1fr; }
  .game-controls { gap: 8px; }
}

/* ── Static pages ─────────────────────────────── */
.static-page { max-width: 760px; margin: 0 auto; padding: 48px 24px; }
.static-page h1 { font-family: var(--font-display); font-size: 2.2rem; color: var(--accent); margin-bottom: 24px; }
.static-page h2 { font-size: 1.3rem; margin: 28px 0 12px; color: var(--accent2); }
.static-page p, .static-page li { color: var(--text2); font-size: 0.95rem; line-height: 1.75; margin-bottom: 12px; }
.static-page ul { padding-left: 20px; }
.static-page a { color: var(--accent); }
