/* =========================================================
   OnlinePlayZone — Core Stylesheet
   Design tokens
   ========================================================= */
:root {
  /* Colors */
  --bg-deep:      #0D0E1F;
  --bg-base:      #14152B;
  --bg-surface:   #1E2040;
  --bg-surface-2: #262a52;
  --accent-violet: #7C5CFC;
  --accent-violet-dim: #5b41c4;
  --accent-coral:  #FF6B5C;
  --accent-mint:   #4ECDC4;
  --text-hi:      #F5F3FF;
  --text-body:    #C9C6E2;
  --text-muted:   #8B87AD;
  --border-soft:  rgba(255,255,255,0.08);

  /* Type */
  --font-display: 'Chakra Petch', 'Segoe UI', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  /* Layout */
  --max-w: 1200px;
  --radius-card: 14px;
  --radius-bezel: 18px;
  --radius-pill: 999px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg-base);
  background-image:
    radial-gradient(circle at 15% 0%, rgba(124,92,252,0.16), transparent 45%),
    radial-gradient(circle at 85% 20%, rgba(255,107,92,0.10), transparent 40%);
  background-attachment: fixed;
  color: var(--text-body);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--text-hi);
  margin: 0 0 0.5em;
  letter-spacing: 0.01em;
  line-height: 1.15;
}

p { margin: 0 0 1em; }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* Focus visibility for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent-mint);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* =========================================================
   Header / Nav
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13,14,31,0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-hi);
}

.logo .logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent-violet), var(--accent-coral));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 3px rgba(124,92,252,0.18);
}
.logo .logo-mark svg { width: 18px; height: 18px; }

.logo .zone { color: var(--accent-coral); }

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.95rem;
  font-weight: 500;
}

.nav-links a {
  color: var(--text-body);
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--text-hi);
  border-color: var(--accent-mint);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--text-hi);
  font-size: 1.1rem;
}

@media (max-width: 760px) {
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-deep);
    border-bottom: 1px solid var(--border-soft);
    flex-direction: column;
    gap: 0;
    display: none;
    padding: 8px 24px 18px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; padding: 12px 0; border-bottom: 1px solid var(--border-soft); }
  .nav-toggle { display: inline-flex; }
}

/* =========================================================
   Buttons
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: linear-gradient(135deg, var(--accent-violet), #9a7bff);
  color: #fff;
  box-shadow: 0 8px 24px -8px rgba(124,92,252,0.7);
}
.btn-primary:hover { box-shadow: 0 10px 28px -6px rgba(124,92,252,0.85); }

.btn-outline {
  background: transparent;
  border-color: var(--border-soft);
  color: var(--text-hi);
}
.btn-outline:hover { border-color: var(--accent-mint); color: var(--accent-mint); }

.btn-coral {
  background: var(--accent-coral);
  color: #1a0f0d;
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
  padding: 64px 0 40px;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-mint);
  background: rgba(78,205,196,0.08);
  border: 1px solid rgba(78,205,196,0.25);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  margin-bottom: 18px;
}
.eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent-mint);
  box-shadow: 0 0 8px var(--accent-mint);
  animation: pulse 1.6s infinite ease-in-out;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

.hero h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  margin-bottom: 0.35em;
}
.hero h1 .hl { color: var(--accent-coral); }
.hero p.lead {
  font-size: 1.08rem;
  color: var(--text-body);
  max-width: 46ch;
  margin-bottom: 1.6em;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-stats {
  display: flex;
  gap: 28px;
  margin-top: 34px;
  font-family: var(--font-mono);
}
.hero-stats div { text-align: left; }
.hero-stats .num { font-size: 1.5rem; color: var(--text-hi); font-weight: 700; }
.hero-stats .label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; }

/* --- Bezel: the signature framing device used for every game screen --- */
.bezel {
  position: relative;
  background: linear-gradient(160deg, #2b2e58, #15172e 65%);
  border-radius: var(--radius-bezel);
  padding: 14px;
  box-shadow:
    0 20px 50px -20px rgba(0,0,0,0.6),
    inset 0 0 0 1px rgba(255,255,255,0.06);
}
.bezel::before {
  content: "";
  position: absolute;
  top: 10px; left: 22px;
  width: 34px; height: 6px;
  border-radius: 4px;
  background: rgba(255,255,255,0.12);
}
.bezel .screen {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #0a0b18;
}
.bezel .screen img,
.bezel .screen iframe {
  width: 100%; height: 100%;
  object-fit: cover;
  border: 0;
}
.bezel .screen::after {
  /* subtle scanline sheen — signature texture, kept faint */
  content: "";
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0.035) 0px,
    rgba(255,255,255,0.035) 1px,
    transparent 1px,
    transparent 3px
  );
  pointer-events: none;
  mix-blend-mode: overlay;
}
.bezel .power {
  position: absolute;
  bottom: 10px; right: 16px;
  display: flex; align-items: center; gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
}
.bezel .power .led {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-mint);
  box-shadow: 0 0 6px var(--accent-mint);
}

/* =========================================================
   Section headers
   ========================================================= */
.section { padding: 56px 0; }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}
.section-head h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin: 0; }
.section-head p { margin: 6px 0 0; color: var(--text-muted); max-width: 60ch; }
.section-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-coral);
}

/* =========================================================
   Category chips
   ========================================================= */
