/* =============================================================================
   DECK DETAIL PAGE THEMES & STYLES
   Based on reference mockup - premium deck viewer design
   ============================================================================= */

/* -----------------------------------------------------------------------------
   Full-width deck content layout
   ----------------------------------------------------------------------------- */

/* -----------------------------------------------------------------------------
   Two-column header grid: Left (deck info + stats), Right (buy buttons)
   Matches the mainboard/sideboard 2fr:1fr proportions
   ----------------------------------------------------------------------------- */

.deck-header-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    position: relative;
    z-index: 10;
}

.deck-header-left {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.deck-header-right {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

/* Responsive: On smaller screens, stack header sections */
@media (max-width: 1200px) {
    .deck-header-grid {
        grid-template-columns: 1fr;
    }
    
    .deck-header-right {
        min-height: auto;
        padding: 1rem 0;
    }
}

/* -----------------------------------------------------------------------------
   Mainboard/Sideboard content layout
   ----------------------------------------------------------------------------- */

.deck-content-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.deck-main-section,
.deck-sideboard-section {
    width: 100%;
}

/* Responsive: On larger screens, show mainboard and sideboard side by side */
@media (min-width: 1200px) {
    .deck-content-wrapper {
        display: grid;
        grid-template-columns: 2fr 1fr;
        gap: 0.75rem;
        align-items: start; /* Flush - both panels start at same vertical position */
    }
}

/* On medium screens, stack vertically */
@media (max-width: 1199px) {
    .deck-content-wrapper {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .deck-sideboard-section .deck-panel {
        margin-top: 0;
    }
}

/* -----------------------------------------------------------------------------
   CSS Custom Properties (Color Themes)
   ----------------------------------------------------------------------------- */

:root {
  /* Default deck theme (teal from brand) */
  --deck-primary: #5BC0BE;
  --deck-secondary: #6B7D8C;
  --deck-bg-gradient: linear-gradient(135deg, rgba(91, 192, 190, 0.1) 0%, transparent 50%);
  
  /* Text colors */
  --text-primary: #EAEAEA;
  --text-secondary: #9CA3AF;
  --text-muted: #6B7280;
  
  /* Panel styling - higher opacity so background card doesn't show through too much */
  --panel-bg: rgba(20, 24, 31, 0.95);
  --panel-border: rgba(255, 255, 255, 0.10);
  --panel-header-border: rgba(255, 255, 255, 0.08);
  --row-hover: rgba(255, 255, 255, 0.05);
}

/* Mono-color themes */
[data-deck-colors="W"] {
  --deck-primary: #F9FAF4;
  --deck-secondary: #E9D896;
  --deck-bg-gradient: linear-gradient(135deg, rgba(249, 250, 244, 0.12) 0%, rgba(233, 216, 150, 0.08) 100%);
}

[data-deck-colors="U"] {
  --deck-primary: #0E68AB;
  --deck-secondary: #14559E;
  --deck-bg-gradient: linear-gradient(135deg, rgba(14, 104, 171, 0.15) 0%, rgba(20, 85, 158, 0.1) 100%);
}

[data-deck-colors="B"] {
  --deck-primary: #715B84;
  --deck-secondary: #4B3D5A;
  --deck-bg-gradient: linear-gradient(135deg, rgba(113, 91, 132, 0.15) 0%, rgba(75, 61, 90, 0.1) 100%);
}

[data-deck-colors="R"] {
  --deck-primary: #D3202A;
  --deck-secondary: #F44336;
  --deck-bg-gradient: linear-gradient(135deg, rgba(211, 32, 42, 0.15) 0%, rgba(244, 67, 54, 0.1) 100%);
}

[data-deck-colors="G"] {
  --deck-primary: #00733E;
  --deck-secondary: #196C3E;
  --deck-bg-gradient: linear-gradient(135deg, rgba(0, 115, 62, 0.15) 0%, rgba(25, 108, 62, 0.1) 100%);
}

/* Two-color guild themes */
[data-deck-colors="WU"] { /* Azorius */
  --deck-primary: #0E68AB;
  --deck-secondary: #F9FAF4;
  --deck-bg-gradient: linear-gradient(135deg, rgba(14, 104, 171, 0.15) 0%, rgba(249, 250, 244, 0.08) 100%);
}

[data-deck-colors="UB"] { /* Dimir */
  --deck-primary: #0E68AB;
  --deck-secondary: #4B3D5A;
  --deck-bg-gradient: linear-gradient(135deg, rgba(14, 104, 171, 0.15) 0%, rgba(75, 61, 90, 0.1) 100%);
}

[data-deck-colors="BR"] { /* Rakdos */
  --deck-primary: #D3202A;
  --deck-secondary: #4B3D5A;
  --deck-bg-gradient: linear-gradient(135deg, rgba(211, 32, 42, 0.15) 0%, rgba(75, 61, 90, 0.1) 100%);
}

[data-deck-colors="RG"] { /* Gruul */
  --deck-primary: #D3202A;
  --deck-secondary: #00733E;
  --deck-bg-gradient: linear-gradient(135deg, rgba(211, 32, 42, 0.15) 0%, rgba(0, 115, 62, 0.1) 100%);
}

[data-deck-colors="GW"], [data-deck-colors="WG"] { /* Selesnya */
  --deck-primary: #00733E;
  --deck-secondary: #F9FAF4;
  --deck-bg-gradient: linear-gradient(135deg, rgba(0, 115, 62, 0.15) 0%, rgba(249, 250, 244, 0.08) 100%);
}

[data-deck-colors="WB"], [data-deck-colors="BW"] { /* Orzhov */
  --deck-primary: #F9FAF4;
  --deck-secondary: #4B3D5A;
  --deck-bg-gradient: linear-gradient(135deg, rgba(249, 250, 244, 0.12) 0%, rgba(75, 61, 90, 0.1) 100%);
}

[data-deck-colors="UR"], [data-deck-colors="RU"] { /* Izzet */
  --deck-primary: #0E68AB;
  --deck-secondary: #D3202A;
  --deck-bg-gradient: linear-gradient(135deg, rgba(14, 104, 171, 0.15) 0%, rgba(211, 32, 42, 0.1) 100%);
}

[data-deck-colors="BG"], [data-deck-colors="GB"] { /* Golgari */
  --deck-primary: #00733E;
  --deck-secondary: #4B3D5A;
  --deck-bg-gradient: linear-gradient(135deg, rgba(0, 115, 62, 0.15) 0%, rgba(75, 61, 90, 0.1) 100%);
}

[data-deck-colors="RW"], [data-deck-colors="WR"] { /* Boros */
  --deck-primary: #D3202A;
  --deck-secondary: #F9FAF4;
  --deck-bg-gradient: linear-gradient(135deg, rgba(211, 32, 42, 0.15) 0%, rgba(249, 250, 244, 0.08) 100%);
}

[data-deck-colors="GU"], [data-deck-colors="UG"] { /* Simic */
  --deck-primary: #00733E;
  --deck-secondary: #0E68AB;
  --deck-bg-gradient: linear-gradient(135deg, rgba(0, 115, 62, 0.15) 0%, rgba(14, 104, 171, 0.1) 100%);
}

/* Colorless */
[data-deck-colors="C"], [data-deck-colors=""] {
  --deck-primary: #9CA3AF;
  --deck-secondary: #6B7280;
  --deck-bg-gradient: linear-gradient(135deg, rgba(156, 163, 175, 0.1) 0%, transparent 50%);
}

/* -----------------------------------------------------------------------------
   Page Layout
   ----------------------------------------------------------------------------- */

.deck-detail-page {
  max-width: 1560px;
  margin: 0 auto;
  padding: 4px 24px 0;
  position: relative;
  min-height: 100vh;
}

@media (min-width: 1400px) {
  .deck-detail-page {
    padding: 0 32px;
  }
}

/* -----------------------------------------------------------------------------
   Hero Background (Blurred Card Art - Full Page)
   ----------------------------------------------------------------------------- */

.deck-hero-background {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

.deck-hero-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: blur(12px) brightness(0.45) saturate(1.4);
  transform: scale(1.1);
}

.deck-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(11, 13, 16, 0.35) 0%,
    rgba(11, 13, 16, 0.55) 20%,
    rgba(11, 13, 16, 0.7) 50%,
    rgba(11, 13, 16, 0.85) 80%,
    rgba(11, 13, 16, 0.92) 100%
  );
}

/* Fallback gradient when no art available */
.deck-hero-gradient {
  position: absolute;
  inset: 0;
  background: var(--deck-bg-gradient);
}

/* -----------------------------------------------------------------------------
   Panel Styling (Dark Translucent Cards)
   ----------------------------------------------------------------------------- */

.deck-panel {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  backdrop-filter: blur(12px);
  overflow: hidden;
}

.deck-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--panel-header-border);
  font-size: 13px;
  color: var(--text-secondary);
}

