/* ============================================================
   Indie Game Hub — Shared Design System
   ============================================================ */

/* ---- Design tokens ---------------------------------------- */
:root {
  /* Palette */
  --bg:        #0f0f1a;
  --surface:   #16162a;
  --fg:        #f0f0f8;
  --muted:     #8888a0;
  --border:    #2a2a3e;
  --accent:    #00ff88;
  --accent-dim:#00cc6a;
  --accent-glow: rgba(0, 255, 136, 0.25);
  --danger:    #e85a4a;
  --success:   #46d98a;
  --warning:   #f0b34a;
  --nav-bg:    rgba(15, 15, 26, 0.8);
  --card-bg:   #1a1a30;

  /* Typography */
  --font-display: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-body:    'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', 'IBM Plex Mono', ui-monospace, Menlo, monospace;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* Radii */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;

  /* Transitions */
  --ease: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ---- Reset & Base ----------------------------------------- */
*, *::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(--fg);
  background: var(--bg);
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; transition: color var(--ease); }
a:hover { color: #66ffbb; }

img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; }

::selection { background: var(--accent); color: var(--bg); }

/* ---- Scrollbar -------------------------------------------- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* ---- Utility classes -------------------------------------- */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

@media (max-width: 768px) {
  .container { padding: 0 var(--space-md); }
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 700;
  margin-bottom: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.section-title .accent-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 2px;
  box-shadow: 0 0 8px var(--accent-glow);
}

.section-subtitle {
  color: var(--muted);
  font-size: 14px;
  margin-top: -12px;
  margin-bottom: var(--space-lg);
}

/* ---- Navbar ----------------------------------------------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--nav-bg);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid var(--border);
  transition: background var(--ease);
}

.navbar .container {
  display: flex;
  align-items: center;
  height: 64px;
  gap: var(--space-lg);
}

.navbar.scrolled {
  background: rgba(10, 10, 22, 0.92);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  color: var(--fg);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-shrink: 0;
}

.nav-logo .logo-pixel {
  width: 28px;
  height: 28px;
  background: var(--accent);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 900;
  color: var(--bg);
  image-rendering: pixelated;
}

.nav-logo span { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  list-style: none;
}

.nav-links a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  transition: color var(--ease);
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--fg);
}

.nav-links a.active::after {
  content: '';
  display: block;
  height: 2px;
  width: 100%;
  background: var(--accent);
  margin-top: 2px;
  border-radius: 1px;
}

.nav-search {
  flex: 1;
  max-width: 320px;
  position: relative;
  margin-left: auto;
}

.nav-search input {
  width: 100%;
  height: 38px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 0 16px 0 40px;
  color: var(--fg);
  font-size: 14px;
  outline: none;
  transition: border-color var(--ease);
}

.nav-search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.nav-search .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 14px;
  pointer-events: none;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-shrink: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  height: 38px;
  padding: 0 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  transition: all var(--ease);
  border: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
}

.btn-primary:hover {
  background: var(--accent-dim);
  box-shadow: 0 0 20px var(--accent-glow);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: none;
}

.btn-ghost:hover {
  color: var(--fg);
}

.btn-sm {
  height: 32px;
  padding: 0 14px;
  font-size: 13px;
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-danger:hover {
  background: #d04a3a;
}

.user-menu {
  position: relative;
  display: none;
  align-items: center;
  gap: var(--space-sm);
  cursor: pointer;
}

.user-menu.visible { display: flex; }

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: var(--bg);
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-sm);
  min-width: 180px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: all var(--ease);
  z-index: 100;
}

.user-menu.open .user-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-dropdown a {
  display: block;
  padding: 8px 12px;
  color: var(--muted);
  font-size: 14px;
  border-radius: var(--radius-sm);
  transition: all var(--ease);
}

.user-dropdown a:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--fg);
}

.user-dropdown .divider {
  height: 1px;
  background: var(--border);
  margin: 6px 8px;
}

/* ---- Hamburger menu (mobile) ------------------------------ */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--fg);
  border-radius: 1px;
  transition: all var(--ease);
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---- Footer ----------------------------------------------- */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: var(--space-3xl) 0 var(--space-xl);
  margin-top: var(--space-3xl);
}

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

.footer-brand h3 {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: var(--space-sm);
}

