/* ==========================================================================
   PlayDirect.net - Modern Gaming Site
   Dark Mode | Blue + Purple Theme | Poki/CrazyGames Style
   ========================================================================== */

:root {
  /* Backgrounds */
  --bg-darkest: #0a0b1e;
  --bg-dark: #12132d;
  --bg-medium: #1a1c3a;
  --bg-light: #232649;
  --bg-card: #1e2042;
  --bg-card-hover: #282b54;
  --bg-sidebar: #0f1027;

  /* Brand Colors - Blue + Purple */
  --primary: #6366f1;        /* Indigo */
  --primary-light: #818cf8;
  --primary-dark: #4f46e5;
  --secondary: #a855f7;      /* Purple */
  --secondary-light: #c084fc;
  --accent: #06b6d4;         /* Cyan */
  --accent-pink: #ec4899;

  /* Status colors */
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --hot: #ef4444;
  --new: #10b981;

  /* Text */
  --text-primary: #ffffff;
  --text-secondary: #b4b8d4;
  --text-muted: #6b7194;
  --text-dim: #4a4f73;

  /* Borders */
  --border: #2a2d5a;
  --border-light: #353a6e;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  --gradient-secondary: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
  --gradient-accent: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
  --gradient-hero: linear-gradient(135deg, #1e1b4b 0%, #4c1d95 50%, #831843 100%);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 24px rgba(99, 102, 241, 0.4);
  --shadow-glow-purple: 0 0 24px rgba(168, 85, 247, 0.4);

  /* Layout */
  --sidebar-width: 220px;
  --sidebar-collapsed: 72px;
  --header-height: 64px;

  /* Border radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-darkest);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Decorative background blobs */
body::before {
  content: '';
  position: fixed;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  bottom: -300px;
  left: -200px;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.12), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

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

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

.sidebar-header {
  padding: 1.25rem 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--gradient-primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  color: white;
  box-shadow: var(--shadow-glow);
}

.logo-text {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sidebar-close {
  display: none;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--bg-card);
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}

.sidebar-section {
  padding: 1rem 0.75rem;
}

.sidebar-section + .sidebar-section {
  border-top: 1px solid var(--border);
}

.sidebar-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding: 0 0.75rem;
  margin-bottom: 0.5rem;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

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

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

.sidebar-link.active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(168, 85, 247, 0.2));
  color: var(--text-primary);
}

.sidebar-link.active::before {
  content: '';
  position: absolute;
  left: -0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 24px;
  background: var(--gradient-primary);
  border-radius: 0 3px 3px 0;
}

.sidebar-link-icon {
  font-size: 1.1rem;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}

.sidebar-link-count {
  margin-left: auto;
  font-size: 0.75rem;
  background: var(--bg-card);
  color: var(--text-muted);
  padding: 0.1rem 0.5rem;
  border-radius: var(--radius-full);
  font-weight: 600;
}

.sidebar-link.active .sidebar-link-count {
  background: var(--primary);
  color: white;
}

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

.sidebar-cta {
  background: var(--gradient-primary);
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.sidebar-cta::before {
  content: '';
  position: absolute;
  top: -20px;
  right: -20px;
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

.sidebar-cta-emoji {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
  position: relative;
}

.sidebar-cta-title {
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  position: relative;
}

.sidebar-cta-text {
  font-size: 0.75rem;
  opacity: 0.85;
  margin-bottom: 0.75rem;
  position: relative;
}

.sidebar-cta-btn {
  display: inline-block;
  background: white;
  color: var(--primary-dark);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  position: relative;
}

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

/* Header */
.header {
  background: rgba(15, 16, 39, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 1rem;
  height: var(--header-height);
}

.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--bg-card);
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
}

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

.search-input {
  width: 100%;
  padding: 0.7rem 1rem 0.7rem 2.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  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-medium);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

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

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

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

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

.search-result-item:hover {
  background: var(--bg-card);
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-img {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

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

.search-result-title {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.1rem;
}

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

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  position: relative;
}

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

.icon-btn-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 18px;
  height: 18px;
  background: var(--danger);
  border: 2px solid var(--bg-darkest);
  border-radius: 50%;
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow);
}

/* ==========================================================================
   CONTENT AREA
   ========================================================================== */
.content {
  padding: 1.5rem;
  flex: 1;
  max-width: 1400px;
  width: 100%;
}

/* ==========================================================================
   HERO BANNER
   ========================================================================== */
.hero-banner {
  position: relative;
  background: var(--gradient-hero);
  border-radius: var(--radius-xl);
  padding: 2rem 2.5rem;
  margin-bottom: 2rem;
  overflow: hidden;
  min-height: 220px;
  display: flex;
  align-items: center;
}

.hero-banner::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1), transparent 60%);
}

.hero-banner::after {
  content: '🎮';
  position: absolute;
  top: 50%;
  right: 2rem;
  transform: translateY(-50%);
  font-size: 8rem;
  opacity: 0.15;
  filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.2));
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 600px;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.85rem;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.hero-tag-dot {
  width: 6px;
  height: 6px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.2); }
}