.deck-panel-header .font-semibold {
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.025em;
}

/* -----------------------------------------------------------------------------
   Header Typography (Premium Style)
   ----------------------------------------------------------------------------- */

.deck-title {
  font-size: 32px;
  font-weight: 700;
  font-family: 'Playfair Display', Georgia, serif;
  line-height: 1.0;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

@media (max-width: 768px) {
  .deck-title {
    font-size: 24px;
  }
}

.deck-author {
  font-size: 15px;
  font-weight: 400;
  color: var(--text-secondary);
}

.deck-author .verified {
  color: #5BC0BE;
}

.deck-metadata {
  font-size: 13px;
  color: var(--text-muted);
}

/* Compact tag badges for header row 2 */
.deck-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  backdrop-filter: blur(8px);
}

.deck-tag.format {
  color: var(--color-gold-400);
  border-color: rgba(212, 175, 55, 0.3);
  background: rgba(212, 175, 55, 0.1);
}

.deck-tag.platform {
  color: #5BC0BE;
  border-color: rgba(91, 192, 190, 0.3);
  background: rgba(91, 192, 190, 0.1);
}

/* -----------------------------------------------------------------------------
   Stats Bar
   ----------------------------------------------------------------------------- */

.deck-stats-bar {
  display: grid;
  grid-template-columns: 0.8fr 1fr 1fr 1fr 2fr;
  gap: 6px;
  margin-bottom: 8px;
}

