/* ============================================================
   Game Aggregator — Master Stylesheet
   Design System: Dark Cyberpunk / Glassmorphism
   Anti-CLS Banner Zones Included
   ============================================================ */

/* ── CSS Custom Properties (Design Tokens) ──────────────── */
:root {
  /* Color Palette */
  --color-bg-primary:      #f8f9fa;
  --color-bg-secondary:    #ffffff;
  --color-bg-card:         #ffffff;
  --color-bg-glass:        rgba(255, 255, 255, 0.75);
  --color-bg-glass-hover:  rgba(255, 255, 255, 0.9);
  --color-surface:         #f1f3f5;

  --color-accent-primary:  #6c5ce7;
  --color-accent-secondary:#5f4de4;
  --color-accent-glow:     rgba(108, 92, 231, 0.15);
  --color-accent-warm:     #e84393;
  --color-accent-cyan:     #0984e3;
  --color-accent-gold:     #e1b12c;

  --color-text-primary:    #1a1a1a;
  --color-text-secondary:  #666666;
  --color-text-muted:      #8c92a0;
  --color-text-link:       #6c5ce7;

  --color-border:          #e0e0e0;
  --color-border-hover:    rgba(108, 92, 231, 0.4);

  --color-success:         #2ecc71;
  --color-error:           #e74c3c;
  --color-warning:         #f1c40f;

  /* Gradients */
  --gradient-hero:         linear-gradient(135deg, #ffffff 0%, #f1effd 40%, #f8f9fa 100%);
  --gradient-card:         linear-gradient(145deg, rgba(108, 92, 231, 0.03) 0%, rgba(0, 206, 201, 0.02) 100%);
  --gradient-accent:       linear-gradient(135deg, #6c5ce7 0%, #8e2de2 50%, #4a00e0 100%);
  --gradient-warm:         linear-gradient(135deg, #ff7675 0%, #e17055 100%);
  --gradient-btn:          linear-gradient(135deg, #6c5ce7 0%, #5f4de4 100%);

  /* Typography */
  --font-primary:          'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-display:          'Outfit', 'Inter', sans-serif;
  --font-mono:             'JetBrains Mono', 'Fira Code', monospace;

  --fs-xs:    0.75rem;
  --fs-sm:    0.875rem;
  --fs-base:  1rem;
  --fs-md:    1.125rem;
  --fs-lg:    1.25rem;
  --fs-xl:    1.5rem;
  --fs-2xl:   2rem;
  --fs-3xl:   2.5rem;
  --fs-4xl:   3.5rem;

  --fw-normal:  400;
  --fw-medium:  500;
  --fw-semibold:600;
  --fw-bold:    700;
  --fw-black:   900;

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

  /* Border Radius */
  --radius-sm:  0.375rem;
  --radius-md:  0.75rem;
  --radius-lg:  1rem;
  --radius-xl:  1.5rem;
  --radius-full:9999px;

  /* Shadows */
  --shadow-sm:   0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md:   0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-lg:   0 8px 32px rgba(0, 0, 0, 0.08);
  --shadow-glow: 0 8px 20px var(--color-accent-glow);
  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.02);

  /* Transitions */
  --transition-fast:   150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base:   250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow:   400ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Layout */
  --container-max:     1280px;
  --header-height:     72px;
  --sidebar-width:     280px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  font-size: 16px;
}

body {
  font-family: var(--font-primary);
  font-size: var(--fs-base);
  font-weight: var(--fw-normal);
  line-height: 1.6;
  color: var(--color-text-primary);
  background: var(--color-bg-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Animated background mesh */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(108, 92, 231, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(0, 206, 201, 0.03) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(253, 121, 168, 0.02) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

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

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

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

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

ul, ol {
  list-style: none;
}

/* ── Typography ──────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  line-height: 1.2;
  color: var(--color-text-primary);
}

h1 { font-size: var(--fs-4xl); }
h2 { font-size: var(--fs-3xl); }
h3 { font-size: var(--fs-2xl); }
h4 { font-size: var(--fs-xl);  }

/* ── Container ───────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
  position: relative;
  z-index: 1;
}

/* ── Header / Navbar ─────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--color-border);
  transition: background var(--transition-base);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: var(--space-lg);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-display);
  font-weight: var(--fw-black);
  font-size: var(--fs-xl);
  color: var(--color-text-primary);
  text-decoration: none;
  white-space: nowrap;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--gradient-accent);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: var(--shadow-glow);
  animation: logoPulse 3s ease-in-out infinite;
  will-change: box-shadow;
}

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

/* Search Bar */
.search-container {
  flex: 1;
  max-width: 480px;
  position: relative;
}

.search-input {
  width: 100%;
  padding: 0.625rem 1rem 0.625rem 2.75rem;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  color: var(--color-text-primary);
  font-size: var(--fs-sm);
  font-family: var(--font-primary);
  transition: all var(--transition-base);
}

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

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

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

/* Nav Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.nav-link {
  padding: 0.5rem 1rem;
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--color-text-secondary);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-text-primary);
  background: rgba(108, 92, 231, 0.12);
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  padding: var(--space-sm);
  color: var(--color-text-primary);
  font-size: var(--fs-xl);
}

/* ── Hero Section ────────────────────────────────────────── */
.hero {
  padding: var(--space-4xl) 0 var(--space-3xl);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(108, 92, 231, 0.15) 0%, transparent 70%);
  pointer-events: none;
  animation: heroGlow 6s ease-in-out infinite alternate;
  will-change: transform, opacity;
}

.hero-title {
  font-size: clamp(2rem, 6vw, var(--fs-4xl));
  font-weight: var(--fw-black);
  margin-bottom: var(--space-md);
  letter-spacing: -0.02em;
}

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

.hero-subtitle {
  font-size: var(--fs-lg);
  color: var(--color-text-secondary);
  max-width: 600px;
  margin: 0 auto var(--space-xl);
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: var(--space-2xl);
  flex-wrap: wrap;
}

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

.stat-value {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  font-weight: var(--fw-black);
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-xs);
}

/* ── Category Filter Bar ─────────────────────────────────── */
.category-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  padding: var(--space-lg) 0;
}

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

.category-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 6px 14px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 50px;
  color: var(--color-text-secondary);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  white-space: nowrap;
  cursor: pointer;
  transition: all var(--transition-base);
}

.category-chip:hover {
  border-color: var(--color-border-hover);
  color: var(--color-text-primary);
  transform: translateY(-1px);
}

.category-chip.active {
  background: var(--gradient-btn);
  border-color: transparent;
  color: #fff;
  box-shadow: var(--shadow-glow);
}

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

.game-card {
  position: relative;
  background: var(--color-bg-glass);
  backdrop-filter: blur(10px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-base);
  cursor: pointer;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.game-card:hover {
  transform: translateY(-6px);
  border-color: var(--color-border-hover);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.game-card-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--color-bg-secondary);
}

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

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

.game-card-badge {
  position: absolute;
  top: var(--space-sm);
  left: var(--space-sm);
  padding: 0.25rem 0.75rem;
  background: var(--gradient-warm);
  border-radius: var(--radius-full);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.game-card-body {
  padding: var(--space-md) var(--space-lg) var(--space-lg);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.game-card-category {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  color: var(--color-accent-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-xs);
}

.game-card-title {
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  margin-bottom: var(--space-xs);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.game-card-desc {
  font-size: var(--fs-sm);
  color: var(--color-text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: var(--space-md);
}

.game-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border);
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
}

.game-card-rating {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--color-accent-gold);
  font-weight: var(--fw-semibold);
}

.game-card-plays {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

/* ── Detail Page ─────────────────────────────────────────── */
.detail-hero {
  position: relative;
  width: 100%;
  min-height: 400px;
  display: flex;
  align-items: flex-end;
  padding: var(--space-3xl) 0 var(--space-2xl);
  overflow: hidden;
}

.detail-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(28px) brightness(0.15);
  transform: scale(1.2);
}

.detail-hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--color-bg-primary) 0%, transparent 50%);
}

