﻿@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&display=swap");

/* ============================================================
   DESIGN SYSTEM
   ============================================================ */
:root {
  --bg-primary:        #09091a;
  --bg-secondary:      #10102a;
  --bg-card:           #16163a;
  --bg-card-hover:     #1e1e48;
  --accent-purple:     #7c3aed;
  --accent-purple-lt:  #a855f7;
  --accent-cyan:       #06b6d4;
  --accent-cyan-lt:    #22d3ee;
  --accent-pink:       #ec4899;
  --accent-orange:     #f97316;
  --accent-amber:      #f59e0b;
  --accent-green:      #10b981;
  --text-primary:      #f1f5f9;
  --text-secondary:    #94a3b8;
  --text-muted:        #64748b;
  --border-base:       rgba(124,58,237,.18);
  --border-card:       rgba(124,58,237,.30);
  --glow-purple:       0 0 24px rgba(124,58,237,.45);
  --glow-cyan:         0 0 24px rgba(6,182,212,.4);
  --radius-sm:  8px;
  --radius-md:  12px;
  --radius-lg:  18px;
  --radius-xl:  26px;
  --ease:       cubic-bezier(.4,0,.2,1);
  --t:          all .28s var(--ease);
  --t-fast:     all .14s ease;
  --nav-h:      68px;
}

/* ============================================================ RESET */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { scroll-behavior: smooth; }
body  {
  font-family: "Outfit", sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

body::before {
  content: "";
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse at 15% 15%, rgba(124,58,237,.10) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 80%, rgba(6,182,212,.07)  0%, transparent 55%);
}

/* ============================================================ SCROLLBAR */
::-webkit-scrollbar            { width: 8px; }
::-webkit-scrollbar-track      { background: var(--bg-primary); }
::-webkit-scrollbar-thumb      { background: rgba(124,58,237,.4); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover{ background: var(--accent-purple); }

/* ============================================================ NAVBAR */
.navbar {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(9,9,26,.9);
  backdrop-filter: blur(22px);
  border-bottom: 1px solid var(--border-base);
  z-index: 1000;
  display: flex; align-items: center;
  padding: 0 clamp(16px,4vw,52px);
}
.navbar-inner {
  display: flex; align-items: center; width: 100%;
  max-width: 1440px; margin: 0 auto; gap: 28px;
}
.nav-logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.nav-logo-icon { width: 36px; height: 36px; }
.nav-logo-text {
  font-size: 1.35rem; font-weight: 800; letter-spacing: -.5px;
  background: linear-gradient(135deg, var(--accent-purple-lt), var(--accent-cyan));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; }
.nav-links a {
  color: var(--text-secondary); font-weight: 500; font-size: .93rem;
  padding: 7px 13px; border-radius: var(--radius-sm); transition: var(--t-fast);
}
.nav-links a:hover, .nav-links a.active {
  color: var(--text-primary); background: rgba(124,58,237,.14);
}
.nav-search { flex: 1; max-width: 340px; margin-left: auto; position: relative; }
.nav-search input {
  width: 100%; background: rgba(255,255,255,.05); border: 1px solid var(--border-base);
  border-radius: 50px; padding: 8px 16px 8px 38px;
  color: var(--text-primary); font-family: inherit; font-size: .9rem; outline: none; transition: var(--t);
}
.nav-search input::placeholder { color: var(--text-muted); }
.nav-search input:focus {
  border-color: var(--accent-purple); background: rgba(124,58,237,.08); box-shadow: var(--glow-purple);
}
.nav-search-icon {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); font-size: .95rem; pointer-events: none;
}
.nav-hamburger {
  display: none; flex-direction: column; gap: 5px;
  padding: 8px; border-radius: var(--radius-sm); cursor: pointer; margin-left: auto;
}
.nav-hamburger span {
  display: block; width: 24px; height: 2px;
  background: var(--text-secondary); border-radius: 2px; transition: var(--t);
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-drawer {
  position: fixed; top: var(--nav-h); left: 0; right: 0; bottom: 0;
  background: rgba(9,9,26,.97); backdrop-filter: blur(24px);
  z-index: 999; padding: 24px;
  flex-direction: column; gap: 8px;
  transform: translateX(-100%); transition: transform .3s var(--ease);
  display: none;
}
.mobile-drawer.open { transform: translateX(0); display: flex; }
.mobile-drawer a {
  display: block; padding: 14px 18px; color: var(--text-secondary);
  font-size: 1.1rem; font-weight: 600; border-radius: var(--radius-md);
  transition: var(--t-fast); border: 1px solid transparent;
}
.mobile-drawer a:hover {
  color: var(--text-primary); background: rgba(124,58,237,.14); border-color: var(--border-card);
}

/* ============================================================ LAYOUT */
.page-wrapper { padding-top: var(--nav-h); position: relative; z-index: 1; }
.container { width: 100%; max-width: 1440px; margin: 0 auto; padding: 0 clamp(16px,4vw,52px); }
.section { padding: 56px 0; }
.section-header {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px;
}
.section-title {
  font-size: clamp(1.2rem,2.5vw,1.65rem); font-weight: 700;
  display: flex; align-items: center; gap: 10px;
}
.section-link {
  color: var(--accent-purple-lt); font-size: .9rem; font-weight: 600;
  transition: var(--t-fast); display: flex; align-items: center; gap: 4px;
}
.section-link:hover { color: var(--accent-cyan); }

/* ============================================================ HERO */
.hero {
  position: relative; min-height: 560px;
  display: flex; align-items: center; overflow: hidden; padding: 80px 0 60px;
}
.hero-bg {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse at 30% 50%, rgba(124,58,237,.22) 0%, transparent 60%),
    radial-gradient(ellipse at 75% 25%, rgba(6,182,212,.16) 0%, transparent 55%);
}
.hero-particles { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.hero-content { position: relative; z-index: 2; text-align: center; width: 100%; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(124,58,237,.18); border: 1px solid rgba(124,58,237,.4);
  color: var(--accent-purple-lt); font-size: .82rem; font-weight: 700;
  padding: 5px 16px; border-radius: 50px; margin-bottom: 22px; letter-spacing: .5px;
}
.hero-badge-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent-cyan);
  animation: pulse 2s ease infinite;
}
@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(6,182,212,.6); }
  50%      { box-shadow: 0 0 0 6px rgba(6,182,212,0); }
}

