/* ==========================================================================
   Secret Neko - Command Center Stylesheet
   Theme: The Vault (Dark Glassmorphism)
   ========================================================================== */

:root {
  --bg-primary: #0E1518;
  --bg-surface: rgba(21, 32, 31, 0.65);
  --bg-elevated: rgba(26, 40, 38, 0.85);
  --accent-brass: #C9A24B;
  --accent-soft: rgba(201, 162, 75, 0.12);
  --text-primary: #EDE7D8;
  --text-secondary: #8A9A93;
  --border-color: rgba(201, 162, 75, 0.15);
  --border-hover: rgba(201, 162, 75, 0.35);
  
  --success: #5EC492;
  --danger: #D25F5F;
  --warning: #DFAC4A;
  
  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'Space Mono', monospace;
  
  --transition-smooth: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --shadow-main: 0 20px 40px -15px rgba(0, 0, 0, 0.6);
}

/* ==========================================================================
   1. Base & Reset
   ========================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

/* Background Glows */
.glow-bg {
  position: fixed;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(160px);
  z-index: -1;
  opacity: 0.12;
  pointer-events: none;
}
.glow-purple {
  background: radial-gradient(circle, #5b3fa3 0%, transparent 70%);
  top: -200px;
  left: -200px;
}
.glow-gold {
  background: radial-gradient(circle, var(--accent-brass) 0%, transparent 70%);
  bottom: -200px;
  right: -200px;
}

/* Scrollbar Styles */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
}
::-webkit-scrollbar-thumb {
  background: rgba(201, 162, 75, 0.2);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(201, 162, 75, 0.4);
}

/* ==========================================================================
   2. Main Layout
   ========================================================================== */
.app-container {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

@media (max-width: 1024px) {
  .app-container {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   3. Sidebar
   ========================================================================== */
.sidebar {
  background-color: rgba(10, 15, 17, 0.85);
  border-right: 1px solid var(--border-color);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
  z-index: 10;
}

@media (max-width: 1024px) {
  .sidebar {
    height: auto;
    position: relative;
    padding: 20px;
  }
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
}

.brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--accent-brass);
  background: radial-gradient(circle, var(--accent-brass) 0%, transparent 75%);
  box-shadow: 0 0 10px rgba(201, 162, 75, 0.4);
  position: relative;
}
.brand-logo::before {
  content: '猫';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 700;
}

.brand-info {
  display: flex;
  flex-direction: column;
}
.brand-name {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 2px;
  color: var(--text-primary);
}
.brand-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 1.5px;
  color: var(--accent-brass);
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1;
}

.nav-item {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: var(--transition-smooth);
}
.nav-item:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.05);
}
.nav-item.active {
  color: var(--text-primary);
  background: var(--accent-soft);
  border-color: var(--border-color);
  box-shadow: inset 0 0 8px rgba(201, 162, 75, 0.05);
}
.nav-icon {
  font-size: 16px;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.db-indicator {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--success);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 8px var(--success);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(94, 196, 146, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(94, 196, 146, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(94, 196, 146, 0); }
}

/* Background Import Progress Dashboard Mini Panel */
.scrape-mini-panel {
  background: rgba(201, 162, 75, 0.05);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-top: 15px;
  margin-bottom: 15px;
}
.mini-header {
  margin-bottom: 8px;
}
.mini-title {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-brass);
  letter-spacing: 0.5px;
}
.mini-status {
  font-family: var(--font-sans);
  font-size: 11px;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.mini-bar {
  background: rgba(0, 0, 0, 0.3);
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}
.mini-progress {
  background: linear-gradient(90deg, var(--accent-brass), var(--success));
  height: 100%;
  width: 0%;
  border-radius: 3px;
  transition: width 0.3s ease;
}

/* ==========================================================================
   4. Main Content Area & Panels
   ========================================================================== */
.main-content {
  padding: 40px;
  overflow-y: auto;
  max-height: 100vh;
}

@media (max-width: 768px) {
  .main-content {
    padding: 20px;
  }
}

.panel {
  display: none;
  animation: fadeIn 0.3s ease-out forwards;
}
.panel.active {
  display: block;
}

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

.panel-header {
  margin-bottom: 35px;
}
.panel-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}
.panel-subtitle {
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 4px;
}

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

