/* =========================================================================
   GamesJi Updates — Theme tokens
   Palette: #0B0F19 (bg), #12172A (panel), #1B2340 (panel-alt),
            #00E5C7 (cyan accent), #A855F7 (violet accent), #F4B740 (amber tag)
   Type: Chakra Petch (display), Inter (body), JetBrains Mono (meta/data)
   ========================================================================= */

:root{
  --bg:#0B0F19;
  --panel:#12172A;
  --panel-alt:#171E38;
  --line:#232B4A;
  --text:#E7EAF6;
  --text-dim:#9AA3C7;
  --cyan:#00E5C7;
  --violet:#A855F7;
  --amber:#F4B740;
  --radius:14px;
  --max:1200px;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family:'Inter',system-ui,sans-serif;
  line-height:1.55;
  background-image:
    radial-gradient(circle at 15% 0%, rgba(0,229,199,.08), transparent 40%),
    radial-gradient(circle at 85% 10%, rgba(168,85,247,.10), transparent 45%);
}
h1,h2,h3,h4,.brand-text,.nav-cta{font-family:'Chakra Petch',sans-serif}
.mono,.meta,time,.tag,.stat{font-family:'JetBrains Mono',monospace}
a{color:inherit;text-decoration:none}
img{max-width:100%;display:block}
.container{max-width:var(--max);margin:0 auto;padding:0 20px}
:focus-visible{outline:3px solid var(--cyan);outline-offset:2px}