.hero-title {
  font-size: clamp(2.6rem,8vw,5.2rem); font-weight: 900;
  line-height: 1.04; letter-spacing: -2px; margin-bottom: 20px;
}
.hero-title .grad {
  background: linear-gradient(135deg, #a855f7 0%, #06b6d4 50%, #ec4899 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  animation: gradShift 5s ease infinite;
}
@keyframes gradShift {
  0%   { background-position: 0%   50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0%   50%; }
}

.hero-sub {
  font-size: clamp(1rem,2vw,1.22rem); color: var(--text-secondary);
  max-width: 540px; margin: 0 auto 42px; line-height: 1.65; font-weight: 400;
}

.hero-search {
  display: flex; max-width: 520px; margin: 0 auto 36px;
  background: rgba(255,255,255,.06); border: 1px solid var(--border-card);
  border-radius: 50px; padding: 6px 6px 6px 22px; gap: 8px; transition: var(--t);
}
.hero-search:focus-within {
  border-color: var(--accent-purple); background: rgba(124,58,237,.09); box-shadow: var(--glow-purple);
}
.hero-search input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--text-primary); font-family: inherit; font-size: 1rem; font-weight: 500;
}
.hero-search input::placeholder { color: var(--text-muted); }
.hero-search-btn {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-purple-lt));
  color: #fff; border-radius: 50px; padding: 11px 28px;
  font-weight: 700; font-size: .95rem; transition: var(--t); white-space: nowrap;
}
.hero-search-btn:hover {
  transform: translateY(-1px); box-shadow: 0 8px 28px rgba(124,58,237,.55);
}