@media (max-width: 600px) {
  .header-split {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ==========================================================================
   5. Buttons & Controls
   ========================================================================== */
.btn {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-solid {
  background-color: var(--accent-brass);
  border: 1px solid var(--accent-brass);
  color: #0E1518;
}
.btn-solid:hover {
  background-color: #dfba62;
  border-color: #dfba62;
  box-shadow: 0 0 15px rgba(201, 162, 75, 0.35);
}
.btn-solid:active {
  transform: scale(0.98);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}
.btn-outline:hover {
  background: rgba(201, 162, 75, 0.08);
  border-color: var(--border-hover);
}
.btn-outline:active {
  transform: scale(0.98);
}

.btn-danger {
  background: transparent;
  border: 1px solid rgba(210, 95, 95, 0.3);
  color: var(--danger);
}
.btn-danger:hover {
  background: rgba(210, 95, 95, 0.15);
  border-color: var(--danger);
}

.btn-small {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

.btn-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* ==========================================================================
   6. Dashboard Elements (KPIs, Sales Form)
   ========================================================================== */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.kpi-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-main);
  transition: var(--transition-smooth);
}
.kpi-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.kpi-label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-secondary);
}
.kpi-value {
  font-size: 36px;
  font-weight: 700;
  margin: 8px 0;
  color: var(--text-primary);
  font-feature-settings: "tnum";
}
.kpi-trend {
  font-size: 12px;
}
.trend-positive {
  color: var(--success);
}
.trend-neutral {
  color: var(--text-secondary);
}
.trend-negative {
  color: var(--danger);
}

.dash-action-row {
  margin-top: 30px;
}
.dash-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-main);
}
.dash-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.inline-form select,
.inline-form input {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 13px;
  outline: none;
  min-width: 120px;
  transition: var(--transition-smooth);
}
.inline-form select:focus,
.inline-form input:focus {
  border-color: var(--accent-brass);
  box-shadow: 0 0 8px rgba(201, 162, 75, 0.15);
}
.inline-form input[type="number"] {
  width: 90px;
}
.inline-form select {
  cursor: pointer;
}

/* ==========================================================================
   7. Tables & Filter Bars
   ========================================================================== */
.filter-bar {
  display: flex;
  gap: 15px;
  margin-bottom: 25px;
}

@media (max-width: 600px) {
  .filter-bar {
    flex-direction: column;
  }
}

.search-input {
  flex-grow: 1;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 14px;
  outline: none;
  transition: var(--transition-smooth);
}
.search-input:focus {
  border-color: var(--accent-brass);
  box-shadow: 0 0 10px rgba(201, 162, 75, 0.2);
}

.filter-select {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 14px;
  outline: none;
  cursor: pointer;
  min-width: 160px;
  transition: var(--transition-smooth);
}
.filter-select:focus {
  border-color: var(--accent-brass);
}

.table-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-main);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th {
  background: rgba(0, 0, 0, 0.15);
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
}

td {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(201, 162, 75, 0.06);
  font-size: 14px;
  color: var(--text-primary);
  vertical-align: middle;
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: rgba(255, 255, 255, 0.015);
}

.td-sku {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-brass);
}

.td-img {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background-size: cover;
  background-position: center;
  border: 1px solid var(--border-color);
  background-color: rgba(0,0,0,0.2);
}

.td-qty {
  font-family: var(--font-mono);
  font-weight: 700;
  font-feature-settings: "tnum";
}

.td-price {
  font-family: var(--font-mono);
  font-feature-settings: "tnum";
}

.status-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.status-in-stock { background: rgba(94, 196, 146, 0.15); color: var(--success); }
.status-hold { background: rgba(223, 172, 74, 0.15); color: var(--warning); }
.status-waitlist { background: rgba(201, 162, 75, 0.15); color: var(--accent-brass); }
.status-sold-out { background: rgba(210, 95, 95, 0.15); color: var(--danger); }

.action-btns {
  display: flex;
  gap: 8px;
}

/* ==========================================================================
   8. Card & Pack Manager Layout
   ========================================================================== */
.pack-database-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 25px;
  margin-top: 15px;
}

@media (max-width: 900px) {
  .pack-database-grid {
    grid-template-columns: 1fr;
  }
}

.packs-list-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-main);
  height: 70vh;
  display: flex;
  flex-direction: column;
}
.packs-list-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.packs-rail {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  flex-grow: 1;
}

.pack-item-btn {
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(201, 162, 75, 0.08);
  padding: 12px 15px;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
  font-family: var(--font-sans);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition-smooth);
}
.pack-item-btn:hover {
  border-color: var(--border-hover);
  background: rgba(255, 255, 255, 0.02);
}
.pack-item-btn.active {
  border-color: var(--accent-brass);
  background: var(--accent-soft);
}
.pack-btn-code {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 14px;
}
.pack-btn-count {
  font-family: var(--font-mono);
  font-size: 10px;
  background: rgba(201, 162, 75, 0.15);
  padding: 2px 6px;
  border-radius: 10px;
  color: var(--accent-brass);
}

