/* =========================================================
   XE888 Slot — Design System
   Dark, premium iGaming aesthetic. Mobile-first.
   ========================================================= */

:root {
  /* Palette */
  --bg-void: #0a0b14;
  --bg-base: #0f1120;
  --bg-elevated: #161829;
  --bg-card: #1a1c30;
  --bg-card-hover: #21243c;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);

  --brand-purple: #7c3aed;
  --brand-purple-light: #a78bfa;
  --brand-blue: #2563eb;
  --brand-blue-light: #60a5fa;
  --brand-gold: #f2b84b;
  --brand-gold-light: #ffd77a;
  --brand-emerald: #10b981;
  --brand-emerald-light: #34d399;

  --grad-hero: linear-gradient(135deg, #1a0b3d 0%, #0f1120 55%, #061a2c 100%);
  --grad-brand: linear-gradient(135deg, var(--brand-purple), var(--brand-blue));
  --grad-gold: linear-gradient(135deg, #f2b84b, #d99a2b);

  --text-primary: #f3f4f8;
  --text-secondary: #b8bcd4;
  --text-muted: #7d8199;
  --text-on-gold: #1a1206;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --shadow-card: 0 8px 30px rgba(0, 0, 0, 0.35);
  --shadow-glow-purple: 0 0 40px rgba(124, 58, 237, 0.25);
  --shadow-glow-gold: 0 0 30px rgba(242, 184, 75, 0.2);

  --container: 1200px;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: "Poppins", var(--font-body);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0;
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  width: 100%;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { padding-left: 1.25rem; }
table { border-collapse: collapse; width: 100%; }
button { font-family: inherit; }

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.25;
  margin: 0 0 0.75rem;
  font-weight: 700;
}
h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin-top: 2.5rem; }
h3 { font-size: clamp(1.15rem, 2.2vw, 1.4rem); margin-top: 1.75rem; color: var(--brand-gold-light); }
p { color: var(--text-secondary); margin: 0 0 1rem; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 1.25rem; }
.section { padding: 3.5rem 0; }
.section-alt { background: var(--bg-elevated); }

/* Skip link */
.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--brand-purple);
  color: #fff; padding: 0.75rem 1.25rem; z-index: 200; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* Focus states */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--brand-gold-light);
  outline-offset: 2px;
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10, 11, 20, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-subtle);
}
.nav-wrap {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.85rem 1.25rem; max-width: var(--container); margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 0.6rem; font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; color: #fff; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 10px; background: var(--grad-brand);
  display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-glow-purple);
  font-weight: 800; color: #fff; font-size: 1rem;
}
.brand-name span { color: var(--brand-gold-light); }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--border-strong); color: #fff;
  width: 42px; height: 42px; border-radius: 8px; cursor: pointer; align-items: center; justify-content: center;
}
.nav-toggle svg { width: 22px; height: 22px; }