.hero-stats { display: flex; justify-content: center; gap: 48px; }
.hero-stat { text-align: center; }
.hero-stat-num {
  font-size: 2rem; font-weight: 800; line-height: 1; margin-bottom: 4px;
  background: linear-gradient(135deg, var(--accent-purple-lt), var(--accent-cyan));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-stat-lbl {
  font-size: .75rem; color: var(--text-muted); font-weight: 600;
  text-transform: uppercase; letter-spacing: .5px;
}

/* ============================================================ GAME CARD */
.games-grid {
  display: grid; grid-template-columns: repeat(auto-fill,minmax(158px,1fr)); gap: 16px;
}
.games-grid.lg { grid-template-columns: repeat(auto-fill,minmax(190px,1fr)); gap: 20px; }

.game-card {
  background: var(--bg-card); border-radius: var(--radius-lg);
  overflow: hidden; border: 1px solid var(--border-base);
  transition: var(--t); cursor: pointer; display: block; position: relative;
}
.game-card:hover {
  transform: translateY(-7px); border-color: var(--accent-purple);
  box-shadow: var(--glow-purple), 0 24px 48px rgba(0,0,0,.45);
}
.game-thumb { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--bg-secondary); }
.game-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.game-card:hover .game-thumb img { transform: scale(1.09); }

.game-thumb-ph {
  width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
}
.game-thumb-ph .ph-icon { font-size: 3rem; line-height: 1; }
.game-thumb-ph .ph-name {
  font-size: .68rem; font-weight: 700; color: rgba(255,255,255,.75);
  text-align: center; padding: 0 8px; line-height: 1.3;
}

.game-overlay {
  position: absolute; inset: 0; background: rgba(0,0,0,.48);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: var(--t);
}
.game-card:hover .game-overlay { opacity: 1; }
.play-circle {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--accent-purple);
  display: flex; align-items: center; justify-content: center; font-size: 1.3rem;
  box-shadow: 0 0 28px rgba(124,58,237,.9);
  transform: scale(.78); transition: transform .2s ease;
}
.game-card:hover .play-circle { transform: scale(1); }