.cards-display-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 25px;
  box-shadow: var(--shadow-main);
  display: flex;
  flex-direction: column;
  height: 70vh;
}

.cards-display-header {
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.cards-display-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 15px;
  overflow-y: auto;
  flex-grow: 1;
  max-height: 60vh;
  padding-right: 5px;
}

.card-item-thumb {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 10px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: var(--transition-smooth);
}
.card-item-thumb:hover {
  border-color: var(--accent-brass);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

.card-thumb-art {
  width: 100%;
  aspect-ratio: 1 / 1.4;
  border-radius: var(--radius-sm);
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 8px;
  background-color: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.card-thumb-art span {
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--text-secondary);
}

.card-thumb-code {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-brass);
}
.card-thumb-name {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  margin-top: 2px;
}

.card-thumb-rarity {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* Card badges */
.card-chase-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  background: var(--accent-brass);
  color: #0E1518;
  font-size: 8px;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 3px;
  z-index: 2;
  box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

.card-actions-overlay {
  position: absolute;
  inset: 0;
  background: rgba(14, 21, 24, 0.9);
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  justify-content: center;
  opacity: 0;
  border-radius: var(--radius-md);
  transition: opacity 0.2s ease;
  z-index: 5;
}
.card-item-thumb:hover .card-actions-overlay {
  opacity: 1;
}

/* ==========================================================================
   9. Waitlist Demand & Brand Configuration Stacked Forms
   ========================================================================== */
.config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}

.config-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-main);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.config-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 22px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.list-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 60vh;
  overflow-y: auto;
}

.demand-ticket {
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-md);
  padding: 15px;
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.ticket-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ticket-title {
  font-weight: 700;
  font-size: 14px;
  color: var(--accent-brass);
}
.ticket-meta {
  font-size: 12px;
  color: var(--text-secondary);
}
.ticket-contact {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-primary);
  margin-top: 4px;
  background: rgba(0,0,0,0.2);
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
}
.ticket-qty {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  text-align: right;
  min-width: 40px;
}

.stacked-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-group label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
}
.form-group input,
.form-group select,
.form-group textarea {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 13px;
  outline: none;
  transition: var(--transition-smooth);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent-brass);
  box-shadow: 0 0 8px rgba(201, 162, 75, 0.2);
}
.form-group textarea {
  min-height: 80px;
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.input-helper-row {
  display: flex;
  gap: 8px;
}
.input-helper-row input {
  flex-grow: 1;
}

.helper-text {
  font-size: 11px;
  color: var(--text-secondary);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
}

/* ==========================================================================
   10. Modals Structure & Toast Alerts
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 15, 17, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}

.modal-container {
  background: #15201F;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 580px;
  box-shadow: 0 50px 100px rgba(0, 0, 0, 0.8);
  padding: 30px;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalSlideUp 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
.modal-small {
  max-width: 400px;
}

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

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.modal-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 26px;
  cursor: pointer;
  line-height: 1;
  transition: var(--transition-smooth);
}
.modal-close:hover {
  color: var(--text-primary);
}

/* Notification Toast Alert */
.toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--bg-elevated);
  border: 1px solid var(--accent-brass);
  color: var(--text-primary);
  padding: 14px 24px;
  border-radius: var(--radius-md);
  box-shadow: 0 15px 30px rgba(0,0,0,0.5);
  font-size: 13px;
  font-weight: 500;
  z-index: 1000;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}
