/* =========================================================
   Binder Builders - Modern Pokémon TCG Theme Design System
   ========================================================= */

:root {
  /* Colors */
  --bg-dark: #090d16;
  --bg-surface: #111827;
  --bg-card: #182235;
  --bg-card-hover: #223048;
  --bg-glass: rgba(17, 24, 39, 0.85);

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-card: rgba(255, 255, 255, 0.12);
  --border-hover: rgba(56, 189, 248, 0.45);
  --border-glow: #38bdf8;

  --electric-blue: #38bdf8;
  --primary-blue: #2563eb;
  --primary-hover: #1d4ed8;
  --poke-gold: #fbbf24;
  --poke-gold-glow: rgba(251, 191, 36, 0.35);
  --poke-red: #ef4444;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-dim: #64748b;
  --success: #10b981;

  /* Typography */
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Shadows */
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.35);
  --shadow-hover: 0 14px 32px rgba(0, 0, 0, 0.55), 0 0 20px rgba(56, 189, 248, 0.2);
  --shadow-glow: 0 0 25px rgba(251, 191, 36, 0.25);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  background-image: 
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(37, 99, 235, 0.18), transparent),
    radial-gradient(circle at 90% 20%, rgba(245, 158, 11, 0.08), transparent 40%),
    radial-gradient(circle at 10% 80%, rgba(56, 189, 248, 0.06), transparent 40%);
  background-attachment: fixed;
  min-height: 100vh;
}

.container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 20px;
}

/* -------------------------------------------------------------
   Top Announcement Bar
   ------------------------------------------------------------- */
.announcement-bar {
  background: linear-gradient(90deg, #1e3a8a, #2563eb, #0284c7, #1e3a8a);
  background-size: 300% 100%;
  animation: announcementGradient 12s ease infinite;
  color: #fff;
  padding: 9px 15px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
  position: relative;
  z-index: 102;
}

@keyframes announcementGradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.announcement-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  text-align: center;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: #fde047;
  border-radius: 50%;
  box-shadow: 0 0 8px #fde047;
  animation: pulseDot 1.8s infinite;
  flex-shrink: 0;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

/* -------------------------------------------------------------
   Header
   ------------------------------------------------------------- */
.header {
  background: var(--bg-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  transition: padding 0.2s ease, background 0.2s ease;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo-wrap {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.25) 0%, rgba(15, 23, 42, 0.8) 100%);
  border: 1.5px solid rgba(56, 189, 248, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.25);
  flex-shrink: 0;
}

.header-pokeball {
  width: 32px;
  height: 32px;
  animation: slowFloat 4s ease-in-out infinite alternate;
}

@keyframes slowFloat {
  0% { transform: translateY(-1px) rotate(-3deg); }
  100% { transform: translateY(2px) rotate(3deg); }
}

.brand-topline {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.brand-badge {
  background: linear-gradient(135deg, #fbbf24, #d97706);
  color: #090d16;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.8px;
}

.brand-live-badge {
  color: #34d399;
  font-size: 0.72rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
}

.live-dot {
  width: 6px;
  height: 6px;
  background-color: #10b981;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 6px #10b981;
}

.brand-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #fff;
  line-height: 1.1;
  background: linear-gradient(180deg, #ffffff 30%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-sub {
  color: var(--text-secondary);
  font-size: 0.82rem;
  margin-top: 2px;
}

/* Header Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  font-family: inherit;
}

.btn-ebay {
  background: linear-gradient(135deg, #0064d2, #0053b3);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 14px rgba(0, 100, 210, 0.35);
}

.btn-ebay:hover {
  background: linear-gradient(135deg, #0070ea, #0064d2);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 100, 210, 0.5);
}

/* -------------------------------------------------------------
   Hero Showcase Deck
   ------------------------------------------------------------- */
.hero-showcase {
  padding: 24px 0 16px 0;
}

.hero-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.6) 0%, rgba(15, 23, 42, 0.8) 100%);
  border: 1px solid var(--border-card);
  border-radius: 20px;
  padding: 28px 32px;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.hero-card::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero-tag {
  color: var(--poke-gold);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  margin-bottom: 6px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 10px;
}

.hero-desc {
  color: var(--text-secondary);
  font-size: 0.96rem;
  max-width: 820px;
  margin-bottom: 20px;
  line-height: 1.6;
}

.hero-perks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.perk-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.07);
  padding: 10px 14px;
  border-radius: 12px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.perk-chip:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.3);
}