/* Cover image visible di hero (bukan background blur) */
.detail-hero-cover {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-xl);
}

.detail-hero-cover img {
  max-height: 280px;
  max-width: 100%;
  width: auto;
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 64px rgba(0,0,0,0.7), 0 8px 24px rgba(108,92,231,0.3);
  object-fit: contain;
  display: block;
}

.detail-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--space-2xl);
  padding: var(--space-2xl) 0;
}

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

.detail-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.detail-title {
  font-size: var(--fs-3xl);
  margin-bottom: var(--space-sm);
}

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

.detail-meta-item {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--fs-sm);
  color: var(--color-text-secondary);
}

.detail-description {
  font-size: var(--fs-md);
  line-height: 1.8;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-xl);
}

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

.tag {
  padding: 0.35rem 1rem;
  background: rgba(108, 92, 231, 0.1);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: var(--fs-xs);
  color: var(--color-accent-secondary);
  font-weight: var(--fw-medium);
  transition: all var(--transition-fast);
}

.tag:hover {
  background: rgba(108, 92, 231, 0.2);
  border-color: var(--color-accent-primary);
}

/* Play Button */
.btn-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  width: 100%;
  padding: 1rem 2rem;
  background: var(--gradient-btn);
  color: #fff;
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-glow);
  transition: all var(--transition-base);
  text-decoration: none;
}