.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Card Visuals panel CSS */
.visuals-container-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
}
@media (max-width: 900px) {
  .visuals-container-grid {
    grid-template-columns: 1fr;
  }
}
.visuals-tabs-header {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 12px;
}
.visuals-tabs-header .btn {
  padding: 6px 12px;
  font-size: 12px;
}
.visuals-tabs-header .btn.active {
  background: var(--accent-soft);
  border-color: var(--accent-brass);
}
.slider {
  -webkit-appearance: none;
  height: 6px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.3);
  outline: none;
  margin: 10px 0;
}
.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-brass);
  cursor: pointer;
  box-shadow: 0 0 8px rgba(201, 162, 75, 0.5);
  transition: var(--transition-smooth);
}
.slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* Pack Image Selection & Preview inside Card Database */
.pack-header-layout {
  display: flex;
  align-items: center;
  gap: 20px;
}
.pack-image-preview {
  width: 70px;
  height: 98px;
  border-radius: 0;
  border: 1px solid var(--border-color);
  background-size: 100% 100%;
  background-position: center;
  background-color: rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
  box-shadow: var(--shadow-main);
  transition: var(--transition-smooth);
}
.pack-header-details {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pack-image-edit-row {
  display: flex;
  gap: 10px;
  margin-top: 8px;
  align-items: center;
}
.pack-image-edit-row .search-input {
  max-width: 300px;
  padding: 8px 12px;
  font-size: 13px;
}
.pack-image-edit-row .btn {
  padding: 8px 14px;
  font-size: 12px;
}

/* ==========================================================================
   14. Card Visual Settings Previews & Poke Holo
   ========================================================================== */
.visuals-preview-section {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid var(--border-color);
  width: 100%;
}
.visuals-preview-section h3 {
  font-size: 18px;
  margin-bottom: 6px;
  color: var(--text-primary);
}
.preview-hint {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 25px;
}
.previews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 24px;
  perspective: var(--perspective, 1000px);
}
.preview-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.preview-label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent-brass);
}

/* 3D Previews */
.preview-card {
  position: relative;
  width: 160px;
  height: 224px;
  border-radius: 12px;
  transform-style: preserve-3d;
  transition: transform var(--tilt-easing, 0.25s) ease, box-shadow 0.25s ease;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.6);
  cursor: crosshair;
  background: linear-gradient(160deg, #1f2c30, #0d1214);
  transform: perspective(var(--perspective, 1000px)) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  /* Critical: clips all foil layers to card boundary */
  overflow: hidden;
}

.holographic-pack-preview {
  position: relative;
  width: 160px;
  height: 224px;
  border-radius: 0;
  transform-style: preserve-3d;
  transition: transform var(--tilt-easing, 0.25s) ease, box-shadow 0.25s ease;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.6);
  cursor: crosshair;
  background: linear-gradient(160deg, #1f2c30, #0d1214);
  transform: perspective(var(--perspective, 1000px)) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  /* Critical: clips all foil layers to pack boundary */
  overflow: hidden;
}

.preview-card:hover,
.holographic-pack-preview:hover {
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.85);
}

.chase-card-face {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: none;
}

.pack-face-preview {
  position: absolute;
  inset: 0;
  border-radius: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: none;
}

.chase-card-art-full {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

/* Pack face styling for preview */
.pack-face-preview {
  background: linear-gradient(160deg, #1a2b3a, #0c1622);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 16px;
  text-align: center;
}
.pack-shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0) 50%, rgba(255,255,255,0.08) 100%);
  pointer-events: none;
}
.pack-brand {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 2px;
  color: var(--accent-brass);
  margin-bottom: 20px;
}
.pack-title {
  font-family: var(--font-serif);
  font-size: 16px;
  font-style: italic;
  font-weight: bold;
  color: #fff;
  line-height: 1.2;
}
.pack-count {
  font-family: var(--font-mono);
  font-size: 10px;
  margin-top: 25px;
  color: rgba(255,255,255,0.6);
}

/* ================================================================
   TCG CARD FOIL SYSTEM — Poke-Holo Inspired
   Based on simeydotme/pokemon-cards-css techniques.
   
   HOW IT WORKS:
   1. .holo-glare-radial  = the foil/shine layer
      - Uses sunpillar rainbow (6 hsl colors, repeating-linear-gradient)
        at 200% × 700% size, scrolling with --background-y
      - Layered with fine diffraction-grating bars (133°, 300% wide)
      - background-blend-mode: hue, hard-light merges them per-layer
      - Container gets: mix-blend-mode:color-dodge +
        filter:brightness(.85) contrast(2.75) saturate(.65)
        This is the "secret sauce" — makes it read as foil not paint
   
   2. .holo-glare-linear  = the glare/glass layer
      - radial white-center, dark edges (farthest-corner)
      - mix-blend-mode: overlay (glass, not light bulb)
      - filter: brightness(.8) contrast(1.5)
      - opacity driven by --pointer-from-center (strongest at edges)
   
   VARIABLES (all set by Holo.js):
   --background-x/y     cursor %, fed into background-position
   --pointer-from-center  0→1, 0=cursor at center, 1=corner
   --pointer-from-left/top  raw 0→1 cursor fractions
   --op                 0 or 1, mouse presence gate
   ================================================================ */

