/* ==========================================================================
   Daggerheart Cards - Studio Stylesheet (Gaming & Deck Builder)
   Diagonal Split Class Artworks, Universal Inspector Pop-Up, Multi-Tab Studio
   ========================================================================== */

:root {
  --dh-primary: #66FCF1;
  --dh-primary-glow: rgba(102, 252, 241, 0.35);
  --dh-secondary: #9B6CFF;
  --dh-secondary-glow: rgba(155, 108, 255, 0.35);
  --dh-dark: #0B0C10;
  --dh-surface: rgba(22, 27, 34, 0.72);
  --dh-surface-hover: rgba(30, 36, 46, 0.88);
  --dh-border: rgba(255, 255, 255, 0.1);
  --dh-border-active: rgba(102, 252, 241, 0.55);
  --dh-radius: 12px;
}

* {
  box-sizing: border-box;
}

body {
  background-color: var(--dh-dark);
  color: #E2E8F0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* App Header */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 2rem;
  background: rgba(11, 12, 16, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--dh-border);
  position: sticky;
  top: 0;
  z-index: 90;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--dh-border);
  color: #fff;
  text-decoration: none;
  transition: all 0.2s ease;
}

.logo-back-btn:hover {
  background: rgba(102, 252, 241, 0.15);
  border-color: var(--dh-primary);
  color: var(--dh-primary);
  transform: translateX(-2px);
}

.logo {
  font-family: 'Outfit', sans-serif;
  font-size: 1.45rem;
  font-weight: 800;
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.logo span.logo-dot {
  color: var(--dh-primary);
}

.logo-subtitle {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--dh-secondary);
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  padding-left: 10px;
  margin-left: 6px;
  font-family: 'Outfit', sans-serif;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.deck-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--dh-border);
  border-radius: 9999px;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.deck-pill-btn:hover,
.deck-pill-btn.has-items {
  background: rgba(102, 252, 241, 0.12);
  border-color: var(--dh-primary);
  color: var(--dh-primary);
  box-shadow: 0 0 16px rgba(102, 252, 241, 0.25);
}

/* Main Studio Layout */
.main-wrapper {
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem 2rem 7rem 2rem;
  flex: 1;
}

/* Persistent Studio Navigation Tabs */
.studio-nav-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(22, 27, 34, 0.65);
  backdrop-filter: blur(12px);
  border: 1px solid var(--dh-border);
  border-radius: var(--dh-radius);
  padding: 6px;
  margin-bottom: 2rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.studio-nav-strip::-webkit-scrollbar {
  display: none;
}

.studio-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: #94A3B8;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.studio-tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}

.studio-tab-btn.active {
  background: rgba(102, 252, 241, 0.12);
  border-color: rgba(102, 252, 241, 0.35);
  color: var(--dh-primary);
  box-shadow: 0 0 16px rgba(102, 252, 241, 0.15);
}

.studio-tab-btn.active span.material-symbols-rounded {
  color: var(--dh-primary);
}

/* Tab Panes */
.studio-tab-pane {
  display: none;
  animation: fadeIn 0.2s ease-out;
}

.studio-tab-pane.active {
  display: block;
}

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

/* ==========================================================================
   DIAGONAL SPLIT CLASS ARTWORK COVERS
   ========================================================================== */
.class-split-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
}

.class-split-left {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  clip-path: polygon(0 0, 62% 0, 38% 100%, 0 100%);
  transition: transform 0.3s ease;
}

.class-split-right {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  clip-path: polygon(62% 0, 100% 0, 100% 100%, 38% 100%);
  transition: transform 0.3s ease;
}

.class-split-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2.5px;
  background: var(--dh-primary);
  box-shadow: 0 0 10px var(--dh-primary);
  transform: skewX(-21deg);
  pointer-events: none;
}

.class-card-item:hover .class-split-left {
  transform: scale(1.05) translateX(-2px);
}

.class-card-item:hover .class-split-right {
  transform: scale(1.05) translateX(2px);
}

/* ==========================================================================
   TAB 1: WIZARD STUDIO
   ========================================================================== */
