/* ==========================================================================
   PlayDirect.net - Final Design (CrazyGames-clone)
   ========================================================================== */

:root {
  /* Backgrounds - Deep dark like CrazyGames */
  --bg-darkest: #0f0f1e;
  --bg-dark: #15162e;
  --bg-medium: #1a1c3a;
  --bg-card: #1e1f3d;
  --bg-card-hover: #28294a;
  --bg-sidebar: #15162e;

  /* Brand Colors */
  --primary: #6366f1;
  --primary-light: #818cf8;
  --primary-dark: #4f46e5;
  --secondary: #a855f7;
  --accent: #06b6d4;

  /* Status */
  --hot: #ef4444;
  --new: #10b981;
  --updated: #06b6d4;
  --top: #f59e0b;
  --warning: #f59e0b;

  /* Text */
  --text-primary: #ffffff;
  --text-secondary: #b8bcd6;
  --text-muted: #7a809e;
  --text-dim: #4a5079;

  /* Borders */
  --border: #252a4d;
  --border-light: #353a6e;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  --gradient-login: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);

  /* Sizes */
  --sidebar-width: 200px;
  --header-height: 64px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.25s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg-darkest);
  color: var(--text-primary);
  line-height: 1.5;
  font-size: 14px;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-light); }

/* ==========================================================================
   APP LAYOUT
   ========================================================================== */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  min-height: 100vh;
}

/* ==========================================================================
   SIDEBAR (Compact like CrazyGames)
   ========================================================================== */
.sidebar {
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  z-index: 50;
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 0.85rem;
  height: var(--header-height);
  border-bottom: 1px solid var(--border);
}

.sidebar-toggle {
  background: transparent;
  border: none;
  color: var(--text-primary);
  padding: 0.4rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast);
}

.sidebar-toggle:hover { background: var(--bg-card); }

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: var(--gradient-primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 900;
  font-size: 1rem;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.logo-text {
  color: var(--text-primary);
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.logo-text-accent {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sidebar-content {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem 0;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  padding: 0 0.5rem;
}

.sidebar-divider {
  height: 1px;
  background: var(--border);
  margin: 0.5rem 0.85rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0.7rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all var(--transition-fast);
  position: relative;
}

.sidebar-link:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}

.sidebar-link.active {
  color: var(--primary-light);
  font-weight: 600;
}

.sidebar-link.active::before {
  content: '';
  position: absolute;
  left: -0.5rem;
  top: 25%;
  bottom: 25%;
  width: 3px;
  background: var(--primary);
  border-radius: 0 3px 3px 0;
}

.sidebar-link-disabled {
  opacity: 0.5;
  cursor: default;
}

.sidebar-link-disabled:hover {
  background: transparent;
  color: var(--text-secondary);
}

.sidebar-icon {
  font-size: 1.05rem;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.sidebar-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 40;
}

.sidebar-overlay.active { display: block; }

/* ==========================================================================
   MAIN
   ========================================================================== */
.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* ==========================================================================
   HEADER
   ========================================================================== */
.header {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: var(--header-height);
  padding: 0 1.25rem;
  background: var(--bg-darkest);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 30;
}

.menu-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-primary);
  padding: 0.4rem;
  border-radius: var(--radius-sm);
}

.search-box {
  flex: 1;
  max-width: 600px;
  margin: 0 auto;
  position: relative;
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  height: 40px;
  padding: 0 1rem 0 2.85rem;
  background: var(--bg-card);
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}

.search-input::placeholder { color: var(--text-muted); }

.search-input:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--bg-card-hover);
}

.search-results {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  max-height: 400px;
  overflow-y: auto;
  display: none;
  z-index: 100;
  box-shadow: var(--shadow-lg);
}

.search-results.active { display: block; }

.search-result-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition-fast);
}

.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--bg-card-hover); }

.search-result-img {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  overflow: hidden;
}

.search-result-info { flex: 1; min-width: 0; }