/* ── SUNPILLAR COLOR TOKENS ──────────────────────────────────────
   6 evenly-spaced hues cycling red→orange→yellow→green→cyan→violet
   Shifted for each sub-layer so the stack doesn't just stack one color.
   ─────────────────────────────────────────────────────────────── */
.holo-glare-radial,
.holo-glare-radial::before,
.holo-glare-radial::after {
  --sp1: hsl(  2, 90%, 60%);
  --sp2: hsl( 53, 90%, 60%);
  --sp3: hsl(123, 90%, 48%);
  --sp4: hsl(176, 90%, 52%);
  --sp5: hsl(228, 90%, 68%);
  --sp6: hsl(283, 90%, 62%);
  --bars: 5%;
}

/* ── LAYER 1 — HOLOGRAPHIC FOIL / SHINE ─────────────────────────
   This is equivalent to poke-holo's .card__shine.
   The ENTIRE ELEMENT uses mix-blend-mode: color-dodge
   + filter: brightness(.85) contrast(2.75) saturate(.65)
   That filter combo is the "secret" — it crushes blacks to nothing
   and makes the colors look like they're lit from inside.
   ─────────────────────────────────────────────────────────────── */
.holo-glare-radial {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;

  /* opacity gate: mouse presence × user holo intensity */
  opacity: calc(var(--op, 0) * var(--rarity-holo-op, 1.0));

  /* THE KEY: color-dodge makes the foil look INSIDE the card art */
  mix-blend-mode: color-dodge;

  /* THE FILTER: this is what separates paint from foil */
  filter: var(--rarity-holo-tint, none)
          brightness(.85)
          contrast(2.75)
          saturate(.65);

  /* Layer 1: Sunpillar rainbow (tall strips, scroll with mouse Y)
     At 200%×700%, a small mouse move = big color shift.
     This is the "rotating rainbow" on real holo foil. */
  background-image:
    repeating-linear-gradient(
      0deg,
      var(--sp1) calc(var(--bars)*1),
      var(--sp2) calc(var(--bars)*2),
      var(--sp3) calc(var(--bars)*3),
      var(--sp4) calc(var(--bars)*4),
      var(--sp5) calc(var(--bars)*5),
      var(--sp6) calc(var(--bars)*6),
      var(--sp1) calc(var(--bars)*7)
    ),
    /* Layer 2: Fine diffraction grating (the "sparkle" texture)
       Thin dark/light diagonal bars simulate the micro-engraving
       on real holo foil paper. background-blend-mode: hard-light
       makes it punch through the rainbow. */
    repeating-linear-gradient(
      133deg,
      #0e152e         0%,
      hsl(180,10%,60%) 3.8%,
      hsl(180,29%,66%) 4.5%,
      hsl(180,10%,60%) 5.2%,
      #0e152e         10%,
      #0e152e         12%
    );

  background-blend-mode: hue, hard-light;
  background-size: 200% 700%, 300% 100%;
  background-position:
    0% var(--background-y, 50%),
    var(--background-x, 50%) var(--background-y, 50%);

  transition: opacity 0.3s ease, background-position 0.08s linear;
}

/* ── ETCHED variant: holo-glare-radial overrides ─────────────── */
[data-foil-style="etched"] .holo-glare-radial {
  /* Tighter bars = SEC-card texture. Same sunpillar but denser grating. */
  --bars: 3.5%;
  filter: var(--rarity-holo-tint, none)
          brightness(.75)
          contrast(3.5)
          saturate(.5);
  background-size: 200% 500%, 200% 100%;
}

/* ── MANGA variant ───────────────────────────────────────────── */
[data-foil-style="manga"] .holo-glare-radial {
  /* Chrome: cold-toned, high contrast, almost grayscale */
  --sp1: hsl(210, 15%, 88%);
  --sp2: hsl(220, 20%, 72%);
  --sp3: hsl(200, 25%, 92%);
  --sp4: hsl(215, 18%, 60%);
  --sp5: hsl(205, 22%, 82%);
  --sp6: hsl(218, 12%, 70%);
  --bars: 8%;
  filter: brightness(.9) contrast(3) saturate(0);
  background-blend-mode: soft-light, hard-light;
  background-size: 200% 400%, 200% 100%;
}

[data-foil-style="manga"] .preview-card-art,
[data-foil-style="manga"] .pack-face-preview {
  filter: grayscale(1) contrast(1.4) brightness(1.05) !important;
}

