/* =======================================================
   MTGSTORM - PALETA PROPIA: ONYX & STORM AMBER/ELECTRIC
   ======================================================= */
:root {
  /* Fondo negro profundo obsidiana */
  --bg-app: #050608;
  --bg-surface: #0a0c12;
  --bg-surface-elevated: #10131c;
  --bg-surface-card: #0d1017;
  --bg-input: #07090e;

  /* Bordes de precisión sutiles (look Linear/Vercel) */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.16);
  --border-focus: #38bdf8;

  /* Tipografía */
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;
  --text-faint: #475569;

  /* Identidad Storm: Eléctrico / Oro / Acentos */
  --storm-cyan: #38bdf8;
  --storm-amber: #f59e0b;
  --storm-violet: #818cf8;
}

body {
  background-color: var(--bg-app) !important;
  color: var(--text-secondary) !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  -webkit-font-smoothing: antialiased;
}

/* --- TARJETAS DE ARQUETIPO (GRID) --- */
.archetype-card {
  background: var(--bg-surface-card) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: 12px !important;
  padding: 13px 15px !important;
  display: flex !important;
  align-items: center !important;
  gap: 13px !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  cursor: pointer !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4) !important;
}

.archetype-card:hover {
  background: var(--bg-surface-elevated) !important;
  border-color: rgba(56, 189, 248, 0.3) !important;
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 1px 1px rgba(56, 189, 248, 0.2) !important;
}

.archetype-avatar {
  border-radius: 10px !important;
  border: 1px solid var(--border-subtle) !important;
  object-fit: cover !important;
}

.archetype-name {
  font-size: 0.94rem !important;
  font-weight: 600 !important;
  color: var(--text-primary) !important;
  letter-spacing: -0.015em;
}

.archetype-stats {
  font-size: 0.76rem !important;
  color: var(--text-muted) !important;
  margin-top: 2px;
  font-feature-settings: "tnum";
}

/* Indicador de Conversión a Top 8 con estilo Storm Amber */
.archetype-card div[style*="color: #3fb950"],
.archetype-card div[style*="⚡"] {
  color: #fbbf24 !important;
  font-size: 0.75rem !important;
  font-weight: 500 !important;
  font-feature-settings: "tnum";
  letter-spacing: 0.01em;
}

.archetype-card div[style*="⚡"] b {
  color: #fef08a !important;
  font-weight: 700;
}

/* --- WIDGETS LATERALES (DONA Y CARTAS DESTACADAS) --- */
#cardsStatsList li {
  padding: 7px 0 !important;
  border-bottom: 1px solid var(--border-subtle) !important;
  font-size: 0.84rem !important;
}

#cardsStatsList li:last-child {
  border-bottom: none !important;
}

.card-name-link {
  color: var(--text-secondary) !important;
  font-weight: 500 !important;
  text-decoration: none !important;
  transition: color 0.15s ease;
}

.card-name-link:hover {
  color: var(--storm-cyan) !important;
}

#cardsStatsList span[style*="color: var(--text-muted)"] {
  color: var(--text-muted) !important;
  font-size: 0.8rem !important;
  font-feature-settings: "tnum";
}

/* --- CABECERA Y FILTROS UNIFICADOS --- */
header button, nav button, .header-actions button,
button[onclick*="openWinrateMatrixModal"],
button[onclick*="openStaplesModal"],
button[onclick*="openTournamentsModal"] {
  background: var(--bg-surface) !important;
  border: 1px solid var(--border-subtle) !important;
  color: var(--text-secondary) !important;
  border-radius: 8px !important;
  font-weight: 500 !important;
  padding: 6px 14px !important;
  transition: all 0.15s ease !important;
}

header button:hover, nav button:hover,
button[onclick*="openWinrateMatrixModal"]:hover,
button[onclick*="openStaplesModal"]:hover,
button[onclick*="openTournamentsModal"]:hover {
  background: var(--bg-surface-elevated) !important;
  border-color: var(--border-hover) !important;
  color: #ffffff !important;
}