.footer-brand h3 span { color: var(--accent); }

.footer-brand p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.footer-col h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: var(--space-md);
  color: var(--fg);
}

.footer-col a {
  display: block;
  color: var(--muted);
  font-size: 14px;
  padding: 4px 0;
  transition: color var(--ease);
}

.footer-col a:hover { color: var(--fg); }

.footer-bottom {
  margin-top: var(--space-2xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
}

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

.footer-social a {
  color: var(--muted);
  font-size: 18px;
  transition: color var(--ease);
}

.footer-social a:hover { color: var(--accent); }

/* ---- Game Card -------------------------------------------- */
.game-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--ease-spring);
  cursor: pointer;
  position: relative;
}

.game-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-glow);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 20px var(--accent-glow);
}

.game-card-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 375 / 175;
  background: linear-gradient(135deg, #1a1a3e 0%, #0f0f2a 100%);
  overflow: hidden;
}

.game-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-card-cover .pixel-overlay {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.08) 2px,
    rgba(0, 0, 0, 0.08) 4px
  );
  pointer-events: none;
  image-rendering: pixelated;
}

.game-card-body {
  padding: var(--space-md);
}

.game-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.game-card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.game-card-tag {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(0, 255, 136, 0.1);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0, 255, 136, 0.15);
}

.game-card-rating {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-left: auto;
  color: var(--fg);
  font-size: 13px;
  font-weight: 600;
}

.game-card-rating .star {
  color: var(--warning);
  font-size: 12px;
}

.game-card-desc {
  color: var(--muted);
  font-size: 13px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---- Hero Section (homepage) ------------------------------ */
.hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: 64px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 40%, rgba(0, 255, 136, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 60%, rgba(15, 52, 96, 0.12) 0%, transparent 50%),
    linear-gradient(180deg, #0f0f1a 0%, #1a1a30 50%, #0f0f1a 100%);
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 255, 136, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 136, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 680px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(0, 255, 136, 0.08);
  border: 1px solid rgba(0, 255, 136, 0.2);
  border-radius: var(--radius-full);
  font-size: 13px;
  color: var(--accent);
  margin-bottom: var(--space-lg);
}

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

@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 var(--accent-glow); }
  50% { opacity: 0.7; box-shadow: 0 0 12px var(--accent-glow); }
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: var(--space-lg);
  letter-spacing: -0.02em;
}

.hero h1 .accent {
  background: linear-gradient(135deg, var(--accent), #66ffbb);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: var(--space-xl);
  max-width: 540px;
}

.hero-actions {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.hero .btn-primary {
  height: 48px;
  padding: 0 32px;
  font-size: 16px;
}

.hero .btn-secondary {
  height: 48px;
  padding: 0 32px;
  font-size: 16px;
}

.hero-stats {
  display: flex;
  gap: var(--space-xl);
  margin-top: var(--space-2xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--border);
}

.hero-stat h2 {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
  color: var(--fg);
}

.hero-stat p {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 0;
}

/* ---- Sections --------------------------------------------- */
.section {
  padding: var(--space-3xl) 0;
}

/* ---- Game Grid -------------------------------------------- */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-lg);
}

/* ---- Horizontal Scroll (Featured) ------------------------- */
.horizontal-scroll {
  display: flex;
  gap: var(--space-lg);
  overflow-x: auto;
  padding-bottom: var(--space-md);
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.horizontal-scroll::-webkit-scrollbar { height: 4px; }
.horizontal-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.horizontal-scroll::-webkit-scrollbar-track { background: transparent; }

.horizontal-scroll .game-card {
  min-width: 320px;
  max-width: 360px;
  scroll-snap-align: start;
}

/* ---- Category Cards --------------------------------------- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--space-md);
}

.category-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  text-align: center;
  transition: all var(--ease-spring);
  cursor: pointer;
}

.category-card:hover {
  border-color: var(--accent-glow);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.category-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto var(--space-sm);
  background: rgba(0, 255, 136, 0.06);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  border: 1px solid rgba(0, 255, 136, 0.1);
}

.category-card h4 {
  font-size: 14px;
  font-weight: 600;
}

.category-card p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

/* ---- Sidebar + Filter Layout ------------------------------ */
.layout-with-sidebar {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: var(--space-xl);
  padding: 80px var(--space-xl) 0;
}

.sidebar {
  position: sticky;
  top: 80px;
  height: fit-content;
}

.sidebar h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: var(--space-md);
  color: var(--fg);
}

