/* GTA VI Wiki — Scoped Styles */
/* All selectors scoped under .gta-vi-wiki */

.gta-vi-wiki {
  --neon-pink: #FF1493;
  --neon-cyan: #00FFFF;
  --neon-purple: #9B59B6;
  --bg-dark: hsl(220 67% 2%);
  --bg-elevated: hsl(220 50% 5%);
  --bg-subtle: hsl(220 40% 8%);
  --bg-card: hsl(220 45% 6%);
  --text-primary: #F0F0F8;
  --text-secondary: #8A8AA0;
  --text-tertiary: #5A5A70;
  --border-color: rgba(255, 20, 147, 0.12);
  --border-subtle: rgba(255, 255, 255, 0.06);
  --shadow-neon: 0 0 20px rgba(255, 20, 147, 0.15);
  --shadow-cyan: 0 0 20px rgba(0, 255, 255, 0.1);
  --font-display: 'Bebas Neue', 'Impact', sans-serif;
  --font-body: 'DM Sans', 'Inter', sans-serif;

  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--bg-dark);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Typography */
.gta-vi-wiki h1, .gta-vi-wiki h2, .gta-vi-wiki h3, .gta-vi-wiki h4 {
  font-family: var(--font-display);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.gta-vi-wiki h1 { font-size: 3rem; line-height: 1; }
.gta-vi-wiki h2 { font-size: 2rem; line-height: 1.1; }
.gta-vi-wiki h3 { font-size: 1.5rem; line-height: 1.2; }

.gta-vi-wiki p { line-height: 1.7; color: var(--text-secondary); }

.gta-vi-wiki a {
  color: var(--neon-pink);
  text-decoration: none;
  transition: color 0.2s, text-shadow 0.2s;
}
.gta-vi-wiki a:hover {
  color: var(--neon-cyan);
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

/* Layout */
.gta-vi-wiki .container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Cards */
.gta-vi-wiki .card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}
.gta-vi-wiki .card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-neon);
  border-color: rgba(255, 20, 147, 0.3);
}

/* Buttons */
.gta-vi-wiki .btn-primary {
  background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple));
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-family: var(--font-display);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: box-shadow 0.3s, transform 0.2s;
}
.gta-vi-wiki .btn-primary:hover {
  box-shadow: 0 0 30px rgba(255, 20, 147, 0.4);
  transform: translateY(-2px);
}

.gta-vi-wiki .btn-secondary {
  background: transparent;
  color: var(--neon-cyan);
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-family: var(--font-display);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--neon-cyan);
  cursor: pointer;
  transition: background 0.3s, box-shadow 0.3s;
}
.gta-vi-wiki .btn-secondary:hover {
  background: rgba(0, 255, 255, 0.08);
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.2);
}

/* Badges */
.gta-vi-wiki .badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.gta-vi-wiki .badge-pink {
  background: rgba(255, 20, 147, 0.15);
  color: var(--neon-pink);
  border: 1px solid rgba(255, 20, 147, 0.3);
}
.gta-vi-wiki .badge-cyan {
  background: rgba(0, 255, 255, 0.1);
  color: var(--neon-cyan);
  border: 1px solid rgba(0, 255, 255, 0.25);
}

/* Tabs */
.gta-vi-wiki .tabs {
  display: flex;
  gap: 0.25rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0;
}
.gta-vi-wiki .tab {
  padding: 0.75rem 1.25rem;
  font-family: var(--font-display);
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.gta-vi-wiki .tab:hover { color: var(--text-primary); }
.gta-vi-wiki .tab.active {
  color: var(--neon-pink);
  border-bottom-color: var(--neon-pink);
}

/* Grid */
.gta-vi-wiki .grid-2 { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.gta-vi-wiki .grid-3 { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }

@media (min-width: 640px) {
  .gta-vi-wiki .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .gta-vi-wiki .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .gta-vi-wiki .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

/* Scrollbar */
.gta-vi-wiki ::-webkit-scrollbar { width: 8px; }
.gta-vi-wiki ::-webkit-scrollbar-track { background: var(--bg-dark); }
.gta-vi-wiki ::-webkit-scrollbar-thumb {
  background: rgba(255, 20, 147, 0.3);
  border-radius: 4px;
}
.gta-vi-wiki ::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 20, 147, 0.5);
}

/* Input */
.gta-vi-wiki input[type="text"],
.gta-vi-wiki input[type="search"] {
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-family: var(--font-body);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.gta-vi-wiki input:focus {
  outline: none;
  border-color: var(--neon-pink);
  box-shadow: 0 0 10px rgba(255, 20, 147, 0.2);
}

/* Neon divider */
.gta-vi-wiki .neon-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--neon-pink), var(--neon-cyan), transparent);
  margin: 2rem 0;
  opacity: 0.6;
}

/* Scanline overlay */
.gta-vi-wiki .scanlines::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
  pointer-events: none;
  z-index: 9999;
}

/* Selection */
.gta-vi-wiki ::selection {
  background: rgba(255, 20, 147, 0.3);
  color: white;
}

/* Stat bars */
.gta-vi-wiki .stat-bar {
  height: 4px;
  background: var(--bg-subtle);
  border-radius: 2px;
  overflow: hidden;
}
.gta-vi-wiki .stat-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--neon-pink), var(--neon-cyan));
  border-radius: 2px;
  transition: width 0.8s ease;
}

/* Retro mode (VHS aesthetic) */
.gta-vi-wiki.retro-mode {
  filter: contrast(1.1) saturate(1.3);
}
.gta-vi-wiki.retro-mode::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 1px,
    rgba(255, 20, 147, 0.02) 1px,
    rgba(255, 20, 147, 0.02) 2px
  );
  pointer-events: none;
  z-index: 9998;
}

/* Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(255, 20, 147, 0.2); }
  50% { box-shadow: 0 0 40px rgba(255, 20, 147, 0.4); }
}

.gta-vi-wiki .animate-fade-in-up { animation: fadeInUp 0.6s ease forwards; }
.gta-vi-wiki .animate-fade-in { animation: fadeIn 0.4s ease forwards; }
.gta-vi-wiki .animate-glow-pulse { animation: glowPulse 3s ease-in-out infinite; }

/* Performance: content-visibility for off-screen cards */
.gta-vi-wiki .card,
.gta-vi-wiki section {
  content-visibility: auto;
  contain-intrinsic-size: auto 300px;
}

/* Reduce motion for accessibility + performance */
@media (prefers-reduced-motion: reduce) {
  .gta-vi-wiki,
  .gta-vi-wiki * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Optimize image rendering */
.gta-vi-wiki img {
  content-visibility: auto;
  image-rendering: auto;
}

/* Font display optimization */
.gta-vi-wiki {
  text-rendering: optimizeSpeed;
}
