/*
 * GamesAtlasStore - Explore the World of Games
 * Mobile-first responsive design
 * Dark theme with analytical dashboard aesthetic
 */

/* ============================================
   CSS VARIABLES & THEME
   ============================================ */

:root {
  /* Light Theme Colors */
  --background: #ffffff;
  --foreground: #0f172a;
  --card: #f8fafc;
  --card-foreground: #0f172a;
  --popover: #ffffff;
  --popover-foreground: #0f172a;
  --primary: #0ea5e9;
  --primary-foreground: #ffffff;
  --secondary: #f1f5f9;
  --secondary-foreground: #0f172a;
  --muted: #f1f5f9;
  --muted-foreground: #64748b;
  --accent: #e0f2fe;
  --accent-foreground: #0f172a;
  --destructive: #ef4444;
  --destructive-foreground: #ffffff;
  --border: #e2e8f0;
  --input: #f8fafc;
  --ring: #0ea5e9;

  /* Semantic Colors */
  --success: #10b981;
  --warning: #f59e0b;
  --info: #3b82f6;

  /* Spacing Scale */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Typography */
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 350ms ease;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

  /* Border Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;

  /* Header Height */
  --header-height: 70px;
}

[data-theme="dark"] {
  --background: #0f172a;
  --foreground: #f8fafc;
  --card: #1e293b;
  --card-foreground: #f8fafc;
  --popover: #1e293b;
  --popover-foreground: #f8fafc;
  --primary: #0ea5e9;
  --primary-foreground: #ffffff;
  --secondary: #334155;
  --secondary-foreground: #f8fafc;
  --muted: #334155;
  --muted-foreground: #94a3b8;
  --accent: #1e293b;
  --accent-foreground: #f8fafc;
  --destructive: #ef4444;
  --destructive-foreground: #ffffff;
  --border: #334155;
  --input: #1e293b;
  --ring: #0ea5e9;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--foreground);
  background-color: var(--background);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ============================================
   OVERFLOW PREVENTION
   ============================================ */

img, video, iframe, embed, object, svg {
  max-width: 100%;
  height: auto;
}

[class*="grid"] > *,
[class*="flex"] > *,
.game-cell,
.game-item,
.insight-card,
.about-card {
  min-width: 0;
}

pre, code, .code-block, [class*="code"] {
  max-width: 100%;
  overflow-x: auto;
}

.table-wrapper,
[class*="table-"] {
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
}

p, li, td, th {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

input, textarea, select {
  max-width: 100%;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--space-md);
  color: var(--foreground);
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  letter-spacing: -0.01em;
}

h3 {
  font-size: clamp(1.35rem, 3vw, 1.875rem);
}

h4 {
  font-size: clamp(1.125rem, 2.5vw, 1.5rem);
}

h5 {
  font-size: 1.25rem;
}

h6 {
  font-size: 1.125rem;
}

p {
  margin-bottom: var(--space-md);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary);
  opacity: 0.8;
}

ul, ol {
  margin-left: var(--space-lg);
  margin-bottom: var(--space-md);
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1;
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  white-space: nowrap;
  min-height: 44px;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--primary-foreground);
  border-color: var(--primary);
}

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

.btn-secondary {
  background-color: transparent;
  color: var(--foreground);
  border-color: var(--border);
}

.btn-secondary:hover {
  background-color: var(--secondary);
  border-color: var(--foreground);
}

.btn-lg {
  padding: 0.875rem 1.75rem;
  font-size: 1rem;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  min-height: 36px;
}

.btn-block {
  width: 100%;
}

/* ============================================
   HEADER NAVIGATION
   ============================================ */

header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--card);
  border-bottom: 1px solid var(--border);
  height: var(--header-height);
  backdrop-filter: blur(10px);
  background-color: rgba(15, 23, 42, 0.9);
}

[data-theme="dark"] header {
  background-color: rgba(15, 23, 42, 0.95);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
}

.logo-link {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  font-weight: 700;
  font-size: 1.25rem;
  font-family: var(--font-mono);
  color: var(--foreground);
  text-decoration: none;
  flex-shrink: 0;
}

.logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.logo-text {
  display: none;
}

@media (min-width: 480px) {
  .logo-text {
    display: inline;
  }
}