.wizard-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.wizard-hub-card {
  background: var(--dh-surface);
  border: 1px solid var(--dh-border);
  border-radius: var(--dh-radius);
  padding: 2.25rem 2rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.wizard-hub-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--dh-primary), transparent);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.wizard-hub-card:hover {
  transform: translateY(-4px);
  background: var(--dh-surface-hover);
  border-color: var(--dh-border-active);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(102, 252, 241, 0.15);
}

.wizard-hub-card:hover::after {
  opacity: 1;
}

.wizard-hub-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(102, 252, 241, 0.1);
  border: 1px solid rgba(102, 252, 241, 0.25);
  color: var(--dh-primary);
}

.wizard-hub-icon span {
  font-size: 30px;
}

.wizard-hub-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.wizard-hub-desc {
  font-size: 0.95rem;
  color: #94A3B8;
  margin: 0;
  line-height: 1.5;
  flex: 1;
}

/* Wizard Flow Container & Modal Box */
.wizard-modal-box {
  background: #11141B;
  border: 1px solid var(--dh-border);
  border-radius: var(--dh-radius);
  max-width: 1050px;
  width: 95vw;
  height: 85vh;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85);
  overflow: hidden;
  position: relative;
}

.wizard-modal-icon-badge {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(155, 108, 255, 0.15);
  border: 1px solid rgba(155, 108, 255, 0.3);
  color: var(--dh-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.wizard-modal-body {
  padding: 1.75rem 2rem;
  overflow-y: auto;
  flex: 1;
}

.wizard-step-panel {
  display: none;
  flex-direction: column;
  gap: 1.5rem;
}

.wizard-step-panel.active {
  display: flex;
}

.wizard-question-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.45rem;
  font-weight: 800;
  color: #fff;
  margin: 0;
}

.wizard-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.wizard-option-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--dh-border);
  border-radius: 10px;
  padding: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  transition: all 0.2s;
  text-align: left;
}

.wizard-option-btn:hover {
  background: rgba(102, 252, 241, 0.1);
  border-color: var(--dh-primary);
  color: var(--dh-primary);
  transform: translateY(-2px);
}

.wizard-long-btn {
  grid-column: 1 / -1;
  width: 100%;
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--dh-border);
  border-radius: 8px;
  color: #CBD5E1;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.2s;
}

.wizard-long-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

/* Wizard Skip Row Button (Top full-width row) */
.wizard-skip-row-btn {
  width: 100%;
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--dh-border);
  border-radius: 8px;
  color: #94A3B8;
  font-size: 0.92rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.wizard-skip-row-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.22);
}

/* Wizard Full-Width Package Hero Banner Card */
.wizard-banner-choice-card {
  background: linear-gradient(135deg, rgba(22, 27, 34, 0.95), rgba(15, 18, 25, 0.95));
  border: 1px solid var(--dh-border);
  border-radius: var(--dh-radius);
  padding: 1.5rem 1.75rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.wizard-banner-choice-card:hover {
  border-color: var(--dh-primary);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(102, 252, 241, 0.15);
}

.wizard-banner-choice-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.wizard-banner-choice-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 9999px;
  background: rgba(102, 252, 241, 0.12);
  border: 1px solid rgba(102, 252, 241, 0.35);
  color: var(--dh-primary);
  font-size: 0.75rem;
  font-weight: 700;
  align-self: flex-start;
}

.wizard-banner-choice-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  margin: 0;
}

.wizard-banner-choice-desc {
  font-size: 0.88rem;
  color: #94A3B8;
  margin: 0;
  line-height: 1.45;
}

.wizard-banner-choice-cta {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--dh-primary);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
}

.wizard-banner-art-fan {
  display: flex;
  align-items: center;
  position: relative;
  width: 140px;
  height: 100px;
  flex-shrink: 0;
}

.fan-img {
  position: absolute;
  width: 65px;
  height: 90px;
  object-fit: cover;
  border-radius: 6px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: transform 0.25s ease;
}