button[onclick*="openTournamentsModal"] {
  border-color: rgba(245, 158, 11, 0.3) !important;
  color: #fbbf24 !important;
}

select, input[type="text"] {
  background: var(--bg-input) !important;
  border: 1px solid var(--border-subtle) !important;
  color: var(--text-primary) !important;
  border-radius: 8px !important;
  padding: 6px 12px !important;
  outline: none !important;
}

select:focus, input[type="text"]:focus {
  border-color: var(--border-focus) !important;
}

/* --- PWA TOAST ELEGANTE --- */
#pwa-install-banner {
  background: rgba(10, 12, 18, 0.95) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  backdrop-filter: blur(16px) !important;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.8) !important;
}

#pwa-install-banner button#btn-install {
  background: #2563eb !important;
  color: #fff !important;
  border-radius: 6px !important;
  font-weight: 600 !important;
}

/* =======================================================
   MODALES GLOBALES (ESTILO ELEVADO & GLASS)
   ======================================================= */
.modal-overlay, #archetypeModal, #tournamentsModal, #winrateMatrixModal, #staplesModal, #matrixModal, #dciModal {
  backdrop-filter: blur(10px) !important;
  background-color: rgba(3, 4, 7, 0.82) !important;
}

.modal-content, .modal-card,
#tournamentsModal .modal-content,
#winrateMatrixModal .modal-card,
#staplesModal .modal-card,
#matrixModal > div,
#archetypeModal > div,
#dciModal > div {
  background: var(--bg-surface) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: 14px !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85), 0 0 1px 1px rgba(255, 255, 255, 0.04) !important;
}

/* Encabezados de modal */
.modal-content > div:first-child,
.modal-card > div:first-child,
#tournamentsModal [style*="border-bottom: 1px solid #30363d"] {
  background: var(--bg-surface-elevated) !important;
  border-bottom: 1px solid var(--border-subtle) !important;
}

/* =======================================================
   DETALLE DE ARQUETIPO & DECK VIEWER
   ======================================================= */
#deckViewerContainer {
  background: var(--bg-surface-card) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: 10px !important;
}

/* Botones neutros de exportación (Share, Arena, TXT) */
button[onclick*="copyShareUrl"],
button[onclick*="copyToArena"],
button[onclick*="downloadDeckTxt"] {
  background: var(--bg-surface-elevated) !important;
  border: 1px solid var(--border-subtle) !important;
  color: var(--text-secondary) !important;
  border-radius: 6px !important;
  font-weight: 500 !important;
  transition: all 0.15s ease !important;
}

button[onclick*="copyShareUrl"]:hover,
button[onclick*="copyToArena"]:hover,
button[onclick*="downloadDeckTxt"]:hover {
  border-color: var(--border-hover) !important;
  color: #fff !important;
  background: rgba(255, 255, 255, 0.08) !important;
}

/* Botón PDF Registro DCI */
button[onclick*="openDciModal"] {
  background: #166534 !important;
  border: 1px solid rgba(74, 222, 128, 0.3) !important;
  color: #dcfce7 !important;
  font-weight: 600 !important;
  border-radius: 6px !important;
}

/* Botones afiliados MKM / TCG / Cardhoarder */
#deckViewerContainer [style*="grid-template-columns"] a {
  border-radius: 8px !important;
  border: 1px solid var(--border-subtle) !important;
  transition: transform 0.15s ease, filter 0.15s ease !important;
}

#deckViewerContainer [style*="grid-template-columns"] a:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
}

/* Listados Maindeck / Sideboard */
.decklist-columns {
  gap: 20px !important;
}

.deck-section h4 {
  color: var(--text-primary) !important;
  font-size: 0.82rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
  border-bottom: 1px solid var(--border-subtle) !important;
  padding-bottom: 6px !important;
}

.deck-section ul li {
  padding: 3px 0 !important;
  font-size: 0.87rem !important;
}

.deck-section .qty {
  color: var(--text-muted) !important;
  font-family: monospace !important;
  font-weight: 700 !important;
}

