:root {
  --bg: #0f1222;
  --surface: #181c33;
  --surface-2: #222847;
  --text: #eef0fb;
  --muted: #9aa1c7;
  --accent: #7c5cff;
  --accent-2: #22d3ee;
  --radius: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 16px; }

.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(15, 18, 34, .88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.header-inner { display: flex; align-items: center; gap: 20px; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; white-space: nowrap; }
.logo-mark {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; font-size: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.main-nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; flex: 1; }
.main-nav::-webkit-scrollbar { display: none; }
.main-nav a { padding: 8px 12px; border-radius: 10px; color: var(--muted); font-weight: 600; font-size: 14px; white-space: nowrap; }
.main-nav a:hover { background: var(--surface-2); color: var(--text); }
.search input {
  width: 220px; padding: 10px 14px; border-radius: 12px; border: 1px solid rgba(255,255,255,.08);
  background: var(--surface); color: var(--text); font-size: 14px; outline: none;
}
.search input:focus { border-color: var(--accent); }

.hero { padding: 40px 0 16px; }
.hero h1 { font-size: clamp(28px, 4vw, 44px); line-height: 1.15; margin: 0 0 12px; }
.hero p { color: var(--muted); max-width: 760px; margin: 0; }
.hero.small { padding-top: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.chip { padding: 8px 14px; border-radius: 999px; background: var(--surface-2); font-weight: 600; font-size: 14px; }
.chip:hover { background: var(--accent); }

.section { margin: 32px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-head h2 { margin: 0; font-size: 22px; }
.more, .count { color: var(--muted); font-size: 14px; font-weight: 600; }
.more:hover { color: var(--accent-2); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.card {
  background: var(--surface); border-radius: var(--radius); overflow: hidden;
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(124, 92, 255, .25); }
.card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--surface-2); }
.card-body { display: flex; flex-direction: column; padding: 10px 12px 12px; }
.card-title { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-cat { color: var(--muted); font-size: 12px; }
.empty { color: var(--muted); }

.breadcrumbs { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 18px; font-size: 14px; color: var(--muted); }
.breadcrumbs a:hover { color: var(--text); }
.breadcrumbs .sep { opacity: .5; }

.game h1 { font-size: clamp(24px, 3vw, 36px); margin: 12px 0 16px; }
.game .subtitle { color: var(--muted); font-weight: 600; font-size: .6em; }
.player {
  position: relative; width: 100%; aspect-ratio: 16 / 9; max-height: 78vh;
  background: #000; border-radius: var(--radius); overflow: hidden;
}
.player-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(2px) brightness(.55); }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.play-btn {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: flex; align-items: center; gap: 10px; padding: 16px 34px; border: 0; border-radius: 999px; cursor: pointer;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-size: 20px; font-weight: 800;
  box-shadow: 0 10px 40px rgba(124, 92, 255, .5); transition: transform .15s ease;
}
.play-btn:hover { transform: translate(-50%, -50%) scale(1.05); }
.player-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0; }
.badge { padding: 4px 10px; border-radius: 8px; background: var(--accent); font-size: 13px; font-weight: 700; }
.tag { color: var(--muted); font-size: 13px; }
.fs-btn {
  margin-left: auto; padding: 8px 14px; border-radius: 10px; border: 0; cursor: pointer;
  background: var(--surface-2); color: var(--text); font-weight: 600;
}
.fs-btn:hover { background: var(--accent); }
.game-info, .seo-text { background: var(--surface); border-radius: var(--radius); padding: 20px 24px; margin: 20px 0; }
.game-info h2, .seo-text h2 { font-size: 20px; margin: 16px 0 6px; }
.game-info h2:first-child, .seo-text h2:first-child { margin-top: 0; }
.game-info p, .seo-text p { color: var(--muted); margin: 0 0 8px; }

a.play-btn { text-decoration: none; }
.badge:hover { filter: brightness(1.15); }
.meta { color: var(--muted); font-size: 13px; }
.player-bar .fs-btn { margin-left: 0; }
.player-bar .open-btn { margin-left: auto; }
.game-info h3 { font-size: 16px; margin: 12px 0 4px; }

.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 28px 0; }
.pagination a, .pagination span {
  min-width: 40px; padding: 8px 12px; border-radius: 10px; text-align: center; font-weight: 600; font-size: 14px;
  background: var(--surface); color: var(--muted);
}
.pagination a:hover { background: var(--surface-2); color: var(--text); }
.pagination .current { background: var(--accent); color: #fff; }
.pagination .gap { background: none; }

.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin-bottom: 24px; }
.cat-card { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.cat-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; filter: brightness(.55); transition: filter .15s; }
.cat-card:hover img { filter: brightness(.8); }
.cat-card span { position: absolute; left: 14px; bottom: 12px; display: flex; flex-direction: column; }
.cat-card strong { font-size: 18px; }
.cat-card small { color: #d6d9f0; }

.site-footer { margin-top: 48px; padding: 28px 0; border-top: 1px solid rgba(255,255,255,.06); color: var(--muted); font-size: 14px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 10px; }
.site-footer a:hover { color: var(--text); }

@media (max-width: 760px) {
  .header-inner { flex-wrap: wrap; height: auto; padding: 10px 16px; gap: 10px; }
  .main-nav { order: 3; flex-basis: 100%; }
  .search { margin-left: auto; }
  .search input { width: 150px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
  .player { aspect-ratio: 3 / 4; max-height: 80vh; }
}