.mobile-menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1001;
}

.hamburger-line {
  width: 100%;
  height: 2px;
  background-color: var(--foreground);
  transition: all var(--transition-base);
  border-radius: 2px;
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-menu {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--background);
  padding: var(--space-xl);
  transform: translateX(-100%);
  transition: transform var(--transition-base);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.nav-menu.active {
  transform: translateX(0);
}

.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.nav-links a {
  display: block;
  padding: var(--space-md);
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--foreground);
  border-radius: var(--radius-md);
  transition: background-color var(--transition-fast);
}

.nav-links a:hover {
  background-color: var(--secondary);
}

.nav-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background-color: var(--secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.theme-toggle:hover {
  background-color: var(--muted);
}

.theme-icon {
  color: var(--foreground);
  transition: transform var(--transition-base);
}

.sun-icon {
  display: none;
}

[data-theme="dark"] .sun-icon {
  display: block;
}

[data-theme="dark"] .moon-icon {
  display: none;
}

@media (min-width: 768px) {
  .mobile-menu-toggle {
    display: none;
  }

  .nav-menu {
    position: static;
    transform: none;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    padding: 0;
    background: transparent;
    overflow: visible;
  }

  .nav-links {
    flex-direction: row;
  }

  .nav-links a {
    font-size: 0.9375rem;
    padding: var(--space-sm) var(--space-md);
  }

  .nav-actions {
    flex-direction: row;
  }
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero-section {
  min-height: calc(100vh - var(--header-height));
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
  padding: var(--space-2xl) var(--space-lg);
  position: relative;
  overflow: hidden;
}

[data-theme="dark"] .hero-section {
  background: linear-gradient(135deg, #0a0a0a 0%, #0f172a 100%);
}

.hero-container {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
  align-items: center;
}

.hero-content {
  animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-title {
  margin-bottom: var(--space-lg);
  color: var(--foreground);
  font-size: clamp(2rem, 6vw, 3.5rem);
  line-height: 1.1;
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  line-height: 1.6;
  color: var(--muted-foreground);
  margin-bottom: var(--space-xl);
  max-width: 600px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-bottom: var(--space-2xl);
}

.hero-metrics {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

.metric-card {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-lg);
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.metric-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.metric-icon {
  color: var(--primary);
  flex-shrink: 0;
}

.metric-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  min-width: 0;
}

.metric-value {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--foreground);
}

.metric-label {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.hero-visual {
  display: none;
}

@media (min-width: 768px) {
  .hero-metrics {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .hero-container {
    grid-template-columns: 1fr 1fr;
  }

  .hero-metrics {
    grid-template-columns: repeat(3, 1fr);
  }

  .hero-visual {
    display: block;
    animation: fadeIn 1s ease-out 0.3s both;
  }

  @keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }

  .hero-image {
    width: 100%;
    height: auto;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
  }
}

/* ============================================
   SECTION CONTAINER
   ============================================ */

section {
  padding: var(--space-3xl) var(--space-lg);
}

.section-container {
  max-width: 1400px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.section-title {
  margin-bottom: var(--space-md);
}

.section-description {
  font-size: 1.125rem;
  color: var(--muted-foreground);
  line-height: 1.7;
}

/* ============================================
   MARKETPLACE SECTION
   ============================================ */

.marketplace-section {
  background-color: var(--background);
}

.marketplace-controls {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-xl);
  padding: var(--space-lg);
  background-color: var(--card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.view-toggle {
  display: flex;
  gap: var(--space-xs);
  background-color: var(--secondary);
  padding: var(--space-xs);
  border-radius: var(--radius-md);
}

.toggle-btn {
  width: 44px;
  height: 44px;
  padding: var(--space-sm);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--muted-foreground);
  transition: all var(--transition-fast);
}

.toggle-btn.active {
  background-color: var(--primary);
  color: var(--primary-foreground);
}

.toggle-btn:hover:not(.active) {
  color: var(--foreground);
}

.sort-controls {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.sort-label {
  font-weight: 500;
  color: var(--foreground);
  white-space: nowrap;
}

.sort-select {
  padding: var(--space-sm) var(--space-md);
  background-color: var(--input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--foreground);
  font-size: 0.9375rem;
  cursor: pointer;
  min-width: 180px;
}

.filter-toggle-mobile {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background-color: var(--secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--foreground);
  font-weight: 500;
  cursor: pointer;
  min-height: 44px;
}

@media (min-width: 768px) {
  .filter-toggle-mobile {
    display: none;
  }
}

.marketplace-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
}

@media (min-width: 1024px) {
  .marketplace-layout {
    grid-template-columns: 280px 1fr;
  }
}

/* Filters Sidebar */

.filters-sidebar {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  height: fit-content;
  position: sticky;
  top: calc(var(--header-height) + var(--space-lg));
  display: none;
}

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

@media (min-width: 1024px) {
  .filters-sidebar {
    display: block;
  }
}

.filter-group {
  margin-bottom: var(--space-xl);
}

.filter-group:last-child {
  margin-bottom: 0;
}

.filter-title {
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: var(--space-md);
  color: var(--foreground);
}

.filter-options {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.9375rem;
  color: var(--foreground);
  cursor: pointer;
  padding: var(--space-xs) 0;
  transition: color var(--transition-fast);
}

.checkbox-label:hover {
  color: var(--primary);
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--primary);
}

.range-slider {
  padding: var(--space-md) 0;
}

.range-slider input[type="range"] {
  width: 100%;
  height: 6px;
  background: var(--secondary);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
  accent-color: var(--primary);
}

.range-values {
  display: flex;
  justify-content: space-between;
  margin-top: var(--space-sm);
  font-size: 0.875rem;
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--primary);
}

.rating-filter {
  padding: var(--space-md) 0;
}

.rating-slider {
  width: 100%;
  margin-bottom: var(--space-md);
}

.rating-value {
  text-align: center;
}

.rating-number {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--primary);
}

.rating-text {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.filter-reset {
  margin-top: var(--space-lg);
}

/* Games Table */

.marketplace-content {
  min-width: 0;
}

.table-wrapper {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
}

.games-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.games-table thead {
  background-color: var(--secondary);
  border-bottom: 2px solid var(--border);
}

.games-table th {
  padding: var(--space-md);
  text-align: left;
  font-weight: 600;
  color: var(--foreground);
  white-space: nowrap;
}

.games-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background-color var(--transition-fast);
}

.games-table tbody tr:hover {
  background-color: var(--secondary);
}

.games-table td {
  padding: var(--space-md);
  vertical-align: middle;
}

.game-cell {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  min-width: 250px;
}

.game-thumbnail {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.game-title {
  font-weight: 600;
  color: var(--foreground);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 500;
  background-color: var(--secondary);
  color: var(--foreground);
  border-radius: var(--radius-sm);
  margin-right: var(--space-xs);
  white-space: nowrap;
}

.platform-cell {
  display: flex;
  gap: var(--space-xs);
  flex-wrap: wrap;
}

.platform-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 24px;
  font-size: 0.625rem;
  font-weight: 700;
  background-color: var(--secondary);
  color: var(--foreground);
  border-radius: var(--radius-sm);
}

.price-cell {
  font-family: var(--font-mono);
  font-weight: 600;
  white-space: nowrap;
}

.price {
  color: var(--foreground);
  font-size: 1rem;
}

.discount {
  display: inline-block;
  margin-left: var(--space-sm);
  padding: 0.125rem 0.5rem;
  font-size: 0.75rem;
  background-color: var(--success);
  color: white;
  border-radius: var(--radius-sm);
}

.discount.trending {
  background-color: var(--warning);
}

.rating-cell {
  min-width: 120px;
}

.rating {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.stars {
  color: var(--warning);
  font-size: 0.875rem;
  letter-spacing: -2px;
}

.rating-value {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--foreground);
}

.popularity-cell {
  min-width: 100px;
}

.popularity-bar {
  position: relative;
  width: 100%;
  height: 28px;
  background-color: var(--secondary);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.popularity-bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: var(--popularity, 0%);
  background: linear-gradient(90deg, var(--primary), var(--info));
  transition: width var(--transition-base);
}

.popularity-value {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--foreground);
  z-index: 1;
}

/* Pagination */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  margin-top: var(--space-xl);
  flex-wrap: wrap;
}