.primary-nav { display: flex; align-items: center; gap: 0.25rem; }
.primary-nav ul { list-style: none; display: flex; gap: 0.1rem; margin: 0; padding: 0; align-items: center; }
.primary-nav a {
  display: inline-block; padding: 0.6rem 0.85rem; border-radius: 8px; color: var(--text-secondary);
  font-size: 0.92rem; font-weight: 600; transition: background 0.15s, color 0.15s;
}
.primary-nav a:hover, .primary-nav a[aria-current="page"] { color: #fff; background: rgba(255,255,255,0.06); }
.nav-cta { display: flex; gap: 0.6rem; margin-left: 0.5rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  padding: 0.65rem 1.3rem; border-radius: 10px; font-weight: 700; font-size: 0.92rem;
  cursor: pointer; border: 1px solid transparent; transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-gold { background: var(--grad-gold); color: var(--text-on-gold); box-shadow: var(--shadow-glow-gold); }
.btn-outline { background: transparent; border-color: var(--border-strong); color: #fff; }
.btn-outline:hover { background: rgba(255,255,255,0.06); }
.btn-ghost { background: rgba(255,255,255,0.05); color: #fff; }
.btn-block { width: 100%; }
.btn-lg { padding: 0.9rem 1.75rem; font-size: 1rem; }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { padding: 0.9rem 0; border-bottom: 1px solid var(--border-subtle); background: var(--bg-void); }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0; padding: 0; font-size: 0.85rem; }
.breadcrumbs li { display: flex; align-items: center; gap: 0.35rem; color: var(--text-muted); }
.breadcrumbs a { color: var(--text-secondary); }
.breadcrumbs a:hover { color: var(--brand-gold-light); }
.breadcrumbs li[aria-current="page"] { color: var(--text-muted); }

/* ---------- Hero ---------- */
.hero {
  background: var(--grad-hero);
  position: relative; overflow: hidden;
  padding: 3.5rem 0 3rem;
  border-bottom: 1px solid var(--border-subtle);
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 15% 20%, rgba(124,58,237,0.35), transparent 40%),
              radial-gradient(circle at 85% 75%, rgba(37,99,235,0.3), transparent 45%);
  pointer-events: none;
}
.hero-grid { position: relative; display: grid; gap: 2rem; align-items: center; grid-template-columns: 1fr; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--brand-gold-light);
  background: rgba(242,184,75,0.1); border: 1px solid rgba(242,184,75,0.3);
  padding: 0.35rem 0.75rem; border-radius: 999px; margin-bottom: 1rem;
}
.hero h1 { color: #fff; }
.hero-lead { font-size: 1.05rem; max-width: 60ch; }
.hero-cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.hero-art { display: flex; justify-content: center; }
.hero-art img { width: 100%; max-width: 420px; filter: drop-shadow(0 20px 40px rgba(124,58,237,0.25)); }

@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.1fr 0.9fr; }
}

/* ---------- Cards / Grids ---------- */
.grid { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.card {
  background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-md);
  padding: 1.5rem; box-shadow: var(--shadow-card); transition: transform 0.18s, border-color 0.18s, background 0.18s;
}
.card:hover { transform: translateY(-3px); border-color: var(--border-strong); background: var(--bg-card-hover); }