.fan-1 {
  left: 0;
  transform: rotate(-10deg);
  z-index: 1;
}

.fan-2 {
  left: 36px;
  transform: translateY(-4px);
  z-index: 2;
}

.fan-3 {
  left: 72px;
  transform: rotate(10deg);
  z-index: 3;
}

.wizard-banner-choice-card:hover .fan-1 {
  transform: rotate(-16deg) translateX(-4px);
}

.wizard-banner-choice-card:hover .fan-2 {
  transform: translateY(-8px) scale(1.05);
}

.wizard-banner-choice-card:hover .fan-3 {
  transform: rotate(16deg) translateX(4px);
}

/* Wizard Subcategory Trio Grid (Row 3, 3 cards) */
.wizard-subcat-trio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

@media (max-width: 768px) {
  .wizard-subcat-trio-grid {
    grid-template-columns: 1fr;
  }
  .wizard-banner-art-fan {
    display: none;
  }
}

.wizard-subcat-card {
  background: var(--dh-surface);
  border: 1px solid var(--dh-border);
  border-radius: var(--dh-radius);
  padding: 1rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.wizard-subcat-card:hover {
  background: var(--dh-surface-hover);
  border-color: var(--dh-primary);
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 0 0 15px rgba(102, 252, 241, 0.15);
}

.wizard-subcat-img-wrap {
  width: 100%;
  aspect-ratio: 63.5 / 88.9;
  max-height: 180px;
  border-radius: 6px;
  overflow: hidden;
  background: #000;
}

.wizard-subcat-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.wizard-subcat-card:hover .wizard-subcat-img-wrap img {
  transform: scale(1.06);
}

.wizard-subcat-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.wizard-subcat-name {
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}

.wizard-subcat-meta {
  font-size: 0.8rem;
  color: #94A3B8;
}

/* Character Cards Grid in Wizard */
.character-select-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.char-select-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--dh-border);
  border-radius: 10px;
  padding: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s;
}

.char-select-card:hover {
  background: rgba(102, 252, 241, 0.1);
  border-color: var(--dh-primary);
  transform: translateY(-2px);
}

.char-select-avatar {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  background: #000;
}

.char-select-name {
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
}

.char-select-meta {
  font-size: 0.8rem;
  color: #94A3B8;
}

/* ==========================================================================
   CLASSES TAB GRID
   ========================================================================== */
.classes-grid-view {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}

.class-card-item {
  background: var(--dh-surface);
  border: 1px solid var(--dh-border);
  border-radius: var(--dh-radius);
  padding: 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.2s ease;
}

.class-card-item:hover {
  background: var(--dh-surface-hover);
  border-color: var(--dh-primary);
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.class-card-header-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 4px;
}

.class-card-name-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
}

.class-card-domains-row {
  display: flex;
  gap: 6px;
  padding: 0 4px;
  flex-wrap: wrap;
}

.domain-mini-pill {
  font-size: 0.72rem;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(155, 108, 255, 0.15);
  border: 1px solid rgba(155, 108, 255, 0.3);
  color: #D4BFFF;
  font-weight: 600;
}

/* ==========================================================================
   HERITAGE TAB LAYOUT
   ========================================================================== */
.heritage-top-banner {
  background: var(--dh-surface);
  border: 1px solid var(--dh-border);
  border-radius: var(--dh-radius);
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.heritage-split-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.heritage-split-btn {
  background: var(--dh-surface);
  border: 1px solid var(--dh-border);
  border-radius: var(--dh-radius);
  padding: 1.5rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s;
}

.heritage-split-btn:hover {
  background: var(--dh-surface-hover);
  border-color: var(--dh-primary);
  transform: translateY(-2px);
}

/* ==========================================================================
   DOMAINS & EQUIPMENT TAB GRIDS
   ========================================================================== */
.domains-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 1rem;
}

.domain-hub-card {
  background: var(--dh-surface);
  border: 1px solid var(--dh-border);
  border-radius: var(--dh-radius);
  padding: 1.25rem 1rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  transition: all 0.2s;
}

