/* ============================================================
   CardValue.net — Design System & Styles
   Premium dark theme with holographic accents
   ============================================================ */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Backgrounds */
  --bg-primary: #06060c;
  --bg-secondary: #0d0d16;
  --bg-tertiary: #14141f;
  --bg-elevated: #1a1a28;
  --bg-hover: #22223a;

  /* Text */
  --text-primary: #f0f0f8;
  --text-secondary: #8888aa;
  --text-tertiary: #55556e;
  --text-accent: #c0c0e0;

  /* Holographic Gradient */
  --holo-gradient: linear-gradient(135deg, #00d4ff, #7b2ff7, #ff2d95, #ffd700);
  --holo-gradient-soft: linear-gradient(135deg, rgba(0,212,255,0.15), rgba(123,47,247,0.15), rgba(255,45,149,0.15), rgba(255,215,0,0.15));
  --holo-border: linear-gradient(135deg, rgba(0,212,255,0.4), rgba(123,47,247,0.4), rgba(255,45,149,0.4), rgba(255,215,0,0.4));
  
  /* Accent Colors */
  --accent-cyan: #00d4ff;
  --accent-purple: #7b2ff7;
  --accent-pink: #ff2d95;
  --accent-gold: #ffd700;
  --accent-success: #00e676;
  --accent-danger: #ff1744;
  --accent-warning: #ffab00;

  /* TCG Brand Colors */
  --pokemon-yellow: #ffcb05;
  --pokemon-blue: #3d7dca;
  --yugioh-gold: #c9a227;
  --yugioh-dark: #1a0a2e;
  --mtg-amber: #f0a830;
  --mtg-dark: #1a1209;

  /* Glass */
  --glass-bg: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-hover: rgba(255, 255, 255, 0.08);
  
  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 30px rgba(123,47,247,0.15);
  --shadow-holo: 0 0 40px rgba(0,212,255,0.1), 0 0 80px rgba(123,47,247,0.05);

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

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

  /* 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);

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Z-index layers */
  --z-base: 0;
  --z-above: 10;
  --z-overlay: 100;
  --z-modal: 1000;
  --z-toast: 2000;
}

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

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

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: 
    radial-gradient(ellipse at 20% 0%, rgba(123,47,247,0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 0%, rgba(0,212,255,0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 100%, rgba(255,45,149,0.04) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

a {
  color: var(--accent-cyan);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover {
  color: var(--accent-purple);
}

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

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

input, select {
  font-family: inherit;
  font-size: inherit;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); }

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

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

.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }

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

.section {
  padding: var(--space-4xl) 0;
}

.hidden {
  display: none !important;
}

.view-section {
  animation: fadeIn 0.3s ease-out;
}

/* ---------- Navbar ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(6, 6, 12, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.3s ease;
  overflow: visible;
}

.navbar.scrolled {
  background: rgba(6, 6, 12, 0.95);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100px;
}

/* --- Brand Logo --- */
.navbar-brand {
  display: flex;
  align-items: center;
  align-self: flex-start;
  text-decoration: none;
  flex-shrink: 0;
  padding-top: 0;
}

.brand-icon {
  height: 320px;
  width: auto;
  object-fit: contain;
  margin-top: -20px;
  margin-left: -30px;
  transition: transform 0.3s ease, filter 0.3s ease;
  filter: drop-shadow(0 0 10px rgba(123, 47, 247, 0.3));
}

.navbar-brand:hover .brand-icon {
  transform: scale(1.08);
  filter: drop-shadow(0 0 16px rgba(0, 212, 255, 0.5)) drop-shadow(0 0 30px rgba(123, 47, 247, 0.3));
}

/* --- Nav Links --- */
.navbar-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.88rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: all 0.25s ease;
  position: relative;
}

.nav-link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.nav-link.active {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 10px;
  right: 10px;
  height: 2px;
  background: var(--holo-gradient);
  background-size: 200% 100%;
  border-radius: 2px;
  animation: holo-sweep 3s linear infinite;
}

@keyframes holo-sweep {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

/* --- Collection Badge --- */
.collection-badge {
  background: var(--accent-purple);
  color: white;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  margin-left: 4px;
  min-width: 16px;
  text-align: center;
  animation: badge-pulse 2s ease-in-out infinite;
}

@keyframes badge-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(123, 47, 247, 0.4); }
  50% { box-shadow: 0 0 0 5px rgba(123, 47, 247, 0); }
}