.pagination-btn {
  padding: var(--space-sm) var(--space-md);
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--foreground);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  min-height: 44px;
}

.pagination-btn:hover:not(:disabled) {
  background-color: var(--secondary);
  border-color: var(--primary);
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-numbers {
  display: flex;
  gap: var(--space-xs);
}

.pagination-number {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--foreground);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.pagination-number:hover,
.pagination-number.active {
  background-color: var(--primary);
  color: var(--primary-foreground);
  border-color: var(--primary);
}

.pagination-ellipsis {
  display: flex;
  align-items: center;
  padding: 0 var(--space-sm);
  color: var(--muted-foreground);
}

/* Marketplace Info Content */

.marketplace-info {
  margin-top: var(--space-3xl);
  padding: var(--space-2xl);
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.marketplace-info h2 {
  margin-bottom: var(--space-lg);
  color: var(--foreground);
}

.marketplace-info h3 {
  margin-top: var(--space-xl);
  margin-bottom: var(--space-md);
  color: var(--foreground);
}

.marketplace-info p {
  color: var(--foreground);
  line-height: 1.8;
}

/* ============================================
   INSIGHTS SECTION
   ============================================ */

.insights-section {
  background-color: var(--card);
}

.insights-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-3xl);
}

@media (min-width: 768px) {
  .insights-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .insights-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.insight-card {
  background-color: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  min-width: 0;
}

.insight-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.insight-header {
  margin-bottom: var(--space-lg);
}

.insight-title {
  font-size: 1.25rem;
  margin-bottom: var(--space-md);
  color: var(--foreground);
}

.insight-chart {
  width: 100%;
  height: auto;
  margin-bottom: var(--space-md);
}

.insight-summary {
  font-size: 0.9375rem;
  color: var(--muted-foreground);
  line-height: 1.6;
  margin-bottom: var(--space-lg);
}

.game-list {
  list-style: none;
  margin: 0 0 var(--space-lg) 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.game-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-sm);
  background-color: var(--card);
  border-radius: var(--radius-md);
  transition: background-color var(--transition-fast);
  min-width: 0;
}

