/* Pixlarc - self-contained stylesheet. No external CDN, no build step. */

:root {
  --bg: #0b1020;
  --bg-soft: #131a2e;
  --panel: #182140;
  --panel-2: #1f2a4d;
  --line: #2a3763;
  --text: #e8ecf7;
  --muted: #9aa6c4;
  --brand: #20adff;
  --brand-2: #7c5cff;
  --accent: #ffd23f;
  --radius: 12px;
  --maxw: 1200px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(11, 16, 32, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 16px; height: 60px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; letter-spacing: -.02em; }
.logo-mark {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  display: grid; place-items: center; font-size: 16px; font-weight: 900; color: #fff;
}
.nav { display: flex; gap: 18px; margin-left: 8px; }
.nav a { color: var(--muted); font-size: 14px; font-weight: 600; }
.nav a:hover { color: #fff; }
.search { margin-left: auto; position: relative; }
.search input {
  width: 220px; padding: 8px 12px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--bg-soft); color: var(--text);
  font-size: 13px; outline: none;
}
.search input:focus { border-color: var(--brand); }
.search-results {
  position: absolute; right: 0; top: 42px; width: 280px; max-height: 320px; overflow-y: auto;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px; display: none; z-index: 70;
}
.search-results.open { display: block; }
.search-results a { display: block; padding: 9px 12px; font-size: 13px; border-bottom: 1px solid rgba(255,255,255,.05); }
.search-results a:hover { background: var(--panel-2); }

/* ---------- hero ---------- */
.hero { padding: 40px 0 24px; }
.hero h1 { font-size: 34px; line-height: 1.2; margin: 0 0 10px; letter-spacing: -.02em; }
.hero p { color: var(--muted); margin: 0; max-width: 620px; }
.hero .accent { background: linear-gradient(90deg, var(--brand), var(--brand-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- game grid ---------- */
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 34px 0 14px; }
.section-head h2 { font-size: 20px; margin: 0; }
.section-head span { color: var(--muted); font-size: 13px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform .16s ease, border-color .16s ease;
}
.card:hover { transform: translateY(-3px); border-color: var(--brand); }
.card-thumb { position: relative; aspect-ratio: 4/3; background: var(--bg-soft); }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 10px 12px 12px; }
.card-title { font-size: 14px; font-weight: 700; line-height: 1.3; }
.card-cat { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; margin-top: 4px; }

/* ---------- player ---------- */
.layout { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 24px; align-items: start; padding: 20px 0 40px; }

.player { position: relative; }
.player-frame {
  position: relative; width: 100%; aspect-ratio: 16/9;
  background: #000; border: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; overflow: hidden;
}
.player-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.splash { position: absolute; inset: 0; z-index: 5; overflow: hidden; cursor: pointer; }
.splash-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(14px) brightness(.45); transform: scale(1.15); }
.splash-inner { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; padding: 16px; }
.splash-title { font-size: 26px; font-weight: 800; margin: 0; letter-spacing: -.02em; }
.btn-play {
  border: 0; cursor: pointer; font: inherit; font-weight: 800; font-size: 13px;
  text-transform: uppercase; letter-spacing: .18em;
  padding: 13px 40px; border-radius: 999px; color: #101528;
  background: linear-gradient(90deg, #ffe270, var(--accent));
  box-shadow: 0 10px 30px -8px rgba(255, 210, 63, .6);
}
.btn-play:hover { filter: brightness(1.07); }

.player-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--panel); border: 1px solid var(--line); border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius); padding: 8px 12px;
}
.player-bar .name { font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .12em; }
.bar-actions { display: flex; gap: 6px; }
.icon-btn {
  display: grid; place-items: center; width: 34px; height: 34px; cursor: pointer;
  border-radius: 8px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text);
}
.icon-btn:hover { border-color: var(--brand); }
.icon-btn svg { width: 17px; height: 17px; }

/* theater mode: player breaks out of the column */
.theater .layout { grid-template-columns: 1fr; }
.theater .side { display: none; }
.theater .player-frame { aspect-ratio: 21/9; }
body.theater-on { background: #05070f; }
.theater-on .site-header { display: none; }
.theater-on .hero { display: none; }

/* ---------- page heading (game pages) ---------- */
.page-title { font-size: 24px; font-weight: 800; letter-spacing: -.02em; margin: 22px 0 0; }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 22px 0 14px; }
.tab {
  border: 1px solid var(--line); background: transparent; color: var(--muted);
  font: inherit; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em;
  padding: 8px 16px; border-radius: 999px; cursor: pointer;
}
.tab[aria-selected="true"] { background: rgba(32,173,255,.14); border-color: rgba(32,173,255,.5); color: #cfe8ff; }
.panel { display: none; }
.panel.active { display: block; }
.panel h3 { font-size: 15px; margin: 18px 0 8px; }
.panel p { color: #cbd4ea; margin: 0 0 12px; }
.panel ul { margin: 0 0 12px; padding-left: 20px; color: #cbd4ea; }
.panel li { margin-bottom: 6px; }

.ctrl-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.ctrl-row { display: flex; gap: 10px; align-items: baseline; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; }
.ctrl-key { font-weight: 700; font-size: 12px; color: var(--accent); white-space: nowrap; }
.ctrl-desc { color: #cbd4ea; font-size: 13px; }

.faq-item { border-bottom: 1px solid var(--line); padding: 12px 0; }
.faq-q { font-weight: 700; font-size: 15px; margin: 0 0 6px; }
.faq-a { color: #cbd4ea; margin: 0; font-size: 14px; }

/* ---------- sidebar ---------- */
.side { position: sticky; top: 76px; display: grid; gap: 14px; }
.panel-box { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.panel-box h4 { margin: 0 0 10px; font-size: 11px; text-transform: uppercase; letter-spacing: .16em; color: var(--muted); }
.meta-row { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; padding: 6px 0; border-bottom: 1px dashed rgba(255,255,255,.07); }
.meta-row:last-child { border-bottom: 0; }
.meta-row span:first-child { color: var(--muted); }
.meta-row span:last-child { font-weight: 600; text-align: right; }
.stars { color: var(--accent); letter-spacing: 2px; }

/* ---------- ad slot (uncomment and insert your ad code) ---------- */
.ad-slot { margin: 18px 0; min-height: 90px; border: 1px dashed var(--line); border-radius: 10px; display: grid; place-items: center; color: #55618a; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.ad-slot.filled { border-style: solid; min-height: auto; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 26px 0 40px; color: var(--muted); font-size: 13px; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 10px; }
.footer-links a:hover { color: #fff; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .side { position: static; }
  .hero h1 { font-size: 26px; }
}
@media (max-width: 640px) {
  .nav { display: none; }
  .search input { width: 150px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
  .player-frame { aspect-ratio: 4/3; }
  .splash-title { font-size: 20px; }
}
