/* ==========================================================================
   prizmcards.com — Neon Vault (D1+D3 hybrid) — 2026
   Palette: #0B0D17 base, Space Grotesk + Inter, controlled glow, WCAG AA
   Variable isimleri eski kodla geriye uyumlu — sadece değerler güncellendi.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700;800&family=Inter:wght@400;500;600;700&family=Fraunces:opsz,wght,SOFT@9..144,500;9..144,600;9..144,700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* Backgrounds — daha nötr, hafif mor underton kaldırıldı */
  --bg-base:        #0B0D17;
  --bg-elevated:    #141826;
  --bg-card:        #1C2238;
  --bg-deep:        #07090F;
  --bg-very-deep:   #04050B;

  /* Borders */
  --border:         rgba(255,255,255,0.08);
  --border-strong:  rgba(255,255,255,0.14);

  /* Brand — cyan-mavi olgunlaştı, eski mega-kırmızı kaldırıldı.
     --accent eski Mega turuncu-kırmızı → cyan-mavi
     --gold eski sarı → amber (holo foil çağrışımı, nadir CTA)            */
  --accent:         #3B82F6;
  --accent-deep:    #2563EB;
  --accent-glow:    rgba(59,130,246,0.25);
  --gold:           #F59E0B;
  --gold-deep:      #D97706;

  /* Text — WCAG AA garantili sabit hex (rgba opacity kaldırıldı) */
  --text:           #F3F4F6;
  --text-muted:     #9CA3AF;
  --text-subtle:    #6B7280;
  --text-faint:     #4B5563;

  /* Status */
  --success:        #10B981;
  --danger:         #EF4444;
  --warning:        #FBBF24;

  /* Rarity */
  --rarity-L:   #F59E0B;
  --rarity-SP:  #EF4423;
  --rarity-SR:  #A855F7;
  --rarity-R:   #3B82F6;
  --rarity-U:   #10B981;
  --rarity-C:   #64748B;
  --rarity-PR:  #00E5FF;

  /* Shadows */
  --shadow-card-hover: 0 20px 50px rgba(0,0,0,.6);
  --shadow-modal:      0 40px 80px rgba(0,0,0,.8);
  --shadow-fab:        0 5px 16px rgba(59,130,246,.32);

  /* Editorial accent (D3 Foil & Folio için, "Bu Haftanın Kartı" bölümünde kullanılır) */
  --editorial-bg:   #F5F1EA;
  --editorial-fg:   #1A1A1A;
  --editorial-gold: #B8935A;
  --editorial-serif: 'Fraunces', Georgia, serif;

  /* Touch target minimum (Apple HIG + WCAG) */
  --touch-min:      44px;

  /* Easing */
  --ease:     cubic-bezier(0.2, 0.8, 0.3, 1);
  --ease-out: cubic-bezier(0.2, 0.9, 0.3, 1);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html {
  background: var(--bg-base);
  overscroll-behavior: none;       /* pull-to-refresh "beyaz alan" engelle */
  -webkit-text-size-adjust: 100%;
}
html, body {
  height: 100%; min-height: 100vh;
  min-height: 100dvh; /* dynamic viewport — address bar değişimine duyarlı */
  background: var(--bg-base);
  color: var(--text);
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px; line-height: 1.5;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
html { scrollbar-gutter: stable; }

::-webkit-scrollbar { width: 3px; height: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }
::selection { background: rgba(239,68,35,0.35); color: #fff; }

button { -webkit-appearance: none; font-family: inherit; cursor: pointer; transition: opacity 0.15s, transform 0.2s, box-shadow 0.2s; }
button:active { transform: scale(0.96); }
input, textarea, select { font-family: inherit; outline: none; }
input::placeholder, textarea::placeholder { color: rgba(255,255,255,0.2); }
input:focus, textarea:focus { border-color: rgba(239,68,35,0.5) !important; }
a { text-decoration: none; color: inherit; }

/* ===== TYPOGRAPHY ===== */
h1, h2, h3 { font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; color: var(--text); }
h1 { font-size: 30px; letter-spacing: -0.035em; }
h2 { font-size: 24px; }
h3 { font-size: 20px; }

.title-gradient {
  background: linear-gradient(135deg, var(--accent) 0%, var(--gold) 55%, var(--text) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.label-tiny {
  font-size: 10px; font-weight: 600;
  color: rgba(255,255,255,0.22);
  text-transform: uppercase; letter-spacing: 0.1em;
}

.mono { font-family: 'JetBrains Mono', monospace; letter-spacing: 0.05em; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 18px;
  border: none; border-radius: 13px;
  font-size: 14px; font-weight: 700; font-family: inherit;
  cursor: pointer; text-decoration: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #fff;
  box-shadow: 0 4px 12px rgba(239,68,35,0.3), inset 0 1px 0 rgba(255,255,255,0.15);
}
.btn-secondary {
  background: rgba(255,255,255,0.05); color: var(--text);
  border: 1px solid var(--border-strong);
}
.btn:active { transform: scale(0.96); }

/* ===== FORM INPUTS ===== */
.input, input[type="text"], input[type="search"], select {
  width: 100%; padding: 11px 12px;
  background: rgba(255,255,255,0.05);
  border: 1.5px solid var(--border);
  border-radius: 11px;
  color: var(--text); font-size: 14px;
}

/* Select dropdown — option içeriklerinin görünür olması için */
select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4 L6 8 L10 4' stroke='%23eef4ff' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
}
select option {
  background: var(--bg-elevated);
  color: var(--text);
  padding: 8px 10px;
}
.input-search {
  position: relative;
}
.input-search input {
  padding-left: 36px;
}
.input-search-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: rgba(255,255,255,0.2); pointer-events: none;
}

/* ===== SCAN FAB ===== */
.scan-fab {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  border: none; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-fab);
  color: #fff;
}

/* ===== HOME SCREEN ===== */
.home-app { min-height: 100vh; padding-bottom: calc(90px + env(safe-area-inset-bottom)); }

.home-header {
  padding: max(20px, env(safe-area-inset-top)) 20px 0;
}
.home-header-row {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 22px;
}
.home-header-row h1 { font-size: 30px; line-height: 1; }
.home-header-row .label-tiny { margin-top: 5px; }

/* Collection stats strip */
.stats-strip {
  display: flex;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 24px;
}
.stat-col {
  flex: 1; padding: 12px 0;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  border-right: 1px solid rgba(255,255,255,0.04);
}
.stat-col:last-child { border-right: none; }
.stat-value { font-size: 18px; font-weight: 800; line-height: 1; }
.stat-value.total { color: rgba(255,255,255,0.85); }
.stat-value.owned { color: var(--success); }
.stat-value.pct   { color: var(--accent); }
.stat-label-text  {
  font-size: 8px; font-weight: 600;
  color: rgba(255,255,255,0.3);
  text-transform: uppercase; letter-spacing: 0.1em;
}

.section-label {
  font-size: 10px; font-weight: 700;
  color: rgba(255,255,255,0.2);
  text-transform: uppercase; letter-spacing: 0.1em;
  margin-bottom: 14px;
}

.home-main { padding: 0 20px; }

/* Binder grid */
.binder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 18px;
}