.btn-play:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px var(--color-accent-glow), 0 8px 24px rgba(0, 0, 0, 0.1);
  color: #fff;
}

.btn-play:active {
  transform: translateY(0);
}

/* Info Card (Sidebar) */
.info-card {
  background: var(--color-bg-glass);
  backdrop-filter: blur(10px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
}

.info-card-title {
  font-size: var(--fs-md);
  font-weight: var(--fw-semibold);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--color-border);
}

.info-card-row {
  display: flex;
  justify-content: space-between;
  padding: var(--space-sm) 0;
  font-size: var(--fs-sm);
}

.info-card-label {
  color: var(--color-text-muted);
}

.info-card-value {
  color: var(--color-text-primary);
  font-weight: var(--fw-medium);
}

/* ── Safelink Page ───────────────────────────────────────── */
.safelink-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-2xl);
  text-align: center;
}

.safelink-card {
  width: 100%;
  max-width: 560px;
  background: var(--color-bg-glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-3xl) var(--space-2xl);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.safelink-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-accent);
}

.safelink-title {
  font-size: var(--fs-2xl);
  margin-bottom: var(--space-sm);
}

.safelink-subtitle {
  font-size: var(--fs-sm);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-2xl);
}

/* Timer Ring */
.timer-container {
  position: relative;
  width: 140px;
  height: 140px;
  margin: 0 auto var(--space-xl);
}

.timer-ring {
  transform: rotate(-90deg);
}

.timer-ring-bg {
  fill: none;
  stroke: var(--color-border);
  stroke-width: 6;
}

.timer-ring-progress {
  fill: none;
  stroke: url(#timerGradient);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 377;
  stroke-dashoffset: 377;
  transition: stroke-dashoffset 0.3s ease;
}

.timer-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-size: var(--fs-3xl);
  font-weight: var(--fw-black);
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.timer-label {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Safelink States */
.safelink-status {
  font-size: var(--fs-sm);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-lg);
  min-height: 1.5em;
}

.safelink-status.paused {
  color: var(--color-warning);
}

.safelink-status.error {
  color: var(--color-error);
}

.btn-continue {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.875rem 2.5rem;
  background: var(--gradient-btn);
  color: #fff;
  font-size: var(--fs-md);
  font-weight: var(--fw-bold);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-glow);
  transition: all var(--transition-base);
  opacity: 0.4;
  pointer-events: none;
  cursor: not-allowed;
}