.badge {
  position: absolute; top: 8px; left: 8px;
  font-size: .6rem; font-weight: 700; padding: 2px 9px;
  border-radius: 50px; text-transform: uppercase; letter-spacing: .5px; color: #fff;
}
.badge-new { background: linear-gradient(135deg,#06b6d4,#7c3aed); }
.badge-hot { background: linear-gradient(135deg,#f59e0b,#ef4444); }

.game-info { padding: 11px 12px 13px; }
.game-title { font-size: .88rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 3px; }
.game-cat   { font-size: .72rem; color: var(--text-muted); font-weight: 500; text-transform: capitalize; }

/* ============================================================ CATEGORIES */
.categories-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(120px,1fr)); gap: 12px; }
.cat-card {
  background: var(--bg-card); border: 1px solid var(--border-base);
  border-radius: var(--radius-md); padding: 20px 12px; text-align: center;
  cursor: pointer; transition: var(--t); display: block;
}
.cat-card:hover, .cat-card.active {
  border-color: var(--accent-purple); background: rgba(124,58,237,.14);
  box-shadow: var(--glow-purple); transform: translateY(-3px);
}
.cat-icon  { font-size: 2.2rem; display: block; margin-bottom: 8px; }
.cat-label { font-size: .82rem; font-weight: 700; color: var(--text-secondary); }
.cat-card:hover .cat-label, .cat-card.active .cat-label { color: var(--accent-purple-lt); }

/* ============================================================ FILTER BAR */
.filter-bar {
  position: sticky; top: var(--nav-h);
  background: rgba(9,9,26,.97); backdrop-filter: blur(22px);
  border-bottom: 1px solid var(--border-base); z-index: 100; padding: 14px 0;
}
.filter-inner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.filter-search { position: relative; min-width: 200px; max-width: 280px; flex: 1; }
.filter-search input {
  width: 100%; background: rgba(255,255,255,.05); border: 1px solid var(--border-base);
  border-radius: 50px; padding: 9px 16px 9px 36px;
  color: var(--text-primary); font-family: inherit; font-size: .88rem; outline: none; transition: var(--t);
}
.filter-search input::placeholder { color: var(--text-muted); }
.filter-search input:focus { border-color: var(--accent-purple); box-shadow: var(--glow-purple); }
.filter-search-ico { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: .9rem; }

.filter-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-tab {
  padding: 7px 16px; border-radius: 50px; font-size: .82rem; font-weight: 700;
  color: var(--text-secondary); background: rgba(255,255,255,.05);
  border: 1px solid transparent; transition: var(--t-fast); cursor: pointer;
  display: flex; align-items: center; gap: 5px;
}
.filter-tab:hover { color: var(--text-primary); background: rgba(124,58,237,.12); border-color: rgba(124,58,237,.3); }
.filter-tab.active {
  background: linear-gradient(135deg,var(--accent-purple),var(--accent-purple-lt));
  color: #fff; border-color: transparent; box-shadow: 0 4px 18px rgba(124,58,237,.45);
}
.tab-count {
  background: rgba(255,255,255,.18); color: #fff;
  font-size: .68rem; padding: 1px 7px; border-radius: 50px; font-weight: 700;
}
.filter-tab.active .tab-count { background: rgba(255,255,255,.25); }

.games-result-count { font-size: .88rem; color: var(--text-muted); margin-bottom: 20px; font-weight: 500; }
.games-result-count span { color: var(--accent-purple-lt); font-weight: 700; }

/* ============================================================ LOAD MORE */
.load-more-wrap { text-align: center; margin-top: 44px; }
.btn-load-more {
  background: transparent; border: 1px solid var(--border-card);
  color: var(--text-secondary); padding: 13px 36px; border-radius: 50px;
  font-size: .95rem; font-weight: 700; font-family: inherit; transition: var(--t);
}
.btn-load-more:hover { border-color: var(--accent-purple); color: var(--accent-purple-lt); box-shadow: var(--glow-purple); }

/* ============================================================ PLAY PAGE */
.play-header { padding: 22px 0; border-bottom: 1px solid var(--border-base); }
.play-breadcrumb {
  display: flex; align-items: center; gap: 7px;
  font-size: .82rem; color: var(--text-muted); margin-bottom: 12px;
}
.play-breadcrumb a { color: var(--accent-purple-lt); transition: var(--t-fast); }
.play-breadcrumb a:hover { color: var(--accent-cyan); }
.play-game-title { font-size: clamp(1.3rem,3vw,2rem); font-weight: 800; }

.play-layout { display: grid; grid-template-columns: 1fr 300px; gap: 24px; padding: 24px 0; align-items: start; }
.play-frame-wrap {
  background: #000; border-radius: var(--radius-lg); overflow: hidden;
  position: relative; border: 1px solid var(--border-base);
}
.play-frame-wrap iframe {
  width: 100%; border: none; display: block;
  min-height: 480px;
  height: calc(100vw * 0.52);
  max-height: 70vh;
}
.play-controls {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 12px; padding: 11px 16px;
  background: var(--bg-card); border-radius: var(--radius-md); border: 1px solid var(--border-base);
}
.play-controls-left, .play-controls-right { display: flex; gap: 8px; }

.btn-ctrl {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--radius-sm);
  font-size: .83rem; font-weight: 700; font-family: inherit; transition: var(--t-fast); cursor: pointer;
}
.btn-ctrl.primary { background: linear-gradient(135deg,var(--accent-purple),var(--accent-purple-lt)); color: #fff; }
.btn-ctrl.primary:hover { box-shadow: 0 4px 18px rgba(124,58,237,.55); transform: translateY(-1px); }
.btn-ctrl.secondary { background: rgba(255,255,255,.06); color: var(--text-secondary); border: 1px solid var(--border-base); }
.btn-ctrl.secondary:hover { color: var(--text-primary); border-color: var(--accent-purple); }

.play-sidebar { display: flex; flex-direction: column; gap: 18px; }
.sidebar-title { font-size: .78rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; }

.related-list { display: flex; flex-direction: column; gap: 10px; }
.related-card {
  display: flex; gap: 12px; align-items: center; padding: 10px;
  background: var(--bg-card); border-radius: var(--radius-md);
  border: 1px solid var(--border-base); transition: var(--t); text-decoration: none;
}
.related-card:hover { border-color: var(--accent-purple); transform: translateX(4px); }
.related-thumb { width: 54px; height: 54px; border-radius: var(--radius-sm); overflow: hidden; flex-shrink: 0; background: var(--bg-secondary); }
.related-thumb img { width: 100%; height: 100%; object-fit: cover; }
.related-thumb-ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; }
.related-info .r-name { font-size: .83rem; font-weight: 700; margin-bottom: 2px; }
.related-info .r-cat  { font-size: .7rem; color: var(--text-muted); text-transform: capitalize; }

.ad-box {
  background: var(--bg-card); border: 1px dashed rgba(255,255,255,.1);
  border-radius: var(--radius-md); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 6px; color: var(--text-muted);
}
.ad-box .ad-lbl  { font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
.ad-box .ad-size { font-size: .75rem; }
.ad-sidebar-box  { min-height: 580px; }
.ad-leaderboard  { height: 90px; margin-top: 16px; }
.ad-rectangle    { height: 250px; }

/* ============================================================ FOOTER */
.footer { background: var(--bg-secondary); border-top: 1px solid var(--border-base); padding: 44px 0 24px; margin-top: 60px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 44px; margin-bottom: 36px; }
.footer-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.footer-logo-text {
  font-size: 1.25rem; font-weight: 800;
  background: linear-gradient(135deg,var(--accent-purple-lt),var(--accent-cyan));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.footer-desc { color: var(--text-muted); font-size: .88rem; line-height: 1.65; max-width: 240px; }
.footer-col-title { font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; color: var(--text-secondary); margin-bottom: 16px; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-links a { color: var(--text-muted); font-size: .88rem; transition: var(--t-fast); }
.footer-links a:hover { color: var(--accent-purple-lt); }
.footer-bottom { border-top: 1px solid var(--border-base); padding-top: 22px; display: flex; align-items: center; justify-content: space-between; font-size: .82rem; color: var(--text-muted); }
.footer-bottom-links { display: flex; gap: 20px; }
.footer-bottom-links a { color: var(--text-muted); transition: var(--t-fast); }
.footer-bottom-links a:hover { color: var(--accent-purple-lt); }

/* ============================================================ ANIMATIONS */
.fade-in { animation: fadeIn .5s ease both; }
@keyframes fadeIn { from { opacity:0; transform:translateY(18px); } to { opacity:1; transform:translateY(0); } }
.delay-1 { animation-delay: .06s; }
.delay-2 { animation-delay: .12s; }
.delay-3 { animation-delay: .18s; }
.delay-4 { animation-delay: .24s; }

.particle { position: absolute; border-radius: 50%; pointer-events: none; animation: floatUp linear infinite; }
@keyframes floatUp {
  0%   { transform: translateY(0) rotate(0deg); opacity: 0; }
  8%   { opacity: 1; }
  92%  { opacity: .6; }
  100% { transform: translateY(-105vh) rotate(540deg); opacity: 0; }
}
.spinner { width: 38px; height: 38px; border: 3px solid var(--border-base); border-top-color: var(--accent-purple); border-radius: 50%; animation: spin .75s linear infinite; margin: 48px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

.no-results { text-align: center; padding: 64px 20px; color: var(--text-muted); }
.no-results-icon  { font-size: 3.2rem; margin-bottom: 16px; }
.no-results-title { font-size: 1.1rem; font-weight: 700; color: var(--text-secondary); margin-bottom: 8px; }
.no-results-sub   { font-size: .88rem; }

/* ============================================================ RESPONSIVE */
@media (max-width: 1100px) {
  .play-layout { grid-template-columns: 1fr; }
  .ad-sidebar-box { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .nav-links, .nav-search { display: none; }
  .nav-hamburger { display: flex; }
  .hero-stats { gap: 24px; }
  .hero-stat-num { font-size: 1.6rem; }
  .categories-grid { grid-template-columns: repeat(4,1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
}
@media (max-width: 480px) {
  .categories-grid { grid-template-columns: repeat(3,1fr); }
  .hero-stats { gap: 16px; }
  .games-grid { grid-template-columns: repeat(2,1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-brand { display: none; }
  .play-frame-wrap iframe { height: 56vw; min-height: 240px; }
}