.filter-section {
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--border);
}

.filter-section:last-child { border-bottom: none; }

.filter-section h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: var(--space-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.filter-option {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 6px 0;
  cursor: pointer;
  font-size: 14px;
  color: var(--muted);
  transition: color var(--ease);
}

.filter-option:hover { color: var(--fg); }

.filter-option input[type="checkbox"] {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
}

.filter-option input[type="radio"] {
  accent-color: var(--accent);
}

.sort-select {
  width: 100%;
  height: 38px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--fg);
  padding: 0 12px;
  font-size: 14px;
  outline: none;
  cursor: pointer;
}

.sort-select:focus { border-color: var(--accent); }

/* ---- Pagination ------------------------------------------- */
.pagination {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  margin-top: var(--space-xl);
}

.pagination button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  border-radius: var(--radius-sm);
  font-size: 14px;
  transition: all var(--ease);
}

.pagination button:hover { border-color: var(--accent); color: var(--fg); }
.pagination button.active { background: var(--accent); color: var(--bg); border-color: var(--accent); font-weight: 600; }

/* ---- Game Detail ------------------------------------------ */
.detail-header {
  padding-top: 80px;
  position: relative;
}

.carousel {
  position: relative;
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--card-bg);
  aspect-ratio: 808 / 455;
  margin-bottom: var(--space-xl);
}

.carousel-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  height: 100%;
}

.carousel-slide {
  min-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a1a3e 0%, #0f0f2a 100%);
  font-size: 48px;
  color: var(--muted);
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: #fff;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--ease);
  z-index: 10;
}

.carousel-btn:hover { background: rgba(0, 0, 0, 0.8); }
.carousel-prev { left: var(--space-md); }
.carousel-next { right: var(--space-md); }

.carousel-dots {
  position: absolute;
  bottom: var(--space-md);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  border: none;
  cursor: pointer;
  transition: all var(--ease);
}

.carousel-dot.active { background: var(--accent); width: 24px; border-radius: 4px; }

.detail-hero {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
  align-items: start;
}

.detail-hero-info {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-top: var(--space-md);
}

.detail-hero-info h1 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  margin-bottom: var(--space-sm);
}

.detail-body {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: var(--space-xl);
  margin-bottom: var(--space-2xl);
  align-items: start;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.detail-tags .tag {
  padding: 4px 12px;
  background: rgba(0, 255, 136, 0.08);
  border: 1px solid rgba(0, 255, 136, 0.15);
  border-radius: var(--radius-full);
  font-size: 13px;
  color: var(--accent);
}

.detail-info-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-bottom: var(--space-lg);
}

.detail-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
}

.detail-info-row + .detail-info-row {
  border-top: 1px solid var(--border);
}

.detail-info-label {
  font-size: 13px;
  color: var(--muted);
}

.detail-info-value {
  font-size: 13px;
  color: var(--fg);
  font-weight: 500;
}

.detail-actions {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.detail-actions .btn-primary {
  height: 48px;
  padding: 0 32px;
  font-size: 16px;
}

.spec-list dt {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: var(--space-md);
}

.spec-list dt:first-child { margin-top: 0; }

.spec-list dd {
  font-size: 14px;
  color: var(--fg);
  margin-top: 2px;
}

/* ---- Comments --------------------------------------------- */
.comments-section {
  margin-top: var(--space-2xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--border);
}

.comments-section h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: var(--space-lg);
}

.comment-input-area {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
  padding: var(--space-md);
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.comment-input-area textarea {
  flex: 1;
  width: 100%;
  background: transparent;
  border: none;
  color: var(--fg);
  font-size: 14px;
  resize: vertical;
  min-height: 60px;
  outline: none;
}

.comment-input-area textarea::placeholder { color: var(--muted); }

.comment-item {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--border);
}

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

.comment-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--bg);
  flex-shrink: 0;
}

.comment-body {
  flex: 1;
}

.comment-author {
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
}

.comment-time {
  font-size: 12px;
  color: var(--muted);
  margin-left: var(--space-sm);
}

.comment-text {
  font-size: 14px;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.6;
}