/* --- Mobile Toggle --- */
.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--space-sm);
  background: none;
  border: none;
  cursor: pointer;
}

.mobile-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.2s ease;
}

/* ---------- Hero Section ---------- */
.hero {
  position: relative;
  padding: 190px 0 80px;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.5;
  pointer-events: none;
  animation: glow-drift 12s ease-in-out infinite alternate;
}

.hero-glow--1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(123, 47, 247, 0.3), transparent 70%);
  top: -200px;
  left: -100px;
}

.hero-glow--2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.2), transparent 70%);
  top: -100px;
  right: -100px;
  animation-delay: -6s;
}

@keyframes glow-drift {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(30px, 20px) scale(1.1); }
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  border-radius: var(--radius-full);
  background: rgba(123, 47, 247, 0.12);
  border: 1px solid rgba(123, 47, 247, 0.25);
  color: var(--accent-purple);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: var(--space-xl);
  animation: fadeInUp 0.5s ease-out both;
}

.hero-title {
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-lg);
  animation: fadeInUp 0.6s ease-out 0.1s both;
}

.hero-desc {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto var(--space-2xl);
  line-height: 1.7;
  animation: fadeInUp 0.6s ease-out 0.2s both;
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xl);
  margin-top: var(--space-2xl);
  animation: fadeInUp 0.6s ease-out 0.4s both;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.stat-value {
  font-size: 1.3rem;
  font-weight: 800;
  font-family: var(--font-mono);
  background: var(--holo-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.stat-divider {
  width: 1px;
  height: 28px;
  background: var(--glass-border);
}

/* ---------- Search Bar ---------- */
.search-container {
  max-width: 680px;
  margin: 0 auto;
  animation: fadeInUp 0.6s ease-out 0.3s both;
}

.search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-md);
}

.search-wrapper:focus-within {
  border-color: var(--accent-purple);
  box-shadow: var(--shadow-md), 0 0 0 3px rgba(123,47,247,0.15);
}

.search-icon {
  padding: 0 0 0 var(--space-lg);
  color: var(--text-tertiary);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.search-input {
  flex: 1;
  padding: var(--space-lg);
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 1rem;
}

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

.search-btn {
  padding: 12px 28px;
  margin: 6px;
  background: var(--holo-gradient);
  color: #000;
  font-weight: 700;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  transition: all var(--transition-base);
  white-space: nowrap;
}

.search-btn:hover {
  opacity: 0.9;
  transform: scale(1.02);
}

/* TCG Selector */
.tcg-selector {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  margin-top: var(--space-md);
  flex-wrap: wrap;
}

.tcg-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--text-secondary);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  transition: all var(--transition-base);
  cursor: pointer;
}

.tcg-tab:hover {
  background: var(--glass-hover);
  color: var(--text-primary);
}

.tcg-tab.active {
  color: #000;
  border-color: transparent;
}

.tcg-tab.active[data-tcg="pokemon"] { background: var(--pokemon-yellow); }
.tcg-tab.active[data-tcg="yugioh"] { background: var(--yugioh-gold); color: #fff; }
.tcg-tab.active[data-tcg="mtg"] { background: var(--mtg-amber); }
.tcg-tab.active[data-tcg="lorcana"] { background: linear-gradient(135deg, #6b5ce7, #9b6dd7); color: #fff; }

.tcg-tab .tcg-icon { font-size: 1rem; }

/* ---------- Features Bento ---------- */
.features-section {
  padding: var(--space-3xl) 0 var(--space-4xl);
}

.section-title {
  text-align: center;
  margin-bottom: var(--space-sm);
}

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

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

.bento-card {
  padding: var(--space-xl) var(--space-lg);
  border-radius: var(--radius-lg);
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.bento-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(123,47,247,0.06) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.bento-card:hover {
  border-color: rgba(123, 47, 247, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

.bento-card:hover::before { opacity: 1; }

.bento-card--lg { grid-column: span 2; }

.bento-icon {
  font-size: 2rem;
  margin-bottom: var(--space-md);
  position: relative;
  z-index: 1;
}

.bento-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
  position: relative;
  z-index: 1;
}

.bento-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  position: relative;
  z-index: 1;
}

/* ---------- Results Section ---------- */
.results-section {
  min-height: 400px;
}

.results-search-bar {
  padding-top: 96px;
  margin-bottom: var(--space-xl);
}

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

.results-count {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

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

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-lg);
}

/* ---------- Card Component ---------- */
.card-item {
  position: relative;
  border-radius: var(--radius-lg);
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition-base);
  animation: fadeInUp 0.4s ease-out both;
}

.card-item:hover {
  transform: translateY(-6px);
  border-color: rgba(123,47,247,0.3);
  box-shadow: var(--shadow-holo);
}

.card-image-wrapper {
  position: relative;
  aspect-ratio: 2.5/3.5;
  overflow: hidden;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform var(--transition-slow);
  padding: var(--space-sm);
}

.card-item:hover .card-image-wrapper img {
  transform: scale(1.05);
}

/* Holo overlay on card images */
.card-holo-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    125deg,
    transparent 0%,
    rgba(0,212,255,0.1) 25%,
    rgba(123,47,247,0.1) 50%,
    rgba(255,45,149,0.1) 75%,
    transparent 100%
  );
  opacity: 0;
  transition: opacity var(--transition-base);
  pointer-events: none;
  mix-blend-mode: screen;
}