.deck-section .card-price {
  color: #94a3b8 !important;
  font-family: monospace !important;
  font-size: 0.82rem !important;
  font-weight: 500 !important;
}

/* =======================================================
   NAVEGADOR DE TORNEOS (MODAL & VISTA DETALLE)
   ======================================================= */
.tourney-pill {
  background: var(--bg-surface) !important;
  border: 1px solid var(--border-subtle) !important;
  color: var(--text-muted) !important;
  border-radius: 20px !important;
}

.tourney-pill:hover {
  border-color: var(--border-hover) !important;
  color: var(--text-primary) !important;
}

.tourney-pill.active {
  background: #1e3a5f !important;
  border-color: var(--storm-cyan) !important;
  color: #e0f2fe !important;
}

#tournamentsListBody table tr {
  border-bottom: 1px solid var(--border-subtle) !important;
}

#tournamentsListBody table tr:hover {
  background: var(--bg-surface-elevated) !important;
}

/* =======================================================
   MATRIZ DE WINRATES & FLEX SLOTS HEATMAP
   ======================================================= */
#winrateMatrixModal table, #matrixModal table {
  border: 1px solid var(--border-subtle) !important;
}

#winrateMatrixModal th, #matrixModal th {
  background: var(--bg-surface-elevated) !important;
  border-color: var(--border-subtle) !important;
  color: var(--text-muted) !important;
}

/* Suavizado del heatmap: fuera colores chillones */
#winrateMatrixModal td[style*="background: #13381e"],
#winrateMatrixModal td[style*="background: #1a4224"] {
  background: rgba(34, 197, 94, 0.16) !important;
  color: #4ade80 !important;
}

#winrateMatrixModal td[style*="background: #49181c"],
#winrateMatrixModal td[style*="background: #391519"] {
  background: rgba(239, 68, 68, 0.16) !important;
  color: #f87171 !important;
}

#winrateMatrixModal td[style*="background: #28231c"] {
  background: rgba(245, 158, 11, 0.14) !important;
  color: #fbbf24 !important;
}

/* =======================================================
   REFINAMIENTO TÁCTICO: DETALLE DE ARQUETIPO
   ======================================================= */

/* Barra resumen (Listas analizadas, Winrate, Partidas) */
#modalBody div[style*="background: #21262d; padding: 10px 15px"] {
  background: var(--bg-surface-elevated) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: 10px !important;
  color: var(--text-secondary) !important;
  font-feature-settings: "tnum";
}

#modalBody div[style*="background: #21262d; padding: 10px 15px"] b {
  color: var(--text-primary) !important;
}

/* Desplegable de Matchups */
.matchups-dropdown {
  background: var(--bg-surface-elevated) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: 10px !important;
  margin-bottom: 20px !important;
  overflow: hidden;
}

.matchups-dropdown summary {
  padding: 12px 16px !important;
  font-size: 0.9rem !important;
  font-weight: 600 !important;
  color: var(--text-primary) !important;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.02) !important;
  user-select: none;
}

.matchups-dropdown summary:hover {
  background: rgba(255, 255, 255, 0.05) !important;
}

.matchups-content {
  padding: 14px !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  background: var(--bg-surface) !important;
  border-top: 1px solid var(--border-subtle) !important;
}

/* Cápsulas de Matchup individuales */
.matchup-bubble {
  background: var(--bg-surface-elevated) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: 8px !important;
  padding: 6px 12px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  font-size: 0.82rem !important;
  transition: border-color 0.15s ease, background 0.15s ease !important;
}

.matchup-bubble:hover {
  border-color: var(--border-hover) !important;
  background: rgba(255, 255, 255, 0.06) !important;
}

.matchup-bubble .rival {
  color: var(--text-secondary) !important;
  font-weight: 500;
}

.matchup-bubble .stats {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-feature-settings: "tnum";
}

/* Alineación limpia de precios de cartas */
.deck-section li {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding: 3px 0 !important;
}

.deck-section .card-price {
  min-width: 65px !important;
  text-align: right !important;
  font-family: var(--font-mono, monospace) !important;
  font-feature-settings: "tnum" !important;
  color: #94a3b8 !important;
  font-size: 0.82rem !important;
}