.search-result-title {
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-category {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.header-icon-btn {
  width: 38px;
  height: 38px;
  background: transparent;
  border: none;
  border-radius: 50%;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all var(--transition-fast);
}

.header-icon-btn:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}

.notification-dot {
  position: absolute;
  top: 5px;
  right: 5px;
  min-width: 16px;
  height: 16px;
  background: var(--hot);
  color: white;
  border-radius: 50%;
  font-size: 0.6rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-darkest);
  padding: 0 4px;
}

.btn-login {
  background: var(--gradient-login);
  color: white;
  border: none;
  padding: 0.5rem 1.4rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.85rem;
  transition: all var(--transition-fast);
  margin-left: 0.5rem;
}

.btn-login:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}

/* ==========================================================================
   CONTENT
   ========================================================================== */
.content {
  padding: 1rem 1.25rem 2rem;
  max-width: 1600px;
  width: 100%;
}

/* ==========================================================================
   HERO BANNERS (Top - small ones like CrazyGames)
   ========================================================================== */
.hero-banners {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.hero-banner {
  position: relative;
  aspect-ratio: 16/9;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition-base);
  background: linear-gradient(135deg, var(--bg-from), var(--bg-to));
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0.75rem;
  min-height: 95px;
}

.hero-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(0,0,0,0.4) 100%);
  z-index: 1;
}

.hero-banner:hover {
  transform: translateY(-3px);
}

.hero-banner-image {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -55%);
  font-size: 2.75rem;
  z-index: 1;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
  transition: transform var(--transition-base);
}

.hero-banner:hover .hero-banner-image {
  transform: translate(-50%, -60%) scale(1.1);
}

.hero-banner-title {
  position: relative;
  font-weight: 700;
  font-size: 0.9rem;
  color: white;
  z-index: 2;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* ==========================================================================
   SECTIONS
   ========================================================================== */
.section {
  margin-bottom: 1.75rem;
}

.section-title {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-more {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--primary-light);
  margin-left: auto;
  transition: color var(--transition-fast);
}

.section-more:hover { color: var(--primary); }

/* ==========================================================================
   TOP PICKS GRID (CrazyGames-style)
   Big featured + small ones around
   ========================================================================== */
.top-picks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.75rem;
}

.top-pick-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition-base);
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
}

.top-pick-card .top-pick-image-wrapper {
  position: relative;
  aspect-ratio: 1/1;
  overflow: hidden;
  border-radius: var(--radius-md);
}

.top-pick-card:hover {
  transform: translateY(-3px);
}

.top-pick-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

.top-pick-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  background: var(--gradient-primary);
}

.top-pick-info {
  padding: 0.6rem 0.25rem 0.4rem;
}

.top-pick-title {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.4rem;
}

.top-pick-developer {
  font-size: 0.7rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.top-pick-developer-pill {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border-radius: 12px;
  font-size: 0.68rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  transition: background 0.2s ease;
}

.top-pick-card:hover .top-pick-developer-pill {
  background: rgba(99, 102, 241, 0.25);
  color: #c7d2fe;
}

/* ==========================================================================
   FEATURED ROW (Horizontal scroll)
   ========================================================================== */
.featured-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
  gap: 0.65rem;
}

.featured-card {
  position: relative;
  aspect-ratio: 1/1;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition-base);
  background: var(--bg-card);
}

.featured-card:hover {
  transform: translateY(-3px);
}

.featured-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

.featured-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.featured-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,0.85) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0.6rem;
  pointer-events: none;
}

.featured-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: white;
  text-shadow: 0 2px 3px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.featured-badges {
  position: absolute;
  top: 0.4rem;
  left: 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  z-index: 2;
}

/* ==========================================================================
   GAMES GRID
   ========================================================================== */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
  gap: 0.65rem;
}

/* ==========================================================================
   GAME CARD (Square thumbnail like CrazyGames)
   ========================================================================== */
.game-card {
  background: transparent;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition-base);
  position: relative;
  display: flex;
  flex-direction: column;
}