.game-card { overflow: hidden; padding: 0; display: flex; flex-direction: column; }
.game-card-art { aspect-ratio: 16/10; background: var(--bg-elevated); overflow: hidden; }
.game-card-art img { width: 100%; height: 100%; object-fit: cover; }
.game-card-body { padding: 1.15rem; flex: 1; display: flex; flex-direction: column; }
.game-card-tag {
  align-self: flex-start; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--brand-emerald-light); background: rgba(16,185,129,0.12); border: 1px solid rgba(16,185,129,0.3);
  padding: 0.2rem 0.55rem; border-radius: 999px; margin-bottom: 0.6rem;
}
.game-card h3 { margin-top: 0; font-size: 1.1rem; color: #fff; }
.game-card p { font-size: 0.9rem; flex: 1; }
.game-card .btn { margin-top: 0.75rem; align-self: flex-start; }

.category-card { text-align: left; }
.category-icon {
  width: 52px; height: 52px; border-radius: 12px; background: var(--grad-brand);
  display: flex; align-items: center; justify-content: center; margin-bottom: 1rem; box-shadow: var(--shadow-glow-purple);
}
.category-icon svg { width: 28px; height: 28px; color: #fff; }

/* ---------- Article / blog cards ---------- */
.article-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.article-card-art { aspect-ratio: 16/9; overflow: hidden; }
.article-card-art img { width: 100%; height: 100%; object-fit: cover; }
.article-card-body { padding: 1.25rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.article-meta { font-size: 0.78rem; color: var(--text-muted); display: flex; gap: 0.5rem; flex-wrap: wrap; }
.article-card h3 { margin-top: 0; font-size: 1.05rem; color: #fff; }
.article-card .excerpt { font-size: 0.9rem; flex: 1; }
.article-card .read-more { font-weight: 700; color: var(--brand-gold-light); font-size: 0.88rem; }

/* ---------- Section headers ---------- */
.section-head { max-width: 720px; margin: 0 auto 2rem; text-align: center; }
.section-head.align-left { margin: 0 0 2rem; text-align: left; }
.eyebrow {
  display: inline-block; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--brand-purple-light); margin-bottom: 0.5rem;
}

/* ---------- Feature list ---------- */
.feature-list { list-style: none; padding: 0; display: grid; gap: 0.9rem; }
.feature-list li { display: flex; gap: 0.75rem; align-items: flex-start; color: var(--text-secondary); }
.feature-list svg { flex-shrink: 0; width: 22px; height: 22px; color: var(--brand-emerald-light); margin-top: 2px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius-md); border: 1px solid var(--border-subtle); margin: 1.5rem 0; }
table.data-table { min-width: 480px; }
.data-table th, .data-table td { text-align: left; padding: 0.75rem 1rem; border-bottom: 1px solid var(--border-subtle); font-size: 0.92rem; }
.data-table th { background: var(--bg-elevated); color: #fff; font-weight: 700; }
.data-table tr:last-child td { border-bottom: none; }
.data-table td { color: var(--text-secondary); }

/* ---------- FAQ ---------- */
.faq-item {
  background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-md);
  margin-bottom: 0.75rem; overflow: hidden;
}
.faq-item summary {
  cursor: pointer; list-style: none; padding: 1.1rem 1.25rem; font-weight: 700; color: #fff;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; font-size: 1.4rem; color: var(--brand-gold-light); flex-shrink: 0; transition: transform 0.2s;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-answer { padding: 0 1.25rem 1.1rem; color: var(--text-secondary); }

/* ---------- Callouts ---------- */
.callout {
  border-radius: var(--radius-md); padding: 1.25rem 1.4rem; margin: 1.75rem 0; border: 1px solid;
  display: flex; gap: 0.85rem; align-items: flex-start;
}
.callout svg { width: 24px; height: 24px; flex-shrink: 0; margin-top: 2px; }
.callout p, .callout strong { margin: 0; }
.callout-responsible { background: rgba(37, 99, 235, 0.08); border-color: rgba(37, 99, 235, 0.35); }
.callout-responsible svg { color: var(--brand-blue-light); }
.callout-info { background: rgba(124, 58, 237, 0.08); border-color: rgba(124, 58, 237, 0.35); }
.callout-info svg { color: var(--brand-purple-light); }
.callout-note { background: rgba(242,184,75,0.08); border-color: rgba(242,184,75,0.35); }
.callout-note svg { color: var(--brand-gold-light); }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--grad-brand); border-radius: var(--radius-lg); padding: 2.5rem;
  text-align: center; margin: 2rem 0; box-shadow: var(--shadow-glow-purple);
}
.cta-band h2 { color: #fff; margin-top: 0; }
.cta-band p { color: rgba(255,255,255,0.85); max-width: 60ch; margin-left: auto; margin-right: auto; }
.cta-band .btn-outline { border-color: rgba(255,255,255,0.5); }

/* ---------- Forms ---------- */
.form-panel { max-width: 480px; margin: 0 auto; }
.form-group { margin-bottom: 1.1rem; }
.form-group label { display: block; font-weight: 600; margin-bottom: 0.4rem; font-size: 0.9rem; color: #fff; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 0.75rem 0.9rem; border-radius: 10px; border: 1px solid var(--border-strong);
  background: var(--bg-elevated); color: #fff; font-size: 0.95rem;
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--brand-purple-light); }
.form-hint { font-size: 0.82rem; color: var(--text-muted); margin-top: 0.35rem; }
.checkbox-row { display: flex; align-items: flex-start; gap: 0.6rem; font-size: 0.85rem; color: var(--text-secondary); }
.checkbox-row input { width: auto; margin-top: 3px; }

/* ---------- Article prose ---------- */
.prose { max-width: 760px; margin: 0 auto; }
.prose h2:first-of-type { margin-top: 0.5rem; }
.article-header { max-width: 760px; margin: 0 auto 2rem; }
.article-header .article-meta { margin-bottom: 1rem; }
.article-header h1 { color: #fff; }
.article-hero-art { border-radius: var(--radius-lg); overflow: hidden; margin: 1.5rem 0 2rem; border: 1px solid var(--border-subtle); }
.article-hero-art img { width: 100%; display: block; }
.key-takeaways {
  background: var(--bg-card); border: 1px solid var(--border-subtle); border-left: 4px solid var(--brand-gold);
  border-radius: var(--radius-md); padding: 1.25rem 1.5rem; margin: 1.5rem 0;
}
.key-takeaways h2 { margin-top: 0; font-size: 1.1rem; }
.key-takeaways ul { margin: 0; padding-left: 1.1rem; }
.key-takeaways li { color: var(--text-secondary); margin-bottom: 0.4rem; }
.author-box {
  display: flex; gap: 1rem; align-items: center; background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md); padding: 1.25rem; margin: 2rem 0;
}
.author-avatar {
  width: 56px; height: 56px; border-radius: 50%; background: var(--grad-brand); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-weight: 800; color: #fff; font-family: var(--font-display);
}
.author-box a { font-weight: 700; color: var(--brand-gold-light); }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-void); border-top: 1px solid var(--border-subtle); padding: 3rem 0 1.5rem; margin-top: 3rem; }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 780px) { .footer-grid { grid-template-columns: 1.3fr repeat(3, 1fr); } }
.footer-col h3 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-top: 0; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.55rem; }
.footer-col a { color: var(--text-secondary); font-size: 0.92rem; }
.footer-col a:hover { color: var(--brand-gold-light); }
.footer-brand p { font-size: 0.88rem; max-width: 42ch; }
.footer-rg {
  margin-top: 2.5rem; padding: 1.25rem; border-radius: var(--radius-md); background: rgba(37,99,235,0.08);
  border: 1px solid rgba(37,99,235,0.3); font-size: 0.85rem; color: var(--text-secondary);
}
.footer-rg strong { color: #fff; }
.footer-bottom {
  margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--border-subtle);
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; font-size: 0.8rem; color: var(--text-muted);
}
.age-badge {
  display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%;
  background: rgba(255,255,255,0.08); border: 1px solid var(--border-strong); font-weight: 800; font-size: 0.75rem; color: #fff;
}