/* Bloque inferior de afiliados (MKM, TCG, MTGO) */
#deckViewerContainer [style*="grid-template-columns"] {
  border-top: 1px solid var(--border-subtle) !important;
  padding-top: 14px !important;
  gap: 12px !important;
}

#deckViewerContainer [style*="grid-template-columns"] a {
  border: 1px solid var(--border-subtle) !important;
  border-radius: 8px !important;
  padding: 10px 14px !important;
  font-size: 0.84rem !important;
  font-weight: 500 !important;
}

/* MKM */
#deckViewerContainer a[href*="cardmarket.com"] {
  background: #1e3a8a !important;
  border-color: rgba(96, 165, 250, 0.3) !important;
  color: #eff6ff !important;
}

/* TCGPlayer */
#deckViewerContainer a[onclick*="exportToTCGPlayer"] {
  background: var(--bg-surface-elevated) !important;
  border-color: var(--border-subtle) !important;
  color: var(--text-primary) !important;
}

/* Cardhoarder */
#deckViewerContainer a[onclick*="exportToCardhoarder"] {
  background: #4c1d95 !important;
  border-color: rgba(192, 132, 252, 0.3) !important;
  color: #faf5ff !important;
}

/* =======================================================
   REFINAMIENTO DECKLIST & HISTORIAL LATERAL
   ======================================================= */

/* Nombres de cartas: Blanco app nativa en vez de azul hipervínculo */
.deck-section a.card-name-link,
#deckViewerContainer a.card-name-link {
  color: #f1f5f9 !important;
  text-decoration: none !important;
  font-weight: 500 !important;
  transition: color 0.12s ease !important;
}

.deck-section a.card-name-link:hover,
#deckViewerContainer a.card-name-link:hover {
  color: var(--storm-cyan) !important;
  text-decoration: none !important;
}

/* Cantidades en la decklist */
.deck-section .qty {
  color: var(--text-muted) !important;
  font-family: monospace !important;
  font-weight: 600 !important;
  display: inline-block;
  min-width: 20px;
}

/* Precios alineados y en gris metálico discreto */
.deck-section .card-price {
  color: #94a3b8 !important;
  font-family: monospace !important;
  font-size: 0.82rem !important;
}

/* Contenedor de curva de maná */
[id^="deckCurveSlot_"] {
  background: var(--bg-surface) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: 8px !important;
  padding: 10px 14px !important;
  margin: 12px 0 16px 0 !important;
}

/* Columna lateral: Historial de Listas */
.modal-body-grid > div:last-child > div {
  background: var(--bg-surface-card) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: 10px !important;
}

.modal-body-grid table tr {
  border-bottom: 1px solid var(--border-subtle) !important;
  transition: background 0.12s ease !important;
}

.modal-body-grid table tr:hover {
  background: var(--bg-surface-elevated) !important;
}

.modal-body-grid table td {
  padding: 8px 10px !important;
}

/* Píldoras de posición (#1, Top 4, etc.) */
.modal-body-grid table td span[style*="border-radius"] {
  font-family: monospace !important;
  letter-spacing: 0.02em;
}

/* =======================================================
   TOOLBAR Y BOTONERA SUPERIOR DECKLIST
   ======================================================= */
#deckViewerContainer button {
  border-radius: 6px !important;
  font-size: 0.8rem !important;
  font-weight: 500 !important;
  padding: 5px 11px !important;
  transition: all 0.15s ease !important;
}

/* Botones secundarios (Compartir, Arena, Descargar) */
#deckViewerContainer button[onclick*="copyShareUrl"],
#deckViewerContainer button[onclick*="copyToArena"],
#deckViewerContainer button[onclick*="downloadDeckTxt"] {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #cbd5e1 !important;
}

#deckViewerContainer button[onclick*="copyShareUrl"]:hover,
#deckViewerContainer button[onclick*="copyToArena"]:hover,
#deckViewerContainer button[onclick*="downloadDeckTxt"]:hover {
  background: rgba(255, 255, 255, 0.09) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
}