.game-item:hover {
  background-color: var(--secondary);
}

.game-mini-thumb {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

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

.game-mini-name {
  display: block;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: var(--space-xs);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-mini-meta {
  display: flex;
  gap: var(--space-md);
  font-size: 0.875rem;
}

.mini-rating {
  color: var(--warning);
  font-weight: 600;
}

.mini-trend {
  font-weight: 600;
  font-family: var(--font-mono);
}

.mini-trend.up {
  color: var(--success);
}

.mini-trend.rising {
  color: var(--primary);
}

.mini-wishlist,
.mini-reviews,
.mini-community {
  color: var(--muted-foreground);
}

.mini-price {
  font-family: var(--font-mono);
  font-weight: 600;
}

.mini-price.value {
  color: var(--success);
}

.mini-rating.highlight {
  color: var(--primary);
  font-size: 1rem;
}

.insight-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  transition: gap var(--transition-fast);
}

.insight-cta:hover {
  gap: var(--space-sm);
}

/* Insights Info Content */

.insights-info {
  padding: var(--space-2xl);
  background-color: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.insights-info h2 {
  margin-bottom: var(--space-lg);
}

.insights-info h3 {
  margin-top: var(--space-xl);
  margin-bottom: var(--space-md);
}

.insights-info p {
  line-height: 1.8;
}

/* ============================================
   GAME DETAIL SECTION
   ============================================ */

.game-detail-section {
  background-color: var(--background);
}

.game-detail-demo {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-3xl);
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
}

@media (min-width: 1024px) {
  .game-detail-demo {
    grid-template-columns: 1.5fr 1fr;
  }
}

.game-visual-section {
  min-width: 0;
}

.game-gallery {
  width: 100%;
}

.game-main-image {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-md);
}

.gallery-thumbnails {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
}

.thumbnail {
  padding: 0;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: border-color var(--transition-fast);
  background: transparent;
}

.thumbnail:hover,
.thumbnail.active {
  border-color: var(--primary);
}

.thumbnail img {
  width: 100%;
  height: auto;
  display: block;
}

.game-stats-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.game-header {
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--border);
}

.game-name {
  font-size: 1.75rem;
  margin-bottom: var(--space-sm);
}

