/* ========== AURORA TECH THEME ========== */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  --aurora-1: #7c3aed;
  --aurora-2: #2dd4bf;
  --aurora-3: #f472b6;
  --aurora-4: #38bdf8;
  --accent: #a78bfa;
  --success: #34d399;
  --warning: #fbbf24;
  --danger: #f87171;
  --bg-dark: #0c0c14;
  --bg-card: #161622;
  --bg-hover: #1e1e2d;
  --border: #2a2a3d;
  --text: #f4f4f5;
  --text-dim: #a1a1aa;
  --sidebar-w: 230px;
  --radius: 14px;
  --radius-sm: 8px;
  --font: 'Outfit', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg-dark);
  padding-bottom: 76px;
}

@media (min-width: 900px) {
  body { padding-bottom: 0; padding-left: var(--sidebar-w); }
}

/* Hide ugly scrollbars */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--aurora-1); }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
button, input { font: inherit; border: none; background: none; }
button { cursor: pointer; }

/* Aurora glow effect */
@keyframes aurora {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* ========== SIDEBAR ========== */
.sidebar {
  display: none;
  position: fixed;
  left: 0;
  top: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  flex-direction: column;
  z-index: 200;
  overflow-y: auto;
}

@media (min-width: 900px) {
  .sidebar { display: flex; }
}

.sidebar-header {
  padding: 22px 18px;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.sidebar-header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--aurora-1), var(--aurora-2), var(--aurora-3));
  opacity: 0.6;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 700;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--aurora-1), var(--aurora-2));
  color: #fff;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
}

.sidebar-nav { flex: 1; padding: 18px 12px; }

.nav-section { margin-bottom: 26px; }

.nav-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-dim);
  padding: 8px 12px;
  opacity: 0.6;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dim);
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  margin-bottom: 4px;
}

.nav-link:hover {
  color: var(--text);
  background: var(--bg-hover);
}

.nav-link.active {
  color: #fff;
  background: linear-gradient(135deg, var(--aurora-1), var(--aurora-3));
}

.nav-link i { width: 22px; font-size: 18px; text-align: center; }

.nav-link .badge {
  margin-left: auto;
  padding: 3px 10px;
  font-size: 10px;
  font-weight: 700;
  background: var(--aurora-2);
  color: var(--bg-dark);
  border-radius: 12px;
}

.sidebar-footer {
  padding: 14px 12px;
  border-top: 1px solid var(--border);
}

.sidebar-cta {
  display: block;
  padding: 16px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.2), rgba(45, 212, 191, 0.2));
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-align: center;
}

.sidebar-cta strong { display: block; font-size: 13px; font-weight: 700; color: var(--aurora-2); }
.sidebar-cta span { font-size: 11px; color: var(--text-dim); }

/* ========== HEADER ========== */
.header {
  position: sticky;
  top: 0;
  background: rgba(12, 12, 20, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
}

@media (min-width: 900px) {
  .header-top { padding: 14px 24px; }
}

.mobile-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
}

@media (min-width: 900px) {
  .mobile-logo { display: none; }
}

.header-actions { display: flex; align-items: center; gap: 10px; }

.search-box {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 0 6px 0 16px;
  transition: all 0.2s;
}

.search-box:focus-within {
  border-color: var(--aurora-1);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

.search-box input {
  width: 130px;
  padding: 10px 0;
  font-size: 14px;
  background: transparent;
  color: var(--text);
}

@media (min-width: 500px) { .search-box input { width: 180px; } }
@media (min-width: 900px) { .search-box input { width: 220px; } }

.search-box input::placeholder { color: var(--text-dim); }
.search-box input:focus { outline: none; }

.search-box button {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--aurora-1), var(--aurora-3));
  color: #fff;
  border-radius: 50%;
  font-size: 13px;
}

.header-link {
  display: none;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dim);
  border-radius: var(--radius-sm);
}

.header-link:hover { color: var(--text); background: var(--bg-hover); }