/* Botón Flex Slots (Acento Eléctrico Storm) */
#deckViewerContainer #btn-matrix-main,
#deckViewerContainer #btn-matrix-tourney,
#deckViewerContainer button[onclick*="openArchetypeMatrixModal"] {
  background: #0284c7 !important;
  border: 1px solid #38bdf8 !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.2) !important;
}

#deckViewerContainer #btn-matrix-main:hover,
#deckViewerContainer button[onclick*="openArchetypeMatrixModal"]:hover {
  background: #0369a1 !important;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.35) !important;
}

/* Botón Sideboard Guide */
#deckViewerContainer #btn-sideboard-guide-main,
#deckViewerContainer button[onclick*="openSideboardGuideModal"] {
  background: #7c3aed !important;
  border: 1px solid #a78bfa !important;
  color: #ffffff !important;
  font-weight: 600 !important;
}

/* Botón PDF (Verde Esmeralda Técnico) */
#deckViewerContainer button[onclick*="openDciModal"] {
  background: rgba(22, 101, 52, 0.8) !important;
  border: 1px solid rgba(74, 222, 128, 0.4) !important;
  color: #86efac !important;
  font-weight: 600 !important;
}

#deckViewerContainer button[onclick*="openDciModal"]:hover {
  background: rgba(22, 101, 52, 1) !important;
  border-color: #4ade80 !important;
  color: #ffffff !important;
}

/* =======================================================
   ENLACES DE CARTAS EN BLANCO NATIVO (MAIN & SIDE)
   ======================================================= */
#deckViewerContainer .deck-section a,
#deckViewerContainer .deck-section a.card-name-link,
.deck-section a,
.deck-section .card-name-link {
  color: #f1f5f9 !important;
  font-weight: 500 !important;
  text-decoration: none !important;
  transition: color 0.12s ease !important;
}

#deckViewerContainer .deck-section a:hover,
#deckViewerContainer .deck-section a.card-name-link:hover,
.deck-section a:hover,
.deck-section .card-name-link:hover {
  color: #38bdf8 !important;
}

/* =======================================================
   HISTORIAL LATERAL (JUGADORES)
   ======================================================= */
.modal-body-grid table td div[style*="color: #58a6ff"] {
  color: #e2e8f0 !important;
  font-weight: 600 !important;
}

.modal-body-grid table tr:hover td div[style*="color: #58a6ff"] {
  color: #38bdf8 !important;
}

/* Matchups desplegables: estilo cápsula oscura con borde sutil */
.matchups-dropdown summary {
  background: #0d1017 !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  border-radius: 8px !important;
  padding: 10px 14px !important;
  color: #f1f5f9 !important;
  font-weight: 600 !important;
  outline: none;
}

.matchup-bubble {
  background: #11141d !important;
  border: 1px solid rgba(255, 255, 255, 0.07) !important;
  border-radius: 8px !important;
  padding: 5px 10px !important;
}

.matchup-bubble .rival {
  color: #cbd5e1 !important;
}

/* Curva de maná: barras más sutiles */
[id^="deckCurveSlot_"] {
  background: #090c12 !important;
  border: 1px solid rgba(255, 255, 255, 0.05) !important;
  border-radius: 8px !important;
  padding: 10px 14px !important;
  margin-bottom: 16px !important;
}

/* Columna lateral: Historial de Listas */
.modal-body-grid > div:last-child > div {
  background: #0d1017 !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  border-radius: 12px !important;
}

.modal-body-grid table thead tr {
  background: #080a0f !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
}

.modal-body-grid table td div[style*="color: #58a6ff"] {
  color: #f1f5f9 !important;
  font-weight: 500 !important;
}

/* =======================================================
   BADGES DE ENFRENTAMIENTOS (TELEMETRÍA ANALÍTICA)
   ======================================================= */
.matchup-bubble {
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.07) !important;
  border-radius: 6px !important;
  padding: 4px 9px !important;
}

