:root {
  color-scheme: dark;
  --bg: #13121b;
  --bg-deep: #0e0d16;
  --panel: #1f1f28;
  --panel-high: #2a2933;
  --line: #464555;
  --text: #e4e1ee;
  --muted: #c7c4d8;
  --primary: #c3c0ff;
  --primary-strong: #4f46e5;
  --secondary: #ffb690;
  --orange: #ec6a06;
  --success: #5ee4a1;
  --danger: #ff6b7a;
  --radius: 12px;
  --max: 1440px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 20% 0%, rgba(79, 70, 229, .24), transparent 30rem),
    radial-gradient(circle at 85% 12%, rgba(236, 106, 6, .14), transparent 26rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select { font: inherit; }

.container { width: min(100% - 48px, var(--max)); margin: 0 auto; }
.topbar {
  position: sticky; top: 0; z-index: 50; height: 72px;
  background: rgba(19, 18, 27, .86); backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(70, 69, 85, .55);
}
.nav-inner { height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { font-size: 28px; font-weight: 900; font-style: italic; letter-spacing: -.03em; color: var(--primary); white-space: nowrap; }
.nav { display: flex; align-items: center; gap: 20px; }
.nav a { color: var(--muted); font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 25px 0 21px; border-bottom: 3px solid transparent; }
.nav a.active, .nav a:hover { color: var(--primary); border-bottom-color: var(--primary); }
.actions { display: flex; align-items: center; gap: 10px; }
.icon-btn, .menu-btn {
  display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 10px;
  border: 1px solid rgba(145, 143, 161, .25); background: rgba(31, 31, 40, .75); color: var(--text); cursor: pointer;
}
.menu-btn { display: none; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px;
  padding: 0 18px; border-radius: 10px; border: 1px solid rgba(195, 192, 255, .26);
  background: var(--primary-strong); color: #dad7ff; font-weight: 800; cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.btn:hover, .card:hover { transform: translateY(-2px); box-shadow: 0 8px 26px rgba(195, 192, 255, .18); }
.btn.secondary { background: rgba(31, 31, 40, .78); color: var(--text); }
.btn.orange { background: var(--orange); color: #341100; border-color: transparent; }

.hero { position: relative; overflow: hidden; min-height: 520px; display: grid; place-items: center; text-align: center; }
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(79,70,229,.95), rgba(124,58,237,.88), rgba(236,72,153,.76)), var(--hero, none) center/cover;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 56px 56px; mask-image: linear-gradient(to bottom, black, transparent);
}
.hero-content { position: relative; z-index: 1; width: min(850px, 100% - 32px); }
.eyebrow { color: var(--secondary); text-transform: uppercase; letter-spacing: .14em; font-weight: 900; font-size: 12px; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(38px, 6vw, 72px); line-height: 1.02; letter-spacing: 0; margin-bottom: 18px; }
h2 { font-size: clamp(26px, 3vw, 38px); line-height: 1.16; letter-spacing: 0; }
h3 { font-size: 21px; line-height: 1.3; }
.lead { color: rgba(255,255,255,.9); font-size: 18px; line-height: 1.6; margin-bottom: 28px; }
.search-wrap { position: relative; max-width: 680px; margin: 0 auto 20px; }
.search-input {
  width: 100%; height: 64px; border: 2px solid rgba(255,255,255,.25); border-radius: 999px;
  background: rgba(255,255,255,.12); color: #fff; padding: 0 66px 0 28px; outline: none; backdrop-filter: blur(12px);
}
.search-input::placeholder { color: rgba(255,255,255,.64); }
.search-submit { position: absolute; right: 10px; top: 10px; width: 44px; height: 44px; border: 0; border-radius: 999px; background: #fff; color: var(--primary-strong); cursor: pointer; }
.suggestions {
  position: absolute; top: 72px; left: 0; right: 0; display: none; text-align: left; z-index: 10;
  background: rgba(14,13,22,.96); border: 1px solid rgba(195,192,255,.22); border-radius: 16px; overflow: hidden;
}
.suggestions a { display: flex; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid rgba(70,69,85,.5); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 14px; border-radius: 999px;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22); color: #fff; font-weight: 800;
}

main { min-height: 70vh; }
.section { padding: 56px 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 24px; }
.section-head p { color: var(--muted); max-width: 720px; line-height: 1.7; margin-bottom: 0; }
.grid { display: grid; gap: 24px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card {
  background: rgba(31, 31, 40, .76); border: 1px solid rgba(70, 69, 85, .55); border-radius: var(--radius);
  overflow: hidden; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { border-color: rgba(195, 192, 255, .45); }
.card-img { aspect-ratio: 16 / 9; overflow: hidden; background: var(--panel-high); }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.card:hover .card-img img { transform: scale(1.05); }
.card-body { padding: 18px; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.badge { display: inline-flex; align-items: center; min-height: 24px; padding: 0 8px; border-radius: 6px; background: rgba(195,192,255,.12); color: var(--primary); font-size: 12px; font-weight: 900; text-transform: uppercase; }
.badge.orange { background: rgba(255,182,144,.14); color: var(--secondary); }
.badge.green { background: rgba(94,228,161,.12); color: var(--success); }
.ad {
  display: grid; place-items: center; color: var(--muted); min-height: 90px; border: 1px dashed rgba(145,143,161,.42);
  background: linear-gradient(90deg, transparent, rgba(195,192,255,.07), transparent), rgba(31,31,40,.6);
  text-transform: uppercase; letter-spacing: .16em; font-size: 11px;
}
.page-hero { padding: 56px 0 28px; }
.page-title { display: grid; grid-template-columns: 1.4fr .7fr; align-items: center; gap: 32px; }
.page-title p { color: var(--muted); line-height: 1.7; }
.hero-media { border-radius: 16px; overflow: hidden; border: 1px solid rgba(195,192,255,.18); max-height: 320px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.filter { border: 1px solid rgba(145,143,161,.34); color: var(--text); background: rgba(31,31,40,.8); border-radius: 999px; padding: 9px 15px; cursor: pointer; font-weight: 800; }
.filter.active { background: var(--primary); color: #1d00a5; border-color: transparent; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid rgba(70,69,85,.45); margin-bottom: 24px; }
.select { min-height: 42px; border-radius: 10px; background: rgba(31,31,40,.9); border: 1px solid rgba(145,143,161,.4); color: var(--text); padding: 0 12px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stat { padding: 18px; border-radius: 12px; background: rgba(42,41,51,.65); border: 1px solid rgba(70,69,85,.5); }
.stat strong { display: block; font-size: 26px; color: var(--primary); }
.split { display: grid; grid-template-columns: 1fr 340px; gap: 28px; align-items: start; }
.panel { padding: 22px; border-radius: 12px; background: rgba(31,31,40,.72); border: 1px solid rgba(70,69,85,.55); }
.table { width: 100%; border-collapse: collapse; overflow: hidden; }
.table th, .table td { padding: 14px 12px; text-align: left; border-bottom: 1px solid rgba(70,69,85,.46); }
.table th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; }
.status { color: var(--success); font-weight: 900; }
.status.checking { color: var(--secondary); }
.status.expired { color: var(--danger); }
.code-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px; border-radius: 10px; background: rgba(42,41,51,.65); margin-bottom: 12px; }
.copy-code { border: 0; border-radius: 8px; background: var(--primary-strong); color: #dad7ff; padding: 9px 12px; font-weight: 900; cursor: pointer; }
.detail-hero { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(320px, .8fr); gap: 28px; padding: 40px 0; }
.play-cover { position: relative; border-radius: 16px; overflow: hidden; min-height: 480px; }
.play-cover img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.play-overlay { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.38); }
.play-circle { width: 88px; height: 88px; display: grid; place-items: center; border-radius: 999px; background: rgba(195,192,255,.18); border: 2px solid var(--primary); color: var(--primary); }
.footer { margin-top: 56px; padding: 38px 0; border-top: 1px solid rgba(70,69,85,.55); color: var(--muted); }
.footer-grid { display: grid; grid-template-columns: 1.2fr repeat(4, 1fr); gap: 24px; }
.footer a { display: block; color: var(--muted); margin: 8px 0; }
.mobile-nav { display: none; }

@media (max-width: 980px) {
  .nav { display: none; }
  .menu-btn { display: inline-grid; }
  .mobile-nav.open { display: grid; position: fixed; top: 72px; left: 0; right: 0; z-index: 60; background: rgba(14,13,22,.98); border-bottom: 1px solid var(--line); padding: 12px 24px; }
  .mobile-nav a { padding: 12px 0; color: var(--muted); font-weight: 800; }
  .grid.cols-4, .grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-title, .split, .detail-hero { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .container { width: min(100% - 32px, var(--max)); }
  .brand { font-size: 22px; }
  .actions .btn { display: none; }
  .hero { min-height: 560px; }
  .grid.cols-4, .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; }
  .section-head, .toolbar { align-items: stretch; flex-direction: column; }
  .stats { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .play-cover { min-height: 320px; }
}

/* === PlayZoneX monetization & i18n additions === */
.lang-switch {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--muted); font-size: 13px; font-weight: 700;
  border: 1px solid rgba(145,143,161,.25); border-radius: 10px;
  background: rgba(31,31,40,.75); padding: 0 10px; height: 42px;
}
.lang-switch select {
  background: transparent; color: var(--text); border: 0; outline: none;
  font-weight: 700; cursor: pointer;
}
.lang-switch svg { stroke: var(--primary); }

.ad-wrapper {
  display: flex; justify-content: center; align-items: center;
  overflow: hidden; border-radius: 12px;
  background: rgba(31,31,40,.45); border: 1px dashed rgba(145,143,161,.35);
}
.ad-wrapper-top { margin: 18px auto; }
.ad-wrapper-bottom { margin: 28px auto; }
.ad-wrapper-inline { margin: 24px auto; }
.ad-wrapper-sidebar ins { width: 160px; height: 600px; }
.ad-shell {
  display: grid; place-items: center; min-height: 90px; margin: 18px auto;
  max-width: 728px; border: 1px dashed rgba(145,143,161,.35);
  border-radius: 8px; color: rgba(225,229,255,.55);
  background: rgba(31,31,40,.36); font-size: 12px; text-transform: uppercase;
}
.ad-shell-inline { min-height: 180px; max-width: 336px; }
.ad-shell-sidebar { width: 160px; min-height: 600px; }

.hero-particles { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.hero-particles i {
  position: absolute; width: 8px; height: 8px; border-radius: 50%;
  background: rgba(124, 247, 255, .9); box-shadow: 0 0 22px rgba(124, 247, 255, .8);
  animation: float-particle 9s linear infinite;
}
.hero-particles i:nth-child(1) { left: 12%; top: 76%; animation-delay: 0s; }
.hero-particles i:nth-child(2) { left: 28%; top: 82%; animation-delay: -2s; background: rgba(255, 180, 85, .9); }
.hero-particles i:nth-child(3) { left: 48%; top: 72%; animation-delay: -4s; }
.hero-particles i:nth-child(4) { left: 65%; top: 88%; animation-delay: -1s; background: rgba(174, 140, 255, .9); }
.hero-particles i:nth-child(5) { left: 78%; top: 70%; animation-delay: -6s; }
.hero-particles i:nth-child(6) { left: 90%; top: 84%; animation-delay: -3s; background: rgba(255, 119, 162, .9); }
@keyframes float-particle {
  0% { transform: translateY(0) scale(.8); opacity: 0; }
  18% { opacity: 1; }
  100% { transform: translateY(-420px) scale(1.2); opacity: 0; }
}

.compact-list { display: grid; gap: 10px; max-height: 760px; overflow: auto; }
.compact-row {
  display: grid; grid-template-columns: minmax(160px, 1.5fr) minmax(90px, .8fr) minmax(100px, 1fr);
  gap: 10px; align-items: center; padding: 12px 14px; border: 1px solid rgba(145,143,161,.18);
  border-radius: 8px; color: var(--text); background: rgba(255,255,255,.035);
}
.compact-row span { color: var(--muted); font-size: 13px; }
.check-list { display: grid; gap: 10px; padding-left: 20px; color: var(--muted); }
.command-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.command-grid code {
  padding: 9px 11px; border-radius: 8px; background: rgba(124, 247, 255, .09);
  color: #c7fbff; border: 1px solid rgba(124, 247, 255, .18);
}
.spark { display: flex; align-items: end; gap: 5px; height: 34px; margin: 12px 0; }
.spark i { width: 12px; min-height: 6px; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, #7cf7ff, #7c5cff); }

.ad-sticky {
  position: fixed; right: 16px; top: 96px; z-index: 40;
  display: none;
}

/* Improve H5 / mobile viewport handling */
@media (max-width: 980px) {
  .ad-sticky { display: none !important; }
  .actions { gap: 6px; }
  .lang-switch span { display: none; }
  .lang-switch { padding: 0 8px; }
}

@media (max-width: 640px) {
  .lang-switch { height: 38px; }
  .ad-wrapper-top, .ad-wrapper-bottom { min-height: auto; }
  .ad-wrapper-inline { max-width: 100%; }
  .compact-row { grid-template-columns: 1fr; }
  h1 { font-size: clamp(30px, 10vw, 48px) !important; }
  .hero { min-height: 480px; }
}

@media (min-width: 1280px) {
  .ad-sticky { display: block; }
  body { padding-right: 0; }
}