.perk-icon {
  font-size: 1.4rem;
  line-height: 1;
}

.perk-info strong {
  display: block;
  font-size: 0.92rem;
  color: #fff;
}

.perk-info span {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

/* -------------------------------------------------------------
   Theme Hub Section (Themed Collections Deck)
   ------------------------------------------------------------- */
.theme-hub-section {
  padding: 20px 0 10px 0;
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 8px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-subtitle {
  color: var(--text-dim);
  font-size: 0.85rem;
}

.theme-deck-scroller {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 6px 2px 14px 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
  -webkit-overflow-scrolling: touch;
}

.theme-deck-scroller::-webkit-scrollbar {
  height: 6px;
}

.theme-deck-scroller::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 6px;
}

/* Theme Card Buttons */
.theme-card-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: 14px;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.theme-card-btn:hover {
  background: var(--bg-card-hover);
  color: #fff;
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

.theme-card-btn.active {
  background: linear-gradient(135deg, var(--theme-color-1, #0284c7), var(--theme-color-2, #0369a1));
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), 0 0 15px var(--theme-glow, rgba(56, 189, 248, 0.4));
  transform: translateY(-2px);
}

.theme-card-icon {
  font-size: 1.15rem;
  line-height: 1;
}

.theme-card-name {
  font-weight: 700;
}

.theme-card-count {
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.3);
  padding: 2px 7px;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* -------------------------------------------------------------
   Controls Toolbar (Search, Sort, View Toggles)
   ------------------------------------------------------------- */
.controls-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 16px 0;
  flex-wrap: wrap;
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 260px;
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  padding: 13px 44px 13px 48px;
  border-radius: 12px;
  border: 1px solid var(--border-card);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 0.94rem;
  font-family: inherit;
  outline: none;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.search-box input:focus {
  border-color: var(--border-glow);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25), 0 4px 14px rgba(0, 0, 0, 0.3);
  background: var(--bg-card);
}

.clear-btn {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--text-secondary);
  font-size: 1.2rem;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.clear-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Sort Select */
.sort-select-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  padding: 4px 12px 4px 14px;
  border-radius: 12px;
}

.sort-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.sort-select {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: inherit;
  outline: none;
  cursor: pointer;
  padding: 8px 0;
}

.sort-select option {
  background: var(--bg-surface);
  color: #fff;
}

/* View Mode Toggle */
.view-mode-toggle {
  display: flex;
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  padding: 4px;
  border-radius: 12px;
  gap: 4px;
}

.view-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.view-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.view-btn.active {
  background: var(--primary-blue);
  color: #fff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

/* -------------------------------------------------------------
   Results Status Bar
   ------------------------------------------------------------- */
.results-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 10px 0 16px 0;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 22px;
}

.results-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

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

.active-filter-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 700;
}

.badge-remove {
  background: none;
  border: none;
  color: #38bdf8;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
}

.badge-remove:hover {
  color: #fff;
}

.condition-tag {
  color: var(--poke-gold);
  font-size: 0.82rem;
  font-weight: 700;
}

/* -------------------------------------------------------------
   Cards Display - Grid View (Sleeves)
   ------------------------------------------------------------- */
.cards-display-container.view-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 22px;
  padding-bottom: 30px;
}

.card-item {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.28s ease, border-color 0.28s ease;
  cursor: pointer;
  position: relative;
  content-visibility: auto;
  contain-intrinsic-size: 0 420px;
}

.card-item:hover {
  transform: translateY(-6px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-hover);
}

/* Card Image Sleeve & Flip */
.card-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 2.5 / 3.5;
  background: #090d16;
  overflow: hidden;
}

.card-img-wrap img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 0.3s ease, transform 0.4s ease;
  background: #0b101c;
}

.img-front {
  opacity: 1;
  z-index: 2;
}

.img-back {
  opacity: 0;
  z-index: 1;
}

.card-item.flipped .img-front {
  opacity: 0;
}

.card-item.flipped .img-back {
  opacity: 1;
}

/* Holographic Sheen Effect on Card */
.card-sheen {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    115deg,
    transparent 20%,
    rgba(255, 255, 255, 0.12) 35%,
    rgba(56, 189, 248, 0.22) 42%,
    rgba(251, 191, 36, 0.18) 48%,
    transparent 60%
  );
  opacity: 0;
  z-index: 3;
  pointer-events: none;
  mix-blend-mode: color-dodge;
  transition: opacity 0.3s ease;
}