.hero-title {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

.hero-subtitle {
  font-size: 0.95rem;
  opacity: 0.85;
  margin-bottom: 1.25rem;
  max-width: 480px;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: white;
  color: var(--bg-darkest);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.95rem;
  transition: all var(--transition-fast);
}

.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* ==========================================================================
   SECTIONS & GRIDS
   ========================================================================== */
.section {
  margin-bottom: 2.5rem;
}

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

.section-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.section-title-emoji {
  font-size: 1.4rem;
}

.section-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-light);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: gap var(--transition-fast);
}

.section-link:hover {
  gap: 0.5rem;
}

/* Game Grid - Poki style */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 0.75rem;
}

.games-grid-mixed {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.75rem;
}

/* Game Card */
.game-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  display: block;
  text-decoration: none;
  color: inherit;
}

.game-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--shadow-lg), 0 0 0 2px var(--primary);
  background: var(--bg-card-hover);
  z-index: 5;
}

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

.game-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

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

/* Fallback gradient backgrounds for cards without images */
.game-card-image-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: rgba(255, 255, 255, 0.9);
}

/* Featured large card (2x2) */
.game-card-featured {
  grid-column: span 2;
  grid-row: span 2;
}

.game-card-featured .game-card-image-fallback {
  font-size: 5rem;
}

.game-card-featured .game-card-info {
  padding: 1rem;
}

.game-card-featured .game-card-title {
  font-size: 1.05rem;
}

/* Badges */
.game-badges {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  z-index: 2;
}

.badge {
  padding: 0.2rem 0.55rem;
  border-radius: 5px;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: white;
  box-shadow: var(--shadow-sm);
}

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

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

.badge-featured {
  background: var(--gradient-primary);
}

/* Play overlay on hover */
.game-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(15, 16, 39, 0.9) 100%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0.75rem;
  opacity: 0;
  transition: opacity var(--transition-base);
}

.game-card:hover .game-card-overlay {
  opacity: 1;
}

.game-card-play {
  background: var(--gradient-primary);
  color: white;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  box-shadow: var(--shadow-lg);
}

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

.game-card-title {
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}

.game-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.game-card-rating {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  color: var(--warning);
}

.game-card-rating-num {
  color: var(--text-secondary);
  font-weight: 600;
}

/* ==========================================================================
   CATEGORY PILLS (mobile-friendly)
   ========================================================================== */
.category-pills {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: none;
}

.category-pills::-webkit-scrollbar {
  display: none;
}