.comment-rating {
  color: var(--warning);
  font-size: 13px;
}

/* ---- Auth Pages ------------------------------------------- */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  position: relative;
  overflow: hidden;
}

.auth-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 40%, rgba(0, 255, 136, 0.04) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 60%, rgba(15, 52, 96, 0.1) 0%, transparent 50%),
    linear-gradient(180deg, #0f0f1a 0%, #16162a 100%);
}

.auth-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 420px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
}

.auth-card h1 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 4px;
}

.auth-card .subtitle {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: var(--space-xl);
}

.form-group {
  margin-bottom: var(--space-md);
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  height: 44px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 14px;
  color: var(--fg);
  font-size: 14px;
  outline: none;
  transition: border-color var(--ease);
}

.form-group textarea {
  height: auto;
  padding: 12px 14px;
  resize: vertical;
  min-height: 100px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group .field-error {
  font-size: 12px;
  color: var(--danger);
  margin-top: 4px;
  display: none;
}

.form-group.error input {
  border-color: var(--danger);
}

.form-group.error .field-error {
  display: block;
}

.auth-card .form-footer {
  text-align: center;
  margin-top: var(--space-lg);
  font-size: 14px;
  color: var(--muted);
}

.auth-card .form-footer a {
  font-weight: 600;
}

/* ---- Submit Game ------------------------------------------ */
.submit-page {
  padding-top: 80px;
  padding-bottom: var(--space-3xl);
}

.submit-tabs {
  display: flex;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: var(--space-xl);
}

.submit-tab {
  flex: 1;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--ease);
  border-bottom: 2px solid transparent;
}

.submit-tab:hover { color: var(--fg); background: rgba(255, 255, 255, 0.03); }
.submit-tab.active { color: var(--accent); border-bottom-color: var(--accent); background: rgba(0, 255, 136, 0.04); }

.submit-panel {
  display: none;
}

.submit-panel.active {
  display: block;
}

.steam-hint {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md);
  background: rgba(0, 255, 136, 0.04);
  border: 1px solid rgba(0, 255, 136, 0.12);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--muted);
  margin-top: var(--space-sm);
}

.steam-hint .steam-icon {
  font-size: 20px;
}

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

.upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
  text-align: center;
  transition: all var(--ease);
  cursor: pointer;
}

.upload-area:hover,
.upload-area.dragover {
  border-color: var(--accent);
  background: rgba(0, 255, 136, 0.03);
}

.upload-area .upload-icon {
  font-size: 32px;
  color: var(--muted);
  margin-bottom: var(--space-sm);
}

.upload-area p {
  color: var(--muted);
  font-size: 14px;
}

.upload-area .upload-hint {
  font-size: 12px;
  margin-top: 4px;
}

.upload-area.drag-over {
  border-color: var(--accent);
  background: rgba(0, 255, 136, 0.08);
}

.upload-preview {
  max-width: 100%;
  max-height: 200px;
  border-radius: var(--radius-sm);
  object-fit: contain;
}

.upload-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.upload-area {
  position: relative;
}

.screenshot-previews {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.screenshot-preview-item {
  position: relative;
  width: 120px;
  height: 80px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}

.screenshot-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.upload-add-more {
  width: 120px;
  height: 80px;
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--muted);
  font-size: 24px;
  transition: all var(--ease);
}

.upload-add-more:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---- Toast ------------------------------------------------ */
.toast-container {
  position: fixed;
  top: 80px;
  right: var(--space-lg);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.toast {
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  transform: translateX(120%);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  max-width: 380px;
  border: 1px solid;
}

.toast.visible {
  transform: translateX(0);
  opacity: 1;
}

.toast-success {
  background: rgba(70, 217, 138, 0.1);
  border-color: rgba(70, 217, 138, 0.3);
  color: var(--success);
}

.toast-error {
  background: rgba(232, 90, 74, 0.1);
  border-color: rgba(232, 90, 74, 0.3);
  color: var(--danger);
}

.toast-info {
  background: rgba(0, 255, 136, 0.08);
  border-color: rgba(0, 255, 136, 0.2);
  color: var(--accent);
}

/* ---- Skeleton Loader -------------------------------------- */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--card-bg) 0%,
    #222244 40%,
    var(--card-bg) 80%
  );
  background-size: 200% 100%;
  animation: shimmer 1.6s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton-card {
  height: 280px;
  border-radius: var(--radius-lg);
}