.game-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.game-developer,
.game-release {
  display: flex;
  align-items: center;
}

.key-stats-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

@media (min-width: 480px) {
  .key-stats-panel {
    grid-template-columns: repeat(2, 1fr);
  }
}

.stat-card {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-lg);
  background-color: var(--secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.stat-card.primary-stat {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, var(--primary) 0%, var(--info) 100%);
  color: white;
}

.stat-visual {
  position: relative;
  flex-shrink: 0;
}

.rating-circle {
  transform: rotate(-90deg);
}

.rating-number {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.5rem;
  font-weight: 700;
  font-family: var(--font-mono);
}

.stat-card.primary-stat .rating-number {
  color: white;
}

.stat-icon {
  color: var(--primary);
  flex-shrink: 0;
}

.stat-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  min-width: 0;
}

.stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--foreground);
}

.stat-card.primary-stat .stat-value {
  color: white;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.stat-card.primary-stat .stat-label {
  color: rgba(255, 255, 255, 0.9);
}

.stat-sublabel {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.stat-card.primary-stat .stat-sublabel {
  color: rgba(255, 255, 255, 0.8);
}

.price-history-mini {
  padding: var(--space-lg);
  background-color: var(--secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.price-history-mini h4 {
  font-size: 0.9375rem;
  margin-bottom: var(--space-md);
  color: var(--foreground);
}

.price-chart {
  margin-bottom: var(--space-sm);
}

.price-range {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  font-family: var(--font-mono);
  color: var(--muted-foreground);
}

.game-cta-buttons {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

/* Game Overview Tabs */

.game-overview {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-3xl);
}

.overview-tabs {
  display: flex;
  overflow-x: auto;
  border-bottom: 1px solid var(--border);
  background-color: var(--secondary);
}

.tab-btn {
  padding: var(--space-lg);
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--muted-foreground);
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  flex-shrink: 0;
}

.tab-btn:hover {
  color: var(--foreground);
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.tab-content {
  display: none;
  padding: var(--space-xl);
}

.tab-content.active {
  display: block;
}

.tab-content h3 {
  margin-bottom: var(--space-lg);
}

.gameplay-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.gameplay-list li {
  padding-left: var(--space-lg);
  position: relative;
}

.gameplay-list li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: bold;
}

.analysis-columns {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
}

@media (min-width: 768px) {
  .analysis-columns {
    grid-template-columns: repeat(2, 1fr);
  }
}

.strengths ul,
.weaknesses ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.strengths li,
.weaknesses li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
}

.indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 6px;
}

.indicator.positive {
  background-color: var(--success);
}

.indicator.negative {
  background-color: var(--warning);
}

.sentiment-bars {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.sentiment-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.sentiment-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--foreground);
}

.sentiment-bar {
  position: relative;
  height: 32px;
  background-color: var(--secondary);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.sentiment-bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: var(--sentiment, 0%);
  transition: width var(--transition-base);
}

.sentiment-bar.positive::before {
  background-color: var(--success);
}

.sentiment-bar.neutral::before {
  background-color: var(--muted-foreground);
}

.sentiment-bar.negative::before {
  background-color: var(--destructive);
}

.sentiment-percentage {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 var(--space-md);
  height: 100%;
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--foreground);
  z-index: 1;
}

.sentiment-summary {
  font-size: 0.9375rem;
  color: var(--muted-foreground);
  line-height: 1.6;
}

.requirements-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
}

@media (min-width: 768px) {
  .requirements-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.requirement-column h4 {
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--primary);
}

.requirement-column ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.requirement-column li {
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--border);
}

.requirement-column li:last-child {
  border-bottom: none;
}

/* Detail Info Content */

.detail-info {
  padding: var(--space-2xl);
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.detail-info h2 {
  margin-bottom: var(--space-lg);
}

.detail-info h3 {
  margin-top: var(--space-xl);
  margin-bottom: var(--space-md);
}

.detail-info p {
  line-height: 1.8;
}

/* ============================================
   ABOUT SECTION
   ============================================ */

.about-section {
  background-color: var(--card);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-3xl);
}

@media (min-width: 1024px) {
  .about-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.about-card {
  background-color: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  min-width: 0;
}

.about-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--info));
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-lg);
  color: white;
}