.game-card:hover {
  transform: translateY(-3px);
}

.game-card-image {
  position: relative;
  aspect-ratio: 1/1;
  overflow: hidden;
  background: var(--gradient-primary);
  border-radius: var(--radius-md);
}

.game-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

.game-card-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.game-card-info {
  padding: 0.6rem 0.25rem 0.4rem;
}

.game-card-title {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.4rem;
}

.game-card-developer {
  font-size: 0.7rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.game-card-developer-pill {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border-radius: 12px;
  font-size: 0.68rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  transition: background 0.2s ease;
}

.game-card:hover .game-card-developer-pill {
  background: rgba(99, 102, 241, 0.25);
  color: #c7d2fe;
}

/* Game Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.45rem;
  border-radius: var(--radius-sm);
  font-size: 0.6rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: white;
}

.badge-hot {
  background: var(--hot);
}

.badge-new {
  background: var(--new);
}

.badge-updated {
  background: var(--updated);
}

.badge-originals {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.badge-originals::before {
  content: '◊';
  color: var(--accent);
}

.badge-top {
  background: var(--top);
  color: #000;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
  background: var(--bg-dark);
  border-top: 1px solid var(--border);
  margin: 2rem -1.25rem -2rem;
  padding: 2.5rem 1.25rem 1.25rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.footer-section .logo { margin-bottom: 1rem; }

.footer-text {
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.6;
}

.footer-title {
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.8rem;
  transition: color var(--transition-fast);
}

.footer-links a:hover { color: var(--primary-light); }

.footer-bottom {
  border-top: 1px solid var(--border);
  margin-top: 2rem;
  padding-top: 1.25rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.75rem;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}

/* ==========================================================================
   LOADING
   ========================================================================== */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

/* ==========================================================================
   GAME PAGE (game.html)
   ========================================================================== */
.game-page-content {
  padding: 1rem 1.25rem 2rem;
  max-width: 1600px;
  width: 100%;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.breadcrumb a {
  color: var(--primary-light);
  transition: color var(--transition-fast);
}

.breadcrumb a:hover { color: var(--primary); }

.game-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.game-frame-wrapper {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
}

.game-frame-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  background: var(--bg-medium);
  border-bottom: 1px solid var(--border);
}

.game-frame-title {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  font-size: 0.9rem;
}

.game-frame-status {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.15rem 0.55rem;
  background: rgba(16, 185, 129, 0.15);
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--new);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.game-frame-status-dot {
  width: 6px;
  height: 6px;
  background: var(--new);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.game-frame-controls { display: flex; gap: 0.4rem; }

.game-control {
  width: 30px;
  height: 30px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.game-control:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.game-frame {
  width: 100%;
  aspect-ratio: 16/10;
  border: none;
  display: block;
  background: #000;
}

.game-info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.1rem;
  margin-top: 1rem;
}

.game-info-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.65rem;
}

.game-info-title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.game-info-stats {
  display: flex;
  gap: 1rem;
  margin-top: 0.3rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.game-info-stat strong { color: var(--text-primary); }

.game-action-btns { display: flex; gap: 0.4rem; flex-shrink: 0; }

.game-action-btn {
  width: 38px;
  height: 38px;
  background: var(--bg-medium);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.game-action-btn:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.game-description {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 0.85rem;
  font-size: 0.9rem;
}

.game-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; }

.game-tag {
  background: var(--bg-medium);
  border: 1px solid var(--border);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.game-tag:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.game-sidebar {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.sidebar-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.85rem;
}

.sidebar-card-title {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.7rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.sidebar-game-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.sidebar-game {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.3rem;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
}

.sidebar-game:hover { background: var(--bg-medium); }

.sidebar-game-img {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--gradient-primary);
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.sidebar-game-info { flex: 1; min-width: 0; }

.sidebar-game-title {
  font-weight: 600;
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-game-meta {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.68rem;
  color: var(--text-muted);
}

.ad-container {
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0.85rem 0;
}

.ad-rectangle { min-height: 250px; }
.ad-leaderboard { min-height: 90px; }

.ad-banner {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ==========================================================================
   SEO ARTICLE
   ========================================================================== */
.seo-article {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  margin: 1.25rem 0;
}

.article-header {
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.article-main-title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.article-intro {
  color: var(--text-secondary);
  line-height: 1.65;
  font-size: 0.95rem;
}

.article-section { margin-bottom: 1.5rem; }
.article-section:last-child { margin-bottom: 0; }

.article-h2 {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.article-emoji { font-size: 1.25rem; }

.article-steps,
.article-tips {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.article-steps { counter-reset: step; }

.article-steps li {
  counter-increment: step;
  background: var(--bg-medium);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.95rem 0.7rem 2.7rem;
  position: relative;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

.article-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  background: var(--gradient-primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
}

.article-tips li {
  background: var(--bg-medium);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.95rem 0.7rem 2.5rem;
  position: relative;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

.article-tips li::before {
  content: '💡';
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
}

.article-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.5rem;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: var(--bg-medium);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.95rem;
}

.feature-check {
  width: 22px;
  height: 22px;
  background: var(--gradient-primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.article-faq {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.faq-item {
  background: var(--bg-medium);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.faq-item[open] {
  border-color: var(--primary);
}

.faq-question {
  padding: 0.85rem 1rem;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
}

.faq-question::-webkit-details-marker { display: none; }

.faq-question::after {
  content: '+';
  font-size: 1.4rem;
  color: var(--primary-light);
  transition: transform var(--transition-base);
  font-weight: 400;
}

.faq-item[open] .faq-question::after { transform: rotate(45deg); }

.faq-answer {
  padding: 0 1rem 0.85rem;
  color: var(--text-secondary);
  line-height: 1.65;
  font-size: 0.88rem;
}

.article-conclusion {
  background: var(--bg-medium);
  border-left: 3px solid var(--primary);
  padding: 0.95rem 1.2rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  line-height: 1.65;
  font-size: 0.95rem;
}

.article-footer {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.article-tags-wrap {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.article-tags-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-right: 0.4rem;
}

.article-tag {
  padding: 0.25rem 0.6rem;
  background: var(--bg-medium);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.article-tag:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn-primary {
  background: var(--gradient-primary);
  color: white;
  padding: 0.55rem 1.2rem;
  border-radius: var(--radius-full);
  border: none;
  font-weight: 600;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all var(--transition-fast);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1280px) {
  .top-picks-grid {
    grid-template-columns: repeat(3, 1fr);
    height: 400px;
  }

  .top-pick-card.featured {
    grid-column: 1 / 3;
  }
}

@media (max-width: 1024px) {
  .game-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .app { grid-template-columns: 1fr; }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 240px;
    transform: translateX(-100%);
    transition: transform var(--transition-base);
  }

  .sidebar.active { transform: translateX(0); }

  .menu-toggle { display: flex; }

  .header { padding: 0 1rem; gap: 0.5rem; }
  .content { padding: 1rem; }

  .header-actions .header-icon-btn:nth-child(2),
  .header-actions .header-icon-btn:nth-child(3) {
    display: none;
  }

  .btn-login { padding: 0.4rem 1rem; font-size: 0.8rem; }

  .hero-banners {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  .hero-banner { min-height: 75px; }
  .hero-banner-image { font-size: 2rem; }
  .hero-banner-title { font-size: 0.78rem; }

  .top-picks-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: 200px 200px 200px;
    height: auto;
  }

  .top-pick-card.featured {
    grid-row: 1 / 2;
    grid-column: 1 / 3;
  }

  .top-pick-card.featured .top-pick-title { font-size: 1.4rem; }

  .featured-row,
  .games-grid {
    grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
    gap: 0.5rem;
  }

  .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; }

  .section-title { font-size: 1.05rem; }
}

@media (max-width: 480px) {
  .featured-row,
  .games-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid { grid-template-columns: 1fr; }
}
