@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Outfit:wght@600;700;800;900&display=swap");

:root {
  /* Surface Elevation Hierarchy */
  --bg-base: #0a0e17;
  --bg-surface: #121826;
  --bg-surface-elevated: #182032;
  --bg-surface-hover: #1f2940;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(245, 158, 11, 0.35);
  --border-gold: rgba(245, 158, 11, 0.32);

  /* Brand & Accent Colors */
  --primary: #f59e0b;
  --primary-hover: #d97706;
  --primary-gradient: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
  --accent-trust: #10b981;
  --accent-trust-bg: rgba(16, 185, 129, 0.12);

  /* Typography Colors */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  /* Typography Families */
  --font-display: "Outfit", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Radii & Shadows */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-pill: 9999px;
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 4px 20px rgba(245, 158, 11, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  color: #fbbf24;
}

.skip {
  position: absolute;
  left: -999px;
  top: auto;
}

.skip:focus {
  left: 12px;
  top: 12px;
  z-index: 999;
  background: #fff;
  color: #0b0e17;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-weight: 700;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(10, 14, 23, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
}

.nav {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 18px;
  position: relative;
}

.logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.logo img {
  width: 140px;
  height: auto;
}

.links {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.desktop-links a {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease;
}

.desktop-links a:hover,
.desktop-links a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.desktop-links a[aria-current="page"] {
  color: var(--primary);
}

.nav-control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 42px;
  padding: 8px 14px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s, border-color 0.2s;
}

.nav-control:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.burger-icon {
  display: grid;
  gap: 4px;
  width: 18px;
}

.burger-icon span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.menu-toggle {
  display: none;
}

.menu-toggle summary,
.lang-menu summary {
  list-style: none;
}

.menu-toggle summary::-webkit-details-marker,
.lang-menu summary::-webkit-details-marker {
  display: none;
}

.lang-menu {
  position: relative;
  flex-shrink: 0;
}

.lang-options {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 110px;
  background: #141826;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.7);
  padding: 6px;
  z-index: 100;
  display: none;
}

.lang-menu[open] .lang-options {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.lang-options a {
  display: block;
  padding: 8px 12px;
  border-radius: 6px;
  color: #f1f5f9;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  transition: background 0.2s;
}

.lang-options a:hover {
  background: rgba(245, 158, 11, 0.15);
  color: var(--primary);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-gradient);
  color: #0a0e17;
  font-weight: 800;
  font-size: 15px;
  border-radius: var(--radius-pill);
  padding: 12px 24px;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.32);
  min-height: 46px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.42);
  filter: brightness(1.05);
  color: #0a0e17;
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.25);
}

.nav > .btn {
  min-height: 42px;
  padding: 10px 20px;
  font-size: 14px;
}

/* ==========================================================================
   Main Layout & Hero Section
   ========================================================================== */
main {
  max-width: 1140px;
  margin: 0 auto;
  padding: 24px 18px 80px;
  display: grid;
  grid-template-columns: minmax(0, 1.85fr) minmax(280px, 1fr);
  grid-template-areas: "hero dock" "content content";
  gap: 24px;
  align-items: start;
}

.hero {
  grid-area: hero;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  min-height: 380px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 30px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  box-shadow: var(--shadow-card);
}

.hero-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.5) saturate(1.1);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 14, 23, 0.3) 0%,
    rgba(10, 14, 23, 0.75) 55%,
    rgba(10, 14, 23, 0.98) 100%
  );
  pointer-events: none;
}

.hero-panel {
  position: relative;
  z-index: 2;
  min-width: 0;
}

.trust-live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #34d399;
  background: var(--accent-trust-bg);
  border: 1px solid rgba(16, 185, 129, 0.28);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 12px;
}

.trust-live::before {
  content: "✓";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #10b981;
  color: #0a0e17;
  font-size: 10px;
  font-weight: 900;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 12px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.9);
  letter-spacing: -0.015em;
}

.lead {
  max-width: 58ch;
  color: #cbd5e1;
  font-size: 1.05rem;
  line-height: 1.6;
  margin: 0 0 16px;
}

.age {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.08);
  padding: 3px 8px;
  border-radius: 4px;
  margin: 0 14px 0 0;
}