.about-card h3 {
  margin-bottom: var(--space-md);
}

.about-card ul {
  margin-left: 0;
  padding-left: var(--space-lg);
}

.about-card li {
  margin-bottom: var(--space-sm);
  color: var(--foreground);
}

.about-card a {
  color: var(--primary);
  text-decoration: none;
  transition: opacity var(--transition-fast);
}

.about-card a:hover {
  opacity: 0.8;
}

.trust-signals {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  margin-bottom: var(--space-3xl);
  padding: var(--space-xl);
  background-color: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

@media (min-width: 768px) {
  .trust-signals {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .trust-signals {
    grid-template-columns: repeat(4, 1fr);
  }
}

.trust-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-lg);
  text-align: center;
  background-color: var(--card);
  border-radius: var(--radius-lg);
  transition: transform var(--transition-base);
}

.trust-badge:hover {
  transform: translateY(-2px);
}

.trust-badge svg {
  color: var(--primary);
  flex-shrink: 0;
}

.trust-badge span {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--foreground);
}

.about-content {
  padding: var(--space-2xl);
  background-color: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.about-content h2 {
  margin-bottom: var(--space-lg);
}

.about-content h3 {
  margin-top: var(--space-xl);
  margin-bottom: var(--space-md);
}

.about-content p {
  line-height: 1.8;
}

/* ============================================
   FOOTER
   ============================================ */

footer {
  background-color: var(--card);
  border-top: 1px solid var(--border);
  padding: var(--space-3xl) var(--space-lg) var(--space-xl);
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

.footer-column {
  min-width: 0;
}

.brand-column {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.footer-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.footer-brand-text {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--foreground);
}

.footer-tagline {
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0;
}

.footer-description {
  font-size: 0.9375rem;
  color: var(--muted-foreground);
  line-height: 1.6;
  margin-bottom: 0;
}

.footer-social {
  display: flex;
  gap: var(--space-sm);
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background-color: var(--secondary);
  border-radius: var(--radius-md);
  color: var(--foreground);
  transition: all var(--transition-fast);
}

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

.footer-heading {
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: var(--space-md);
  color: var(--foreground);
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer-links a {
  display: block;
  font-size: 0.9375rem;
  color: var(--muted-foreground);
  text-decoration: none;
  transition: color var(--transition-fast);
  padding: var(--space-xs) 0;
}

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

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  align-items: center;
  padding-top: var(--space-xl);
  border-top: 1px solid var(--border);
  text-align: center;
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
  }
}

.footer-certifications {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  justify-content: center;
}

.cert-badge {
  font-size: 0.8125rem;
  color: var(--muted-foreground);
  white-space: nowrap;
}

.footer-copyright {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin: 0;
}

/* ============================================
   COOKIE BANNER
   ============================================ */

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background-color: var(--card);
  border-top: 1px solid var(--border);
  padding: var(--space-lg);
  box-shadow: var(--shadow-xl);
  transform: translateY(100%);
  transition: transform var(--transition-base);
}

.cookie-banner.show {
  transform: translateY(0);
}

.cookie-content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  align-items: center;
  text-align: center;
}

@media (min-width: 768px) {
  .cookie-content {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.cookie-content p {
  flex: 1;
  margin: 0;
  font-size: 0.9375rem;
  color: var(--foreground);
  line-height: 1.5;
}

.cookie-actions {
  display: flex;
  gap: var(--space-md);
  flex-shrink: 0;
}

/* ============================================
   ANIMATIONS & INTERACTIONS
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Scroll reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.text-center {
  text-align: center;
}

.text-primary {
  color: var(--primary);
}

.text-muted {
  color: var(--muted-foreground);
}

.font-mono {
  font-family: var(--font-mono);
}

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

@media (max-width: 767px) {
  :root {
    --space-xl: 1.5rem;
    --space-2xl: 2rem;
    --space-3xl: 2.5rem;
  }

  section {
    padding: var(--space-2xl) var(--space-md);
  }

  .section-header {
    margin-bottom: var(--space-xl);
  }
}

@media (min-width: 1280px) {
  body {
    font-size: 17px;
  }

  .section-container {
    max-width: 1400px;
  }
}