.card-item:hover .card-sheen {
  opacity: 1;
  animation: holoSheen 1.2s ease forwards;
}

@keyframes holoSheen {
  0% { transform: translateY(-30%) translateX(-30%); }
  100% { transform: translateY(30%) translateX(30%); }
}

/* Flip Trigger Badge */
.flip-hint {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(9, 13, 22, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  z-index: 4;
  backdrop-filter: blur(6px);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 4px;
}

.card-item:hover .flip-hint {
  background: rgba(37, 99, 235, 0.88);
  border-color: #60a5fa;
}

/* Card Details */
.card-details {
  padding: 14px 16px 16px 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
}

.card-theme-tag {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--electric-blue);
  margin-bottom: 4px;
}

.card-name {
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}

.card-set-info {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
}

.price-box {
  display: flex;
  flex-direction: column;
}

.card-price {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
}

.price-sub-calc {
  font-size: 0.72rem;
  color: var(--poke-gold);
  font-weight: 700;
}

.btn-card-buy {
  background: linear-gradient(135deg, #0064d2, #0053b3);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.btn-card-buy:hover {
  background: linear-gradient(135deg, #0070ea, #0064d2);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 100, 210, 0.4);
}

/* -------------------------------------------------------------
   Cards Display - Compact List View
   ------------------------------------------------------------- */
.cards-display-container.view-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 30px;
}

.cards-display-container.view-list .card-item {
  flex-direction: row;
  align-items: center;
  border-radius: 12px;
  contain-intrinsic-size: 0 90px;
}

.cards-display-container.view-list .card-img-wrap {
  width: 68px;
  height: 90px;
  aspect-ratio: auto;
  flex-shrink: 0;
}

.cards-display-container.view-list .flip-hint,
.cards-display-container.view-list .card-sheen {
  display: none;
}

.cards-display-container.view-list .card-details {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  gap: 16px;
  flex-wrap: wrap;
}

.cards-display-container.view-list .card-col-info {
  min-width: 160px;
  flex: 1;
}

.cards-display-container.view-list .card-footer {
  border-top: none;
  padding-top: 0;
}

/* -------------------------------------------------------------
   Progressive Load More Button
   ------------------------------------------------------------- */
.load-more-wrap {
  display: flex;
  justify-content: center;
  padding: 20px 0 40px 0;
}

.btn-load-more {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  color: #fff;
  padding: 14px 36px;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.btn-load-more:hover {
  background: var(--bg-card-hover);
  border-color: var(--electric-blue);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.45);
}

.load-more-sub {
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* -------------------------------------------------------------
   No Results State
   ------------------------------------------------------------- */
.no-results {
  text-align: center;
  padding: 60px 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: 20px;
  margin: 30px 0 60px 0;
}

.no-results-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.no-results h3 {
  font-size: 1.4rem;
  color: #fff;
  margin-bottom: 6px;
}

.no-results p {
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.btn-reset {
  background: var(--primary-blue);
  color: #fff;
}

/* -------------------------------------------------------------
   Modal Inspector & Binder Navigation
   ------------------------------------------------------------- */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  padding: 16px;
}

.modal.active {
  opacity: 1;
  visibility: visible;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(5, 8, 15, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.modal-content {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: 24px;
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  z-index: 2;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 30px rgba(56, 189, 248, 0.15);
  transform: scale(0.95);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal.active .modal-content {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: background 0.2s ease;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Modal Nav Arrows (Prev/Next) */
.modal-nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(17, 24, 39, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  transition: all 0.2s ease;
  backdrop-filter: blur(6px);
}

.modal-nav-prev {
  left: 12px;
}

.modal-nav-next {
  right: 12px;
}

.modal-nav-arrow:hover {
  background: var(--primary-blue);
  border-color: #60a5fa;
  transform: translateY(-50%) scale(1.08);
}

.modal-body {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 28px;
  padding: 32px;
}

.modal-images {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.modal-view-toggle {
  display: flex;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
  width: 100%;
}

.toggle-btn {
  flex: 1;
  padding: 8px 12px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.toggle-btn.active {
  background: var(--primary-blue);
  color: #fff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

.modal-img-container {
  width: 100%;
  max-width: 340px;
  aspect-ratio: 2.5 / 3.5;
  background: #090d16;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border-card);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.modal-flip-hint {
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* Modal Info Panel */
.modal-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.modal-theme-tag-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.modal-theme {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--electric-blue);
}

.modal-index-counter {
  font-size: 0.78rem;
  color: var(--text-dim);
  font-weight: 600;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 4px;
}

.modal-meta {
  color: var(--text-secondary);
  font-size: 0.94rem;
  margin-bottom: 16px;
}

.modal-condition-box {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-card);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 18px;
}

.condition-badge {
  color: var(--poke-gold);
  font-size: 0.85rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.condition-note {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.modal-pricing {
  margin-bottom: 22px;
}

.price-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
}

.price-label {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.price-val {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
}

.deal-box {
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 12px;
  padding: 12px 16px;
}

.deal-header {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--electric-blue);
  margin-bottom: 6px;
}

.deal-tiers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  text-align: center;
}

.deal-tier {
  background: rgba(15, 23, 42, 0.5);
  padding: 6px;
  border-radius: 8px;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.deal-tier strong {
  display: block;
  font-size: 0.88rem;
  color: #fff;
}

.deal-tier.highlight {
  border: 1px solid rgba(251, 191, 36, 0.4);
  background: rgba(251, 191, 36, 0.1);
}

.deal-tier.highlight strong {
  color: var(--poke-gold);
}

.btn-buy-ebay {
  background: linear-gradient(135deg, #0064d2, #0053b3);
  color: #fff;
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 1.05rem;
  font-weight: 800;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0, 100, 210, 0.4);
  margin-bottom: 12px;
}

.btn-buy-ebay:hover {
  background: linear-gradient(135deg, #0070ea, #0064d2);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 100, 210, 0.6);
}

.modal-footer-nav {
  display: flex;
  gap: 10px;
}

.modal-btn-step {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.modal-btn-step:hover {
  background: var(--bg-card-hover);
  color: #fff;
}

/* -------------------------------------------------------------
   Mobile Thumb Floating Bar
   ------------------------------------------------------------- */
.mobile-thumb-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--border-card);
  padding: 8px 16px calc(8px + env(safe-area-inset-bottom, 0px)) 16px;
  z-index: 99;
  justify-content: space-around;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
}

.thumb-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
}

.thumb-icon {
  font-size: 1.2rem;
  line-height: 1;
}

.thumb-btn:hover,
.thumb-btn:focus {
  color: #fff;
}

.thumb-ebay {
  color: #38bdf8;
}

/* -------------------------------------------------------------
   Footer
   ------------------------------------------------------------- */
.footer {
  background: #050811;
  border-top: 1px solid var(--border-subtle);
  padding: 40px 0 60px 0;
  color: var(--text-dim);
  font-size: 0.85rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: center;
  align-items: center;
}

.footer-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.5px;
}

.footer-sub {
  color: var(--text-secondary);
  font-size: 0.84rem;
}

.disclaimer {
  max-width: 700px;
  line-height: 1.6;
}

.footer-copy {
  font-size: 0.78rem;
}

/* -------------------------------------------------------------
   Responsive Breakpoints
   ------------------------------------------------------------- */
@media (max-width: 900px) {
  .modal-body {
    grid-template-columns: 1fr;
    padding: 24px;
  }
  
  .modal-img-container {
    max-width: 260px;
  }
  
  .modal-nav-arrow {
    display: none;
  }
}

@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .header-actions {
    width: 100%;
  }
  
  .btn-ebay {
    width: 100%;
  }

  .hero-card {
    padding: 20px;
  }

  .hero-title {
    font-size: 1.5rem;
  }

  .mobile-thumb-bar {
    display: flex;
  }

  body {
    padding-bottom: 60px;
  }

  .cards-display-container.view-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
  }

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

  .card-price {
    font-size: 1.1rem;
  }

  .btn-card-buy {
    padding: 6px 10px;
    font-size: 0.75rem;
  }
}

/* =========================================================
   Analytics Navigation Bar
   ========================================================= */

.analytics-nav {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 90;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.analytics-nav .nav-tabs {
  display: flex;
  gap: 4px;
  padding: 8px 0;
  justify-content: center;
}

.analytics-nav .nav-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  border-radius: 10px;
  color: var(--text-secondary);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.analytics-nav .nav-tab:hover {
  color: var(--text-primary);
  background: var(--bg-card);
}

.analytics-nav .nav-tab.active {
  color: var(--text-primary);
  background: var(--bg-card);
  border-color: var(--border-hover);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.12);
}

.analytics-nav .nav-icon {
  font-size: 1rem;
}

@media (max-width: 480px) {
  .analytics-nav .nav-tab {
    padding: 7px 14px;
    font-size: 0.8rem;
    gap: 4px;
  }
}