/* ── GOLD variant ────────────────────────────────────────────── */
[data-foil-style="gold"] .holo-glare-radial {
  --sp1: hsl( 45, 95%, 62%);
  --sp2: hsl( 36, 90%, 52%);
  --sp3: hsl( 52, 100%,72%);
  --sp4: hsl( 38, 85%, 45%);
  --sp5: hsl( 48, 100%,65%);
  --sp6: hsl( 30, 80%, 50%);
  --bars: 6%;
  filter: brightness(.9) contrast(2.5) saturate(1.4) sepia(.5);
  background-blend-mode: overlay, hard-light;
  background-size: 200% 600%, 300% 100%;
}

[data-foil-style="gold"] .chase-card-face,
[data-foil-style="gold"] .pack-face-preview {
  box-shadow:
    inset 0 0 0 3px rgba(255, 215, 60, 0.90),
    inset 0 0 12px rgba(255, 200, 40, 0.40),
    0 0 20px rgba(255, 195, 30, 0.30) !important;
}

/* ── COSMIC variant ──────────────────────────────────────────── */
[data-foil-style="cosmic"] .holo-glare-radial {
  /* Deep space: ultra-saturated violet/cyan */
  --sp1: hsl(240, 90%, 58%);
  --sp2: hsl(280, 95%, 62%);
  --sp3: hsl(190, 95%, 60%);
  --sp4: hsl(155, 90%, 52%);
  --sp5: hsl(270, 90%, 65%);
  --sp6: hsl(200, 100%,65%);
  --bars: 6%;
  filter: brightness(.7) contrast(3.5) saturate(1.6);
  background-blend-mode: hue, hard-light;
  background-size: 200% 900%, 300% 100%;
}

/* ── METAL variant ───────────────────────────────────────────── */
[data-foil-style="metal"] .holo-glare-radial {
  /* Satin anodized aluminum: desaturated, tall horizontal satin band */
  filter: brightness(.8) contrast(2.5) saturate(0.1);
  background-image:
    linear-gradient(
      180deg,
      transparent                    calc(var(--background-y, 50%) - 22%),
      rgba(210, 220, 230, 0.25)      calc(var(--background-y, 50%) - 16%),
      rgba(240, 248, 255, 0.95)      calc(var(--background-y, 50%) -  3%),
      rgba(255, 255, 255, 1.00)      var(--background-y, 50%),
      rgba(240, 248, 255, 0.95)      calc(var(--background-y, 50%) +  3%),
      rgba(210, 220, 230, 0.25)      calc(var(--background-y, 50%) + 16%),
      transparent                    calc(var(--background-y, 50%) + 22%)
    ),
    repeating-linear-gradient(
      88deg,
      transparent                   0px,
      rgba(255, 255, 255, 0.05)     1px,
      transparent                   2px,
      transparent                   6px
    );
  background-blend-mode: normal, screen;
  background-size: 100% 100%, 100% 100%;
  background-position: center center;
  mix-blend-mode: screen;
  filter: blur(1.5px);
}

/* ── LAYER 2 — GLASS GLARE ──────────────────────────────────────
   This is equivalent to poke-holo's .card__glare.
   Pure glass refraction: radial white→dark, overlay blend.
   Opacity is driven by --pointer-from-center so the glare is
   STRONGEST when the cursor is near the edges/corners and
   WEAKEST at center — exactly like tilting a real card.
   ─────────────────────────────────────────────────────────────── */
.holo-glare-linear {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;

  /* Scale with user intensity AND mouse distance from center */
  opacity: calc(
    var(--op, 0)
    * var(--rarity-linear-intensity, 1.0)
    * (0.25 + var(--pointer-from-center, 0) * 0.75)
  );

  /* overlay = glass refraction, not a torch */
  mix-blend-mode: overlay;

  /* Tight filter: makes it look like a real specular reflection */
  filter: brightness(.8) contrast(1.5) blur(var(--rarity-light-blur, 4px));

  background-image: radial-gradient(
    farthest-corner circle at var(--x, 50%) var(--y, 50%),
    hsla(0, 0%, 100%, 0.8) 5%,
    hsla(0, 0%, 100%, 0.35) 25%,
    hsla(0, 0%, 0%, 0.5)   90%
  );

  transition: opacity 0.2s ease;
}

/* Light shape variants (affect glare shape/direction) */
[data-light-shape="dual"] .holo-glare-linear {
  background-image:
    radial-gradient(
      farthest-corner circle at calc(var(--x, 50%) - 15%) var(--y, 50%),
      hsla(0, 0%, 100%, 0.7)  5%,
      hsla(0, 0%, 100%, 0.2) 30%,
      hsla(0, 0%, 0%, 0.4)   90%
    ),
    radial-gradient(
      farthest-corner circle at calc(var(--x, 50%) + 15%) var(--y, 50%),
      hsla(0, 0%, 100%, 0.7)  5%,
      hsla(0, 0%, 100%, 0.2) 30%,
      hsla(0, 0%, 0%, 0.4)   90%
    );
}