.btn-continue.ready {
  opacity: 1;
  pointer-events: auto;
  cursor: pointer;
  animation: btnReady 0.6s var(--transition-spring);
}

.btn-continue.ready:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px var(--color-accent-glow);
}

@keyframes btnReady {
  0%   { transform: scale(0.9); opacity: 0; }
  50%  { transform: scale(1.05); }
  100% { transform: scale(1); opacity: 1; }
}

/* Anti-Adblock Overlay */
.adblock-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
}

.adblock-modal {
  max-width: 480px;
  padding: var(--space-3xl);
  background: var(--color-bg-card);
  border: 1px solid var(--color-error);
  border-radius: var(--radius-xl);
  text-align: center;
}

.adblock-icon {
  font-size: 4rem;
  margin-bottom: var(--space-lg);
}

.adblock-title {
  font-size: var(--fs-xl);
  color: var(--color-error);
  margin-bottom: var(--space-md);
}

.adblock-desc {
  font-size: var(--fs-sm);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-xl);
  line-height: 1.7;
}

.btn-reload {
  padding: 0.75rem 2rem;
  background: var(--color-error);
  color: #fff;
  font-weight: var(--fw-bold);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.btn-reload:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  color: #fff;
}

/* ── Safelink Recommendation Section ────────────────────── */
.sl-recommendation-section {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
  text-align: center;
}

.sl-recommendation-title {
  font-family: var(--font-display);
  font-size: var(--fs-md);
  font-weight: var(--fw-semibold);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-lg);
  letter-spacing: 0.02em;
}

.sl-recommendation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: var(--space-md);
}

.sl-rec-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--color-bg-glass);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.sl-rec-card:hover {
  transform: translateY(-4px);
  border-color: var(--color-border-hover);
  box-shadow: var(--shadow-md), var(--shadow-glow);
}

.sl-rec-card-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--color-surface);
}

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

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

.sl-rec-card-body {
  padding: var(--space-sm);
  text-align: left;
}

.sl-rec-card-title {
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  color: var(--color-text-primary);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.sl-rec-card-platform {
  font-size: 0.65rem;
  color: var(--color-accent-secondary);
  font-weight: var(--fw-medium);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Loading skeleton for recommendation cards */
.sl-rec-skeleton {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  min-height: 140px;
  animation: shimmer 1.5s infinite;
  background: linear-gradient(
    90deg,
    var(--color-bg-card) 25%,
    var(--color-surface) 50%,
    var(--color-bg-card) 75%
  );
  background-size: 200% 100%;
}

@media (max-width: 480px) {
  .sl-recommendation-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
  }
}

/* ── Banner Ad Zones (Anti-CLS) ──────────────────────────── */
.banner-ad-728x90 {
  width: 100%;
  max-width: 728px;
  height: 90px;
  margin: var(--space-lg) auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-secondary);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  font-size: var(--fs-xs);
  overflow: hidden;
  contain: layout size style;
}

.banner-ad-300x250 {
  width: 300px;
  height: 250px;
  max-width: 100%;
  margin: var(--space-lg) auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-secondary);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  font-size: var(--fs-xs);
  overflow: hidden;
  contain: layout size style;
}

/* ── Pagination ──────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-2xl) 0;
}

.page-btn {
  padding: 0.5rem 1rem;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-secondary);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  transition: all var(--transition-fast);
}

.page-btn:hover:not(:disabled) {
  border-color: var(--color-accent-primary);
  color: var(--color-text-primary);
}

.page-btn.active {
  background: var(--gradient-btn);
  border-color: transparent;
  color: #fff;
}

.page-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* ── Footer ──────────────────────────────────────────────── */
.site-footer {
  margin-top: var(--space-4xl);
  padding: var(--space-2xl) 0;
  border-top: 1px solid var(--color-border);
  text-align: center;
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
  position: relative;
  z-index: 1;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-md);
  flex-wrap: wrap;
}