.card-item:hover .card-holo-overlay {
  opacity: 1;
  animation: holo-shift 3s linear infinite;
}

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

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

.card-name {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-set {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-price {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--accent-success);
}

.card-rarity {
  font-size: 0.7rem;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.card-rarity.common { border-color: #666; }
.card-rarity.uncommon { border-color: var(--accent-cyan); color: var(--accent-cyan); }
.card-rarity.rare { border-color: var(--accent-gold); color: var(--accent-gold); }
.card-rarity.mythic { border-color: var(--accent-pink); color: var(--accent-pink); }

.card-actions {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  opacity: 0;
  transform: translateX(8px);
  transition: all var(--transition-fast);
}

.card-item:hover .card-actions {
  opacity: 1;
  transform: translateX(0);
}

.card-action-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all var(--transition-fast);
  border: 1px solid rgba(255,255,255,0.1);
}

.card-action-btn:hover {
  background: var(--accent-purple);
  color: #fff;
}

.card-action-btn.in-collection {
  background: var(--accent-success);
  color: #000;
}

/* ---------- Card Detail Modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: var(--z-modal);
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  animation: fadeIn 0.2s ease-out;
}

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

.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 960px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg), var(--shadow-holo);
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-close {
  position: absolute;
  top: var(--space-lg);
  right: var(--space-lg);
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--text-secondary);
  z-index: 10;
  transition: all var(--transition-fast);
}

.modal-close:hover {
  background: var(--accent-danger);
  color: #fff;
  border-color: var(--accent-danger);
}

.modal-body {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: var(--space-xl);
  padding: var(--space-xl);
}

/* 3D Holo Card Effect */
.card-3d-container {
  perspective: 1000px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.card-3d {
  position: relative;
  width: 100%;
  max-width: 300px;
  aspect-ratio: 2.5/3.5;
  border-radius: var(--radius-md);
  overflow: hidden;
  transform-style: preserve-3d;
  transition: transform 0.1s linear;
  box-shadow: var(--shadow-lg);
}

.card-3d img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: var(--radius-md);
}

.card-3d .holo-effect {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    125deg,
    transparent 0%,
    rgba(0,212,255,0.15) 20%,
    rgba(123,47,247,0.2) 40%,
    rgba(255,45,149,0.15) 60%,
    rgba(255,215,0,0.1) 80%,
    transparent 100%
  );
  background-size: 250% 250%;
  mix-blend-mode: color-dodge;
  pointer-events: none;
  border-radius: var(--radius-md);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.card-3d:hover .holo-effect {
  opacity: 1;
}

.card-3d .shine {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(255,255,255,0.15) 0%,
    transparent 60%
  );
  pointer-events: none;
  border-radius: var(--radius-md);
}

/* Card Detail Info */
.card-detail {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.card-detail-header {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.card-detail-name {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.card-detail-set {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.card-detail-badges {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-top: var(--space-xs);
}

.badge {
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-tcg {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-accent);
}

.badge-rarity {
  background: rgba(255,215,0,0.1);
  border: 1px solid rgba(255,215,0,0.3);
  color: var(--accent-gold);
}

/* ---------- Price Panel ---------- */
.price-panel {
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
}

.price-panel-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-tertiary);
  margin-bottom: var(--space-md);
  font-weight: 600;
}

.price-main {
  display: flex;
  align-items: baseline;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.price-value {
  font-size: 2.2rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--accent-success);
}

.price-currency {
  font-size: 1rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.price-trend {
  font-size: 0.85rem;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-weight: 600;
}

.price-trend.up {
  background: rgba(0,230,118,0.1);
  color: var(--accent-success);
}

.price-trend.down {
  background: rgba(255,23,68,0.1);
  color: var(--accent-danger);
}

.price-trend.stable {
  background: var(--glass-bg);
  color: var(--text-secondary);
}

.price-breakdown {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--space-sm);
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--glass-border);
}

.price-tier {
  text-align: center;
  padding: var(--space-sm);
  border-radius: var(--radius-sm);
  background: var(--glass-bg);
}

.price-tier-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  margin-bottom: 4px;
}

.price-tier-value {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.95rem;
}

.price-source {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-md);
}