.matchup-bubble:hover {
  background: rgba(255, 255, 255, 0.07) !important;
  border-color: rgba(255, 255, 255, 0.16) !important;
}

.matchup-bubble .rival {
  color: #e2e8f0 !important;
  font-size: 0.8rem !important;
}

.matchup-bubble .stats span[style*="color: var(--text-muted)"] {
  color: #64748b !important;
  font-size: 0.72rem !important;
}

/* =======================================================
   CURVA DE MANÁ: BARRAS SUAVES Y BADGE TOTAL
   ======================================================= */
[id^="deckCurveSlot_"] span[style*="background: #e03131"],
[id^="deckCurveSlot_"] span[style*="background: #238636"] {
  border-radius: 4px !important;
  font-weight: 600 !important;
  padding: 2px 7px !important;
  font-size: 0.75rem !important;
}

/* Redondear esquinas superiores de las columnas del histograma */
[id^="deckCurveSlot_"] .curve-bar,
[id^="deckCurveSlot_"] [style*="background: #1f6feb"],
[id^="deckCurveSlot_"] [style*="background: rgb(31, 111, 235)"] {
  background: #2563eb !important;
  border-radius: 3px 3px 0 0 !important;
}

/* Nombres de cartas: blanco nítido tipo app nativa */
#deckViewerContainer a,
#deckViewerContainer a:visited,
.deck-section a,
.deck-section .card-name-link {
  color: #f1f5f9 !important;
  text-decoration: none !important;
  font-weight: 500 !important;
}

#deckViewerContainer a:hover,
.deck-section a:hover,
.deck-section .card-name-link:hover {
  color: #38bdf8 !important;
  text-decoration: none !important;
}

/* =======================================================
   BLANCO NATIVO PARA CARTAS (MAINDECK & SIDEBOARD)
   ======================================================= */
#archetypeModal a,
#archetypeModal a:link,
#archetypeModal a:visited,
.card-name-link {
  color: #f1f5f9 !important;
  text-decoration: none !important;
  font-weight: 500 !important;
}

#archetypeModal a:hover,
.card-name-link:hover {
  color: #38bdf8 !important;
}

/* Corrección estricta de hipervínculos de cartas */
.deck-section a,
.deck-section a:link,
.deck-section a:visited,
.deck-section .card-name-link {
  color: #f1f5f9 !important;
  background: transparent !important;
  text-decoration: none !important;
  font-weight: 500 !important;
}

.deck-section a:hover,
.deck-section .card-name-link:hover {
  color: #38bdf8 !important;
  background: transparent !important;
}

.deck-section li div {
  background: transparent !important;
}

/* =======================================================
   RESET COMPLETO FONDOS DECKLIST (NO BACKGROUND AZUL)
   ======================================================= */
.deck-section li,
.deck-section li div,
.deck-section li a,
.deck-section li span,
#deckViewerContainer .card-name-link {
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
}

.deck-section a.card-name-link {
  color: #f1f5f9 !important;
  text-decoration: none !important;
  font-weight: 500 !important;
}

.deck-section a.card-name-link:hover {
  color: #38bdf8 !important;
  background: transparent !important;
}

/* =======================================================
   SUPRESIÓN ABSOLUTA DE FONDOS AZULES EN CARTAS
   ======================================================= */
#archetypeModal .deck-section *,
#deckViewerContainer .deck-section *,
.decklist-columns * {
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

#archetypeModal .deck-section a,
#deckViewerContainer .deck-section a,
.card-name-link {
  color: #f1f5f9 !important;
  display: inline !important;
  padding: 0 !important;
  margin: 0 !important;
  text-decoration: none !important;
  font-weight: 500 !important;
}

#archetypeModal .deck-section a:hover,
#deckViewerContainer .deck-section a:hover,
.card-name-link:hover {
  color: #38bdf8 !important;
  text-decoration: underline !important;
}

/* Conservar el badge de Rarezas CMC (34 R) sin alterarlo */
[id^="deckCurveSlot_"] span {
  background-color: inherit !important;
  border-radius: 4px !important;
}