.domain-hub-card:hover {
  background: var(--dh-surface-hover);
  border-color: var(--dh-primary);
  transform: translateY(-2px);
}

.domain-hub-icon-img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6));
}

.domain-hub-name {
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
}

/* Equipment Split Buttons */
.equipment-top-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.equipment-top-card {
  background: var(--dh-surface);
  border: 1px solid var(--dh-border);
  border-radius: var(--dh-radius);
  padding: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.2s;
}

.equipment-top-card:hover {
  background: var(--dh-surface-hover);
  border-color: var(--dh-primary);
  transform: translateY(-2px);
}

/* ==========================================================================
   THE UNIVERSAL INSPECTOR POP-UP (Strictly 1 Viewport Screen!)
   ========================================================================== */
.inspector-modal-card {
  background: #11141B;
  border: 1px solid var(--dh-border);
  border-radius: var(--dh-radius);
  width: 95vw;
  max-width: 1200px;
  height: 85vh;
  max-height: 85vh;
  display: grid;
  grid-template-columns: 350px 1fr;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8);
  overflow: hidden;
  position: relative;
}

@media (max-width: 900px) {
  .inspector-modal-card {
    grid-template-columns: 1fr;
    height: 90vh;
    max-height: 90vh;
  }
  .inspector-left-panel {
    border-right: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
}

.inspector-left-panel {
  padding: 1.75rem;
  background: rgba(0, 0, 0, 0.35);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.25rem;
  overflow-y: auto;
}

.inspector-info-top {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.inspector-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  margin: 0;
  line-height: 1.2;
}

.inspector-stats-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(102, 252, 241, 0.08);
  border: 1px solid rgba(102, 252, 241, 0.3);
  color: var(--dh-primary);
  padding: 5px 12px;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
  align-self: flex-start;
}

.inspector-actions-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.inspector-right-gallery {
  padding: 1.5rem;
  overflow-y: auto;
  height: 100%;
  max-height: 100%;
}

.inspector-gallery-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* ==========================================================================
   Shared Visual Cards Flow Grid (The Cards Deck View)
   ========================================================================== */
.cards-flow-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
}

.deck-card-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.deck-card-item:hover {
  transform: translateY(-3px);
  border-color: rgba(102, 252, 241, 0.4);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

.deck-card-item.in-deck {
  border-color: var(--dh-primary);
  box-shadow: 0 0 16px rgba(102, 252, 241, 0.35);
  background: rgba(102, 252, 241, 0.04);
}

.deck-card-thumb-wrap {
  width: 100%;
  aspect-ratio: 63.5 / 88.9;
  background: #000;
  position: relative;
  cursor: pointer;
  overflow: hidden;
}

.deck-card-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.deck-card-thumb-wrap:hover img {
  transform: scale(1.04);
}

.deck-card-status-dot {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: all 0.15s;
}

.deck-card-item.in-deck .deck-card-status-dot {
  background: var(--dh-primary);
  border-color: var(--dh-primary);
  color: #0B0C10;
}

.deck-card-info {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.deck-card-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}

.deck-card-sub,
.deck-card-meta {
  font-size: 0.72rem;
  color: #94A3B8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.deck-card-action-btn {
  margin-top: 4px;
  padding: 5px 6px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.15s;
}

.deck-card-action-btn:hover {
  background: rgba(102, 252, 241, 0.15);
  border-color: var(--dh-primary);
  color: var(--dh-primary);
}

.deck-card-item.in-deck .deck-card-action-btn {
  background: var(--dh-primary);
  border-color: var(--dh-primary);
  color: #0B0C10;
  font-weight: 700;
}

/* ==========================================================================
   Sticky Bottom Action Bar (Dein Deck & Download)
   ========================================================================== */
.bottom-action-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(11, 12, 16, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--dh-border);
  padding: 0.85rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  z-index: 100;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.6);
}