@media (min-width: 900px) {
  .header-link { display: block; }
}

/* Categories */
.categories-bar {
  display: flex;
  gap: 8px;
  padding: 0 16px 14px;
  overflow-x: auto;
}

.categories-bar::-webkit-scrollbar { display: none; }

@media (min-width: 900px) {
  .categories-bar { padding: 0 24px 16px; gap: 10px; }
}

.cat-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  transition: all 0.2s;
}

.cat-btn i {
  font-size: 16px;
  line-height: 1;
  flex-shrink: 0;
}

.cat-btn:hover {
  color: var(--text);
  border-color: var(--aurora-1);
}

.cat-btn.active {
  color: #fff;
  background: linear-gradient(135deg, var(--aurora-1), var(--aurora-3));
  border-color: transparent;
}

/* ========== AD ========== */
.ad-banner {
  background: var(--bg-card);
  padding: 10px 16px;
  text-align: center;
  font-size: 11px;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
}

.ad-banner:empty { display: none; }

/* ========== MAIN ========== */
.main { padding: 20px 16px; }

@media (min-width: 900px) {
  .main { padding: 24px; }
}

/* ========== SECTION ========== */
.section { margin-bottom: 36px; }

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  font-weight: 700;
}

.section-title .icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--aurora-1), var(--aurora-2));
  color: #fff;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.section-title .icon i { line-height: 1; }

.section-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--aurora-2);
}

.section-link:hover { color: var(--aurora-1); }

/* ========== GRID ========== */
.game-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

@media (min-width: 420px) { .game-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 640px) { .game-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 900px) { .game-grid { grid-template-columns: repeat(4, 1fr); gap: 18px; } }
@media (min-width: 1100px) { .game-grid { grid-template-columns: repeat(5, 1fr); } }
@media (min-width: 1400px) { .game-grid { grid-template-columns: repeat(6, 1fr); } }

/* ========== CARD ========== */
.card {
  position: relative;
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all 0.25s;
}

.card:hover {
  transform: translateY(-5px);
  border-color: var(--aurora-1);
  box-shadow: 0 20px 40px rgba(124, 58, 237, 0.15);
}

.card-link { display: block; }

.card-thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg-hover);
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s;
}

.card:hover .card-thumb img { transform: scale(1.08); }

.card-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 4px 10px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, var(--aurora-1), var(--aurora-3));
  color: #fff;
  border-radius: 6px;
}

.card-badge.new { background: linear-gradient(135deg, var(--aurora-2), var(--aurora-4)); }
.card-badge.top { background: linear-gradient(135deg, var(--warning), #f97316); }

.card-body { padding: 14px; }

.card-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
}

.card-cat {
  padding: 3px 10px;
  background: rgba(124, 58, 237, 0.15);
  color: var(--accent);
  border-radius: 4px;
  font-weight: 600;
}

.card-rating { color: var(--warning); font-weight: 700; display: flex; align-items: center; gap: 3px; }
.card-rating i { font-size: 12px; }

.card-play {
  display: none;
}

@media (min-width: 900px) {
  .card-play {
    display: flex;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--aurora-1), var(--aurora-3));
    color: #fff;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 5;
  }
  .card:hover .card-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* ========== SCROLL ROW ========== */
.scroll-row {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.scroll-row::-webkit-scrollbar { display: none; }

.scroll-row .card {
  flex: 0 0 155px;
}

@media (min-width: 600px) {
  .scroll-row .card { flex: 0 0 185px; }
}

/* ========== BOTTOM NAV ========== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(22, 22, 34, 0.98);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  padding: 10px 0 16px;
  z-index: 100;
}

@media (min-width: 900px) {
  .bottom-nav { display: none; }
}

.bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 16px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-dim);
}

.bottom-nav a i { font-size: 22px; }

.bottom-nav a.active { color: var(--aurora-2); }

/* ========== PAGE HEADER ========== */
.page-header {
  padding: 28px 0 20px;
  text-align: center;
}

.page-header h1 {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 8px;
}

.page-header p { font-size: 14px; color: var(--text-dim); }

/* ========== DETAIL ========== */
.detail-banner {
  aspect-ratio: 16 / 9;
  position: relative;
  overflow: hidden;
}

@media (min-width: 900px) {
  .detail-banner { aspect-ratio: 21 / 9; border-radius: 0 0 var(--radius) var(--radius); margin: 0 24px; }
}

.detail-banner img { width: 100%; height: 100%; object-fit: cover; }

.detail-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 50%, var(--bg-dark));
}