/* Binder tile */
.binder-tile {
  border-radius: 18px;
  border: 1.5px solid var(--border);
  background: linear-gradient(155deg, rgba(239,68,35,0.09) 0%, rgba(255,255,255,0.025) 100%);
  overflow: hidden;
  cursor: pointer;
  color: var(--text); text-align: left; font-family: inherit;
  transform: translateY(0) scale(1);
  transition: transform 0.3s var(--ease-out), border-color 0.3s, box-shadow 0.3s;
  box-shadow: 0 4px 16px rgba(0,0,0,0.35);
  animation: tileIn 0.5s var(--ease-out) both;
}
.binder-tile:hover {
  transform: translateY(-5px) scale(1.02);
  border-color: rgba(239,68,35,0.35);
  box-shadow: var(--shadow-card-hover), 0 0 30px rgba(239,68,35,0.15);
}
@keyframes tileIn {
  from { opacity: 0; transform: translateY(28px) scale(0.94); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.tile-cover {
  height: 210px; position: relative; overflow: hidden;
  background: linear-gradient(175deg, rgba(239,68,35,0.1), var(--bg-base));
}
.tile-cover-image {
  position: absolute; inset: 0;
  overflow: hidden;
  background: var(--bg-deep);
}
.tile-cover-image img {
  width: 100%; height: 100%;
  object-fit: contain;
  object-position: center;
  transition: transform 0.4s var(--ease-out);
  display: block;
  filter: drop-shadow(0 8px 20px rgba(0,0,0,0.5));
  padding: 8px;
}
.binder-tile:hover .tile-cover-image img {
  transform: scale(1.05);
}
.tile-cover-accent {
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
}
.tile-cover-fade {
  position: absolute; bottom: 0; left: 0; right: 0; height: 50px;
  background: linear-gradient(transparent, var(--bg-base));
  pointer-events: none;
}

/* Card fan */
.card-fan {
  position: absolute; inset: 12px 8px 0;
  display: flex; align-items: center; justify-content: center;
}
.card-fan-glow {
  position: absolute; bottom: -10%; left: 50%; transform: translateX(-50%);
  width: 80%; height: 30px; border-radius: 50%;
  background: radial-gradient(ellipse, rgba(239,68,35,0.3), transparent 70%);
  filter: blur(12px);
  opacity: 0; transition: opacity 0.3s;
}
.binder-tile:hover .card-fan-glow { opacity: 1; }

.fan-card {
  position: absolute;
  width: 38px; height: 54px;
  border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  transform-origin: bottom center;
  transition: transform 0.35s var(--ease-out);
  background-size: cover; background-position: center;
  overflow: hidden;
}
.fan-card.center { width: 42px; height: 59px; z-index: 3; }
.fan-card.owned {
  border: 1px solid rgba(239,68,35,0.4);
  box-shadow: 0 4px 14px rgba(239,68,35,0.2), 0 2px 4px rgba(0,0,0,0.5);
}
.fan-card:not(.owned) {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  filter: grayscale(1) brightness(0.5);
}
.fan-card img { width: 100%; height: 100%; object-fit: cover; }

/* Ring progress */
.tile-ring {
  position: absolute; top: 10px; right: 10px;
  width: 36px; height: 36px;
}
.tile-ring svg { transform: rotate(-90deg); }
.tile-ring-text {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 8px; font-weight: 800; color: var(--accent);
}

.tile-body { padding: 12px 14px 14px; }
.tile-name { font-weight: 800; font-size: 14px; line-height: 1.2; margin-bottom: 2px; }
.tile-code {
  font-size: 9px; font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}
.tile-bar {
  height: 2px; background: rgba(255,255,255,0.07);
  border-radius: 1px; overflow: hidden; margin-bottom: 8px;
}
.tile-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), rgba(239,68,35,0.5));
  transition: width 0.6s ease;
}
.tile-stats {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 10px;
}
.tile-count { color: rgba(255,255,255,0.3); }
.tile-count strong { color: rgba(255,255,255,0.6); font-weight: 600; }
.rarity-dots { display: flex; gap: 3px; }
.rarity-dot {
  width: 6px; height: 6px; border-radius: 50%;
}
.rarity-dot.L  { background: var(--rarity-L);  box-shadow: 0 0 4px rgba(253,186,65,0.5); }
.rarity-dot.SP { background: var(--rarity-SP); box-shadow: 0 0 4px rgba(239,68,35,0.5); }
.rarity-dot.SR { background: var(--rarity-SR); box-shadow: 0 0 4px rgba(168,85,247,0.5); }
.rarity-dot.R  { background: var(--rarity-R);  box-shadow: 0 0 4px rgba(59,130,246,0.5); }
.rarity-dot.U  { background: var(--rarity-U);  box-shadow: 0 0 4px rgba(34,197,94,0.5); }
.rarity-dot.C  { background: var(--rarity-C); }
.rarity-dot.PR { background: var(--rarity-PR); box-shadow: 0 0 4px rgba(0,229,255,0.5); }

.empty-state {
  display: flex; flex-direction: column; align-items: center;
  padding: 80px 20px; text-align: center;
}
.empty-icon { font-size: 60px; opacity: 0.2; margin-bottom: 16px; }
.empty-state h2 { margin-bottom: 8px; }
.empty-state p { color: var(--text-muted); margin-bottom: 24px; max-width: 320px; font-size: 13px; }

/* ===== BOTTOM NAV ===== */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(5, 10, 22, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid rgba(255,255,255,0.07);
  display: flex;
  padding: 8px 0 max(8px, env(safe-area-inset-bottom));
  /* iOS Safari address-bar değişimlerine karşı sabitler */
  transform: translate3d(0, 0, 0);
  -webkit-transform: translate3d(0, 0, 0);
  will-change: transform;
}
.nav-tab {
  flex: 1; background: transparent; border: none;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px 0;
  color: rgba(255,255,255,0.25);
  text-decoration: none; cursor: pointer;
  position: relative;
  transition: color 0.18s;
  font-family: inherit;
}
.nav-tab span {
  font-size: 9px; font-weight: 500; letter-spacing: 0.04em;
}
.nav-tab.active { color: var(--accent); }
.nav-tab.active span { font-weight: 700; }
.nav-tab.active::after {
  content: ''; position: absolute; bottom: -2px;
  width: 18px; height: 2px;
  background: var(--accent); border-radius: 2px;
}

/* ===== CATALOG SCREEN ===== */
.catalog-app { min-height: 100vh; padding-bottom: calc(90px + env(safe-area-inset-bottom)); }
.catalog-header {
  padding: max(20px, env(safe-area-inset-top)) 20px 0;
  margin-bottom: 20px;
}
.catalog-header h2 { margin-bottom: 4px; }
.catalog-header p {
  font-size: 11px; color: rgba(255,255,255,0.2);
}

.catalog-main { padding: 0 20px; }
.catalog-search { margin-bottom: 12px; }