.hero-play {
  margin-top: 4px;
}

/* ==========================================================================
   Reported Offer Dock (Sidebar)
   ========================================================================== */
.offer-dock {
  grid-area: dock;
  background: linear-gradient(180deg, #161d2e 0%, #121826 100%);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card), 0 0 24px rgba(245, 158, 11, 0.06);
  position: relative;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.offer-dock p:first-child {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 10px;
  line-height: 1.4;
}

.offer-dock p:nth-child(2) {
  font-size: 0.92rem;
  color: var(--primary);
  font-weight: 600;
  margin: 0 0 10px;
  background: rgba(245, 158, 11, 0.08);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(245, 158, 11, 0.18);
}

.offer-dock p:nth-child(3) {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0 0 18px;
}

.offer-dock .btn {
  width: 100%;
  box-sizing: border-box;
}

/* ==========================================================================
   Content Area & Sections
   ========================================================================== */
.content {
  grid-area: content;
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

section {
  background: var(--bg-surface);
  padding: 26px 28px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
  min-width: 0;
}

h2, h3 {
  font-family: var(--font-display);
  letter-spacing: -0.01em;
}

h2 {
  font-size: 1.45rem;
  font-weight: 800;
  margin: 0 0 12px;
  color: var(--text-primary);
}

h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 8px;
}

p {
  color: #cbd5e1;
  margin: 0 0 12px;
}

p:last-child {
  margin-bottom: 0;
}

/* ==========================================================================
   Quick Actions
   ========================================================================== */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.quick-actions a {
  background: var(--bg-surface-elevated);
  padding: 13px 14px;
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 14px;
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 48px;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.quick-actions a:hover {
  background: var(--bg-surface-hover);
  border-color: rgba(245, 158, 11, 0.35);
  color: var(--primary);
  transform: translateY(-2px);
}

/* ==========================================================================
   Games Grid & Cards
   ========================================================================== */
.games,
.games-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  overflow-wrap: anywhere;
  margin-top: 14px;
}

.game,
.game-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #141826;
  border: 1px solid var(--border-subtle);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  position: relative;
}

.game:hover,
.game-card:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.4);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5);
}

.game-card a {
  display: block;
  position: relative;
  overflow: hidden;
  aspect-ratio: 226 / 338;
  background: #0d121c;
}

.game img,
.game-card img {
  width: 100%;
  height: 100%;
  aspect-ratio: 226 / 338;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.game-card:hover img {
  transform: scale(1.06);
}

.game-card a::after {
  content: "▶";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #0a0e17;
  background: var(--primary-gradient);
  width: 44px;
  height: 44px;
  margin: auto;
  border-radius: 50%;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.25s ease, transform 0.25s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
}

.game-card:hover a::after {
  opacity: 1;
  transform: scale(1);
}

.game-card h3 {
  font-size: 0.92rem;
  font-weight: 700;
  margin: 10px 10px 4px;
  line-height: 1.3;
  color: #fff;
}

.game-card p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0 10px 12px;
  overflow-wrap: anywhere;
}

/* ==========================================================================
   Table Component
   ========================================================================== */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-top: 10px;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th {
  background: var(--bg-surface-elevated);
  padding: 13px 16px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-subtle);
}

td {
  padding: 13px 16px;
  font-size: 14px;
  color: #cbd5e1;
  border-bottom: 1px solid var(--border-subtle);
}

tr:last-child td {
  border-bottom: none;
}

tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.02);
}

/* ==========================================================================
   Steps Component
   ========================================================================== */
.steps {
  display: grid;
  gap: 10px;
  padding: 0;
  list-style: none;
  counter-reset: step-counter;
}

.steps li {
  counter-increment: step-counter;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.03);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  font-size: 15px;
}

.steps li::before {
  content: counter(step-counter);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary-gradient);
  color: #0a0e17;
  font-weight: 800;
  font-size: 13px;
  flex-shrink: 0;
}

/* ==========================================================================
   FAQ Component
   ========================================================================== */
.faq details {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-surface-elevated);
  margin-bottom: 8px;
  overflow: hidden;
  transition: border-color 0.2s, background 0.2s;
}

.faq details[open] {
  border-color: rgba(245, 158, 11, 0.3);
  background: #161d2e;
}