@media (max-width: 1024px) {
  .deck-stats-bar {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  .deck-stats-bar {
    grid-template-columns: repeat(2, 1fr);
  }
}

.deck-stat-card {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  padding: 8px 10px;
  backdrop-filter: blur(12px);
}

.deck-stat-label {
  font-size: 9px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 3px;
}

.deck-stat-value {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.deck-stat-value.small {
  font-size: 13px;
}

.deck-stat-sub {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* -----------------------------------------------------------------------------
   Card List - Two Column Layout with Column Flow
   ----------------------------------------------------------------------------- */

.deck-card-sections {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.deck-card-section {
  width: 100%;
}

.deck-card-section-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--panel-header-border);
  margin-bottom: 4px;
}

.deck-card-section-header .count {
  color: var(--text-secondary);
  font-weight: 500;
}

/* Two columns with column-first flow (top to bottom, then next column) */
.deck-card-row-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-flow: column;
  gap: 1px 12px;
}

/* For proper column flow, set fixed number of rows based on content */
.deck-card-row-grid {
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
  max-height: calc(var(--card-rows, 10) * 42px);
  gap: 1px;
  column-gap: 16px;
}

.deck-card-row-grid > * {
  width: calc(50% - 8px);
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .deck-card-row-grid {
    flex-direction: row;
    max-height: none;
  }
  
  .deck-card-row-grid > * {
    width: 100%;
  }
}

/* Single column layout (for sideboard) */
.deck-card-row-single {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.deck-card-row-single > * {
  width: 100%;
  flex-shrink: 0;
}

/* Legacy support for old layout */
.deck-card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 16px;
  padding: 12px;
}

.deck-card-group {
  break-inside: avoid;
  page-break-inside: avoid;
  margin-bottom: 16px;
}

.deck-card-group-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--panel-header-border);
  margin-bottom: 4px;
}

.deck-card-group-header .count {
  color: var(--text-secondary);
  font-weight: 500;
}

@media (max-width: 1024px) {
  .deck-card-grid {
    grid-template-columns: 1fr;
  }
}

/* -----------------------------------------------------------------------------
   Card Row Styling
   ----------------------------------------------------------------------------- */

.deck-card-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px;
  border-radius: 4px;
  transition: background-color 0.15s ease;
  cursor: pointer;
}

.deck-card-row:hover {
  background: var(--row-hover);
}

/* Mainboard rows - fixed height for column flow */
.deck-card-row.mainboard {
  height: 43px;
  min-height: 43px;
  max-height: 43px;
}

/* Sideboard rows - compact */
.deck-card-row.sideboard {
  height: 35px;
  min-height: 35px;
  max-height: 35px;
}

.deck-card-qty {
  min-width: 28px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
}

.deck-card-thumb {
  width: 56px;
  height: 40px;
  border-radius: 4px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.05);
  flex-shrink: 0;
}

.deck-card-row.sideboard .deck-card-thumb {
  width: 48px;
  height: 32px;
}

.deck-card-info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.deck-card-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.deck-card-type {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.deck-card-row.sideboard .deck-card-type {
  display: none;
}

.deck-card-row.sideboard:hover .deck-card-type {
  display: block;
}

.deck-card-mana {
  display: flex;
  align-items: center;
  gap: 1px;
  flex-shrink: 0;
}

.deck-card-menu {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  opacity: 0;
  transition: opacity 0.15s ease;
  border-radius: 4px;
}

.deck-card-row:hover .deck-card-menu {
  opacity: 1;
}

.deck-card-menu:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

/* -----------------------------------------------------------------------------
   Mini Mana Curve (CSS-only)
   ----------------------------------------------------------------------------- */

.mini-curve {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 4px;
  height: 60px;
  padding-top: 16px;
}

.mini-curve-bar-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex: 1;
}