.detail-content { padding: 24px 16px; }

@media (min-width: 900px) {
  .detail-content { max-width: 900px; margin: 0 auto; padding: 32px 24px; }
}

.detail-title {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 14px;
}

@media (min-width: 900px) {
  .detail-title { font-size: 34px; }
}

.detail-tags { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }

.detail-tags .tag {
  padding: 7px 18px;
  font-size: 12px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--aurora-1), var(--aurora-3));
  color: #fff;
  border-radius: 100px;
}

.detail-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding: 22px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 22px;
}

@media (min-width: 600px) {
  .detail-stats { grid-template-columns: repeat(4, 1fr); }
}

.detail-stat { text-align: center; }
.detail-stat-value { font-size: 24px; font-weight: 800; color: var(--aurora-2); }
.detail-stat-label { font-size: 10px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 1px; }

.detail-desc {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-dim);
  margin-bottom: 26px;
}

.detail-actions { display: flex; gap: 12px; }

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 100px;
  transition: all 0.25s;
}

.btn-primary {
  flex: 1;
  background: linear-gradient(135deg, var(--aurora-1), var(--aurora-3));
  color: #fff;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(124, 58, 237, 0.3);
}

@media (min-width: 600px) {
  .btn-primary { flex: none; }
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 2px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--aurora-1);
  color: var(--aurora-1);
}

/* ========== CONTENT PAGES ========== */
.content-page { padding: 24px 16px; }

@media (min-width: 900px) {
  .content-page { max-width: 700px; margin: 0 auto; padding: 36px 24px; }
}

.content-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 28px;
  border: 1px solid var(--border);
}

@media (min-width: 600px) {
  .content-card { padding: 40px; }
}

.content-card h1 {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 22px;
}

.content-card h2 {
  font-size: 17px;
  font-weight: 700;
  color: var(--aurora-2);
  margin: 28px 0 12px;
}

.content-card p {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-dim);
  margin-bottom: 14px;
}

.content-card a { color: var(--aurora-2); font-weight: 600; }
.content-card a:hover { color: var(--aurora-1); }

.faq-item { padding: 18px 0; border-bottom: 1px solid var(--border); }
.faq-item:last-child { border-bottom: none; }
.faq-q { font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.faq-a { font-size: 14px; line-height: 1.7; color: var(--text-dim); }

/* ========== FOOTER ========== */
.footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 26px 16px;
  text-align: center;
}

@media (min-width: 900px) {
  .footer { text-align: left; padding: 30px 24px; }
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 1200px;
  margin: 0 auto;
}

@media (min-width: 600px) {
  .footer-inner { flex-direction: row; justify-content: space-between; align-items: center; }
}

.footer-nav { display: flex; gap: 22px; justify-content: center; flex-wrap: wrap; }
.footer-nav a { font-size: 13px; font-weight: 500; color: var(--text-dim); }
.footer-nav a:hover { color: var(--aurora-2); }
.footer-copy { font-size: 12px; color: var(--text-dim); }

/* ========== EMPTY ========== */
.empty { text-align: center; padding: 70px 20px; }
.empty-icon { font-size: 56px; margin-bottom: 18px; opacity: 0.6; }
.empty p { color: var(--text-dim); margin-bottom: 10px; }
.empty a { color: var(--aurora-2); font-weight: 600; }
