/* gamezog — H5 game portal
   Dark, mobile-first theme. One stylesheet for the whole site. */

:root {
  --bg: #0f1116;
  --bg-2: #171a21;
  --card: #1c2028;
  --card-hover: #232833;
  --line: #2a2f3a;
  --text: #eef1f6;
  --text-dim: #9aa3b2;
  --accent: #ff5a3c;
  --accent-2: #ffb020;
  --brand-grad: linear-gradient(135deg, #ff5a3c 0%, #ff2d78 100%);
  --radius: 14px;
  --maxw: 1180px;
  --font: "Saira", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -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: 50;
  background: rgba(15,17,22,.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; gap: 16px;
  height: 62px;
}
.logo {
  font-weight: 800; font-size: 22px; letter-spacing: -.5px;
  display: flex; align-items: center; gap: 8px;
}
.logo .dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--brand-grad);
}
.logo b { background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.search {
  margin-left: auto; position: relative; flex: 0 1 320px;
}
.search input {
  width: 100%; height: 40px; border-radius: 999px;
  background: var(--bg-2); border: 1px solid var(--line);
  color: var(--text); padding: 0 16px 0 40px; font-family: inherit; font-size: 14px;
}
.search input::placeholder { color: var(--text-dim); }
.search svg { position: absolute; left: 14px; top: 11px; width: 18px; height: 18px; stroke: var(--text-dim); }

/* ---------- Hero ---------- */
.hero {
  background: radial-gradient(1200px 400px at 50% -20%, rgba(255,90,60,.18), transparent 70%);
  padding: 44px 0 28px;
  text-align: center;
}
.hero h1 { font-size: clamp(28px, 5vw, 46px); font-weight: 800; letter-spacing: -1px; }
.hero h1 span { background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--text-dim); margin-top: 8px; font-size: 16px; }

/* ---------- Category chips ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 18px 0 6px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; padding: 8px 16px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line);
  color: var(--text-dim); font-size: 14px; font-weight: 600; cursor: pointer;
  transition: all .15s;
}
.chip:hover { color: var(--text); border-color: var(--accent); }
.chip.active { background: var(--brand-grad); color: #fff; border-color: transparent; }

/* ---------- Ad slots ---------- */
.ad-slot {
  margin: 22px auto; display: flex; align-items: center; justify-content: center;
  min-height: 90px; background: var(--bg-2); border: 1px dashed var(--line);
  border-radius: 10px; color: #4b5364; font-size: 12px; letter-spacing: 1px;
}
.ad-slot.filled { border-style: solid; }

/* ---------- Game grid ---------- */
.section-title { font-size: 20px; font-weight: 700; margin: 26px 0 14px; }
.grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; cursor: pointer;
  transition: transform .15s, border-color .15s, background .15s;
}
.card:hover { transform: translateY(-4px); border-color: var(--accent); background: var(--card-hover); }
.card .thumb { aspect-ratio: 1/1; width: 100%; background: var(--bg-2); object-fit: cover; }
.card .meta { padding: 10px 12px; }
.card .name { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .cat { color: var(--text-dim); font-size: 12px; margin-top: 2px; }
.empty { color: var(--text-dim); padding: 40px 0; text-align: center; }

/* ---------- Game detail page ---------- */
.game-top { display: grid; grid-template-columns: 128px 1fr; gap: 20px; align-items: center; padding: 24px 0; }
.game-top .logo-lg { width: 128px; height: 128px; border-radius: 20px; border: 1px solid var(--line); }
.game-top h1 { font-size: 30px; font-weight: 800; letter-spacing: -.5px; }
.game-top .cat { color: var(--accent-2); font-weight: 600; margin: 4px 0 12px; }
.btn-play {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--brand-grad); color: #fff; font-weight: 700; font-size: 16px;
  padding: 12px 26px; border-radius: 999px; border: none; cursor: pointer;
  font-family: inherit;
}
.btn-play:hover { filter: brightness(1.08); }

/* Play stage (iframe host) */
.stage {
  position: relative; width: 100%; aspect-ratio: 16/10;
  background: #000; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); margin: 8px 0 24px;
}
.stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.stage .poster {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 16px; cursor: pointer;
  background: radial-gradient(600px 300px at 50% 40%, rgba(255,90,60,.25), #0a0c10);
}
.stage .poster .big-play {
  width: 78px; height: 78px; border-radius: 50%; background: var(--brand-grad);
  display: flex; align-items: center; justify-content: center;
}
.stage .fs-btn {
  position: absolute; right: 10px; bottom: 10px; z-index: 5;
  background: rgba(0,0,0,.6); border: 1px solid var(--line); color: #fff;
  border-radius: 8px; padding: 6px 10px; font-size: 13px; cursor: pointer; font-family: inherit;
}

/* SEO content */
.content { display: grid; grid-template-columns: 1fr; gap: 22px; padding-bottom: 40px; }
.content h2 { font-size: 20px; margin-bottom: 8px; }
.content p, .content li { color: #cdd3dd; }
.content ul, .content ol { padding-left: 20px; }
.content li { margin: 5px 0; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.faq details { border-bottom: 1px solid var(--line); padding: 12px 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details[open] summary { color: var(--accent); }
.faq p { margin-top: 8px; }
.license-note { color: var(--text-dim); font-size: 13px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 30px; padding: 26px 0; color: var(--text-dim); font-size: 14px; }
.site-footer .row { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between; }
.site-footer a:hover { color: var(--text); }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
  .game-top { grid-template-columns: 88px 1fr; gap: 14px; }
  .game-top .logo-lg { width: 88px; height: 88px; }
  .game-top h1 { font-size: 22px; }
  .search { flex-basis: 160px; }
}