.mini-curve-count {
  font-size: 9px;
  font-weight: 600;
  color: var(--text-muted);
  height: 12px;
}

.mini-curve-bar {
  width: 100%;
  max-width: 20px;
  background: var(--deck-primary);
  border-radius: 2px 2px 0 0;
  min-height: 4px;
  transition: height 0.3s ease;
}

.mini-curve-label {
  font-size: 9px;
  color: var(--text-muted);
  height: 12px;
}

/* -----------------------------------------------------------------------------
   Mana Distribution Bars
   ----------------------------------------------------------------------------- */

.mana-distribution {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mana-dist-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mana-dist-symbol {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.mana-dist-bar-bg {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
}

.mana-dist-bar {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
}

.mana-dist-bar.white { background: #F9FAF4; }
.mana-dist-bar.blue { background: #0E68AB; }
.mana-dist-bar.black { background: #715B84; }
.mana-dist-bar.red { background: #D3202A; }
.mana-dist-bar.green { background: #00733E; }
.mana-dist-bar.colorless { background: #9CA3AF; }

.mana-dist-percent {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  min-width: 40px;
  text-align: right;
}

/* -----------------------------------------------------------------------------
   Type Breakdown Mini (Simplified)
   ----------------------------------------------------------------------------- */

.type-breakdown-mini {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.type-breakdown-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.type-breakdown-label {
  flex: 1;
  color: var(--text-secondary);
}

.type-breakdown-count {
  font-weight: 600;
  color: var(--text-primary);
}

.type-breakdown-bar-bg {
  width: 60px;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
}

.type-breakdown-bar {
  height: 100%;
  background: var(--deck-primary);
  border-radius: 2px;
}

/* -----------------------------------------------------------------------------
   Deck Notes Placeholder
   ----------------------------------------------------------------------------- */

.deck-notes-placeholder {
  padding: 16px;
  text-align: center;
}

.deck-notes-placeholder-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(91, 192, 190, 0.1);
  border-radius: 12px;
  color: var(--deck-primary);
}

.deck-notes-placeholder-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.deck-notes-placeholder-text {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* -----------------------------------------------------------------------------
   Sort Dropdown
   ----------------------------------------------------------------------------- */

.deck-sort-select {
  background: var(--panel-bg);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  padding: 6px 28px 6px 10px;
  font-size: 12px;
  color: var(--text-primary);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%239CA3AF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 5l3 3 3-3'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}

.deck-sort-select:focus {
  outline: none;
  border-color: var(--deck-primary);
  box-shadow: 0 0 0 2px rgba(91, 192, 190, 0.2);
}

/* Style the dropdown options with dark background */
.deck-sort-select option {
  background: #1a1d24;
  color: var(--text-primary);
  padding: 8px;
}

/* -----------------------------------------------------------------------------
   Action Buttons
   ----------------------------------------------------------------------------- */

.deck-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.15s ease;
  cursor: pointer;
}

.deck-action-btn.primary {
  background: var(--deck-primary);
  color: #0B0D10;
  border: none;
}

.deck-action-btn.primary:hover {
  filter: brightness(1.1);
}

.deck-action-btn.secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--panel-border);
}

.deck-action-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.deck-action-btn.edit-active {
  background: rgba(34, 197, 94, 0.15);
  color: #22C55E;
  border: 1px solid rgba(34, 197, 94, 0.4);
}

.deck-action-btn.edit-active:hover {
  background: rgba(34, 197, 94, 0.25);
}

.deck-action-btn.export-btn {
  background: linear-gradient(135deg, #D4AF37, #F0D060);
  color: #0B0D10;
  border: none;
  animation: export-pulse 2s ease-in-out infinite;
}

.deck-action-btn.export-btn:hover {
  filter: brightness(1.1);
}

@keyframes export-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.4); }
  50% { box-shadow: 0 0 0 4px rgba(212, 175, 55, 0); }
}

/* -----------------------------------------------------------------------------
   Format Badge
   ----------------------------------------------------------------------------- */

.deck-format-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 4px;
  background: rgba(91, 192, 190, 0.15);
  color: #5BC0BE;
  border: 1px solid rgba(91, 192, 190, 0.3);
}

/* -----------------------------------------------------------------------------
   Guild Icon Styling
   ----------------------------------------------------------------------------- */

.guild-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.guild-icon .ms {
  font-size: 48px;
  color: var(--deck-primary);
}

.guild-icon.small .ms {
  font-size: 24px;
}

/* Color identity badge circles */
.color-identity-badge {
  display: flex;
  align-items: center;
  gap: 4px;
}

.color-identity-badge .mana-symbol {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.color-identity-badge .mana-symbol .ms {
  font-size: 16px;
}

/* -----------------------------------------------------------------------------
   Responsive Content Grid
   ----------------------------------------------------------------------------- */

.deck-content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 1024px) {
  .deck-content-grid {
    grid-template-columns: 2fr 1fr;
    gap: 24px;
  }
}

/* -----------------------------------------------------------------------------
   Loading States
   ----------------------------------------------------------------------------- */

.deck-skeleton {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.04) 0%,
    rgba(255, 255, 255, 0.08) 50%,
    rgba(255, 255, 255, 0.04) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 6px;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* -----------------------------------------------------------------------------
   Share Menu
   ----------------------------------------------------------------------------- */

.share-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
}

.share-menu-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.share-menu-item svg {
  flex-shrink: 0;
}

/* -----------------------------------------------------------------------------
   Card Art Thumbnail (Art Crop Focus)
   ----------------------------------------------------------------------------- */

.deck-card-thumb {
  width: 48px;
  height: 36px;
  border-radius: 4px;
  object-fit: cover;
  object-position: center;
  background: rgba(255, 255, 255, 0.05);
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.deck-card-row.mainboard .deck-card-thumb {
  width: 52px;
  height: 38px;
}

.deck-card-row.sideboard .deck-card-thumb {
  width: 44px;
  height: 32px;
}

/* -----------------------------------------------------------------------------
   Edit Mode Styles
   ----------------------------------------------------------------------------- */

.edit-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px 10px;
  height: 28px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: #9CA3AF;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 12px;
  font-weight: 500;
}

.edit-toggle-btn .edit-btn-text {
  white-space: nowrap;
}

.edit-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #EAEAEA;
}

.edit-toggle-btn.active {
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.3);
  color: #22C55E;
}

.edit-mode-badge {
  font-size: 9px;
  font-weight: 600;
  color: #22C55E;
  background: rgba(34, 197, 94, 0.15);
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  animation: pulse-edit 2s ease-in-out infinite;
}

@keyframes pulse-edit {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* -----------------------------------------------------------------------------
   Compact Analytics Panel
   ----------------------------------------------------------------------------- */

.deck-panel.analytics-compact {
  background: var(--panel-bg);
}

.deck-panel-header.compact {
  padding: 8px 12px;
  font-size: 11px;
}

.analytics-compact .space-y-3 > * + * {
  margin-top: 0.5rem;
}

/* -----------------------------------------------------------------------------
   Purchase Buttons
   ----------------------------------------------------------------------------- */

.purchase-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.purchase-btn .price {
  font-weight: 600;
  font-size: 14px;
}

/* TCGPlayer - Orange theme */
.purchase-btn.tcgplayer {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.15), rgba(249, 115, 22, 0.05));
  border: 1px solid rgba(249, 115, 22, 0.3);
  color: #EAEAEA;
}