.chip-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}
.chip {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-soft);
  background: var(--bg-surface);
  color: var(--text-body);
  cursor: pointer;
  transition: all .15s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.chip .swatch { width: 8px; height: 8px; border-radius: 50%; }
.chip:hover { border-color: var(--accent-violet); color: var(--text-hi); }
.chip.active {
  background: var(--accent-violet);
  border-color: var(--accent-violet);
  color: #fff;
}

/* =========================================================
   Game grid + cards
   ========================================================= */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 22px;
}

.game-card {
  display: block;
  color: inherit;
}
.game-card .bezel { padding: 8px; transition: transform .2s ease, box-shadow .2s ease; }
.game-card:hover .bezel {
  transform: translateY(-4px);
  box-shadow: 0 24px 50px -18px rgba(124,92,252,0.45), inset 0 0 0 1px rgba(255,255,255,0.1);
}
.game-card .bezel::before { top: 6px; left: 14px; width: 22px; height: 4px; }
.game-card .power { bottom: 6px; right: 10px; }

.game-card .info {
  padding: 12px 4px 0;
}
.game-card .title {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--text-hi);
  margin-bottom: 4px;
}
.game-card .meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.game-card .meta .cat-dot { width: 6px; height: 6px; border-radius: 50%; }

.badge {
  position: absolute;
  top: 20px; left: 20px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 6px;
  color: #1a0f0d;
  background: var(--accent-coral);
  z-index: 2;
}
.badge.new { background: var(--accent-mint); }

/* =========================================================
   Feature / info blocks
   ========================================================= */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 800px) { .features-grid { grid-template-columns: 1fr; } }

.feature-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-card);
  padding: 26px;
}
.feature-card .icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(124,92,252,0.15);
  color: var(--accent-violet);
  margin-bottom: 16px;
}
.feature-card h3 { font-size: 1.1rem; margin-bottom: 6px; }
.feature-card p { color: var(--text-muted); margin: 0; font-size: 0.94rem; }

/* =========================================================
   Content pages (about, privacy, terms, contact)
   ========================================================= */
.prose {
  max-width: 760px;
}
.prose h2 { margin-top: 1.6em; font-size: 1.35rem; }
.prose h3 { margin-top: 1.2em; font-size: 1.1rem; color: var(--accent-mint); }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 0.5em; }
.prose a { color: var(--accent-mint); text-decoration: underline; text-underline-offset: 3px; }

.page-hero {
  padding: 48px 0 8px;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 40px;
}
.page-hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.page-hero p { color: var(--text-muted); max-width: 60ch; }

/* Contact form */
.form-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-card);
  padding: 30px;
  max-width: 560px;
}
.form-row { margin-bottom: 18px; }
.form-row label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.form-row input,
.form-row textarea {
  width: 100%;
  background: var(--bg-deep);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--text-hi);
  font-family: var(--font-body);
  font-size: 0.95rem;
}
.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--accent-violet);
}
.form-note { font-size: 0.82rem; color: var(--text-muted); margin-top: 10px; }

/* =========================================================
   Play page
   ========================================================= */
.player-wrap { padding: 32px 0 60px; }
.player-bezel {
  background: linear-gradient(160deg, #2b2e58, #15172e 65%);
  border-radius: var(--radius-bezel);
  padding: 16px;
  box-shadow: 0 20px 50px -20px rgba(0,0,0,0.6), inset 0 0 0 1px rgba(255,255,255,0.06);
}
.player-screen {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
  width: 100%;
  aspect-ratio: 16 / 9;
}
.player-screen iframe {
  width: 100%; height: 100%; border: 0; display: block;
}

/* On phones, a wide 16:9 box leaves games (which are mostly square
   or portrait-shaped) with very little height to work with, so they
   render small in the middle of a lot of empty space. Give the
   player a tall box driven by viewport height instead. */
@media (max-width: 760px) {
  .player-screen {
    aspect-ratio: unset;
    height: min(78vh, 640px);
    height: min(78svh, 640px);
  }
}
.player-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding-top: 14px;
}
.player-toolbar .left { display: flex; align-items: center; gap: 12px; }
.player-toolbar h1 { font-size: 1.3rem; margin: 0; }

.game-detail { margin-top: 40px; display: grid; grid-template-columns: 2fr 1fr; gap: 32px; }
@media (max-width: 860px) { .game-detail { grid-template-columns: 1fr; } }
.related-list { display: flex; flex-direction: column; gap: 14px; }
.related-card {
  display: flex;
  gap: 12px;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 10px;
}
.related-card img { width: 64px; height: 48px; object-fit: cover; border-radius: 6px; }
.related-card .title { font-size: 0.9rem; color: var(--text-hi); font-family: var(--font-display); }

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  border-top: 1px solid var(--border-soft);
  margin-top: 60px;
  padding: 48px 0 28px;
  background: var(--bg-deep);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 30px;
  margin-bottom: 36px;
}
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid h4 {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 10px; }
.footer-grid a { color: var(--text-body); font-size: 0.92rem; }
.footer-grid a:hover { color: var(--accent-mint); }
.footer-about p { color: var(--text-muted); font-size: 0.9rem; max-width: 32ch; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 24px;
  border-top: 1px solid var(--border-soft);
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* =========================================================
   Empty state
   ========================================================= */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state h3 { color: var(--text-hi); }

/* Utility */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