/* ---------- Utilities ---------- */
.text-muted { color: var(--text-muted); }
.mt-0 { margin-top: 0; }
.related-links { display: grid; gap: 0.75rem; margin: 1.5rem 0; }
.related-links a {
  display: block; padding: 0.85rem 1.1rem; background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm); font-weight: 600; color: var(--text-secondary);
}
.related-links a:hover { border-color: var(--brand-purple-light); color: #fff; }

/* Mobile nav */
@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .primary-nav {
    position: fixed; inset: 0 0 0 auto; width: min(320px, 85vw); height: 100vh;
    background: var(--bg-elevated); border-left: 1px solid var(--border-subtle);
    transform: translateX(100%); transition: transform 0.25s ease; z-index: 150;
    flex-direction: column; align-items: stretch; padding: 5rem 1.25rem 2rem; overflow-y: auto;
  }
  .primary-nav.is-open { transform: translateX(0); }
  .primary-nav ul { flex-direction: column; align-items: stretch; gap: 0.25rem; }
  .primary-nav a { padding: 0.85rem 1rem; font-size: 1rem; }
  .nav-cta { flex-direction: column; margin-left: 0; margin-top: 1rem; }
  .nav-backdrop {
    display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 140;
  }
  .nav-backdrop.is-open { display: block; }
}
@media (min-width: 901px) {
  .primary-nav { display: flex !important; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