.purchase-btn.tcgplayer:hover {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.25), rgba(249, 115, 22, 0.1));
  border-color: rgba(249, 115, 22, 0.5);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.2);
}

.purchase-btn.tcgplayer .price {
  color: #F97316;
}

/* ManaTraders - Blue theme */
.purchase-btn.manatraders {
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.15), rgba(96, 165, 250, 0.05));
  border: 1px solid rgba(96, 165, 250, 0.3);
  color: #EAEAEA;
}

.purchase-btn.manatraders:hover {
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.25), rgba(96, 165, 250, 0.1));
  border-color: rgba(96, 165, 250, 0.5);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(96, 165, 250, 0.2);
}

.purchase-btn.manatraders .price {
  color: #60A5FA;
}

/* ManaTraders Rent - Green theme */
.purchase-btn.manatraders-rent {
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.15), rgba(52, 211, 153, 0.05));
  border: 1px solid rgba(52, 211, 153, 0.3);
  color: #EAEAEA;
}

.purchase-btn.manatraders-rent:hover {
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.25), rgba(52, 211, 153, 0.1));
  border-color: rgba(52, 211, 153, 0.5);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(52, 211, 153, 0.2);
}

.purchase-btn.manatraders-rent .price {
  color: #34D399;
}

/* -----------------------------------------------------------------------------
   Type Pills Row
   ----------------------------------------------------------------------------- */

