:root {
  --nx-bg: #080B14;
  --nx-bg2: #101629;
  --nx-header-bg: rgba(16,22,41,0.88);
  --nx-card: #151D32;
  --nx-surface: #1B2640;
  --nx-accent: #8B5CF6;
  --nx-accent2: #22D3EE;
  --nx-highlight: #EC4899;
  --nx-text: #F8FAFC;
  --nx-muted: #94A3B8;
  --nx-border: rgba(255,255,255,0.08);
  --nx-radius: 16px;
  --nx-container: 1380px;
}

html[data-theme="light"] {
  --nx-bg: #F1F5F9;
  --nx-bg2: #FFFFFF;
  --nx-header-bg: rgba(255,255,255,0.92);
  --nx-card: #FFFFFF;
  --nx-surface: #E2E8F0;
  --nx-text: #0F172A;
  --nx-muted: #475569;
  --nx-border: rgba(15,23,42,0.12);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin:0; background:var(--nx-bg); color:var(--nx-text); font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,sans-serif; line-height:1.6; overflow-x:hidden; }
a { color:inherit; text-decoration:none; }
img { max-width:100%; height:auto; display:block; }

.nx-container { width:min(var(--nx-container), 94vw); margin:0 auto; }
.nx-announcement { background:linear-gradient(90deg,var(--nx-accent),var(--nx-highlight)); color:#fff; text-align:center; padding:8px 0; font-size:.875rem; font-weight:600; }

/* Header */
.nx-header { background:var(--nx-header-bg); backdrop-filter:blur(16px); border-bottom:1px solid var(--nx-border); z-index:500; }
.nx-header.is-sticky { position:sticky; top:0; }
.nx-header-inner { display:flex; align-items:center; justify-content:space-between; gap:14px; min-height:72px; }
.nx-brand { display:flex; align-items:center; gap:10px; flex-shrink:0; max-width:260px; }
.nx-logo-link { display:inline-flex; align-items:center; gap:10px; font-weight:800; font-size:1.08rem; letter-spacing:-.02em; min-width:0; }
.nx-site-title { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:210px; }
.nx-logo-badge { display:grid; place-items:center; width:36px; height:36px; flex-shrink:0; border-radius:10px; background:linear-gradient(135deg,var(--nx-accent),var(--nx-accent2)); color:#080B14; font-size:1.1rem; }
.nx-mobile-toggle { display:none; background:var(--nx-surface); color:var(--nx-text); border:1px solid var(--nx-border); border-radius:10px; padding:8px 12px; cursor:pointer; }

.nx-nav { display:flex; align-items:center; gap:8px; min-width:0; overflow:visible; }
.nx-nav-list { display:flex; align-items:center; list-style:none; margin:0; padding:0; gap:4px; flex-wrap:nowrap; }
.nx-nav-link, .nx-nav-list a { display:inline-block; white-space:nowrap; font-weight:600; font-size:.86rem; color:var(--nx-muted); background:none; border:0; cursor:pointer; padding:7px 9px; border-radius:10px; transition:color .2s,background .2s; }
.nx-nav-link:hover, .nx-nav-list a:hover { color:var(--nx-text); background:rgba(139,92,246,.12); }

.nx-dropdown { position:relative; }
.nx-mega-menu { position:absolute; top:100%; left:0; width:560px; max-width:90vw; background:var(--nx-bg2); border:1px solid var(--nx-border); border-radius:var(--nx-radius); padding:16px; display:none; grid-template-columns:repeat(3,1fr); gap:8px; box-shadow:0 24px 60px rgba(0,0,0,.35); z-index:600; }
.nx-dropdown:hover .nx-mega-menu, .nx-dropdown.is-open .nx-mega-menu { display:grid; }
.nx-mega-item { display:flex; align-items:center; gap:8px; padding:8px 10px; border-radius:10px; font-size:.86rem; background:rgba(139,92,246,.04); }
.nx-mega-item:hover { background:rgba(139,92,246,.18); }
.nx-mega-item small { margin-left:auto; color:var(--nx-muted); }

.nx-header-actions { display:flex; align-items:center; gap:8px; }
.nx-search-box { position:relative; }
.nx-search-input { background:var(--nx-card); color:var(--nx-text); border:1px solid var(--nx-border); border-radius:999px; padding:8px 14px; width:175px; font-size:.86rem; outline:none; transition:border-color .2s,width .25s; }
.nx-search-input:focus { border-color:var(--nx-accent2); width:215px; }
.nx-search-results { position:absolute; top:calc(100% + 8px); right:0; width:340px; max-width:92vw; background:var(--nx-bg2); border:1px solid var(--nx-border); border-radius:14px; padding:10px; box-shadow:0 20px 50px rgba(0,0,0,.45); z-index:700; }
.nx-search-results[hidden] { display:none; }
.nx-sr-item { display:flex; align-items:center; gap:10px; padding:8px; border-radius:10px; }
.nx-sr-item:hover { background:var(--nx-surface); }
.nx-sr-item img { width:44px; height:32px; object-fit:cover; border-radius:6px; }

.nx-icon-btn, .nx-btn-outline { background:var(--nx-surface); color:var(--nx-text); border:1px solid var(--nx-border); border-radius:10px; padding:8px 12px; cursor:pointer; font-weight:600; font-size:.85rem; display:inline-flex; align-items:center; gap:5px; white-space:nowrap; flex-shrink:0; }
.nx-icon-btn:hover, .nx-btn-outline:hover { border-color:var(--nx-accent); }
.nx-avatar-btn img { border-radius:999px; border:2px solid var(--nx-accent); }

/* Hero */
.nx-hero { position:relative; padding:54px 0 42px; overflow:hidden; }
.nx-hero-glow { position:absolute; inset:-40% -10% auto -10%; height:420px; background:radial-gradient(ellipse at center, rgba(139,92,246,.28), rgba(34,211,238,.12) 45%, transparent 72%); pointer-events:none; }
.nx-hero-grid { display:grid; grid-template-columns:1.15fr .85fr; gap:36px; align-items:center; position:relative; }
.nx-eyebrow { display:inline-block; padding:6px 14px; border-radius:999px; background:rgba(139,92,246,.16); border:1px solid rgba(139,92,246,.35); color:var(--nx-accent2); font-weight:700; font-size:.78rem; letter-spacing:.06em; }
.nx-hero-copy h1 { font-size:clamp(2rem,4vw,3.3rem); line-height:1.12; margin:16px 0 14px; letter-spacing:-.03em; }
.nx-hero-copy p { color:var(--nx-muted); font-size:1.08rem; max-width:560px; margin:0 0 24px; }
.nx-hero-cta { display:flex; flex-wrap:wrap; gap:14px; }
.nx-btn-primary { display:inline-flex; align-items:center; gap:8px; background:linear-gradient(135deg,var(--nx-accent),var(--nx-highlight)); color:#fff; border:0; padding:13px 26px; border-radius:12px; font-weight:700; cursor:pointer; box-shadow:0 8px 28px rgba(139,92,246,.35); transition:transform .2s; }
.nx-btn-primary:hover { transform:translateY(-2px); }
.nx-btn-glass { display:inline-flex; align-items:center; gap:8px; background:rgba(139,92,246,.08); backdrop-filter:blur(10px); border:1px solid var(--nx-border); padding:13px 24px; border-radius:12px; font-weight:600; }

.nx-spotlight-card { display:block; position:relative; border-radius:20px; overflow:hidden; border:1px solid rgba(139,92,246,.4); box-shadow:0 24px 60px rgba(0,0,0,.35); aspect-ratio:16/10; background:var(--nx-card); }
.nx-spotlight-card img { width:100%; height:100%; object-fit:cover; }
.nx-spotlight-placeholder { width:100%; height:100%; display:grid; place-items:center; font-size:1.6rem; font-weight:800; background:linear-gradient(135deg,#151D32,#1B2640); color:#F8FAFC; }
.nx-spotlight-info { position:absolute; inset:auto 0 0 0; padding:20px; background:linear-gradient(transparent,rgba(8,11,20,.92)); color:#F8FAFC; }
.nx-spotlight-info h2 { margin:8px 0 0; font-size:1.4rem; }

/* Sections, Tabs & 3D Game Cards */
.nx-section { padding:26px 0; }
.nx-sec-head { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px; margin-bottom:18px; }
.nx-sec-head h2 { margin:0; font-size:1.45rem; }
.nx-pop-tabs { display:flex; flex-wrap:wrap; gap:6px; }
.nx-tab-btn { background:var(--nx-card); color:var(--nx-muted); border:1px solid var(--nx-border); border-radius:999px; padding:6px 14px; font-size:.82rem; font-weight:600; cursor:pointer; }
.nx-tab-btn.is-active, .nx-tab-btn:hover { background:var(--nx-accent); color:#fff; border-color:var(--nx-accent); }

.nx-game-grid { display:grid; grid-template-columns:repeat(var(--nx-cols,4), minmax(0,1fr)); gap:20px; perspective:1000px; }
.nx-card { background:var(--nx-card); border:1px solid var(--nx-border); border-radius:var(--nx-radius); overflow:hidden; transition:transform .24s ease, border-color .24s ease, box-shadow .24s ease; transform-style:preserve-3d; }
.nx-card:hover { transform:translateY(-6px); border-color:rgba(139,92,246,.65); box-shadow:0 16px 36px rgba(139,92,246,.22); }
.nx-card-media { position:relative; aspect-ratio:16/10; overflow:hidden; background:var(--nx-bg2); }
.nx-card-media img { width:100%; height:100%; object-fit:cover; transition:transform .35s ease; }
.nx-card:hover .nx-card-media img { transform:scale(1.06); }
.nx-card-fallback { width:100%; height:100%; display:grid; place-items:center; font-size:2.4rem; background:linear-gradient(135deg,#151D32,#1B2640); }
.nx-card-overlay { position:absolute; inset:0; background:rgba(8,11,20,.55); display:grid; place-items:center; opacity:0; transition:opacity .2s ease; }
.nx-card:hover .nx-card-overlay { opacity:1; }
.nx-play-pill { background:linear-gradient(135deg,var(--nx-accent),var(--nx-accent2)); color:#080B14; font-weight:800; padding:8px 18px; border-radius:999px; font-size:.85rem; }
.nx-badge-top { position:absolute; top:10px; right:10px; background:rgba(8,11,20,.78); color:#fff; padding:3px 9px; border-radius:999px; font-size:.72rem; font-weight:700; }
.nx-card-body { padding:14px; }
.nx-card-cat { font-size:.72rem; text-transform:uppercase; letter-spacing:.06em; color:var(--nx-accent2); font-weight:700; }
.nx-card-title { margin:4px 0 8px; font-size:1rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.nx-card-meta { display:flex; justify-content:space-between; font-size:.8rem; color:var(--nx-muted); }

/* Categories & News Grid */
.nx-cat-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(160px,1fr)); gap:14px; }
.nx-cat-card { background:var(--nx-card); border:1px solid var(--nx-border); border-radius:14px; padding:16px; display:flex; flex-direction:column; gap:4px; transition:border-color .2s, transform .2s; }
.nx-cat-card:hover { border-color:var(--cat-color,var(--nx-accent)); transform:translateY(-3px); }
.nx-cat-icon { font-size:1.6rem; }
.nx-cat-card small { color:var(--nx-muted); }
.nx-news-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(280px,1fr)); gap:18px; }
.nx-news-card { background:var(--nx-card); border:1px solid var(--nx-border); border-radius:var(--nx-radius); padding:20px; transition:border-color .2s; }
.nx-news-card:hover { border-color:var(--nx-accent); }
.nx-news-card h3 { margin:0 0 8px; font-size:1.1rem; }
.nx-news-card p { color:var(--nx-muted); font-size:.9rem; margin:0 0 10px; }

/* Single Game Page & Standalone Player */
.nx-single-wrap { display:grid; grid-template-columns:1fr 320px; gap:28px; padding:28px 0 56px; }
.nx-single-wrap.no-sidebar { grid-template-columns:1fr; }
.nx-standalone-player { position:relative; width:100%; padding-top:62.5%; background:#080B14; border-radius:var(--nx-radius); overflow:hidden; border:1px solid var(--nx-border); }
.nx-standalone-player iframe { position:absolute; inset:0; width:100%; height:100%; border:0; }
.nx-breadcrumbs { font-size:.85rem; color:var(--nx-muted); margin-bottom:14px; }
.nx-game-header { margin-bottom:18px; }
.nx-game-header h1 { margin:0 0 10px; font-size:clamp(1.6rem,3vw,2.3rem); }
.nx-game-badges { display:flex; flex-wrap:wrap; gap:8px; }
.nx-tag-neon { background:rgba(139,92,246,.2); color:var(--nx-accent2); border:1px solid rgba(139,92,246,.45); padding:4px 12px; border-radius:999px; font-size:.78rem; font-weight:700; }
.nx-tag-muted { background:var(--nx-surface); color:var(--nx-muted); padding:4px 12px; border-radius:999px; font-size:.78rem; }
.nx-tag-verified { background:rgba(16,185,129,.18); color:#10B981; padding:4px 12px; border-radius:999px; font-size:.78rem; font-weight:600; }

.nx-info-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:16px; margin:24px 0; }
.nx-info-card, .nx-editorial-content, .nexus-widget { background:var(--nx-card); border:1px solid var(--nx-border); border-radius:var(--nx-radius); padding:22px; }
.nx-editorial-content { margin-top:20px; }
.nx-editorial-meta { display:flex; flex-wrap:wrap; gap:16px; margin-top:24px; padding-top:14px; border-top:1px solid var(--nx-border); font-size:.84rem; color:var(--nx-muted); }
.nx-faq-section { margin-top:28px; }
.nx-faq-item { background:var(--nx-card); border:1px solid var(--nx-border); border-radius:12px; padding:14px 18px; margin-bottom:10px; }
.nx-faq-item summary { font-weight:700; cursor:pointer; }
.nx-shots-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:12px; }
.nx-shots-grid img { border-radius:12px; }
.nx-side-list { list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:10px; }
.nx-side-list a:hover { color:var(--nx-accent2); }

/* Pagination & Comments */
.nx-pagination { margin-top:32px; display:flex; justify-content:center; }
.nx-pagination .nav-links { display:flex; flex-wrap:wrap; gap:8px; }
.nx-pagination .page-numbers { padding:8px 14px; border-radius:10px; background:var(--nx-card); border:1px solid var(--nx-border); font-weight:600; }
.nx-pagination .page-numbers.current, .nx-pagination .page-numbers:hover { background:var(--nx-accent); color:#fff; border-color:var(--nx-accent); }

.nx-comments-section { margin-top:32px; background:var(--nx-card); border:1px solid var(--nx-border); border-radius:var(--nx-radius); padding:24px; }
.nx-comment-list { list-style:none; padding:0; margin:0 0 24px; display:flex; flex-direction:column; gap:16px; }
.nx-comment-list .comment-body { padding:14px; background:var(--nx-bg2); border:1px solid var(--nx-border); border-radius:12px; }
.nx-comments-section textarea, .nx-comments-section input[type="text"], .nx-comments-section input[type="email"], .nx-comments-section input[type="url"] { width:100%; background:var(--nx-bg); color:var(--nx-text); border:1px solid var(--nx-border); border-radius:10px; padding:10px 12px; margin-top:6px; }
.nx-comments-section .submit { background:linear-gradient(135deg,var(--nx-accent),var(--nx-highlight)); color:#fff; border:0; padding:11px 22px; border-radius:10px; font-weight:700; cursor:pointer; }

/* Archive, Filters & Newsletter */
.nx-archive-wrap, .nx-page-wrap { padding:28px 0 56px; }
.nx-filter-bar { display:flex; flex-wrap:wrap; align-items:center; gap:12px; margin:18px 0 24px; background:var(--nx-card); border:1px solid var(--nx-border); padding:14px; border-radius:14px; }
.nx-filter-bar select { background:var(--nx-bg2); color:var(--nx-text); border:1px solid var(--nx-border); border-radius:10px; padding:8px 12px; }
.nx-newsletter-box { background:linear-gradient(135deg,rgba(139,92,246,.22),rgba(34,211,238,.12)); border:1px solid rgba(139,92,246,.35); border-radius:20px; padding:28px; display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:20px; }
.nx-newsletter-form { display:flex; gap:10px; flex-wrap:wrap; align-items:center; }
.nx-newsletter-form input { background:var(--nx-bg); color:var(--nx-text); border:1px solid var(--nx-border); border-radius:12px; padding:12px 16px; min-width:240px; }

/* Footer */
.nx-footer { background:var(--nx-bg2); border-top:1px solid var(--nx-border); margin-top:48px; padding-top:44px; }
.nx-footer-grid { display:grid; grid-template-columns:1.4fr 1fr 1fr 1fr; gap:28px; padding-bottom:36px; }
.nx-footer-brand { font-size:1.3rem; font-weight:800; margin-bottom:10px; }
.nx-footer-desc, .nx-footer ul { color:var(--nx-muted); font-size:.9rem; list-style:none; padding:0; margin:0; }
.nx-footer li { margin-bottom:8px; }
.nx-footer li a:hover { color:var(--nx-accent2); }
.nx-footer-bottom { border-top:1px solid var(--nx-border); padding:18px 0; text-align:center; color:var(--nx-muted); font-size:.85rem; }

.nx-mobile-drawer { position:fixed; inset:0 auto 0 0; width:290px; background:var(--nx-bg2); border-right:1px solid var(--nx-border); padding:20px; z-index:999; overflow-y:auto; box-shadow:16px 0 48px rgba(0,0,0,.45); }
.nx-mobile-drawer[hidden] { display:none; }
.nx-drawer-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:18px; }
.nx-drawer-menu { list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:8px; }
.nx-drawer-cats { display:flex; flex-direction:column; gap:10px; }
.nx-404 { text-align:center; padding:80px 0; }
.nx-404 h1 { font-size:5rem; margin:0; color:var(--nx-accent); }

@media (max-width: 1024px) {
  .nx-hero-grid, .nx-single-wrap, .nx-footer-grid { grid-template-columns:1fr; }
  .nx-game-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media (max-width: 768px) {
  .nx-nav, .nx-random-btn span, .nx-hide-sm { display:none; }
  .nx-mobile-toggle { display:inline-flex; }
  .nx-search-input { width:135px; }
  .nx-game-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition:none !important; animation:none !important; }
}