.price-source a {
  font-size: 0.8rem;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.price-source a:hover {
  background: var(--glass-hover);
  color: var(--text-primary);
}

/* ---------- Authenticity Checker ---------- */
.auth-checker {
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
}

.auth-checker-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-tertiary);
  margin-bottom: var(--space-md);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.auth-score {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-lg);
  transition: all var(--transition-base);
}

.auth-score.authentic {
  background: rgba(0,230,118,0.08);
  border: 1px solid rgba(0,230,118,0.2);
}

.auth-score.suspicious {
  background: rgba(255,171,0,0.08);
  border: 1px solid rgba(255,171,0,0.2);
}

.auth-score.fake {
  background: rgba(255,23,68,0.08);
  border: 1px solid rgba(255,23,68,0.2);
}

.auth-score-icon {
  font-size: 2rem;
}

.auth-score-text {
  font-weight: 700;
  font-size: 1.1rem;
}

.auth-score-detail {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

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

.auth-check-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  background: var(--glass-bg);
  border: 1px solid transparent;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.auth-check-item:hover {
  background: var(--glass-hover);
  border-color: var(--glass-border);
}

.auth-check-item.checked {
  border-color: rgba(0,230,118,0.3);
}

.auth-check-item.failed {
  border-color: rgba(255,23,68,0.3);
}

.auth-check-toggle {
  width: 44px;
  height: 24px;
  border-radius: var(--radius-full);
  background: var(--bg-elevated);
  position: relative;
  flex-shrink: 0;
  transition: background var(--transition-fast);
  border: 1px solid var(--glass-border);
}

.auth-check-toggle::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--text-tertiary);
  transition: all var(--transition-fast);
}

.auth-check-item.checked .auth-check-toggle {
  background: var(--accent-success);
  border-color: var(--accent-success);
}

.auth-check-item.checked .auth-check-toggle::after {
  transform: translateX(20px);
  background: #fff;
}

.auth-check-item.failed .auth-check-toggle {
  background: var(--accent-danger);
  border-color: var(--accent-danger);
}

.auth-check-item.failed .auth-check-toggle::after {
  transform: translateX(20px);
  background: #fff;
}

.auth-check-label {
  font-weight: 500;
  font-size: 0.9rem;
}

.auth-check-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* ---------- Authenticity Guide Section ---------- */
.guide-section {
  background: var(--bg-secondary);
  border-top: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
}

.guide-tabs {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
  justify-content: center;
}

.guide-tab {
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-secondary);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  cursor: pointer;
  transition: all var(--transition-base);
}

.guide-tab:hover {
  background: var(--glass-hover);
}

.guide-tab.active {
  background: var(--holo-gradient);
  color: #000;
  border-color: transparent;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-lg);
}

.guide-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: all var(--transition-base);
}

.guide-card:hover {
  border-color: rgba(123,47,247,0.3);
  box-shadow: var(--shadow-glow);
  transform: translateY(-4px);
}

.guide-card-icon {
  font-size: 2rem;
  margin-bottom: var(--space-md);
}

.guide-card h3 {
  margin-bottom: var(--space-sm);
  font-size: 1.1rem;
}

.guide-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

.guide-card .tip {
  margin-top: var(--space-md);
  padding: var(--space-md);
  border-radius: var(--radius-sm);
  background: rgba(0,212,255,0.05);
  border-left: 3px solid var(--accent-cyan);
  font-size: 0.85rem;
  color: var(--text-accent);
}

/* ---------- Collection Section ---------- */
.collection-section {
  /* Uses same container/section styling */
}

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