.type-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.15);
}

/* Inline pills in header (next to MAINBOARD count) */
.type-pills-inline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
}

.type-pills-inline .type-pill {
  padding: 2px 8px;
  font-size: 10px;
  gap: 3px;
}

.type-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #EAEAEA;
}

.type-pill .type-label {
  font-weight: 500;
  color: #9CA3AF;
}

.type-pill .type-count {
  font-weight: 700;
  color: #EAEAEA;
}

.type-pill.creatures {
  background: rgba(156, 163, 175, 0.1);
  border-color: rgba(156, 163, 175, 0.2);
}

.type-pill.creatures .type-count {
  color: #D4D4D4;
}

.type-pill.spells {
  background: rgba(212, 175, 55, 0.1);
  border-color: rgba(212, 175, 55, 0.2);
}

.type-pill.spells .type-count {
  color: #D4AF37;
}

.type-pill.spells .spell-breakdown {
  font-size: 9px;
  color: #9CA3AF;
  font-weight: 400;
  margin-left: 4px;
  padding-left: 6px;
  border-left: 1px solid rgba(255, 255, 255, 0.15);
}

.type-pill.lands {
  background: rgba(52, 211, 153, 0.1);
  border-color: rgba(52, 211, 153, 0.2);
}

.type-pill.lands .type-count {
  color: #34D399;
}

/* No-headers mode spacing */
.deck-card-sections.no-headers .deck-card-section {
  padding-top: 4px;
}