.category-pill {
  padding: 0.5rem 1.1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.category-pill:hover {
  border-color: var(--primary);
  color: var(--text-primary);
}

.category-pill.active {
  background: var(--gradient-primary);
  border-color: transparent;
  color: white;
  box-shadow: var(--shadow-glow);
}

/* ==========================================================================
   ADS
   ========================================================================== */
.ad-container {
  margin: 1.5rem 0;
  padding: 1rem;
  background: var(--bg-card);
  border: 1px dashed var(--border-light);
  border-radius: var(--radius-md);
  text-align: center;
  position: relative;
}

.ad-container::before {
  content: 'Advertisement';
  position: absolute;
  top: 0.4rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.ad-banner {
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.ad-rectangle {
  min-height: 250px;
  max-width: 300px;
  margin: 1rem auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ad-leaderboard {
  min-height: 90px;
  max-width: 728px;
  margin: 1rem auto;
}

/* ==========================================================================
   GAME PAGE
   ========================================================================== */
.game-page-content {
  padding: 1.5rem;
  max-width: 1400px;
  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(--text-secondary);
  transition: color var(--transition-fast);
}

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

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

.game-main {
  min-width: 0;
}

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

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

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

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

.game-frame-status {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: var(--success);
  background: rgba(16, 185, 129, 0.1);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
}

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

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

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

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

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

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

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

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

.game-info-stats {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.game-info-stat {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

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

.game-action-btns {
  display: flex;
  gap: 0.5rem;
}

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

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

.game-description {
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 0.95rem;
  margin-bottom: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

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

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

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

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

.sidebar-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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

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

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

.sidebar-game-img {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

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

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

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

/* ==========================================================================
   CATEGORY PAGE
   ========================================================================== */
.category-hero {
  background: var(--gradient-hero);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
  text-align: center;
}

.category-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top right, rgba(255, 255, 255, 0.1), transparent 60%);
}

.category-hero-icon {
  font-size: 4.5rem;
  margin-bottom: 0.75rem;
  position: relative;
  filter: drop-shadow(0 4px 24px rgba(99, 102, 241, 0.4));
}

.category-hero-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  position: relative;
}

.category-hero-desc {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 500px;
  margin: 0 auto;
  position: relative;
}

.category-hero-count {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.4rem 1.1rem;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  position: relative;
}

.sort-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.sort-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.sort-buttons {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.sort-btn {
  padding: 0.4rem 0.9rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.sort-btn:hover {
  border-color: var(--primary);
  color: var(--text-primary);
}

.sort-btn.active {
  background: var(--gradient-primary);
  border-color: transparent;
  color: white;
}

/* ==========================================================================
   LOADING & EMPTY
   ========================================================================== */
.loading {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-secondary);
  grid-column: 1 / -1;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 0.75rem;
}

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

.empty-state {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--text-secondary);
  grid-column: 1 / -1;
}

.empty-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.4;
}

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

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

.footer-about {
  max-width: 350px;
}

.footer-text {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
  margin-top: 1rem;
}

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

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

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

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

.footer-bottom {
  max-width: 1400px;
  margin: 0 auto;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.social-links {
  display: flex;
  gap: 0.5rem;
}

.social-link {
  width: 36px;
  height: 36px;
  background: var(--bg-card);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.social-link:hover {
  background: var(--gradient-primary);
  color: white;
  transform: translateY(-2px);
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.game-card {
  animation: fadeInUp 0.4s ease backwards;
}

.game-card:nth-child(1) { animation-delay: 0.02s; }
.game-card:nth-child(2) { animation-delay: 0.05s; }
.game-card:nth-child(3) { animation-delay: 0.08s; }
.game-card:nth-child(4) { animation-delay: 0.11s; }
.game-card:nth-child(5) { animation-delay: 0.14s; }
.game-card:nth-child(6) { animation-delay: 0.17s; }
.game-card:nth-child(7) { animation-delay: 0.20s; }
.game-card:nth-child(8) { animation-delay: 0.23s; }
.game-card:nth-child(n+9) { animation-delay: 0.25s; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

/* Sidebar overlay for mobile */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 99;
}

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

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

  .games-grid-mixed {
    grid-template-columns: repeat(4, 1fr);
  }
}

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

  .footer-about {
    grid-column: span 2;
  }

  .games-grid-mixed {
    grid-template-columns: repeat(4, 1fr);
  }
}

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

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

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

  .sidebar-close {
    display: flex;
  }

  .menu-toggle {
    display: flex;
  }

  .header {
    padding: 0.75rem 1rem;
  }

  .content {
    padding: 1rem;
  }

  .games-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
  }

  .games-grid-mixed {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
  }

  .game-card-featured {
    grid-column: span 2;
    grid-row: span 2;
  }

  .hero-banner {
    padding: 1.5rem;
    min-height: 180px;
  }

  .hero-banner::after {
    font-size: 5rem;
    right: 1rem;
  }

  .hero-title {
    font-size: 1.5rem;
  }

  .game-card-title {
    font-size: 0.78rem;
  }

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

  .footer-about {
    grid-column: span 2;
  }

  .game-info-card {
    padding: 1rem;
  }

  .game-info-title {
    font-size: 1.25rem;
  }

  .header-actions .btn-primary {
    display: none;
  }
}

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

  .games-grid-mixed {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-banner {
    padding: 1.25rem;
  }

  .hero-banner::after {
    display: none;
  }

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

  .footer-about {
    grid-column: span 1;
  }

  .icon-btn {
    width: 36px;
    height: 36px;
  }
}

/* ==========================================================================
   SEO ARTICLE STYLES
   ========================================================================== */

.seo-article {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  margin: 1.5rem 0;
  max-width: 100%;
}

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

.article-main-title {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

.article-section {
  margin-bottom: 2rem;
}

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

.article-h2 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

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

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

.article-steps li,
.article-tips li {
  background: var(--bg-medium);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.1rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-secondary);
  position: relative;
  padding-left: 3rem;
  transition: all var(--transition-fast);
}

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

.article-steps li {
  counter-increment: step-counter;
}

.article-steps li::before {
  content: counter(step-counter);
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  background: var(--gradient-primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

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

.article-steps li:hover,
.article-tips li:hover {
  border-color: var(--primary);
  background: var(--bg-card-hover);
}

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

.feature-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-medium);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.1rem;
  transition: all var(--transition-fast);
}

.feature-item:hover {
  border-color: var(--primary);
  transform: translateX(4px);
}

.feature-check {
  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.9rem;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

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

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

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

.faq-question {
  padding: 1rem 1.25rem;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: background var(--transition-fast);
}

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

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

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

.faq-question:hover {
  background: var(--bg-card-hover);
}

.faq-answer {
  padding: 0 1.25rem 1.1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 0.95rem;
}

.article-conclusion {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-secondary);
  background: var(--bg-medium);
  border-left: 4px solid var(--primary);
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-md);
}

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

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

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

.article-tag {
  padding: 0.35rem 0.85rem;
  background: var(--bg-medium);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  text-decoration: none;
}

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

/* Mobile responsive for article */
@media (max-width: 768px) {
  .seo-article {
    padding: 1.5rem 1.25rem;
  }

  .article-main-title {
    font-size: 1.4rem;
  }

  .article-h2 {
    font-size: 1.15rem;
  }

  .article-steps li,
  .article-tips li {
    padding-left: 2.5rem;
    font-size: 0.9rem;
  }

  .article-features {
    grid-template-columns: 1fr;
  }
}
