/* ═══════════════════════════════════════════════════════════════
   GamesHub — Main Stylesheet
   assets/css/style.css
═══════════════════════════════════════════════════════════════ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --bg:          #0a0b14;
  --surface:     #111224;
  --surface2:    #181a30;
  --accent:      #7c3aed;
  --accent2:     #06d6a0;
  --accent3:     #f72585;
  --text:        #e8e9f5;
  --muted:       #7b7d9b;
  --border:      rgba(124,58,237,0.2);
  --card-radius: 14px;
  --font-head:   'Exo 2', sans-serif;
  --font-body:   'DM Sans', sans-serif;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html  { scroll-behavior:smooth; }
body  { background:var(--bg); color:var(--text); font-family:var(--font-body); min-height:100vh; line-height:1.6; }
a     { text-decoration:none; color:inherit; }
ul    { list-style:none; }
img   { max-width:100%; display:block; }
button { font-family:var(--font-body); cursor:pointer; }

/* ── NAV ───────────────────────────────────────────────────── */
header { position:sticky; top:0; z-index:200; }

.navbar {
  background: rgba(10,11,20,0.95);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  padding: 0 5%;
  display: flex; align-items:center; justify-content:space-between;
  height: 64px; gap:16px;
}

.logo {
  font-family: var(--font-head);
  font-size: 1.5rem; font-weight:900;
  background: linear-gradient(135deg,#7c3aed,#06d6a0);
  -webkit-background-clip:text; -webkit-text-fill-color:transparent;
  letter-spacing:-0.5px; white-space:nowrap; flex-shrink:0;
}
.logo span { color:#f72585; -webkit-text-fill-color:#f72585; }

.nav-links { display:flex; gap:4px; align-items:center; }
.nav-links li a {
  color:var(--muted); font-size:0.88rem; font-weight:500;
  padding:7px 12px; border-radius:8px; transition:all 0.2s;
  white-space:nowrap;
}
.nav-links li a:hover,
.nav-links li a.active { color:var(--text); background:var(--surface2); }

/* Dropdown */
.dropdown { position:relative; }
.dropdown-menu {
  display:none; position:absolute; top:calc(100% + 8px); right:0;
  background:var(--surface); border:1px solid var(--border);
  border-radius:10px; padding:6px; min-width:180px;
  box-shadow:0 12px 40px rgba(0,0,0,0.4); z-index:300;
}
.dropdown-menu.open { display:block; }
.dropdown-menu li a {
  display:block; padding:9px 14px; border-radius:7px;
  color:var(--muted); font-size:0.88rem; transition:0.15s;
}
.dropdown-menu li a:hover { background:var(--surface2); color:var(--text); }

.nav-right { display:flex; gap:10px; align-items:center; }

.btn-search {
  background:var(--surface2); border:1px solid var(--border);
  color:var(--muted); border-radius:8px;
  padding:8px 14px; font-size:0.85rem;
  display:flex; align-items:center; gap:6px; transition:0.2s;
}
.btn-search:hover { border-color:var(--accent); color:var(--text); }

.hamburger {
  display:none; background:none; border:none;
  color:var(--text); font-size:1.5rem; line-height:1; padding:4px;
}

/* Mobile menu */
.mobile-menu {
  display:none; flex-direction:column; gap:4px;
  background:var(--surface); border-bottom:1px solid var(--border);
  padding:12px 5%;
}
.mobile-menu a {
  color:var(--muted); padding:10px 14px; border-radius:8px;
  font-weight:500; font-size:0.95rem; transition:0.15s;
}
.mobile-menu a:hover,
.mobile-menu a.active { color:var(--text); background:var(--surface2); }
.mobile-menu.open { display:flex; }

/* ── BUTTONS ───────────────────────────────────────────────── */
.btn-primary {
  background:var(--accent); color:#fff; border:none;
  padding:13px 26px; border-radius:10px;
  font-family:var(--font-body); font-size:1rem; font-weight:600;
  cursor:pointer; transition:0.2s; display:inline-block;
}
.btn-primary:hover { background:#6d28d9; transform:translateY(-1px); }

.btn-secondary {
  background:transparent; color:var(--text);
  border:1px solid var(--border); padding:13px 26px; border-radius:10px;
  font-family:var(--font-body); font-size:1rem; font-weight:600;
  cursor:pointer; transition:0.2s; display:inline-block;
}
.btn-secondary:hover { border-color:var(--accent); }

/* ── HERO ───────────────────────────────────────────────────── */
.hero {
  padding:80px 5% 60px; text-align:center;
  background:radial-gradient(ellipse 70% 50% at 50% -10%, rgba(124,58,237,0.25) 0%, transparent 70%);
  position:relative; overflow:hidden;
}
.hero::before {
  content:''; position:absolute; inset:0; pointer-events:none; z-index:0;
  background:url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%237c3aed' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero > * { position:relative; z-index:1; }

.hero-badge {
  display:inline-block; background:rgba(124,58,237,0.15);
  border:1px solid rgba(124,58,237,0.4); color:#a78bfa;
  font-size:0.78rem; font-weight:600; letter-spacing:1px; text-transform:uppercase;
  padding:6px 14px; border-radius:50px; margin-bottom:20px;
}
.hero h1 {
  font-family:var(--font-head); font-size:clamp(2rem,5vw,4rem);
  font-weight:900; line-height:1.1; margin-bottom:18px;
}
.hero h1 em { font-style:normal; color:var(--accent2); }
.hero > p { font-size:1.1rem; color:var(--muted); max-width:540px; margin:0 auto 32px; line-height:1.7; }

.hero-btns { display:flex; gap:14px; justify-content:center; flex-wrap:wrap; }

.hero-stats { display:flex; gap:40px; justify-content:center; margin-top:50px; flex-wrap:wrap; }
.stat { text-align:center; }
.stat-num { font-family:var(--font-head); font-size:2rem; font-weight:900; color:var(--accent2); }
.stat-label { font-size:0.8rem; color:var(--muted); margin-top:2px; }

/* ── SECTIONS ──────────────────────────────────────────────── */
.section { padding:50px 5%; }
.section-divider { height:1px; background:var(--border); margin:0 5%; }

.section-head {
  display:flex; align-items:center; justify-content:space-between;
  margin-bottom:28px; flex-wrap:wrap; gap:12px;
}
.section-title { font-family:var(--font-head); font-size:1.5rem; font-weight:800; }
.section-title span { color:var(--accent); }
.see-all { color:var(--accent); font-size:0.9rem; font-weight:600; transition:0.2s; }
.see-all:hover { color:var(--accent2); }

/* ── CATEGORY PILLS (filter bar) ──────────────────────────── */
.cat-pills { display:flex; gap:10px; flex-wrap:wrap; margin-bottom:30px; }
.cat-pill {
  padding:9px 18px; border-radius:50px;
  border:1px solid var(--border); background:var(--surface);
  color:var(--muted); font-size:0.85rem; font-weight:600;
  cursor:pointer; transition:all 0.2s; display:flex; align-items:center; gap:6px;
}
.cat-pill:hover, .cat-pill.active {
  background:var(--accent); border-color:var(--accent); color:#fff;
}

/* ── CATEGORY CARDS ────────────────────────────────────────── */
.cat-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(160px,1fr)); gap:14px; }

.cat-card {
  background:var(--surface); border:1px solid var(--border);
  border-radius:var(--card-radius); padding:24px 16px;
  text-align:center; cursor:pointer; transition:all 0.25s;
  position:relative; overflow:hidden; display:block;
}
.cat-card::before {
  content:''; position:absolute; inset:0; opacity:0; transition:0.3s;
  background:radial-gradient(circle at 50% 0%, var(--cat-color,#7c3aed) 0%, transparent 70%);
  opacity:0;
}
.cat-card:hover { transform:translateY(-4px); border-color:var(--cat-color,var(--accent)); }
.cat-card:hover::before { opacity:0.15; }
.cat-icon { font-size:2.2rem; margin-bottom:10px; }
.cat-name { font-family:var(--font-head); font-weight:700; font-size:0.95rem; }
.cat-count { color:var(--muted); font-size:0.78rem; margin-top:4px; }

/* ── GAME CARDS ────────────────────────────────────────────── */
.game-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:18px; }

.game-card {
  background:var(--surface); border:1px solid var(--border);
  border-radius:var(--card-radius); overflow:hidden;
  cursor:pointer; transition:all 0.25s; position:relative;
}
.game-card:hover { transform:translateY(-5px); border-color:var(--accent); box-shadow:0 8px 30px rgba(124,58,237,0.2); }

.game-thumb {
  width:100%; aspect-ratio:16/10;
  display:flex; align-items:center; justify-content:center;
  font-size:3rem; position:relative; overflow:hidden;
}

.game-badge {
  position:absolute; top:10px; left:10px;
  font-size:0.7rem; font-weight:700; letter-spacing:0.5px; text-transform:uppercase;
  padding:4px 8px; border-radius:4px; z-index:1;
}
.badge-new { background:#06d6a0; color:#001a12; }
.badge-hot { background:#f72585; color:#fff; }
.badge-top { background:#f4a261; color:#1a0900; }

.game-play-overlay {
  position:absolute; inset:0; background:rgba(10,11,20,0.6);
  display:flex; align-items:center; justify-content:center;
  opacity:0; transition:0.25s;
}
.game-card:hover .game-play-overlay { opacity:1; }

.play-btn {
  width:52px; height:52px; border-radius:50%;
  background:var(--accent); border:none; color:#fff;
  font-size:1.3rem; display:flex; align-items:center; justify-content:center;
  transition:0.2s;
}
.play-btn:hover { background:#6d28d9; transform:scale(1.1); }

.game-info { padding:14px; }
.game-title { font-family:var(--font-head); font-weight:700; font-size:0.95rem; margin-bottom:6px; }
.game-meta { display:flex; align-items:center; justify-content:space-between; }
.game-cat   { font-size:0.75rem; color:var(--accent); font-weight:600; }
.game-rating{ font-size:0.75rem; color:#f4a261; }

/* ── FEATURED CARD ─────────────────────────────────────────── */
.featured-card {
  background:var(--surface); border:1px solid var(--border);
  border-radius:var(--card-radius); overflow:hidden;
  display:grid; grid-template-columns:1fr 1fr; cursor:pointer;
  transition:border-color 0.25s;
}
.featured-card:hover { border-color:var(--accent); }
.featured-thumb {
  min-height:280px; display:flex; align-items:center;
  justify-content:center; font-size:5rem;
}
.featured-content { padding:36px 32px; display:flex; flex-direction:column; justify-content:center; }
.featured-tag { font-size:0.72rem; font-weight:700; text-transform:uppercase;
  letter-spacing:1px; color:var(--accent2); margin-bottom:10px; }
.featured-content h2 { font-family:var(--font-head); font-size:1.8rem; font-weight:900; margin-bottom:10px; }
.featured-content p  { color:var(--muted); line-height:1.6; margin-bottom:20px; font-size:0.9rem; }

/* ── TAGS ──────────────────────────────────────────────────── */
.tag-list { display:flex; gap:8px; flex-wrap:wrap; margin-top:8px; }
.tag {
  background:rgba(124,58,237,0.15); border:1px solid rgba(124,58,237,0.3);
  color:#a78bfa; font-size:0.72rem; padding:3px 8px; border-radius:4px;
}

/* ── AD BLOCKS ─────────────────────────────────────────────── */
.ad-block {
  background:var(--surface); border:1px dashed rgba(124,58,237,0.3);
  border-radius:var(--card-radius); overflow:hidden; position:relative;
}
.ad-label {
  position:absolute; top:8px; right:10px; z-index:1;
  font-size:0.65rem; color:var(--muted); letter-spacing:0.5px; text-transform:uppercase;
}
.ad-banner {
  width:100%; display:flex; align-items:center; justify-content:center;
  background:linear-gradient(135deg, #1a0a2e 0%, #0a1a2e 50%, #0a2e1a 100%);
  position:relative; overflow:hidden;
}
.ad-banner::after {
  content:''; position:absolute; inset:0;
  background:repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(124,58,237,0.03) 10px, rgba(124,58,237,0.03) 20px);
}
.ad-banner-text {
  color:rgba(255,255,255,0.15); font-family:var(--font-head);
  font-size:1.2rem; font-weight:900; letter-spacing:2px; user-select:none; z-index:1;
}
.ad-banner-728 { height:90px; }
.ad-banner-300 { height:250px; }

/* Ad wrapper rows */
.ad-row { padding:20px 5%; }
.ad-row-top { padding:20px 5% 0; }

/* Content + sidebar layout */
.content-with-sidebar {
  display:grid; grid-template-columns:1fr 300px; gap:30px;
  padding:30px 5%;
}
.sidebar { display:flex; flex-direction:column; gap:20px; }

/* ── FILTER BAR ────────────────────────────────────────────── */
.filter-bar {
  display:flex; gap:12px; align-items:center; flex-wrap:wrap;
  padding:16px 5%; background:var(--surface); border-bottom:1px solid var(--border);
  position:sticky; top:64px; z-index:100;
}
.filter-bar .cat-pills { margin:0; flex-wrap:nowrap; overflow-x:auto; padding-bottom:2px; }
.filter-search {
  flex:1; min-width:180px;
  background:var(--surface2); border:1px solid var(--border);
  color:var(--text); padding:8px 14px; border-radius:8px;
  font-family:var(--font-body); font-size:0.85rem;
  outline:none; transition:0.2s;
}
.filter-search::placeholder { color:var(--muted); }
.filter-search:focus { border-color:var(--accent); }
.filter-select {
  background:var(--surface2); border:1px solid var(--border);
  color:var(--text); padding:8px 14px; border-radius:8px;
  font-family:var(--font-body); font-size:0.85rem;
  outline:none; cursor:pointer; transition:0.2s;
}
.filter-select:hover { border-color:var(--accent); }
.results-count { color:var(--muted); font-size:0.85rem; white-space:nowrap; }

/* ── PAGE HEADERS ──────────────────────────────────────────── */
.page-header { padding:40px 5% 30px; border-bottom:1px solid var(--border); }
.page-header h1 { font-family:var(--font-head); font-size:2rem; font-weight:900; margin-bottom:6px; }
.page-header p  { color:var(--muted); }

/* ── CATEGORY PAGE HERO ────────────────────────────────────── */
.cat-hero {
  padding:50px 5% 40px; text-align:center;
  background:radial-gradient(ellipse 60% 40% at 50% 0%, rgba(124,58,237,0.18) 0%, transparent 70%);
  border-bottom:1px solid var(--border);
}
.cat-hero-icon { font-size:3.5rem; margin-bottom:16px; }
.cat-hero h1   { font-family:var(--font-head); font-size:2.2rem; font-weight:900; margin-bottom:8px; }
.cat-hero p    { color:var(--muted); max-width:480px; margin:0 auto; }

/* ── BREADCRUMB ────────────────────────────────────────────── */
.breadcrumb { display:flex; align-items:center; gap:8px; padding:16px 5%; font-size:0.8rem; color:var(--muted); }
.breadcrumb a { color:var(--accent); }
.breadcrumb a:hover { text-decoration:underline; }

/* ── MODAL / GAME PLAYER ───────────────────────────────────── */
.modal-overlay {
  display:none; position:fixed; inset:0; z-index:500;
  background:rgba(5,6,12,0.92); backdrop-filter:blur(8px);
  align-items:center; justify-content:center; padding:20px;
}
.modal-overlay.open { display:flex; }

.modal {
  background:var(--surface); border:1px solid var(--border);
  border-radius:16px; width:100%; max-width:820px; overflow:hidden;
}
.modal-header {
  padding:16px 20px; border-bottom:1px solid var(--border);
  display:flex; align-items:center; justify-content:space-between;
}
.modal-title { font-family:var(--font-head); font-weight:800; font-size:1.1rem; }
.modal-close { background:none; border:none; color:var(--muted); font-size:1.4rem; transition:0.2s; padding:4px; }
.modal-close:hover { color:var(--text); }
.modal-body { padding:20px; }

.game-frame {
  width:100%; aspect-ratio:16/9;
  background:linear-gradient(135deg,#0d0d1f,#0d1f12);
  border-radius:10px; display:flex; align-items:center; justify-content:center;
  flex-direction:column; gap:10px;
}
.frame-icon { font-size:4rem; }
.game-frame p { color:var(--muted); font-size:0.9rem; text-align:center; }

/* ── SEARCH MODAL ──────────────────────────────────────────── */
.search-modal {
  display:none; position:fixed; inset:0; z-index:400;
  background:rgba(5,6,12,0.95); backdrop-filter:blur(10px);
  padding:60px 5% 20px; overflow-y:auto;
}
.search-modal.open { display:block; }
.search-input-wrap { display:flex; gap:12px; margin-bottom:24px; }
.search-input-big {
  flex:1; background:var(--surface); border:1px solid var(--border);
  color:var(--text); padding:14px 20px; border-radius:12px;
  font-family:var(--font-body); font-size:1.1rem; outline:none;
}
.search-input-big:focus { border-color:var(--accent); }
.search-close {
  background:var(--surface); border:1px solid var(--border);
  color:var(--text); padding:14px 20px; border-radius:12px; font-size:1rem;
}
.search-close:hover { border-color:var(--accent); }

/* ── TOAST ─────────────────────────────────────────────────── */
.toast {
  position:fixed; bottom:24px; right:24px; z-index:600;
  background:var(--accent); color:#fff; padding:12px 20px;
  border-radius:10px; font-size:0.9rem; font-weight:600;
  transform:translateY(80px); opacity:0; transition:all 0.3s; pointer-events:none;
}
.toast.show { transform:translateY(0); opacity:1; }

/* ── FOOTER ────────────────────────────────────────────────── */
footer {
  background:var(--surface); border-top:1px solid var(--border);
  padding:50px 5% 30px; margin-top:60px;
}
.footer-grid {
  display:grid; grid-template-columns:2fr 1fr 1fr 1fr;
  gap:40px; margin-bottom:36px;
}
.footer-brand .logo { font-size:1.3rem; }
.footer-brand p { color:var(--muted); font-size:0.85rem; margin-top:12px; line-height:1.6; }
.footer-tags { display:flex; gap:8px; flex-wrap:wrap; margin-top:14px; }
.footer-tag {
  background:var(--surface2); border:1px solid var(--border);
  color:var(--muted); font-size:0.72rem; padding:4px 10px; border-radius:4px;
}
.footer-col h4 { font-family:var(--font-head); font-weight:700; margin-bottom:14px; font-size:0.9rem; }
.footer-col ul { display:flex; flex-direction:column; gap:8px; }
.footer-col ul li a { color:var(--muted); font-size:0.85rem; transition:0.2s; }
.footer-col ul li a:hover { color:var(--accent2); }

.footer-popular {
  display:flex; gap:8px; flex-wrap:wrap; align-items:center;
  padding:20px 0; border-top:1px solid var(--border); border-bottom:1px solid var(--border);
  margin-bottom:24px;
}
.footer-pop-label { color:var(--muted); font-size:0.8rem; font-weight:600; flex-shrink:0; }
.footer-pop-tag {
  background:var(--surface2); border:1px solid var(--border);
  color:var(--muted); font-size:0.75rem; padding:4px 10px;
  border-radius:4px; transition:0.2s;
}
.footer-pop-tag:hover { border-color:var(--accent); color:var(--accent); }

.footer-bottom { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:10px; }
.footer-bottom p, .footer-credit { color:var(--muted); font-size:0.8rem; }

/* ── RESPONSIVE ────────────────────────────────────────────── */
@media (max-width:1100px) {
  .nav-links li:nth-child(n+4) { display:none; }
  .nav-links li.dropdown { display:flex; }
}

@media (max-width:900px) {
  .nav-links { display:none; }
  .hamburger { display:block; }
  .featured-card { grid-template-columns:1fr; }
  .featured-thumb { min-height:200px; }
  .footer-grid { grid-template-columns:1fr 1fr; }
  .content-with-sidebar { grid-template-columns:1fr; }
  .sidebar { flex-direction:row; flex-wrap:wrap; }
  .sidebar .ad-block { flex:1; min-width:200px; }
}

@media (max-width:640px) {
  .hero h1 { font-size:1.8rem; }
  .hero-stats { gap:20px; }
  .game-grid { grid-template-columns:repeat(auto-fill,minmax(155px,1fr)); gap:12px; }
  .cat-grid  { grid-template-columns:repeat(3,1fr); gap:10px; }
  .footer-grid { grid-template-columns:1fr; gap:24px; }
  .featured-content { padding:20px; }
  .featured-content h2 { font-size:1.3rem; }
  .ad-banner-728 { height:60px; }
  .ad-banner-text { font-size:0.85rem; }
  .filter-bar { top:64px; }
}