.deck-card-sections.no-headers .deck-card-section + .deck-card-section {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* -----------------------------------------------------------------------------
   Modern Deck Header Animations
   ----------------------------------------------------------------------------- */

/* Header entry animation */
.deck-header-animated {
  animation: headerSlideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes headerSlideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Guild icon pulse animation */
.guild-icon-animated {
  animation: guildIconEnter 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s both;
}

@keyframes guildIconEnter {
  from {
    opacity: 0;
    transform: scale(0.5) rotate(-10deg);
  }
  to {
    opacity: 1;
    transform: scale(1) rotate(0);
  }
}

.guild-icon-animated:hover {
  animation: guildIconPulse 0.5s ease;
}

@keyframes guildIconPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* Title shimmer effect */
.deck-title-animated {
  animation: titleReveal 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both;
  background: linear-gradient(
    90deg,
    var(--deck-primary) 0%,
    #EAEAEA 50%,
    var(--deck-primary) 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.deck-title-animated:hover {
  animation: titleShimmer 2s ease-in-out infinite;
}

@keyframes titleReveal {
  from {
    opacity: 0;
    transform: translateX(-15px);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
    filter: blur(0);
  }
}

@keyframes titleShimmer {
  0% { background-position: 200% center; }
  100% { background-position: -200% center; }
}

/* Action buttons animation */
.deck-actions-animated {
  animation: actionsSlideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

@keyframes actionsSlideIn {
  from {
    opacity: 0;
    transform: translateX(15px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Modern button hover effects */
.animated-btn {
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.animated-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.animated-btn:hover::before {
  opacity: 1;
}

.animated-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3),
              0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.animated-btn:active {
  transform: translateY(0) scale(0.98);
}

/* Share menu animation */
.share-menu-animated {
  animation: shareMenuOpen 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  transform-origin: top right;
}

@keyframes shareMenuOpen {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Tag staggered animation */
.tag-animated {
  animation: tagSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(0.3s + var(--tag-index, 0) * 0.08s);
}

@keyframes tagSlideIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Tag hover effect */
.deck-tag {
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.deck-tag:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  border-color: var(--deck-primary);
}

/* Verified badge glow */
.verified-badge {
  color: #D4AF37;
  margin-left: 4px;
  animation: verifiedPulse 2s ease-in-out infinite;
}

@keyframes verifiedPulse {
  0%, 100% {
    text-shadow: 0 0 4px rgba(212, 175, 55, 0.5);
  }
  50% {
    text-shadow: 0 0 12px rgba(212, 175, 55, 0.8), 0 0 20px rgba(212, 175, 55, 0.4);
  }
}

/* Placement badge styling */
.placement-badge {
  background: linear-gradient(135deg, #D4AF37 0%, #B8860B 100%);
  color: #1A1A1A;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 10px;
  margin-left: 6px;
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}

/* Format and platform tag special styling */
.deck-tag.format,
.deck-tag.platform {
  background: rgba(var(--deck-primary-rgb, 91, 192, 190), 0.15);
  border-color: rgba(var(--deck-primary-rgb, 91, 192, 190), 0.3);
}

/* Small action buttons for mainboard header */
.deck-action-btn-sm {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 6px;
  transition: all 0.2s ease;
  cursor: pointer;
  white-space: nowrap;
}

.deck-action-btn-sm.primary {
  background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
  color: white;
  border: none;
}

.deck-action-btn-sm.primary:hover {
  background: linear-gradient(135deg, #60A5FA 0%, #3B82F6 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.deck-action-btn-sm.secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #EAEAEA;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.deck-action-btn-sm.secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

/* Compact purchase panel */
.purchase-panel-compact .deck-panel-header {
  padding: 8px 12px;
}

.purchase-btn-compact {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.purchase-btn-compact.tcgplayer {
  background: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%);
  color: white;
}

.purchase-btn-compact.tcgplayer:hover {
  background: linear-gradient(135deg, #60A5FA 0%, #3B82F6 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.purchase-btn-compact.manatraders {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  color: white;
}

.purchase-btn-compact.manatraders:hover {
  background: linear-gradient(135deg, #34D399 0%, #10B981 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.purchase-btn-compact.manatraders-rent {
  background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%);
  color: white;
}

.purchase-btn-compact.manatraders-rent:hover {
  background: linear-gradient(135deg, #A78BFA 0%, #8B5CF6 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

/* Ensure sidebar panels align properly */
.lg\:col-span-4 .deck-panel {
  margin-bottom: 0;
}

/* ========================================
   DRAW 7 MODAL - WOW FACTOR ANIMATIONS
   ======================================== */

/* Accent button style for Draw 7 */
.deck-action-btn-sm.accent {
  background: linear-gradient(135deg, #8B5CF6 0%, #6D28D9 100%);
  color: white;
  border: none;
}

.deck-action-btn-sm.accent:hover {
  background: linear-gradient(135deg, #A78BFA 0%, #8B5CF6 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.5);
}

/* Modal Overlay */
.draw-modal-overlay {
  background: rgba(0, 0, 0, 0);
  backdrop-filter: blur(0px);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.draw-modal-overlay.active {
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
}

/* Modal Container */
.draw-modal-container {
  background: linear-gradient(145deg, #1a1a2e 0%, #16213e 50%, #0f0f23 100%);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 24px;
  padding: 0;
  width: 95%;
  max-width: 950px; /* Wider to fit 7 cards in a row */
  max-height: 90vh;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.05),
    0 25px 50px -12px rgba(0, 0, 0, 0.5),
    0 0 100px rgba(139, 92, 246, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transform: scale(0.8) translateY(30px);
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.draw-modal-container.active {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* Modal Header */
.draw-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(139, 92, 246, 0.15) 0%, transparent 100%);
}

.draw-modal-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, #8B5CF6 0%, #6D28D9 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 8px 20px rgba(139, 92, 246, 0.4);
  animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
  0%, 100% { box-shadow: 0 8px 20px rgba(139, 92, 246, 0.4); }
  50% { box-shadow: 0 8px 30px rgba(139, 92, 246, 0.6), 0 0 40px rgba(139, 92, 246, 0.3); }
}

.draw-modal-close {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #9CA3AF;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.draw-modal-close:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.3);
  color: #EF4444;
  transform: rotate(90deg);
}

/* Cards Display */
.draw-modal-cards {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 32px 24px;
  flex-wrap: nowrap; /* Desktop: single row, no wrap */
  min-height: 280px;
  background: radial-gradient(ellipse at center, rgba(139, 92, 246, 0.05) 0%, transparent 70%);
  overflow-x: auto;
}

.draw-card-wrapper {
  perspective: 1000px;
  transform-style: preserve-3d;
  flex-shrink: 0; /* Prevent cards from shrinking on desktop */
}

/* Idle state - no animation, cards visible */
.draw-card-wrapper.idle {
  opacity: 1;
  transform: translateY(0) rotateX(0) rotateZ(0) scale(1);
}

/* Card deal animation (initial draw) */
.draw-card-wrapper.dealing {
  opacity: 0;
  transform: translateY(50px) rotateX(30deg) scale(0.8);
  animation: cardDeal 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: calc(var(--card-index) * 0.1s);
}

/* Shuffle out animation (before new cards are dealt) */
.draw-card-wrapper.shuffling-out {
  animation: cardShuffleOut 0.4s cubic-bezier(0.55, 0.055, 0.675, 0.19) forwards;
  animation-delay: calc(var(--card-index) * 0.03s);
}

/* Shuffle in animation (new cards being dealt) */
.draw-card-wrapper.shuffling-in {
  opacity: 0;
  animation: cardShuffleIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: calc(0.3s + var(--card-index) * 0.08s);
}

@keyframes cardDeal {
  0% {
    opacity: 0;
    transform: translateY(80px) rotateX(40deg) rotateZ(-10deg) scale(0.7);
    filter: blur(4px);
  }
  60% {
    transform: translateY(-10px) rotateX(-5deg) rotateZ(2deg) scale(1.05);
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: translateY(0) rotateX(0) rotateZ(0) scale(1);
  }
}

@keyframes cardShuffleOut {
  0% {
    opacity: 1;
    transform: translateY(0) rotateY(0) scale(1);
  }
  50% {
    opacity: 0.8;
    transform: translateY(-20px) rotateY(90deg) scale(0.9);
  }
  100% {
    opacity: 0;
    transform: translateY(-40px) rotateY(180deg) scale(0.5) translateX(calc(var(--card-index) * -30px + 90px));
    filter: blur(3px);
  }
}

@keyframes cardShuffleIn {
  0% {
    opacity: 0;
    transform: translateY(-60px) rotateY(-180deg) rotateZ(calc(var(--card-index) * 5deg - 15deg)) scale(0.3);
    filter: blur(4px);
  }
  40% {
    transform: translateY(10px) rotateY(-90deg) rotateZ(0deg) scale(0.95);
    filter: blur(1px);
  }
  70% {
    opacity: 1;
    transform: translateY(-5px) rotateY(-10deg) scale(1.02);
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: translateY(0) rotateY(0) rotateZ(0) scale(1);
  }
}

/* Magic sparkle effect during shuffle */
.draw-modal-cards.shuffling::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 200px;
  height: 200px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(139, 92, 246, 0.6) 0%, transparent 70%);
  animation: shuffleGlow 0.6s ease-out forwards;
  pointer-events: none;
  border-radius: 50%;
}

@keyframes shuffleGlow {
  0% {
    width: 50px;
    height: 50px;
    opacity: 1;
  }
  100% {
    width: 400px;
    height: 400px;
    opacity: 0;
  }
}

.draw-card-image {
  width: 110px; /* Slightly smaller to fit 7 comfortably */
  height: auto;
  border-radius: 8px;
  box-shadow:
    0 8px 25px rgba(0, 0, 0, 0.5),
    0 0 20px rgba(139, 92, 246, 0.2);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.draw-card-image:hover {
  transform: translateY(-15px) scale(1.1);
  box-shadow:
    0 15px 40px rgba(0, 0, 0, 0.6),
    0 0 40px rgba(139, 92, 246, 0.4);
  z-index: 10;
}

.draw-card-placeholder {
  width: 110px;
  height: 154px;
  border-radius: 8px;
  background: linear-gradient(145deg, #2a2a4a 0%, #1a1a2e 100%);
  border: 1px dashed rgba(139, 92, 246, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  color: #9CA3AF;
  flex-shrink: 0;
}

/* Modal Actions */
.draw-modal-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 20px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.2) 0%, transparent 100%);
  flex-wrap: wrap;
}

.draw-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border: none;
}

.draw-action-btn.mulligan {
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
  color: white;
}

.draw-action-btn.mulligan:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(245, 158, 11, 0.4);
}

.draw-action-btn.new-hand {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  color: white;
}

.draw-action-btn.new-hand:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

.draw-action-btn.close {
  background: rgba(255, 255, 255, 0.1);
  color: #EAEAEA;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.draw-action-btn.close:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

/* Disabled state for action buttons during shuffle */
.draw-action-btn.disabled,
.draw-action-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.draw-action-btn.disabled:hover,
.draw-action-btn:disabled:hover {
  transform: none !important;
}

/* Spin animation for icons */
.animate-spin {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .draw-modal-container {
    width: 95%;
    max-width: none;
    border-radius: 16px;
  }
  
  .draw-modal-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Max 3 cards per row on mobile */
    gap: 10px;
    padding: 20px 16px;
    flex-wrap: wrap;
    overflow-x: visible;
    justify-items: center;
  }
  
  .draw-card-wrapper {
    flex-shrink: 1;
  }
  
  .draw-card-image {
    width: 90px;
  }
  
  .draw-card-placeholder {
    width: 90px;
    height: 126px;
  }
  
  .draw-modal-actions {
    padding: 16px;
    gap: 8px;
  }
  
  .draw-action-btn {
    padding: 8px 14px;
    font-size: 12px;
  }
}

/* Extra small screens */
@media (max-width: 480px) {
  .draw-modal-cards {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 16px 12px;
  }
  
  .draw-card-image {
    width: 80px;
  }
  
  .draw-card-placeholder {
    width: 80px;
    height: 112px;
  }
}