/* ---------- Top blinking strip ---------- */
.top-strip{
  background:linear-gradient(90deg,#091018,#0d1730);
  border-bottom:1px solid var(--line);
  text-align:center;
  padding:7px 10px;
  font-family:'Chakra Petch',sans-serif;
  font-weight:600;
  font-size:.85rem;
  letter-spacing:.02em;
}
.blink-link{color:var(--cyan);animation:blinker 1.1s step-start infinite}
@keyframes blinker{50%{opacity:.25}}
@media (prefers-reduced-motion: reduce){
  .blink-link{animation:none}
}

/* ---------- Header ---------- */
.site-header{
  position:sticky;top:0;z-index:50;
  background:rgba(11,15,25,.85);
  backdrop-filter:blur(10px);
  border-bottom:1px solid var(--line);
}
.header-inner{
  display:flex;align-items:center;gap:18px;
  padding:14px 20px;
}
.brand{display:flex;align-items:center;gap:10px;font-weight:700;font-size:1.15rem;white-space:nowrap}
.brand-mark{
  display:inline-grid;place-items:center;
  width:38px;height:38px;border-radius:10px;
  background:linear-gradient(135deg,var(--cyan),var(--violet));
  color:#08101c;font-weight:800;font-size:1rem;
}
.brand-text em{font-style:normal;color:var(--cyan)}

.global-search{
  flex:1;display:flex;align-items:center;
  background:var(--panel);border:1px solid var(--line);
  border-radius:999px;padding:6px 8px 6px 18px;max-width:520px;
}
.global-search input{
  flex:1;background:transparent;border:0;color:var(--text);font-size:.95rem;padding:6px 0;
}
.global-search input:focus{outline:none}
.global-search button{
  background:linear-gradient(135deg,var(--cyan),#00b8a0);
  border:0;width:36px;height:36px;border-radius:999px;color:#06110f;
  display:grid;place-items:center;cursor:pointer;flex-shrink:0;
}

.main-nav{display:flex;align-items:center;gap:22px;margin-left:auto;font-weight:600;font-size:.92rem}
.main-nav a:hover{color:var(--cyan)}
.nav-cta{
  background:rgba(0,229,199,.12);border:1px solid var(--cyan);
  color:var(--cyan)!important;padding:8px 16px;border-radius:999px;
}
.nav-toggle{display:none;flex-direction:column;gap:5px;background:none;border:0;cursor:pointer;padding:6px}
.nav-toggle span{width:24px;height:2px;background:var(--text)}

/* ---------- Hero ---------- */
.hero{padding:56px 0 36px;position:relative}
.hero-eyebrow{
  display:inline-flex;align-items:center;gap:8px;
  color:var(--amber);font-size:.8rem;letter-spacing:.12em;text-transform:uppercase;
  font-family:'JetBrains Mono',monospace;margin-bottom:16px;
}
.hero-eyebrow::before{content:'';width:8px;height:8px;border-radius:50%;background:var(--amber);box-shadow:0 0 12px var(--amber)}
.hero h1{font-size:clamp(2rem,5vw,3.2rem);line-height:1.1;margin:0 0 16px;max-width:820px}
.hero h1 span{color:var(--cyan)}
.hero p.lead{color:var(--text-dim);max-width:640px;font-size:1.05rem;margin:0 0 26px}
.hero-actions{display:flex;gap:14px;flex-wrap:wrap}
.btn{
  display:inline-flex;align-items:center;gap:8px;padding:12px 22px;border-radius:10px;
  font-weight:700;font-size:.95rem;cursor:pointer;border:1px solid transparent;
}
.btn-primary{background:linear-gradient(135deg,var(--cyan),#00b8a0);color:#06120f}
.btn-primary:hover{filter:brightness(1.08)}
.btn-ghost{border-color:var(--line);color:var(--text)}
.btn-ghost:hover{border-color:var(--cyan);color:var(--cyan)}
.btn-violet{background:linear-gradient(135deg,var(--violet),#7c3aed);color:#fff}

/* ---------- Live ticker (signature element) ---------- */
.ticker-wrap{
  margin-top:34px;border:1px solid var(--line);border-radius:999px;
  background:var(--panel);overflow:hidden;display:flex;align-items:center;
}
.ticker-label{
  background:linear-gradient(135deg,var(--violet),#7c3aed);
  color:#fff;font-family:'JetBrains Mono',monospace;font-size:.75rem;font-weight:700;
  padding:10px 18px;white-space:nowrap;letter-spacing:.08em;
}
.ticker-track{overflow:hidden;flex:1;position:relative;height:38px}
.ticker-track ul{
  position:absolute;display:flex;gap:48px;white-space:nowrap;list-style:none;
  margin:0;padding:0 24px;align-items:center;height:100%;
  animation:ticker 45s linear infinite;
}
.ticker-track:hover ul{animation-play-state:paused}
.ticker-track li{font-size:.88rem;color:var(--text-dim)}
.ticker-track li a:hover{color:var(--cyan)}
@keyframes ticker{from{transform:translateX(0)}to{transform:translateX(-50%)}}
@media (prefers-reduced-motion: reduce){
  .ticker-track ul{animation:none;position:static;display:flex;flex-wrap:wrap;padding:10px 18px}
}

/* ---------- Section headers ---------- */
.section{padding:44px 0}
.section-head{display:flex;align-items:baseline;justify-content:space-between;gap:14px;margin-bottom:22px;flex-wrap:wrap}
.section-head h2{font-size:1.55rem;margin:0}
.section-head .see-all{color:var(--cyan);font-weight:600;font-size:.9rem}

/* ---------- News cards ---------- */
.news-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:20px}
.card{
  background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);
  padding:20px;display:flex;flex-direction:column;gap:10px;transition:.2s border-color,.2s transform;
}
.card:hover{border-color:var(--cyan);transform:translateY(-3px)}
.card .tag{
  align-self:flex-start;background:rgba(168,85,247,.15);color:var(--violet);
  padding:4px 10px;border-radius:999px;font-size:.72rem;
}
.card h3{font-size:1.08rem;margin:0;line-height:1.35}
.card p{color:var(--text-dim);font-size:.9rem;margin:0}
.card .meta{color:var(--text-dim);font-size:.75rem;display:flex;gap:10px;margin-top:auto}

/* ---------- Games grid ---------- */
.games-toolbar{
  display:flex;gap:12px;flex-wrap:wrap;align-items:center;margin-bottom:24px;
  background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);padding:16px;
}
.games-toolbar form{display:flex;gap:10px;flex:1;min-width:240px}
.games-toolbar input[type=text]{
  flex:1;background:var(--panel-alt);border:1px solid var(--line);border-radius:8px;
  color:var(--text);padding:10px 14px;font-size:.95rem;
}
.games-toolbar select{
  background:var(--panel-alt);border:1px solid var(--line);border-radius:8px;
  color:var(--text);padding:10px 14px;font-size:.9rem;
}
.games-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:18px}
.game-card{
  background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);
  padding:18px;display:flex;flex-direction:column;gap:10px;transition:.2s;
}
.game-card:hover{border-color:var(--cyan);transform:translateY(-3px)}
.game-thumb{
  width:100%;aspect-ratio:16/10;border-radius:10px;
  background:linear-gradient(135deg,var(--panel-alt),#0e1428);
  display:grid;place-items:center;font-family:'Chakra Petch',sans-serif;font-weight:700;
  color:var(--text-dim);font-size:1.6rem;letter-spacing:.05em;border:1px solid var(--line);
}
.game-card h3{font-size:1rem;margin:2px 0 0}
.game-card .cat{color:var(--amber);font-size:.72rem;font-family:'JetBrains Mono',monospace}
.game-card p{color:var(--text-dim);font-size:.85rem;margin:0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.game-actions{display:flex;gap:8px;margin-top:auto;flex-wrap:wrap}
.game-actions a{
  flex:1;text-align:center;padding:8px 10px;border-radius:8px;font-size:.8rem;font-weight:700;
  background:var(--panel-alt);border:1px solid var(--line);
}
.game-actions a.primary{background:linear-gradient(135deg,var(--cyan),#00b8a0);color:#06120f;border-color:transparent}
.game-actions a:hover{border-color:var(--cyan)}

/* ---------- Article / detail pages ---------- */
.article-wrap{max-width:820px;margin:0 auto;padding:40px 20px}
.article-wrap h1{font-size:clamp(1.6rem,4vw,2.3rem);line-height:1.25}
.article-meta{display:flex;gap:14px;flex-wrap:wrap;color:var(--text-dim);font-size:.85rem;margin:14px 0 26px}
.article-body{font-size:1.05rem;color:#D9DEF2}
.article-body p{margin:0 0 18px}
.ad-slot{
  margin:28px 0;padding:14px;border:1px dashed var(--line);border-radius:10px;
  text-align:center;color:var(--text-dim);font-size:.75rem;font-family:'JetBrains Mono',monospace;
}
.source-link{
  display:inline-block;margin-top:20px;padding:10px 18px;border-radius:8px;
  background:var(--panel);border:1px solid var(--line);font-weight:600;font-size:.9rem;
}
.source-link:hover{border-color:var(--cyan);color:var(--cyan)}

.game-hero{display:grid;grid-template-columns:280px 1fr;gap:30px;padding:44px 0;align-items:start}
.game-hero .game-thumb{width:100%;aspect-ratio:1/1;font-size:2.4rem}
.game-hero h1{font-size:clamp(1.6rem,4vw,2.4rem);margin:0 0 10px}
.game-hero .cat{font-size:.8rem}
@media(max-width:720px){.game-hero{grid-template-columns:1fr}.game-hero .game-thumb{max-width:180px}}

/* ---------- Pagination ---------- */
.pagination{display:flex;gap:8px;flex-wrap:wrap;justify-content:center;margin:36px 0}
.page-btn{
  padding:8px 14px;border:1px solid var(--line);border-radius:8px;font-size:.85rem;font-weight:600;
  background:var(--panel);
}
.page-btn.active{background:var(--cyan);color:#06120f;border-color:var(--cyan)}
.page-btn:hover{border-color:var(--cyan)}
.page-dots{color:var(--text-dim);padding:8px 4px}

/* ---------- Footer ---------- */
.site-footer{border-top:1px solid var(--line);margin-top:60px;background:var(--panel)}
.footer-inner{display:grid;grid-template-columns:2fr 1fr 1fr;gap:36px;padding:44px 20px}
.footer-col h4{margin:0 0 14px;font-size:.9rem;color:var(--text-dim);text-transform:uppercase;letter-spacing:.08em}
.footer-col a{display:block;margin-bottom:8px;color:var(--text-dim);font-size:.9rem}
.footer-col a:hover{color:var(--cyan)}
.footer-blink{margin-top:14px;display:inline-block}
.footer-bottom{border-top:1px solid var(--line);text-align:center;padding:18px;color:var(--text-dim);font-size:.8rem}

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

/* ---------- Responsive ---------- */
@media(max-width:900px){
  .main-nav{
    position:fixed;inset:64px 0 0 0;background:var(--bg);flex-direction:column;
    align-items:flex-start;padding:24px;gap:20px;transform:translateX(100%);
    transition:.25s;border-top:1px solid var(--line);
  }
  .main-nav.open{transform:translateX(0)}
  .nav-toggle{display:flex}
  .global-search{order:3;max-width:none;flex-basis:100%}
  .header-inner{flex-wrap:wrap}
  .footer-inner{grid-template-columns:1fr}
}