.faq summary {
  padding: 14px 18px;
  font-weight: 700;
  font-size: 15px;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  transition: transform 0.2s;
  flex-shrink: 0;
  margin-left: 12px;
}

.faq details[open] summary::after {
  content: "−";
}

.faq details p {
  padding: 0 18px 16px;
  margin: 0;
  color: #cbd5e1;
  font-size: 14px;
  line-height: 1.6;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 12px;
}

/* ==========================================================================
   Author / E-E-A-T Box
   ========================================================================== */
.author {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 16px;
  align-items: center;
}

.author img {
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

/* ==========================================================================
   Calculator Component
   ========================================================================== */
.calc {
  display: grid;
  gap: 12px;
  max-width: 440px;
  margin-top: 8px;
}

.calc label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.calc input {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: var(--bg-base);
  color: var(--text-primary);
  font-size: 16px; /* 16px prevents iOS auto-zoom */
  font-weight: 700;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.calc input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

#calc-out {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: #fbbf24;
  font-weight: 700;
  font-size: 15px;
  margin: 0;
}

/* ==========================================================================
   Sticky Bottom CTA
   ========================================================================== */
.sticky-cta {
  display: none;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  max-width: 1140px;
  margin: 0 auto;
  padding: 24px 18px 48px;
  border-top: 1px solid var(--border-subtle);
}

.site-disclaimer {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

/* ==========================================================================
   Responsive Breakpoints & Mobile Optimization
   ========================================================================== */
@media (max-width: 860px) {
  main {
    grid-template-columns: 1fr;
    grid-template-areas: "hero" "dock" "content";
    gap: 18px;
    padding: 16px 14px 80px;
  }

  .nav {
    gap: 8px;
    padding: 10px 14px;
    justify-content: space-between;
  }

  .nav .logo img {
    width: 120px;
  }

  /* Ensure burger dropdown is always full-width on mobile */
  .menu-toggle {
    display: block;
    position: static;
  }

  nav .desktop-links {
    display: none;
  }

  .menu-toggle[open] .links {
    position: absolute;
    top: calc(100% + 8px);
    left: 14px;
    right: 14px;
    width: calc(100% - 28px);
    min-width: 280px;
    max-width: calc(100vw - 28px);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px;
    background: #141826;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--radius-md);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.85);
    z-index: 100;
  }

  .menu-toggle[open] .links a {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 600;
    min-height: 44px;
    box-sizing: border-box;
    text-decoration: none;
  }

  .menu-toggle[open] .links a:hover,
  .menu-toggle[open] .links a[aria-current="page"] {
    background: rgba(245, 158, 11, 0.15);
    color: var(--primary);
  }

  .nav > .btn {
    padding: 8px 14px;
    font-size: 13px;
    min-height: 38px;
  }

  .hero {
    min-height: 320px;
    padding: 22px;
  }

  .offer-dock {
    position: static;
  }

  .quick-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .games,
  .games-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  section {
    padding: 20px 18px;
    border-radius: var(--radius-md);
  }

  .sticky-cta {
    display: flex;
    justify-content: center;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 90;
    background: rgba(10, 14, 23, 0.94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid rgba(245, 158, 11, 0.3);
    padding: 10px 16px;
    padding-bottom: max(10px, env(safe-area-inset-bottom, 10px));
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.5);
  }

  .sticky-cta .btn {
    width: 100%;
    max-width: 440px;
    min-height: 48px;
    font-size: 16px;
  }

  body {
    padding-bottom: 74px;
  }
}

@media (max-width: 420px) {
  .nav {
    gap: 6px;
    padding: 8px 10px;
  }

  .nav .logo img {
    width: 104px;
  }

  .nav-control {
    min-width: 38px;
    min-height: 38px;
    padding: 6px 10px;
    font-size: 12px;
  }

  .nav > .btn {
    padding: 6px 10px;
    font-size: 12px;
    min-height: 34px;
  }

  .hero h1 {
    font-size: 1.55rem;
  }

  .lead {
    font-size: 0.95rem;
  }

  .author {
    grid-template-columns: 56px 1fr;
    gap: 12px;
  }

  .author img {
    width: 56px;
    height: 56px;
  }
}