[data-light-shape="crimped"] .holo-glare-linear {
  /* Pack wrapper reflection: repeating bright lines */
  background-image: repeating-linear-gradient(
    calc(var(--rarity-light-skew, 0deg) + 108deg),
    transparent                            0%,
    rgba(255, 255, 255, 0.10)  calc(var(--rarity-light-width, 30%) * 0.15),
    rgba(255, 255, 255, 0.65)  calc(var(--rarity-light-width, 30%) * 0.45),
    rgba(255, 255, 255, 0.10)  calc(var(--rarity-light-width, 30%) * 0.75),
    transparent                             var(--rarity-light-width, 30%),
    transparent               calc(var(--rarity-light-width, 30%) * 1.6)
  );
  background-position: calc(var(--background-x, 50%) - 50%) calc(var(--background-y, 50%) - 50%);
  background-size: 200% 200%;
  filter: brightness(.9) contrast(1.5) blur(var(--rarity-light-blur, 3px));
}

[data-light-shape="skewed"] .holo-glare-linear {
  background-image: linear-gradient(
    calc(var(--rarity-light-skew, 25deg) + 90deg),
    transparent             0%,
    transparent            22%,
    hsla(0, 0%, 100%, 0.08) 30%,
    hsla(0, 0%, 100%, 0.75) 46%,
    hsla(0, 0%, 100%, 0.95) 50%,
    hsla(0, 0%, 100%, 0.75) 54%,
    hsla(0, 0%, 100%, 0.08) 62%,
    transparent            70%,
    transparent           100%
  );
  background-position: calc((var(--background-x, 50%) - 50%) * 1.2) 0;
  background-size: 200% 100%;
  filter: brightness(.9) contrast(1.5) blur(var(--rarity-light-blur, 4px));
}

/* ── SPECIALTY LAYERS ────────────────────────────────────────────
   These are only used for specific foil styles.
   ─────────────────────────────────────────────────────────────── */

/* .etched-texture: fine cross-hatch for SEC-grade cards */
.etched-texture {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: calc(var(--op, 0) * var(--rarity-holo-op, 1.0) * 0.45);
  mix-blend-mode: overlay;
  background-image:
    repeating-linear-gradient(
      45deg,
      rgba(255,255,255,0.55) 0px,
      rgba(255,255,255,0.55) 0.6px,
      transparent             0.6px,
      transparent             3px
    ),
    repeating-linear-gradient(
      -45deg,
      rgba(255,255,255,0.20) 0px,
      rgba(255,255,255,0.20) 0.6px,
      transparent             0.6px,
      transparent             3px
    );
  background-size: 5px 5px;
  filter: blur(0.3px);
}

/* .manga-chrome-glare: wide chrome sweep for Manga Rare */
.manga-chrome-glare {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: calc(var(--op, 0) * var(--rarity-holo-op, 1.0)
          * calc(.35 + var(--pointer-from-center, 0) * .65));
  mix-blend-mode: hard-light;
  background-image:
    radial-gradient(
      farthest-corner circle at var(--x, 50%) var(--y, 50%),
      hsla(220, 5%, 90%, 0.6)  0%,
      hsla(220, 5%, 40%, 0.2) 55%,
      hsla(220, 5%, 10%, 0.0) 100%
    );
  filter: brightness(.8) contrast(1.5) blur(2px);
}

/* .gold-alt-art-glare: warm amber glare for Gold Alt Art */
.gold-alt-art-glare {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: calc(var(--op, 0) * var(--rarity-holo-op, 1.0)
          * (0.4 + var(--pointer-from-center, 0) * 0.6));
  mix-blend-mode: overlay;
  background-image:
    radial-gradient(
      farthest-corner circle at var(--x, 50%) var(--y, 50%),
      hsl(48,  100%, 92%)  5%,
      hsl(38,  80%,  60%) 45%,
      hsl(0, 0%, 0%)      110%
    );
  filter: brightness(.65) contrast(2.5) saturate(2) blur(2px);
}