.footer-link {
  color: var(--color-text-secondary);
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: var(--color-accent-secondary);
}

/* ── DMCA Page ───────────────────────────────────────────── */
.legal-page {
  padding: var(--space-3xl) 0;
  position: relative;
  z-index: 1;
}

.legal-content {
  max-width: 800px;
  margin: 0 auto;
}

.legal-content h1 {
  font-size: var(--fs-3xl);
  margin-bottom: var(--space-lg);
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.legal-content h2 {
  font-size: var(--fs-xl);
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-md);
  color: var(--color-accent-secondary);
}

.legal-content p,
.legal-content li {
  font-size: var(--fs-md);
  color: var(--color-text-secondary);
  line-height: 1.8;
  margin-bottom: var(--space-md);
}

.legal-content ul {
  padding-left: var(--space-xl);
  list-style: disc;
}

.legal-content a {
  color: var(--color-accent-primary);
  text-decoration: underline;
}

/* ── Loading States ──────────────────────────────────────── */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--color-bg-card) 25%,
    var(--color-surface) 50%,
    var(--color-bg-card) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

@media (prefers-reduced-motion: no-preference) {
  @keyframes logoPulse {
    0%, 100% { box-shadow: 0 0 15px var(--color-accent-glow); }
    50%      { box-shadow: 0 0 30px var(--color-accent-glow), 0 0 60px rgba(108, 92, 231, 0.15); }
  }

  @keyframes heroGlow {
    0%   { opacity: 0.5; transform: translateX(-50%) scale(0.9); }
    100% { opacity: 1;   transform: translateX(-50%) scale(1.1); }
  }

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

/* ── Reduced Motion: disable decorative animations ──────── */
@media (prefers-reduced-motion: reduce) {
  .logo-icon {
    animation: none;
    will-change: auto;
  }

  .hero::before {
    animation: none;
    will-change: auto;
  }

  .skeleton,
  .sl-rec-skeleton {
    animation: none;
    background-position: 0 0;
  }
}

.skeleton-card {
  height: 320px;
}

/* ── Toast Notifications ─────────────────────────────────── */
.toast-container {
  position: fixed;
  top: calc(var(--header-height) + var(--space-md));
  right: var(--space-lg);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.toast {
  padding: var(--space-md) var(--space-lg);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-primary);
  font-size: var(--fs-sm);
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s var(--transition-spring);
  max-width: 360px;
}

.toast.error {
  border-color: var(--color-error);
}

.toast.success {
  border-color: var(--color-success);
}

@keyframes toastIn {
  0%   { opacity: 0; transform: translateX(100%); }
  100% { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
  0%   { opacity: 1; transform: translateX(0); }
  100% { opacity: 0; transform: translateX(100%); }
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1024px) {
  .detail-content {
    grid-template-columns: 1fr;
  }

  .detail-sidebar {
    order: -1;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 64px;
  }

  .hero-title {
    font-size: var(--fs-2xl);
  }

  .hero-stats {
    gap: var(--space-lg);
  }

  .game-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: var(--space-md);
  }

  .search-container {
    display: none;
  }

  .nav-links {
    display: none;
  }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--color-bg-secondary);
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-md);
    gap: var(--space-xs);
  }

  .menu-toggle {
    display: block;
  }

  .banner-ad-728x90 {
    min-height: 60px;
    aspect-ratio: auto;
    min-width: 0;
  }

  .detail-hero {
    min-height: 280px;
  }
}

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

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

  .safelink-card {
    padding: var(--space-2xl) var(--space-lg);
  }
}

/* ── Utility Classes ─────────────────────────────────────── */
.text-center    { text-align: center; }
.text-muted     { color: var(--color-text-muted); }
.mt-sm          { margin-top: var(--space-sm); }
.mt-md          { margin-top: var(--space-md); }
.mt-lg          { margin-top: var(--space-lg); }
.mb-md          { margin-bottom: var(--space-md); }
.hidden         { display: none !important; }
.sr-only        { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