/* ---- Admin Layout ----------------------------------------- */
.admin-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
  padding-top: 64px;
}

.admin-sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: var(--space-lg);
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow-y: auto;
}

.admin-sidebar h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.admin-nav a {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 10px 12px;
  color: var(--muted);
  font-size: 14px;
  border-radius: var(--radius-sm);
  transition: all var(--ease);
  margin-bottom: 2px;
}

.admin-nav a:hover,
.admin-nav a.active {
  background: rgba(0, 255, 136, 0.06);
  color: var(--fg);
}

.admin-nav a.active {
  border-left: 2px solid var(--accent);
}

.admin-main {
  padding: var(--space-xl);
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-xl);
}

.admin-header h1 {
  font-size: 24px;
  font-weight: 700;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.admin-table td {
  padding: 14px 16px;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
}

.admin-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
}

.status-pending {
  background: rgba(240, 179, 74, 0.1);
  color: var(--warning);
  border: 1px solid rgba(240, 179, 74, 0.2);
}

.status-approved {
  background: rgba(70, 217, 138, 0.1);
  color: var(--success);
  border: 1px solid rgba(70, 217, 138, 0.2);
}

.status-rejected {
  background: rgba(232, 90, 74, 0.1);
  color: var(--danger);
  border: 1px solid rgba(232, 90, 74, 0.2);
}

.table-actions {
  display: flex;
  gap: var(--space-sm);
}

.table-actions .btn-sm {
  height: 30px;
  padding: 0 12px;
  font-size: 12px;
}

/* ---- Modal ------------------------------------------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 9000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
}

.modal-overlay.open {
  display: flex;
}

.modal-content {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  max-width: 640px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  padding: var(--space-xl);
}

.modal-content h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: var(--space-lg);
}

.modal-actions {
  display: flex;
  gap: var(--space-sm);
  justify-content: flex-end;
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border);
}

/* ---- Responsive ------------------------------------------- */
@media (max-width: 1024px) {
  .layout-with-sidebar {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-md);
  }

  .filter-section {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
  }

  .detail-hero {
    grid-template-columns: 1fr;
  }

  .detail-body {
    grid-template-columns: 1fr;
  }

.detail-specs {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
}

.detail-specs h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: var(--space-md);
  color: var(--fg);
}

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

  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    display: none;
  }
}

@media (max-width: 768px) {
  .nav-links,
  .nav-search,
  .nav-actions .btn-secondary {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .nav-actions {
    margin-left: auto;
  }

  .nav-links.mobile-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: var(--space-md);
    gap: var(--space-sm);
  }

  .nav-links.mobile-open a {
    padding: 10px 0;
    font-size: 16px;
  }

  .hero {
    min-height: 60vh;
  }

  .hero-stats {
    flex-wrap: wrap;
    gap: var(--space-md);
  }

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

  .horizontal-scroll .game-card {
    min-width: 280px;
  }

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

  .form-row {
    grid-template-columns: 1fr;
  }

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

  .footer-bottom {
    flex-direction: column;
    gap: var(--space-md);
    text-align: center;
  }

  .footer-social {
    justify-content: center;
  }

  .detail-actions {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--space-md);
  }

  .hero h1 {
    font-size: 28px;
  }

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

  .auth-card {
    padding: var(--space-lg);
  }
}

/* ---- Mobile Sidebar Drawer -------------------------------- */
.mobile-drawer {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
}

.mobile-drawer.open {
  display: block;
}

.mobile-drawer-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.mobile-drawer-content {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 280px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: var(--space-lg);
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-drawer.open .mobile-drawer-content {
  transform: translateX(0);
}

.mobile-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-lg);
}

.mobile-drawer-header .close-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 24px;
  cursor: pointer;
}

.mobile-drawer-nav a {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 12px;
  color: var(--muted);
  font-size: 15px;
  border-radius: var(--radius-sm);
  transition: all var(--ease);
}

.mobile-drawer-nav a:hover,
.mobile-drawer-nav a.active {
  color: var(--fg);
  background: rgba(255, 255, 255, 0.03);
}

.mobile-admin-nav {
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border);
}

.mobile-admin-nav h4 {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-sm);
}