/* Rarity filter chips */
.rarity-filter {
  display: flex; gap: 5px; flex-wrap: wrap;
  margin-bottom: 20px;
}
.rarity-chip {
  padding: 5px 13px; border-radius: 20px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.3);
  font-size: 10px; font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.15s;
}
.rarity-chip.active.all  { background: rgba(255,255,255,0.4); color: #fff; border-color: rgba(255,255,255,0.4); }
.rarity-chip.active.L    { background: var(--rarity-L); color: #fff; border-color: var(--rarity-L); box-shadow: 0 2px 10px rgba(253,186,65,0.4); }
.rarity-chip.active.SP   { background: var(--rarity-SP); color: #fff; border-color: var(--rarity-SP); box-shadow: 0 2px 10px rgba(239,68,35,0.4); }
.rarity-chip.active.SR   { background: var(--rarity-SR); color: #fff; border-color: var(--rarity-SR); box-shadow: 0 2px 10px rgba(168,85,247,0.4); }
.rarity-chip.active.R    { background: var(--rarity-R); color: #fff; border-color: var(--rarity-R); box-shadow: 0 2px 10px rgba(59,130,246,0.4); }
.rarity-chip.active.U    { background: var(--rarity-U); color: #fff; border-color: var(--rarity-U); }
.rarity-chip.active.C    { background: var(--rarity-C); color: #fff; border-color: var(--rarity-C); }
.rarity-chip.active.PR   { background: var(--rarity-PR); color: #fff; border-color: var(--rarity-PR); }

/* Toggles */
.toggle-row {
  display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 20px;
  font-size: 12px;
}
.toggle {
  display: flex; align-items: center; gap: 6px;
  cursor: pointer; user-select: none;
  color: rgba(255,255,255,0.5);
}
.toggle input[type=checkbox] { accent-color: var(--accent); width: 14px; height: 14px; }
.toggle:has(input:checked) { color: var(--text); }

/* Card grid (catalog) */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}

/* ===== HOLOCARD (Card Tile) ===== */
.holo-card {
  position: relative;
  aspect-ratio: 2/3;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  user-select: none;
  background: linear-gradient(135deg, #0a1428 0%, #060916 100%);
  border: 1.5px solid rgba(255,255,255,0.06);
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s ease, filter 0.3s, opacity 0.3s;
}

.holo-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 28px rgba(0,0,0,0.5);
  z-index: 2;
}

/* Binder modunda: owned olmayan kartlar gri ve solgun */
.holo-card.unowned {
  opacity: 0.55;
  filter: grayscale(0.85) brightness(0.7);
}
.holo-card.unowned:hover {
  opacity: 1;
  filter: grayscale(0) brightness(1);
}

/* Owned olanlar rarity rengiyle vurgulu */
.holo-card.owned[data-rarity="L"]  { border-color: var(--rarity-L);  background: linear-gradient(135deg, rgba(253,186,65,0.1), #080f22 60%); }
.holo-card.owned[data-rarity="SP"] { border-color: var(--rarity-SP); background: linear-gradient(135deg, rgba(239,68,35,0.1), #080f22 60%); }
.holo-card.owned[data-rarity="SR"] { border-color: var(--rarity-SR); background: linear-gradient(135deg, rgba(168,85,247,0.1), #080f22 60%); }
.holo-card.owned[data-rarity="R"]  { border-color: var(--rarity-R);  background: linear-gradient(135deg, rgba(59,130,246,0.1), #080f22 60%); }
.holo-card.owned[data-rarity="U"]  { border-color: var(--rarity-U);  background: linear-gradient(135deg, rgba(34,197,94,0.1), #080f22 60%); }
.holo-card.owned[data-rarity="PR"] { border-color: var(--rarity-PR); background: linear-gradient(135deg, rgba(0,229,255,0.1), #080f22 60%); }

/* Catalog modunda (markOwned değil) rarity rengi tüm kartlara uygulanır */
.holo-card[data-rarity="L"]:not(.unowned)  { border-color: var(--rarity-L);  background: linear-gradient(135deg, rgba(253,186,65,0.1), #080f22 60%); }
.holo-card[data-rarity="SP"]:not(.unowned) { border-color: var(--rarity-SP); background: linear-gradient(135deg, rgba(239,68,35,0.1), #080f22 60%); }
.holo-card[data-rarity="SR"]:not(.unowned) { border-color: var(--rarity-SR); background: linear-gradient(135deg, rgba(168,85,247,0.1), #080f22 60%); }
.holo-card[data-rarity="R"]:not(.unowned)  { border-color: var(--rarity-R);  background: linear-gradient(135deg, rgba(59,130,246,0.1), #080f22 60%); }
.holo-card[data-rarity="U"]:not(.unowned)  { border-color: var(--rarity-U);  background: linear-gradient(135deg, rgba(34,197,94,0.1), #080f22 60%); }
.holo-card[data-rarity="PR"]:not(.unowned) { border-color: var(--rarity-PR); background: linear-gradient(135deg, rgba(0,229,255,0.1), #080f22 60%); }

.holo-img-wrap {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.holo-img-wrap img {
  width: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
}
.holo-no-img {
  font-size: 32px; opacity: 0.15;
}

/* Rarity badge */
.holo-rarity-badge {
  position: absolute; top: 5px; right: 5px;
  padding: 2px 5px; border-radius: 4px;
  font-size: 8px; font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.05em;
}
.holo-rarity-badge[data-rarity="L"]  { background: rgba(253,186,65,0.15); border: 1px solid rgba(253,186,65,0.4); color: var(--rarity-L); }
.holo-rarity-badge[data-rarity="SP"] { background: rgba(239,68,35,0.15); border: 1px solid rgba(239,68,35,0.4); color: var(--rarity-SP); }
.holo-rarity-badge[data-rarity="SR"] { background: rgba(168,85,247,0.15); border: 1px solid rgba(168,85,247,0.4); color: var(--rarity-SR); }
.holo-rarity-badge[data-rarity="R"]  { background: rgba(59,130,246,0.15); border: 1px solid rgba(59,130,246,0.4); color: var(--rarity-R); }
.holo-rarity-badge[data-rarity="U"]  { background: rgba(34,197,94,0.15); border: 1px solid rgba(34,197,94,0.4); color: var(--rarity-U); }
.holo-rarity-badge[data-rarity="C"]  { background: rgba(100,116,139,0.15); border: 1px solid rgba(100,116,139,0.4); color: var(--rarity-C); }
.holo-rarity-badge[data-rarity="PR"] { background: rgba(0,229,255,0.15); border: 1px solid rgba(0,229,255,0.4); color: var(--rarity-PR); }

/* Owned check */
.holo-owned-check {
  position: absolute; top: 5px; left: 5px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--success);
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; color: #fff; font-weight: 800;
  box-shadow: 0 0 6px rgba(34,197,94,0.5);
}

/* Stock indicator (top-right pill above rarity if mega) */
.holo-stock-pill {
  position: absolute; bottom: 5px; right: 5px;
  width: 8px; height: 8px; border-radius: 50%;
}
.holo-stock-pill.in   { background: var(--success); box-shadow: 0 0 6px rgba(34,197,94,0.6); }
.holo-stock-pill.out  { background: rgba(255,255,255,0.15); }

/* Bottom label — ortalanmış, koyu pill arka plan */
.holo-bottom {
  position: absolute; bottom: 6px; left: 6px; right: 6px;
  padding: 5px 8px 6px;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  pointer-events: none;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}
.holo-name {
  font-size: 10px; font-weight: 700;
  color: #f5faff;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  margin-bottom: 2px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}
.holo-code {
  font-size: 9px; font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.06em;
  color: #f5faff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

/* Holographic overlay (only on hover for owned cards) */
.holo-shine {
  position: absolute; inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  mix-blend-mode: overlay;
}
.holo-card:hover .holo-shine { opacity: 1; }

/* Specular line for special rarities */
.holo-specular {
  position: absolute; inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}
.holo-card[data-rarity="L"]:hover  .holo-specular,
.holo-card[data-rarity="SP"]:hover .holo-specular,
.holo-card[data-rarity="SR"]:hover .holo-specular {
  opacity: 0.6;
}

/* Edge glow for special owned */
.holo-card[data-rarity="L"].owned  { box-shadow: 0 0 8px rgba(253,186,65,0.3), inset 0 0 16px rgba(253,186,65,0.15); }
.holo-card[data-rarity="SP"].owned { box-shadow: 0 0 8px rgba(239,68,35,0.3), inset 0 0 16px rgba(239,68,35,0.15); }
.holo-card[data-rarity="SR"].owned { box-shadow: 0 0 8px rgba(168,85,247,0.3), inset 0 0 16px rgba(168,85,247,0.15); }

/* ===== CARD MODAL (Centered, medium) ===== */
.card-modal {
  position: fixed; inset: 0; z-index: 200;
  display: none;
  align-items: center; justify-content: center;
  padding: 20px;
  background: rgba(3, 5, 16, 0.85);
  backdrop-filter: blur(14px) saturate(150%);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.card-modal.open {
  display: flex;
  opacity: 1;
}

.card-modal-content {
  position: relative;
  background: linear-gradient(180deg, var(--bg-elevated), var(--bg-base));
  border: 1px solid var(--border-strong);
  border-radius: 22px;
  max-width: 820px;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: var(--shadow-modal), 0 0 0 1px rgba(253, 186, 65, 0.06);
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 0;
  transform: scale(0.92) translateY(20px);
  opacity: 0;
  transition: transform 0.35s var(--ease-out), opacity 0.25s ease;
}
.card-modal.open .card-modal-content {
  transform: scale(1) translateY(0);
  opacity: 1;
}

@media (max-width: 640px) {
  .card-modal { padding: 0; align-items: stretch; }
  .card-modal-content {
    grid-template-columns: 1fr;
    border-radius: 20px 20px 0 0;
    max-height: 96vh;
    margin-top: auto;
  }
  /* Mobilde close butonu çok daha büyük + üst köşede sabit */
  .cm-close-btn {
    width: 48px !important; height: 48px !important;
    top: 12px !important; right: 12px !important;
    background: rgba(0,0,0,0.7) !important;
    border-width: 1.5px !important;
    z-index: 20 !important;
  }
  .cm-close-btn svg { width: 18px !important; height: 18px !important; }
  /* Üstte swipe-down indicator çubuğu */
  .card-modal-content::after {
    content: ''; display: block;
    position: absolute; top: 8px; left: 50%;
    transform: translateX(-50%);
    width: 44px; height: 4px;
    background: rgba(255,255,255,0.25);
    border-radius: 4px;
    z-index: 15;
  }
}

/* Glow at top */
.card-modal-content::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 200px;
  background: radial-gradient(ellipse 80% 100% at 50% 0%, var(--rarity-color, rgba(239,68,35,0.3)) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
  border-radius: 22px 22px 0 0;
}

/* Top bar removed - now using floating close button */
.cm-topbar {
  position: absolute; top: 14px; right: 14px;
  z-index: 10;
  display: flex; align-items: center; gap: 10px;
}
.cm-stock-status {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(8px);
  border-radius: 999px;
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.04em;
}
.cm-stock-dot {
  width: 6px; height: 6px; border-radius: 50%;
}
.cm-stock-status.in  { color: var(--success); }
.cm-stock-status.in  .cm-stock-dot { background: var(--success); box-shadow: 0 0 6px var(--success); animation: stockPulse 2.5s ease-in-out infinite; }
.cm-stock-status.out { color: rgba(255,255,255,0.4); }
.cm-stock-status.out .cm-stock-dot { background: rgba(255,255,255,0.2); }
@keyframes stockPulse { 0%,100%{opacity:1} 50%{opacity:.4} }

.cm-close-btn {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.7);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.cm-close-btn:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
  transform: rotate(90deg);
}

/* Card showcase — left column (flat, no 3D) */
.cm-showcase {
  display: flex; align-items: center; justify-content: center;
  padding: 28px 24px;
  position: relative;
  z-index: 1;
  background: linear-gradient(135deg, rgba(255,255,255,0.02), transparent);
  border-right: 1px solid var(--border);
}

@media (max-width: 640px) {
  .cm-showcase { border-right: none; border-bottom: 1px solid var(--border); padding: 20px 16px 12px; }
  .cm-card3d { width: 220px; height: 308px; }
}

.cm-showcase-shadow {
  position: absolute; bottom: 16px; left: 50%;
  transform: translateX(-50%);
  width: 120px; height: 18px; border-radius: 50%;
  filter: blur(10px);
}
.cm-card3d {
  width: 280px; height: 392px;
  position: relative;
}
.cm-card3d-face, .cm-card3d-back {
  position: absolute; inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 12px; overflow: hidden;
}
.cm-card3d-face {
  border: 2px solid var(--rarity-color, var(--accent));
  box-shadow:
    0 0 20px var(--rarity-color, rgba(239,68,35,0.3)),
    0 24px 48px rgba(0,0,0,0.6),
    inset 0 1px 0 rgba(255,255,255,0.08);
}
.cm-card3d-face img {
  width: 100%; height: 100%; object-fit: cover;
}
.cm-card3d-back {
  transform: rotateY(180deg);
  background: linear-gradient(135deg, var(--bg-card), var(--bg-base));
  border: 2px solid rgba(255,255,255,0.07);
  display: flex; align-items: center; justify-content: center;
  font-size: 38px; opacity: 0.4;
}

/* Info section — right column */
.cm-info {
  padding: 28px 24px 24px;
  position: relative; z-index: 1;
  display: flex; flex-direction: column;
}
@media (max-width: 640px) {
  .cm-info { padding: 20px 20px 24px; }
}

.cm-name {
  font-size: 22px; font-weight: 800; color: #fff;
  letter-spacing: -0.025em; line-height: 1.15;
  margin-bottom: 6px;
}
.cm-codeline {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.cm-codeline .cm-code {
  font-size: 11px; color: rgba(255,255,255,0.3);
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.04em;
}
.cm-codeline .cm-sep {
  width: 3px; height: 3px; border-radius: 50%;
  background: rgba(255,255,255,0.15);
}
.cm-rarity-tag {
  font-size: 10px; padding: 2px 8px; border-radius: 5px;
  font-weight: 800; font-family: 'JetBrains Mono', monospace;
}

.cm-price-row {
  display: flex; align-items: flex-end; justify-content: space-between;
  padding: 14px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.cm-price-label, .cm-stock-label {
  font-size: 9px; color: rgba(255,255,255,0.3);
  letter-spacing: 0.1em; text-transform: uppercase; font-weight: 600;
  margin-bottom: 4px;
}
.cm-price {
  font-size: 28px; font-weight: 800; color: #fff;
  letter-spacing: -0.025em; line-height: 1;
}
.cm-stock-display {
  display: flex; align-items: center; gap: 6px; justify-content: flex-end;
  font-size: 13px; font-weight: 700;
}

.cm-buy-btn {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 18px; border-radius: 12px;
  background: linear-gradient(135deg, var(--rarity-color, var(--accent)), rgba(239,68,35,0.85));
  color: #fff;
  font-weight: 800; font-size: 14px;
  text-decoration: none;
  margin-bottom: 10px;
  position: relative; overflow: hidden;
  box-shadow: 0 8px 24px var(--rarity-color, rgba(239,68,35,0.4)), inset 0 1px 0 rgba(255,255,255,0.2);
}
.cm-buy-btn.out {
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.25);
  pointer-events: none;
  box-shadow: none;
}
.cm-buy-btn.outline {
  background: rgba(253, 186, 65, 0.08);
  color: var(--gold);
  border: 1.5px solid rgba(253, 186, 65, 0.35);
  box-shadow: 0 4px 14px rgba(253, 186, 65, 0.1);
  flex-direction: column;
  gap: 2px;
  padding: 14px 20px;
  text-decoration: none;
}
.cm-buy-btn.outline:hover {
  background: rgba(253, 186, 65, 0.14);
  border-color: var(--gold);
  box-shadow: 0 8px 24px rgba(253, 186, 65, 0.25);
}
.cm-buy-btn.outline::after { display: none; }
.cm-buy-btn::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,0.15) 50%, transparent 70%);
  animation: buyShimmer 2.8s linear infinite;
}
.cm-buy-btn.out::after { display: none; }
@keyframes buyShimmer { from{transform:translateX(-100%)} to{transform:translateX(200%)} }

.cm-collection-btn {
  width: 100%; padding: 12px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  color: rgba(255,255,255,0.55);
  font-weight: 600; font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}
.cm-collection-btn:hover {
  border-color: rgba(253,186,65,0.4);
  color: var(--gold);
}
.cm-collection-btn.owned {
  border-color: rgba(239,68,68,0.3);
  color: rgba(248,113,113,0.9);
}

.cm-drag-hint {
  text-align: center; margin-top: 12px;
  font-size: 9px; color: rgba(255,255,255,0.15);
  letter-spacing: 0.08em; text-transform: uppercase;
}

/* ===== BINDER PICKER (small modal) ===== */
.picker-overlay {
  position: fixed; inset: 0; z-index: 250;
  background: rgba(3,5,16,0.85);
  backdrop-filter: blur(12px);
  display: none; align-items: center; justify-content: center;
  padding: 20px;
}
.picker-overlay.open { display: flex; }
.picker-content {
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  padding: 24px;
  max-width: 420px; width: 100%;
  max-height: 80vh; overflow-y: auto;
}
.picker-content h2 { margin-bottom: 14px; font-size: 18px; }
.picker-list {
  display: flex; flex-direction: column; gap: 8px;
  max-height: 320px; overflow-y: auto;
  margin-bottom: 12px;
}
.picker-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer; color: var(--text);
  text-align: left; font-family: inherit;
  transition: all 0.15s;
}
.picker-item:hover {
  border-color: rgba(239,68,35,0.4);
  background: rgba(239,68,35,0.05);
}
.pi-name { font-size: 14px; font-weight: 600; }
.pi-meta { font-size: 11px; color: var(--text-muted); }

/* ===== TOAST ===== */
.toast {
  position: fixed; bottom: 80px; left: 50%;
  transform: translateX(-50%) translateY(120%);
  background: var(--bg-elevated);
  color: var(--text);
  padding: 12px 22px; border-radius: 999px;
  font-size: 13px; font-weight: 500;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  border: 1px solid var(--border-strong);
  z-index: 300;
  transition: transform 0.3s var(--ease-out);
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.success { border-color: rgba(34,197,94,0.4); }
.toast.error   { border-color: rgba(239,68,68,0.4); color: var(--danger); }

/* ===== NEW BINDER PAGE ===== */
.new-app { min-height: 100vh; padding-bottom: calc(90px + env(safe-area-inset-bottom)); }
.new-main { padding: 16px 20px; display: flex; flex-direction: column; gap: 16px; }

.new-card {
  background: linear-gradient(135deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px;
}

.new-card-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.new-card-title {
  font-size: 16px; font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
}
.new-card-desc {
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  line-height: 1.4;
}

.new-textarea {
  resize: vertical;
  min-height: 70px;
  font-family: inherit;
  margin-bottom: 10px;
}

.chip-row {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin-bottom: 14px;
}
.chip {
  padding: 5px 11px;
  background: rgba(253, 186, 65, 0.08);
  border: 1px solid rgba(253, 186, 65, 0.25);
  color: var(--gold);
  border-radius: 999px;
  font-size: 11px; font-weight: 600;
  cursor: pointer; font-family: inherit;
  transition: all 0.15s;
}
.chip:hover {
  background: rgba(253, 186, 65, 0.15);
  border-color: var(--gold);
}

.new-submit {
  width: 100%; margin-top: 4px;
}

/* AI credit badge */
.ai-credit-badge {
  display: flex; flex-direction: column;
  align-items: center;
  padding: 8px 14px;
  background: linear-gradient(135deg, rgba(253, 186, 65, 0.1), rgba(253, 186, 65, 0.04));
  border: 1px solid rgba(253, 186, 65, 0.3);
  border-radius: 12px;
  font-family: 'JetBrains Mono', monospace;
  min-width: 76px;
  flex-shrink: 0;
}
.ai-credit-badge.depleted {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.3);
}
.ai-credit-count {
  font-size: 22px; font-weight: 900;
  color: var(--gold);
  line-height: 1;
}
.ai-credit-badge.depleted .ai-credit-count { color: var(--danger); }
.ai-credit-sep, .ai-credit-max {
  font-size: 14px; font-weight: 700;
  color: rgba(255,255,255,0.3);
}
.ai-credit-label {
  font-size: 9px; font-weight: 600;
  color: rgba(255,255,255,0.4);
  margin-top: 4px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ai-depleted-msg {
  padding: 16px; border-radius: 12px;
  background: rgba(239, 68, 68, 0.06);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: rgba(255,255,255,0.5);
  font-size: 13px; line-height: 1.5;
}

/* Set picker */
.new-filter-row {
  display: flex; gap: 10px;
  margin-bottom: 14px;
}
.new-filter-row select { flex: 0 0 150px; }

.new-set-list {
  max-height: 380px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(0,0,0,0.2);
  margin-bottom: 14px;
}

.set-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  color: var(--text);
  transition: background 0.15s;
}
.set-row:last-child { border-bottom: none; }
.set-row:hover { background: rgba(255,255,255,0.04); }
.set-row.selected {
  background: rgba(253, 186, 65, 0.1);
  border-left: 3px solid var(--gold);
  padding-left: 11px;
}

.set-row-empty {
  opacity: 0.5;
  cursor: not-allowed !important;
}
.set-row-empty:hover { background: transparent !important; }

.set-row-icon {
  font-size: 22px;
  flex: 0 0 32px;
  text-align: center;
}
.set-row-info { flex: 1; min-width: 0; }
.set-row-name {
  font-size: 13px; font-weight: 700;
  color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.set-row-meta {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  margin-top: 3px;
}
.set-row-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px; font-weight: 800;
  padding: 1px 5px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: 4px;
  letter-spacing: 0.05em;
  color: rgba(255,255,255,0.55);
}

.new-status {
  margin-top: 12px;
  font-size: 13px;
  padding: 10px 14px;
  border-radius: 10px;
  display: none;
}
.new-status.loading {
  display: block;
  background: rgba(253, 186, 65, 0.08);
  color: var(--gold);
}
.new-status.success {
  display: block;
  background: rgba(34, 197, 94, 0.1);
  color: var(--success);
}
.new-status.error {
  display: block;
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

/* Binder tile - delete button */
.binder-tile {
  position: relative;
}
.binder-tile-delete {
  position: absolute; top: 8px; left: 8px;
  width: 28px; height: 28px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 100, 100, 0.7);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 5;
  opacity: 0;
  transition: all 0.2s;
  font-size: 14px;
  pointer-events: none;
}
.binder-tile:hover .binder-tile-delete {
  opacity: 1;
  pointer-events: auto;
}
.binder-tile-delete:hover {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
  transform: scale(1.1);
}

/* ===== POKEDEX ===== */
.dex-app { min-height: 100vh; padding-bottom: calc(90px + env(safe-area-inset-bottom)); }
.dex-header { padding: max(20px, env(safe-area-inset-top)) 20px 0; margin-bottom: 16px; }
.dex-main { padding: 0 20px; }

.dex-stats {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; color: rgba(255,255,255,0.3);
  margin-bottom: 14px;
}
.dex-stats strong { color: var(--accent); font-weight: 800; font-size: 13px; }

.dex-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}
.dex-tile {
  position: relative; aspect-ratio: 3/4;
  background: linear-gradient(155deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer; font-family: inherit; text-align: center;
  transition: all 0.25s var(--ease);
}
.dex-tile:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 12px 30px rgba(0,0,0,0.5), 0 0 16px rgba(239,68,35,0.2);
}
.dex-tile.has-cards { border-color: rgba(239,68,35,0.2); }
.dex-tile.empty .dex-bg-img { display: none; }
.dex-tile.empty::after {
  content: '?'; position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -65%);
  font-size: 44px; font-weight: 900;
  color: rgba(255,255,255,0.08);
}

.dex-bg-img {
  position: absolute; inset: 0 0 38px 0;
  overflow: hidden;
}
.dex-bg-img img {
  width: 100%; height: 100%; object-fit: cover; object-position: center top;
}
.dex-bg-img::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, var(--bg-base) 100%);
}

.dex-num {
  position: absolute; top: 6px; left: 8px;
  font-size: 9px; font-family: 'JetBrains Mono', monospace;
  color: var(--accent); font-weight: 800; letter-spacing: 0.08em;
  background: rgba(0,0,0,0.6);
  padding: 2px 6px; border-radius: 999px;
  z-index: 2;
}
.dex-card-count {
  position: absolute; top: 6px; right: 6px;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #fff;
  font-size: 10px; font-weight: 800;
  padding: 2px 7px; border-radius: 999px;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(239,68,35,0.4);
}
.dex-name {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 10px 8px;
  font-size: 12px; font-weight: 700;
  color: var(--text);
  z-index: 2;
}

/* ===== PACK (v10 redesign) ===== */
.pack-app {
  min-height: 100vh; padding-bottom: calc(110px + env(safe-area-inset-bottom));
  background:
    radial-gradient(ellipse at top, rgba(239,68,35,0.12) 0%, transparent 50%),
    radial-gradient(ellipse at bottom right, rgba(253,186,65,0.08) 0%, transparent 50%);
}
.pack-header {
  padding: max(24px, env(safe-area-inset-top)) 20px 0;
  text-align: center; margin-bottom: 28px;
}
.pack-header h2 {
  margin-bottom: 6px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--gold) 60%, var(--text) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.pack-header p { color: var(--text-muted); font-size: 13px; }
.pack-main { padding: 0 20px; }

/* Set groups */
.pack-group { margin-bottom: 28px; }
.pack-group-header {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 12px;
  padding-left: 4px;
}
.pack-group-flag { font-size: 18px; }
.pack-group-title {
  font-size: 11px; font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.1em; text-transform: uppercase;
}
.pack-group-count {
  margin-left: auto;
  font-size: 10px; font-family: 'JetBrains Mono', monospace;
  color: rgba(255,255,255,0.3);
  padding: 2px 8px;
  background: rgba(255,255,255,0.04);
  border-radius: 999px;
}

.pack-set-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
}

.pack-set-tile {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
  border: 1px solid var(--border);
  border-radius: 14px;
  cursor: pointer; text-align: left;
  color: var(--text); font-family: inherit;
  position: relative; overflow: hidden;
  transition: all 0.2s var(--ease);
}
.pack-set-tile::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent);
  opacity: 0.5;
  transition: width 0.2s;
}
.pack-set-tile.tcg-one_piece::before { background: linear-gradient(180deg, #a31616, #ef4423); }
.pack-set-tile.tcg-pokemon::before    { background: linear-gradient(180deg, #3a6fc4, #1e4490); }

.pack-set-tile:hover {
  transform: translateX(4px);
  border-color: var(--gold);
  background: linear-gradient(135deg, rgba(253,186,65,0.06), rgba(255,255,255,0.02));
  box-shadow: 0 10px 28px rgba(0,0,0,0.4);
}
.pack-set-tile:hover::before { width: 5px; }
.pack-set-tile:hover .pst-arrow { transform: translateX(4px); color: var(--gold); }

.pst-icon {
  font-size: 26px; flex: 0 0 38px;
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
  border: 1px solid var(--border);
}
.pst-body { flex: 1; min-width: 0; }
.pst-name {
  font-size: 14px; font-weight: 800;
  margin-bottom: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pst-meta {
  font-size: 11px; color: rgba(255,255,255,0.4);
}
.pst-count {
  color: var(--gold); font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
}
.pst-arrow {
  flex: 0 0 18px;
  font-size: 20px; color: rgba(255,255,255,0.2);
  transition: all 0.2s;
}

/* Stage 2: Pack art */
.pack-stage {
  display: flex; flex-direction: column; align-items: center;
  padding: 16px 20px 40px;
  position: relative;
}

.pack-back-btn {
  align-self: flex-start;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  color: rgba(255,255,255,0.7);
  font-size: 12px; font-weight: 600;
  padding: 8px 14px; border-radius: 999px;
  cursor: pointer; font-family: inherit;
  margin-bottom: 24px;
  transition: all 0.15s;
}
.pack-back-btn:hover {
  border-color: rgba(255,255,255,0.2);
  color: var(--text);
}

.pack-stage-info {
  text-align: center;
  margin-bottom: 32px;
}
.pack-stage-label {
  font-size: 10px; font-weight: 600;
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.15em; text-transform: uppercase;
  font-family: 'JetBrains Mono', monospace;
  margin-bottom: 6px;
}
.pack-stage-name {
  font-size: 22px; font-weight: 800;
  background: linear-gradient(135deg, var(--gold), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 4px;
}
.pack-stage-sub {
  font-size: 12px; color: rgba(255,255,255,0.5);
}

/* Pack art — gerçek booster pack look */
.pack-art {
  width: 220px; height: 320px;
  border: none; padding: 0;
  border-radius: 18px;
  position: relative;
  cursor: pointer;
  overflow: hidden;
  transform-style: preserve-3d;
  transform: perspective(900px) rotateY(-6deg) rotateX(2deg);
  animation: packFloat 4s ease-in-out infinite;
  box-shadow:
    0 30px 70px rgba(239,68,35,0.4),
    0 0 0 2px rgba(253,186,65,0.4),
    inset 0 2px 0 rgba(255,255,255,0.2);
}

.pack-art.tcg-pokemon {
  box-shadow:
    0 30px 70px rgba(58,111,196,0.4),
    0 0 0 2px rgba(253,186,65,0.4),
    inset 0 2px 0 rgba(255,255,255,0.2);
}
.pack-art.tcg-pokemon .pack-art-bg {
  background: linear-gradient(135deg, #3a6fc4 0%, #1e4490 50%, #152d63 100%);
}
.pack-art.tcg-one_piece .pack-art-bg {
  background: linear-gradient(135deg, #c8351a 0%, #a31616 50%, #6b0d0d 100%);
}
.pack-art-bg {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep) 60%, var(--gold-deep));
}

.pack-art-foil {
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(45deg,
      rgba(255,255,255,0.03) 0,
      rgba(255,255,255,0.03) 2px,
      transparent 2px,
      transparent 8px),
    repeating-linear-gradient(-45deg,
      rgba(255,255,255,0.05) 0,
      rgba(255,255,255,0.05) 1px,
      transparent 1px,
      transparent 6px);
  pointer-events: none;
}

.pack-art-content {
  position: relative; z-index: 2;
  height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 30px 20px;
  color: #fff;
}
.pack-art-logo {
  font-size: 64px;
  margin-bottom: 14px;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.4));
  animation: logoFloat 3s ease-in-out infinite alternate;
}
@keyframes logoFloat {
  from { transform: translateY(0) rotate(-3deg); }
  to   { transform: translateY(-6px) rotate(3deg); }
}
.pack-art-title {
  font-size: 24px; font-weight: 900;
  letter-spacing: 0.04em;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
  margin-bottom: 6px;
  font-family: 'Georgia', serif;
  font-style: italic;
}
.pack-art-set {
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: center;
  color: rgba(255,255,255,0.85);
  padding: 4px 12px;
  background: rgba(0,0,0,0.3);
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.2);
  margin-bottom: auto;
  margin-top: 8px;
}
.pack-art-pack-label {
  font-size: 12px; font-weight: 900;
  letter-spacing: 0.3em;
  color: var(--gold);
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
  border-top: 1px solid rgba(253,186,65,0.4);
  padding-top: 10px;
  width: 100%; text-align: center;
}

.pack-art-shine {
  position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 28%, rgba(255,255,255,0.25) 48%, transparent 68%);
  pointer-events: none;
  animation: shimmer 3.5s linear infinite;
}
@keyframes shimmer {
  from { transform: translateX(-100%); }
  to   { transform: translateX(100%); }
}

@keyframes packFloat {
  0%, 100% { transform: perspective(900px) rotateY(-6deg) rotateX(2deg) translateY(0); }
  50%      { transform: perspective(900px) rotateY(-6deg) rotateX(2deg) translateY(-10px); }
}

.pack-art:hover { animation-play-state: paused; transform: perspective(900px) rotateY(-3deg) rotateX(1deg) scale(1.03); }

.pack-art.opening {
  animation: packOpen 0.55s cubic-bezier(0.6, 0, 0.9, 0.5) forwards;
}
@keyframes packOpen {
  0%   { transform: perspective(900px) rotateY(-6deg) rotateX(2deg) scale(1); filter: brightness(1); }
  100% { transform: perspective(900px) scale(0.4); filter: brightness(8); opacity: 0; }
}

.pack-cta-bar {
  margin-top: 28px;
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; font-weight: 700;
  color: var(--gold);
}
.pack-cta-icon {
  font-size: 20px; animation: bounce 1.4s ease-in-out infinite;
}
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

/* Flash overlay */
.pack-flash {
  position: fixed; inset: 0; z-index: 999;
  pointer-events: none; opacity: 0;
}
.pack-flash.active { animation: packFlash 0.7s ease-out forwards; }
@keyframes packFlash {
  0%   { opacity: 0; background: rgba(239,68,35,0.4); }
  35%  { opacity: 1; background: rgba(255,180,80,0.7); }
  60%  { opacity: 1; background: rgba(255,255,255,0.95); }
  100% { opacity: 0; background: rgba(255,255,255,0.95); }
}

/* Stage 3: Card reveal */
.pack-cards-stage {
  padding: 30px 16px 40px;
}
.pack-reveal-header {
  text-align: center; margin-bottom: 30px;
}
.pack-reveal-title {
  font-size: 26px; font-weight: 900;
  background: linear-gradient(135deg, var(--gold), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 6px;
}
.pack-reveal-sub {
  font-size: 12px; color: rgba(255,255,255,0.4);
}

.pack-cards-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 14px;
  margin: 0 auto 34px;
  max-width: 720px;
  perspective: 1800px;
}
@media (min-width: 700px) {
  .pack-cards-row { grid-template-columns: repeat(5, 1fr); }
}

.pack-card {
  width: 100%;
  max-width: 130px;
  margin: 0 auto;
  cursor: pointer;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.45s, transform 0.45s var(--ease-out);
}
.pack-card.entered {
  opacity: 1;
  transform: translateY(0);
}

.pack-card-inner {
  width: 100%; aspect-ratio: 2/3;
  position: relative;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  transform: rotateY(0deg);
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
.pack-card.revealed .pack-card-inner {
  transform: rotateY(180deg);
}
.pack-card:hover .pack-card-inner {
  transform: rotateY(0deg) translateY(-8px) scale(1.04);
}
.pack-card.revealed:hover .pack-card-inner {
  transform: rotateY(180deg) translateY(-8px) scale(1.04);
}

.pack-card-back, .pack-card-face {
  position: absolute; inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 10px; overflow: hidden;
  box-shadow:
    0 10px 26px rgba(0,0,0,0.5),
    0 0 0 1.5px rgba(253,186,65,0.4);
}
.pack-card-back { transform: rotateY(0deg); }
.pack-card-back svg { display: block; width: 100%; height: 100%; }

.pack-card-face { transform: rotateY(180deg); background: var(--bg-card); }
.pack-card-face img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}

/* Reverse Holo badge */
.pack-card-rh-badge {
  position: absolute; top: 8px; left: 8px;
  background: linear-gradient(135deg, #00e5ff, #a855f7);
  color: #fff;
  font-size: 9px; font-weight: 900;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.08em;
  padding: 3px 7px;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(168,85,247,0.4);
  z-index: 2;
}

.pack-card-name {
  margin-top: 8px;
  font-size: 11px; font-weight: 600;
  text-align: center;
  color: rgba(255,255,255,0);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: color 0.3s ease 0.3s;
  padding: 0 4px;
}
.pack-card.revealed .pack-card-name {
  color: var(--text);
}

/* Rarity glow when revealed */
.pack-card.revealed.L  .pack-card-face,
.pack-card.revealed.SP .pack-card-face {
  box-shadow: 0 0 32px var(--gold), 0 10px 26px rgba(0,0,0,0.6), 0 0 0 2px var(--gold);
  animation: rarityPulseGold 1.8s ease-in-out infinite alternate;
}
.pack-card.revealed.SR .pack-card-face {
  box-shadow: 0 0 28px var(--rarity-SR), 0 10px 26px rgba(0,0,0,0.6), 0 0 0 2px var(--rarity-SR);
  animation: rarityPulseSR 1.8s ease-in-out infinite alternate;
}
.pack-card.revealed.R  .pack-card-face {
  box-shadow: 0 0 18px var(--rarity-R), 0 10px 26px rgba(0,0,0,0.5), 0 0 0 1.5px var(--rarity-R);
}
.pack-card.revealed.PR .pack-card-face {
  box-shadow: 0 0 22px var(--rarity-PR), 0 10px 26px rgba(0,0,0,0.5), 0 0 0 1.5px var(--rarity-PR);
}
@keyframes rarityPulseGold {
  from { box-shadow: 0 0 18px var(--gold),  0 10px 26px rgba(0,0,0,0.6), 0 0 0 2px var(--gold); }
  to   { box-shadow: 0 0 42px var(--gold),  0 10px 26px rgba(0,0,0,0.6), 0 0 0 2px var(--gold); }
}
@keyframes rarityPulseSR {
  from { box-shadow: 0 0 18px var(--rarity-SR), 0 10px 26px rgba(0,0,0,0.6), 0 0 0 2px var(--rarity-SR); }
  to   { box-shadow: 0 0 42px var(--rarity-SR), 0 10px 26px rgba(0,0,0,0.6), 0 0 0 2px var(--rarity-SR); }
}

/* Rarity tag on revealed card-name */
.pack-card.revealed.L .pack-card-name  { color: var(--rarity-L); font-weight: 800; }
.pack-card.revealed.SP .pack-card-name { color: var(--rarity-SP); font-weight: 800; }
.pack-card.revealed.SR .pack-card-name { color: var(--rarity-SR); font-weight: 700; }

.pack-actions {
  display: flex; gap: 10px; flex-wrap: wrap; justify-content: center;
}
.pack-actions .btn { padding: 12px 18px; font-size: 13px; }

/* Confetti */
.confetti {
  position: fixed; pointer-events: none;
  width: 10px; height: 14px; top: -10px;
  animation: confettiFall 3s linear forwards;
  z-index: 999;
}
@keyframes confettiFall {
  0%   { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(110vh) rotate(720deg); opacity: 0; }
}

@media (max-width: 600px) {
  .pack-cards-stage { padding: 16px 8px 24px; }
  .pack-reveal-header { margin-bottom: 18px; }
  .pack-reveal-title { font-size: 22px; }
  .pack-reveal-sub { font-size: 11px; }

  /* Mobil: 3 sütun (4 sığmıyordu — kartlar taşıyordu) */
  .pack-cards-row {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 0 0 16px;
    max-width: none;
    perspective: 1200px;
  }
  .pack-card { max-width: none; }
  .pack-card-name { font-size: 10px; margin-top: 4px; }

  /* Butonlar sticky — bottom-nav üzerinde her zaman erişilebilir */
  .pack-actions {
    position: sticky;
    bottom: calc(80px + env(safe-area-inset-bottom));
    z-index: 10;
    background: rgba(7, 16, 31, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    padding: 10px 8px;
    margin: 0 -8px;
    border-top: 1px solid rgba(255,255,255,0.06);
    flex-wrap: nowrap;
    overflow: hidden;
    gap: 5px;
  }
  .pack-actions .btn {
    font-size: 11px;
    padding: 9px 6px;
    flex: 1 1 0;            /* eşit dağılım */
    min-width: 0;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    letter-spacing: 0;
  }
  /* Mobilde uzun yazıları gizle — sadece emoji + kısa */
  .pack-actions .btn .pa-text { display: inline; }
}
@media (max-width: 380px) {
  /* Çok dar ekran: sadece emoji kalsın */
  .pack-actions .btn .pa-text { display: none; }
  .pack-actions .btn { font-size: 18px; padding: 12px 4px; }
}

  .pack-art { width: 190px; height: 280px; }
  .pack-art-logo { font-size: 48px; }
  .pack-art-title { font-size: 20px; }
  .pack-set-grid { grid-template-columns: 1fr; }
}

/* ===== SCAN MODAL ===== */
.scan-modal {
  position: fixed; inset: 0; z-index: 250;
  background: rgba(3, 5, 16, 0.97);
  backdrop-filter: blur(20px);
  display: none;
  align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.scan-modal.open { display: flex; opacity: 1; }

.scan-content {
  position: relative;
  width: 100%; max-width: 480px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: 22px;
  padding: 28px 24px;
  max-height: 92vh;
  overflow-y: auto;
  text-align: center;
}

.scan-close {
  position: absolute; top: 14px; right: 14px;
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.7);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 2;
  transition: all 0.15s;
}
.scan-close:hover { background: rgba(255,255,255,0.15); transform: rotate(90deg); }

.scan-title {
  font-size: 22px;
  background: linear-gradient(135deg, var(--accent), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 6px;
}
.scan-subtitle {
  font-size: 13px;
  color: rgba(255,255,255,0.4);
  margin-bottom: 20px;
}

.scan-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 5/7;
  background: #000;
  border-radius: 14px;
  overflow: visible;
  margin-bottom: 56px; /* kod alanı şeridinin altında yer */
}
.scan-viewport video {
  width: 100%; height: 100%; object-fit: cover;
  display: block;
  border-radius: 14px;
}

.scan-frame {
  position: absolute;
  top: 6%; left: 6%; right: 6%; bottom: 18%;
  border: 2px dashed rgba(239, 68, 35, 0.6);
  border-radius: 12px;
  pointer-events: none;
}

.scan-tips {
  background: rgba(253, 186, 65, 0.06);
  border: 1px solid rgba(253, 186, 65, 0.2);
  color: rgba(255, 255, 255, 0.7);
  font-size: 11px;
  padding: 8px 12px;
  border-radius: 10px;
  margin-bottom: 14px;
  line-height: 1.4;
  text-align: center;
}
.scan-tips code {
  background: rgba(253, 186, 65, 0.15);
  color: var(--gold);
  padding: 1px 5px;
  border-radius: 3px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
}

.scan-corner {
  position: absolute; width: 24px; height: 24px;
  border: 3px solid var(--accent);
}
.scan-corner.tl { top: -3px; left: -3px; border-right: none; border-bottom: none; border-radius: 12px 0 0 0; }
.scan-corner.tr { top: -3px; right: -3px; border-left: none; border-bottom: none; border-radius: 0 12px 0 0; }
.scan-corner.bl { bottom: -3px; left: -3px; border-right: none; border-top: none; border-radius: 0 0 0 12px; }
.scan-corner.br { bottom: -3px; right: -3px; border-left: none; border-top: none; border-radius: 0 0 12px 0; }

.scan-line {
  position: absolute; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: scanSweep 2.4s ease-in-out infinite;
  box-shadow: 0 0 12px var(--accent);
}
@keyframes scanSweep {
  0%, 100% { top: 0; }
  50%      { top: calc(100% - 2px); }
}

/* Kart kodu için işaretli alt şerit */
.scan-code-zone {
  position: absolute;
  bottom: -38px; left: -3px; right: -3px;
  pointer-events: none;
}
.scan-code-label {
  font-size: 9px; font-weight: 800;
  color: var(--gold);
  text-align: center;
  letter-spacing: 0.06em;
  text-shadow: 0 0 8px rgba(0,0,0,0.9);
  margin-bottom: 3px;
  animation: pulseLabel 1.8s ease-in-out infinite;
}
@keyframes pulseLabel {
  0%, 100% { opacity: 0.7; }
  50%      { opacity: 1; }
}
.scan-code-strip {
  height: 24px;
  background:
    repeating-linear-gradient(45deg,
      rgba(253,186,65,0.15) 0,
      rgba(253,186,65,0.15) 6px,
      rgba(253,186,65,0.05) 6px,
      rgba(253,186,65,0.05) 12px);
  border: 1.5px dashed var(--gold);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  position: relative;
}
.scan-code-hint {
  font-size: 8px; font-weight: 700;
  color: var(--gold);
  text-shadow: 0 0 6px rgba(0,0,0,0.9);
  letter-spacing: 0.04em;
}
.scan-code-hint.left  { color: #5b8def; }
.scan-code-hint.right { color: #ff6b4a; }

.scan-cam-error {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.7);
  color: rgba(255,255,255,0.5);
  font-size: 13px;
  text-align: center;
  padding: 20px;
}

.scan-actions {
  display: flex; gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.scan-actions .btn { flex: 1; min-width: 130px; }

/* Scanning phase */
.scan-phase-loading {
  padding: 40px 20px;
  display: flex; flex-direction: column; align-items: center;
}
.scan-spinner {
  width: 60px; height: 60px;
  border: 4px solid rgba(239, 68, 35, 0.15);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Result phase */
.scan-phase-result {
  padding: 12px;
}
.scan-result-icon {
  width: 64px; height: 64px;
  background: var(--success);
  color: #fff;
  border-radius: 50%;
  font-size: 36px; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
  box-shadow: 0 0 32px rgba(34,197,94,0.5);
}

.scan-result-card {
  width: 160px; aspect-ratio: 2/3;
  margin: 18px auto;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid var(--accent);
  box-shadow: 0 16px 40px rgba(0,0,0,0.5);
}
.scan-result-card img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}

.scan-result-info {
  margin-bottom: 20px;
}
.scan-result-name {
  font-size: 18px; font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
}
.scan-result-meta {
  display: flex; align-items: center; gap: 10px;
  justify-content: center;
  margin-bottom: 8px;
}
.scan-result-price {
  font-size: 22px; font-weight: 800;
  color: var(--gold);
  font-family: 'JetBrains Mono', monospace;
  margin-top: 4px;
}

.scan-result-actions {
  display: flex; flex-direction: column; gap: 8px;
}

/* Error phase */
.scan-phase-error {
  padding: 30px 20px;
  text-align: center;
}
.scan-error-icon {
  width: 64px; height: 64px;
  background: var(--danger);
  color: #fff;
  border-radius: 50%;
  font-size: 36px; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}

/* ===== BINDER DETAIL (simple grid - 3D book coming later) ===== */
.binder-app { min-height: 100vh; padding-bottom: calc(90px + env(safe-area-inset-bottom)); }
.binder-header-bar {
  position: sticky; top: 0; z-index: 10;
  background: rgba(7,16,31,0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  padding: 14px 20px;
  display: flex; align-items: center; gap: 12px;
}
.binder-back-btn {
  width: 34px; height: 34px; border-radius: 9px;
  background: rgba(255,255,255,0.07);
  border: none;
  display: flex; align-items: center; justify-content: center;
  color: var(--text);
}
.binder-title-block { flex: 1; min-width: 0; }
.binder-title-block h1 {
  font-size: 18px; font-weight: 800;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.binder-subtitle {
  font-size: 11px; color: rgba(255,255,255,0.25);
  margin-top: 2px;
}
.binder-main { padding: 16px 20px; }

/* ===== LOGIN ===== */
.auth-app {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.auth-box {
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: 24px;
  padding: 36px;
  max-width: 400px; width: 100%;
  box-shadow: var(--shadow-modal);
}
.auth-box h1 {
  font-size: 30px; margin-bottom: 8px;
  background: linear-gradient(135deg, var(--accent), var(--gold), var(--text));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.auth-box .subtitle { color: var(--text-muted); font-size: 13px; margin-bottom: 24px; }
.auth-box form { display: flex; flex-direction: column; gap: 12px; }
.auth-box label { font-size: 11px; color: var(--text-muted); font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; }
.auth-error {
  color: var(--danger); font-size: 13px;
  padding: 10px;
  background: rgba(239,68,68,0.08);
  border-radius: 8px;
  border: 1px solid rgba(239,68,68,0.2);
}

/* ===== MOBILE ===== */
@media (max-width: 600px) {
  h1 { font-size: 26px; }
  h2 { font-size: 22px; }
  .home-header, .catalog-header, .dex-header, .pack-header {
    padding-left: 16px; padding-right: 16px;
  }
  .home-main, .catalog-main, .dex-main, .pack-main, .binder-main {
    padding-left: 16px; padding-right: 16px;
  }
  .binder-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
  .pack-set-grid { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 10px; }
  .dex-grid { grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 10px; }
  .cm-name { font-size: 22px; }
  .cm-price { font-size: 28px; }
}

@media (hover: none) {
  button:hover { transform: none !important; }
  .binder-tile:hover, .holo-card:hover { transform: none; }
}