/* .cosmic-glare: deep-space glare for Treasure Rare */
.cosmic-glare {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: calc(var(--op, 0) * var(--rarity-holo-op, 1.0)
          * (0.25 + var(--pointer-from-center, 0)));
  mix-blend-mode: overlay;
  background-image:
    radial-gradient(
      farthest-corner circle at var(--x, 50%) var(--y, 50%),
      hsl(204, 100%, 96%) 5%,
      hsl(250,  15%,  20%) 150%
    );
  filter: brightness(.75) contrast(2) saturate(2) blur(3px);
}

/* .metal-glare-linear: satin horizontal band for metal foil */
.metal-glare-linear {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: calc(var(--op, 0) * var(--rarity-linear-intensity, 1.0)
          * (0.2 + var(--pointer-from-center, 0) * 0.8));
  mix-blend-mode: hard-light;
  background-image: radial-gradient(
    farthest-corner circle at var(--x, 50%) var(--y, 50%),
    hsla(210, 20%, 95%, 0.8)  0%,
    hsla(200, 10%, 70%, 0.3) 40%,
    hsla(0,    0%,  0%, 0.0) 90%
  );
  filter: brightness(1) contrast(1.5) blur(4px);
}


/* ============ CHASE EDITOR DRAG AND DROP ============ */
.chase-editor-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 25px;
  margin-top: 15px;
}

@media (max-width: 900px) {
  .chase-editor-layout {
    grid-template-columns: 1fr;
  }
}

.chase-draggable-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  flex-grow: 1;
  max-height: 60vh;
  padding-right: 5px;
}

.chase-drag-row {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px 18px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: grab;
  user-select: none;
  transition: var(--transition-smooth);
}

.chase-drag-row:active {
  cursor: grabbing;
}

.chase-drag-row.dragging {
  opacity: 0.4;
  border-style: dashed;
  background: rgba(201, 162, 75, 0.05);
}

.chase-drag-row.over {
  border-color: var(--accent-brass);
  box-shadow: 0 0 10px rgba(201, 162, 75, 0.2);
}

.chase-drag-rank {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 14px;
  color: var(--accent-brass);
  min-width: 40px;
}

.chase-drag-img {
  width: 42px;
  height: 58px;
  border-radius: var(--radius-sm);
  background-size: cover;
  background-position: center;
  border: 1px solid var(--border-color);
  background-color: rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chase-drag-img span {
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--text-secondary);
}

.chase-drag-details {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chase-drag-code {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
  color: var(--text-primary);
}

.chase-drag-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.chase-drag-rarity {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
}

.chase-drag-handle {
  font-size: 18px;
  color: var(--text-secondary);
  cursor: grab;
  padding: 0 5px;
}

.chase-drag-actions {
  display: flex;
  align-items: center;
}

/* Image options toggle buttons in modal */
.image-options-toggle {
  display: flex;
  gap: 10px;
  margin-bottom: 8px;
  background: rgba(0, 0, 0, 0.2);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}
.image-options-toggle .btn-toggle {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.image-options-toggle .btn-toggle:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.02);
}
.image-options-toggle .btn-toggle.active {
  background: var(--accent-soft);
  color: var(--accent-brass);
  border: 1px solid var(--accent-brass);
}

/* Checkbox Styling */
.checkbox-container {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  font-size: 14px;
}
.checkbox-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}
.checkbox-custom {
  height: 20px;
  width: 20px;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  display: inline-block;
  position: relative;
  transition: all 0.25s ease;
}
.checkbox-container:hover input ~ .checkbox-custom {
  border-color: var(--accent-brass);
}
.checkbox-container input:checked ~ .checkbox-custom {
  background-color: var(--accent-brass);
  border-color: var(--accent-brass);
}
.checkbox-custom:after {
  content: "";
  position: absolute;
  display: none;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid #10100c;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.checkbox-container input:checked ~ .checkbox-custom:after {
  display: block;
}

/* Active Preview Highlight */
.preview-item {
  border: 2px solid transparent;
  border-radius: 16px;
  padding: 12px;
  transition: all 0.3s ease;
  cursor: pointer;
}
.preview-item:hover {
  background: var(--bg-elevated);
}
.preview-item.active {
  background: var(--bg-elevated);
  border-color: var(--accent-brass);
  box-shadow: 0 0 15px rgba(201, 162, 75, 0.2);
}

/* Slider value display */
.slider-val-label {
  font-family: var(--font-mono);
  color: var(--accent-brass);
  margin-top: 4px;
  display: inline-block;
}



.settings-focused-header {
  margin-bottom: 15px;
  background: var(--bg-elevated);
  padding: 12px 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}
.settings-focused-header h3 {
  margin: 0;
  font-size: 16px;
  font-family: var(--font-mono);
}