.collection-value {
  display: flex;
  align-items: baseline;
  gap: var(--space-sm);
}

.collection-value-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.collection-value-amount {
  font-size: 2rem;
  font-weight: 800;
  font-family: var(--font-mono);
  background: var(--holo-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all var(--transition-base);
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--holo-gradient);
  color: #000;
}

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

.btn-secondary {
  background: var(--glass-bg);
  border-color: var(--glass-border);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: var(--glass-hover);
}

.btn-danger {
  background: rgba(255,23,68,0.1);
  border-color: rgba(255,23,68,0.3);
  color: var(--accent-danger);
}

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

.collection-empty {
  text-align: center;
  padding: var(--space-4xl) var(--space-xl);
}

.collection-empty-icon {
  font-size: 4rem;
  margin-bottom: var(--space-lg);
  opacity: 0.3;
}

.collection-empty h3 {
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

.collection-empty p {
  color: var(--text-tertiary);
  font-size: 0.9rem;
}

.collection-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.stat-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  text-align: center;
}

.stat-card-value {
  font-size: 1.5rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--text-primary);
}

.stat-card-label {
  font-size: 0.78rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 4px;
}

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

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

.footer-col h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-tertiary);
  margin-bottom: var(--space-md);
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: var(--space-sm);
}

.footer-col ul li a {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-col ul li a:hover {
  color: var(--text-primary);
}

.footer-disclaimer,
.footer-bottom {
  padding-top: var(--space-lg);
  border-top: 1px solid var(--glass-border);
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-tertiary);
  line-height: 1.7;
}

/* ---------- Loading & States ---------- */
.skeleton {
  background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-elevated) 50%, var(--bg-tertiary) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: var(--radius-sm);
}

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

.skeleton-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.skeleton-image {
  aspect-ratio: 2.5/3.5;
}

.skeleton-text {
  height: 16px;
  margin: var(--space-md);
}

.skeleton-text.short {
  width: 60%;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--glass-border);
  border-top-color: var(--accent-purple);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.loading-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-4xl);
  gap: var(--space-lg);
  color: var(--text-secondary);
}

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

.toast {
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  font-size: 0.9rem;
  animation: toastSlideIn 0.3s ease-out;
  min-width: 280px;
  backdrop-filter: blur(20px);
}

@keyframes toastSlideIn {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

.toast.success { border-color: rgba(0,230,118,0.3); }
.toast.error { border-color: rgba(255,23,68,0.3); }

.toast-icon { font-size: 1.2rem; }

/* ---------- Animations ---------- */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Staggered animation delays for grid items */
.card-item:nth-child(1) { animation-delay: 0ms; }
.card-item:nth-child(2) { animation-delay: 50ms; }
.card-item:nth-child(3) { animation-delay: 100ms; }
.card-item:nth-child(4) { animation-delay: 150ms; }
.card-item:nth-child(5) { animation-delay: 200ms; }
.card-item:nth-child(6) { animation-delay: 250ms; }
.card-item:nth-child(7) { animation-delay: 300ms; }
.card-item:nth-child(8) { animation-delay: 350ms; }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .navbar-links {
    display: none;
    position: absolute;
    top: 100px;
    left: 0;
    right: 0;
    background: rgba(6, 6, 12, 0.98);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    flex-direction: column;
    padding: var(--space-md);
  }

  .navbar-links.open {
    display: flex;
  }

  .mobile-toggle {
    display: flex;
  }

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

  .stat-divider {
    width: 40px;
    height: 1px;
  }

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

  .bento-card--lg {
    grid-column: span 1;
  }

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

  .card-3d-container {
    justify-content: center;
  }

  .price-breakdown {
    grid-template-columns: 1fr;
  }

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

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

  .collection-header {
    flex-direction: column;
    text-align: center;
  }

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

  .guide-tabs {
    flex-wrap: wrap;
  }
}

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

  .search-btn {
    padding: 10px 16px;
    font-size: 0.85rem;
  }

  .results-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-sm);
  }

  .card-info {
    padding: var(--space-sm);
  }

  .card-name {
    font-size: 0.85rem;
  }
}

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

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

::-webkit-scrollbar-thumb {
  background: var(--bg-elevated);
  border-radius: 4px;
}

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

/* ---------- Selection ---------- */
::selection {
  background: rgba(123,47,247,0.3);
  color: var(--text-primary);
}