.bottom-deck-info-group {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.bottom-deck-text {
  display: flex;
  flex-direction: column;
}

.bottom-deck-count-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.bottom-deck-sub-text {
  font-size: 0.82rem;
  color: #94A3B8;
}

.bottom-actions-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.duplex-toggle-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #E2E8F0;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.05);
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid var(--dh-border);
}

.duplex-toggle-pill input[type="checkbox"] {
  accent-color: var(--dh-primary);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-block {
  width: 100%;
}

.btn-primary {
  background: var(--dh-primary);
  color: #0B0C10;
  font-weight: 700;
  box-shadow: 0 0 15px rgba(102, 252, 241, 0.25);
}

.btn-primary:hover:not(:disabled) {
  background: #7efdf4;
  box-shadow: 0 0 25px rgba(102, 252, 241, 0.45);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.82rem;
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
}

/* Search Bar & Filter Pills */
.search-bar-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(22, 27, 34, 0.75);
  border: 1px solid var(--dh-border);
  border-radius: var(--dh-radius);
  padding: 12px 18px;
  transition: all 0.2s ease;
}

.search-bar-box:focus-within {
  border-color: var(--dh-primary);
  box-shadow: 0 0 20px rgba(102, 252, 241, 0.2);
  background: rgba(22, 27, 34, 0.95);
}

.search-bar-box span.material-symbols-rounded {
  color: var(--dh-primary);
  font-size: 24px;
}

.search-bar-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
}

.search-bar-input::placeholder {
  color: #64748B;
}

.search-filter-pills-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 12px;
  background: rgba(22, 27, 34, 0.65);
  border: 1px solid var(--dh-border);
  border-radius: var(--dh-radius);
  margin-bottom: 1.75rem;
}

.tier-pill-btn,
.search-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94A3B8;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.tier-pill-btn:hover,
.search-pill-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.tier-pill-btn.active,
.search-pill-btn.active {
  background: rgba(102, 252, 241, 0.15);
  border-color: var(--dh-primary);
  color: var(--dh-primary);
  box-shadow: 0 0 16px rgba(102, 252, 241, 0.25);
  font-weight: 700;
}

.tier-pill-btn .material-symbols-rounded,
.search-pill-btn .material-symbols-rounded {
  font-size: 18px;
}

/* Modals Overlay */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

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

.modal-box,
.inspector-modal-card,
.wizard-modal-box {
  cursor: default;
}

.modal-box {
  background: #11141B;
  border: 1px solid var(--dh-border);
  border-radius: var(--dh-radius);
  max-width: 650px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.7);
  overflow: hidden;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: #94A3B8;
  cursor: pointer;
  padding: 4px;
  display: flex;
}

.modal-close-btn:hover {
  color: #fff;
}

.modal-body {
  padding: 1.25rem 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 0, 0, 0.2);
}

/* Deck Items in Modal */
.deck-items-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.deck-modal-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 8px 12px;
}

.deck-modal-item-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.deck-modal-thumb {
  width: 32px;
  height: 44px;
  border-radius: 4px;
  object-fit: cover;
}

.deck-modal-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
}

.deck-modal-sub {
  font-size: 0.75rem;
  color: #94A3B8;
}

.deck-modal-del-btn {
  background: transparent;
  border: none;
  color: #94A3B8;
  cursor: pointer;
  padding: 6px;
}

.deck-modal-del-btn:hover {
  color: #F87171;
}

/* Progress Overlay */
.progress-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  z-index: 300;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1rem;
}

.progress-overlay.visible {
  display: flex;
}

.progress-card {
  background: #11141B;
  border: 1px solid var(--dh-border);
  border-radius: var(--dh-radius);
  padding: 2rem;
  max-width: 440px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
}

.progress-bar-wrap {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  margin: 1.25rem 0 0.75rem 0;
}

.progress-bar-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--dh-primary), var(--dh-secondary));
  transition: width 0.2s;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .app-header {
    padding: 0.75rem 1rem;
  }
  .main-wrapper {
    padding: 1rem 1rem 6.5rem 1rem;
  }
  .bottom-action-bar {
    padding: 0.75rem 1rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  .bottom-actions-right {
    justify-content: space-between;
  }
}
