/* CSS para Academia de magia e ilusionismo */
:root {
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  --font-heading: 'Outfit', 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Paleta mística Midnight */
  --bg-deep: #090a10;
  --bg-card: #12131f;
  --bg-card-hover: #191b2c;
  --bg-input: #1a1c30;
  --border-card: #272a45;
  --border-color: #272a45;
  --border-focus: #7c3aed;
  
  --primary: #8b5cf6;
  --primary-hover: #7c3aed;
  --primary-glow: rgba(139, 92, 246, 0.35);
  --primary-light: rgba(139, 92, 246, 0.15);
  
  --accent-gold: #f59e0b;
  --accent-gold-glow: rgba(245, 158, 11, 0.3);
  --accent-cyan: #06b6d4;
  --accent-emerald: #10b981;
  --accent-rose: #f43f5e;

  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --card-radius: 16px;
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-mystic: 0 12px 36px -8px rgba(0, 0, 0, 0.6), 0 0 20px -2px rgba(139, 92, 246, 0.15);
}

[data-theme="light"] {
  --bg-deep: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-input: #f1f5f9;
  --border-card: #cbd5e1;
  --border-color: #cbd5e1;
  --border-focus: #7c3aed;
  
  --primary: #7c3aed;
  --primary-hover: #6d28d9;
  --primary-glow: rgba(124, 58, 217, 0.2);
  --primary-light: rgba(124, 58, 217, 0.12);
  
  --accent-gold: #d97706;
  --accent-gold-glow: rgba(217, 119, 6, 0.2);
  --accent-cyan: #0891b2;
  --accent-emerald: #059669;
  --accent-rose: #e11d48;

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;
  
  --shadow-mystic: 0 10px 30px -5px rgba(0, 0, 0, 0.08), 0 0 15px -2px rgba(124, 58, 217, 0.1);
}

/* Reset y contención */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-deep);
  color: var(--text-main);
  margin: 0;
  padding: 0;
  overflow-x: clip;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6,
.brand-title,
.magic-hero-title,
.section-title,
.effect-title,
.modal-title {
  font-family: var(--font-heading);
  letter-spacing: -0.02em;
}

.mono,
.magic-badge,
.card-val,
.grid-cell,
.step-number {
  font-family: var(--font-mono);
}

/* Layout canónico */
.tool-layout {
  max-width: 1200px;
  margin: 1.5rem auto 3rem;
  padding: 0 1rem;
  box-sizing: border-box;
  flex: 1 0 auto;
  width: 100%;
}

.tool-with-sidebar {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  width: 100%;
}

.tool-main-content {
  flex: 1 1 0%;
  min-width: 0;
  width: 100%;
}

/* Hero místico */
.magic-hero-banner {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(245, 158, 11, 0.1) 50%, rgba(6, 182, 212, 0.1) 100%), var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--card-radius);
  padding: 2rem 2.2rem;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-mystic);
}

.magic-hero-banner::after {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.magic-hero-content {
  position: relative;
  z-index: 2;
  max-width: 820px;
}

.magic-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 0.85rem;
}

.magic-hero-title {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 0.75rem;
  color: var(--text-main);
}

.magic-hero-title span {
  background: linear-gradient(120deg, #c084fc, #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.magic-hero-desc {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0 0 1.25rem;
}

.magic-quick-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.quick-stat-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.quick-stat-icon {
  color: var(--accent-gold);
}

/* Pestañas de navegación de la suite */
.magic-tabs-container {
  display: flex;
  gap: 0.5rem;
  border-bottom: 2px solid var(--border-card);
  margin-bottom: 2rem;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
}

.magic-tabs-container::-webkit-scrollbar {
  display: none;
}

.magic-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.4rem;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-fast);
  border-radius: 8px 8px 0 0;
}

.magic-tab-btn:hover {
  color: var(--text-main);
  background: rgba(139, 92, 246, 0.06);
}

.magic-tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: rgba(139, 92, 246, 0.08);
}

.tab-badge {
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  background: var(--bg-input);
  color: var(--text-muted);
  font-weight: 700;
}

.magic-tab-btn.active .tab-badge {
  background: var(--primary);
  color: #fff;
}

/* Paneles de pestañas */
.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

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

/* SECCIÓN 1: EFECTOS EN DIRECTO */
.effects-grid-selector {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.effect-card-selector {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--card-radius);
  padding: 1.25rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
}

.effect-card-selector:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px -6px var(--primary-glow);
}

.effect-card-selector.active {
  border-color: var(--primary);
  background: linear-gradient(145deg, rgba(139, 92, 246, 0.12), var(--bg-card));
  box-shadow: 0 0 0 2px var(--primary), var(--shadow-mystic);
}

.effect-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.effect-card-icon {
  font-size: 1.8rem;
}

.effect-tag {
  font-size: 0.72rem;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(139, 92, 246, 0.12);
  color: var(--primary);
}

.effect-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-main);
}

.effect-card-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin: 0;
}

/* Área de escenario del truco */
.magic-stage-container {
  background: radial-gradient(ellipse at top, #1e1b38 0%, var(--bg-card) 70%);
  border: 1px solid var(--border-card);
  border-radius: var(--card-radius);
  padding: 2.2rem;
  min-height: 480px;
  box-shadow: var(--shadow-mystic);
  position: relative;
}

.stage-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.8rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-card);
}

.stage-title-wrap h2 {
  font-size: 1.6rem;
  margin: 0 0 0.35rem;
  color: var(--text-main);
}

.stage-instructions {
  font-size: 1rem;
  color: var(--accent-gold);
  margin: 0;
  font-weight: 500;
}

.stage-controls {
  display: flex;
  gap: 0.75rem;
}

.btn-magic-action {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 0.65rem 1.25rem;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 14px var(--primary-glow);
  transition: var(--transition-fast);
}

.btn-magic-action:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn-magic-secondary {
  background: var(--bg-input);
  color: var(--text-main);
  border: 1px solid var(--border-card);
  border-radius: 10px;
  padding: 0.65rem 1.15rem;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition-fast);
}

.btn-magic-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--text-muted);
}

/* Efecto 21 cartas (Gergonne) */
.gergonne-columns-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
  margin-bottom: 2rem;
}

.gergonne-col {
  background: rgba(15, 16, 26, 0.6);
  border: 2px dashed var(--border-card);
  border-radius: 14px;
  padding: 1.2rem 0.8rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  transition: var(--transition-smooth);
}

.gergonne-col:hover {
  border-color: var(--primary);
  background: rgba(139, 92, 246, 0.05);
}

.gergonne-col-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-muted);
  margin: 0;
}

.gergonne-cards-stack {
  display: flex;
  flex-direction: column;
  gap: -40px; /* Cartas superpuestas */
  align-items: center;
  min-height: 280px;
  padding: 0.5rem 0;
}

.btn-choose-column {
  margin-top: auto;
  width: 100%;
  padding: 0.75rem;
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  border-radius: 8px;
  color: var(--text-main);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-choose-column:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px var(--primary-glow);
}

/* Naipes visuales realistas con SVG de casino póker */
.playing-card {
  width: 90px;
  height: 126px;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  user-select: none;
  cursor: pointer;
  position: relative;
  transition: var(--transition-smooth);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.playing-card:hover {
  transform: translateY(-8px) scale(1.06);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.6), 0 0 20px rgba(245, 158, 11, 0.4);
  z-index: 20;
}

.playing-card img.card-svg-face {
  width: 100%;
  height: 100%;
  object-fit: fill;
  display: block;
  border-radius: 7px;
  pointer-events: none;
}

.gergonne-cards-stack .playing-card {
  margin-top: -75px; /* Efecto cascada de baraja realista */
}

.gergonne-cards-stack .playing-card:first-child {
  margin-top: 0;
}

/* Dorso de carta realista */
.playing-card.card-back {
  background: #0f172a;
}

/* Revelación espectacular de carta */
.revelation-card-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1rem;
  text-align: center;
  animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.6) rotate(-8deg); }
  to { opacity: 1; transform: scale(1) rotate(0); }
}

.revelation-card-display .playing-card {
  width: 175px;
  height: 245px;
  margin: 0;
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.75), 0 0 35px var(--accent-gold-glow);
}

.revelation-text {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 1.5rem 0 0.5rem;
  color: var(--accent-gold);
}

/* Efecto Cuadrado Mágico */
.magic-square-form {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin-bottom: 2rem;
  background: var(--bg-card);
  padding: 1.2rem;
  border-radius: 12px;
  border: 1px solid var(--border-card);
}

.magic-square-input {
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  border-radius: 8px;
  padding: 0.7rem 1.2rem;
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 1.3rem;
  font-weight: 700;
  width: 140px;
  text-align: center;
}

.magic-square-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-glow);
}

.magic-grid-4x4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
  max-width: 440px;
  margin: 0 auto 2rem;
}

.grid-cell {
  background: var(--bg-card);
  border: 2px solid var(--border-card);
  border-radius: 12px;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-main);
  transition: var(--transition-smooth);
}

.grid-cell.highlight-sum {
  background: rgba(245, 158, 11, 0.25);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  transform: scale(1.06);
  box-shadow: 0 0 20px var(--accent-gold-glow);
}

.square-sums-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 1.5rem;
}

.btn-sum-pattern {
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  border-radius: 8px;
  padding: 0.45rem 0.9rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-sum-pattern:hover,
.btn-sum-pattern.active {
  background: var(--accent-gold);
  color: #000;
  border-color: var(--accent-gold);
  font-weight: 700;
}

/* Efecto 1089 de Einstein (Matemagia) */
.einstein-calc-box {
  max-width: 520px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 14px;
  padding: 1.8rem;
  text-align: center;
}

.einstein-steps-stream {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  text-align: left;
  margin: 1.5rem 0;
  font-family: var(--font-mono);
  font-size: 1.05rem;
}

.einstein-step-line {
  background: var(--bg-input);
  padding: 0.65rem 1rem;
  border-radius: 8px;
  border-left: 3px solid var(--primary);
  display: flex;
  justify-content: space-between;
}

.wax-envelope {
  width: 220px;
  height: 140px;
  background: #7f1d1d;
  border-radius: 12px;
  margin: 1.5rem auto;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.wax-envelope:hover {
  transform: translateY(-4px) scale(1.02);
}

.wax-seal {
  width: 52px;
  height: 52px;
  background: #dc2626;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #fef08a;
  border: 3px solid #991b1b;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

/* Modal de secreto revelado */
.secret-reveal-box {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 12px;
  padding: 1.4rem;
  margin-top: 1.8rem;
  text-align: left;
}

.secret-reveal-title {
  color: var(--accent-emerald);
  font-size: 1.2rem;
  margin: 0 0 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.secret-reveal-body {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-main);
  margin: 0;
}

/* SECCIÓN 2: ACADEMIA DE TRUCOS (CATÁLOGO) */
.academy-filters-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.8rem;
  background: var(--bg-card);
  padding: 1rem 1.4rem;
  border-radius: var(--card-radius);
  border: 1px solid var(--border-card);
}

.search-input-wrap {
  position: relative;
  flex: 1 1 260px;
}

.magic-search-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  border-radius: 10px;
  padding: 0.7rem 1rem 0.7rem 2.5rem;
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 0.95rem;
}

.magic-search-input:focus {
  outline: none;
  border-color: var(--primary);
}

.search-icon-inside {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.filter-pills-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.filter-btn {
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  border-radius: 8px;
  padding: 0.45rem 0.9rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.filter-btn:hover {
  color: var(--text-main);
  border-color: var(--text-muted);
}

.filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.academy-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.trick-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--card-radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.trick-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: 0 10px 25px -5px var(--primary-glow);
}

.trick-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
}

.trick-category-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  background: rgba(139, 92, 246, 0.12);
  color: var(--primary);
}

.trick-diff-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
}

.diff-easy { background: rgba(16, 185, 129, 0.15); color: var(--accent-emerald); }
.diff-medium { background: rgba(245, 158, 11, 0.15); color: var(--accent-gold); }
.diff-hard { background: rgba(244, 63, 94, 0.15); color: var(--accent-rose); }

.trick-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 0.6rem;
  color: var(--text-main);
  line-height: 1.3;
}

.trick-card-effect-preview {
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--text-muted);
  margin: 0 0 1.2rem;
  flex: 1 1 auto;
}

.trick-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.82rem;
  color: var(--text-dim);
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-card);
  margin-bottom: 1rem;
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-learn-trick {
  width: 100%;
  padding: 0.75rem;
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  border-radius: 10px;
  color: var(--text-main);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: var(--transition-fast);
}

.btn-learn-trick:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* Modal interactivo de truco explicado */
.magic-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.magic-modal-backdrop.open {
  display: flex;
  opacity: 1;
}

.magic-modal-container {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--card-radius);
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8);
  position: relative;
  display: flex;
  flex-direction: column;
}

.modal-header-sticky {
  position: sticky;
  top: 0;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-card);
  padding: 1.25rem 1.8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
}

.btn-close-modal {
  background: var(--bg-input);
  border: none;
  border-radius: 8px;
  width: 36px;
  height: 36px;
  color: var(--text-muted);
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-close-modal:hover {
  background: var(--accent-rose);
  color: #fff;
}

.modal-scrollable-body {
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
}

.modal-section-card {
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  padding: 1.25rem;
}

.modal-sec-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-sec-title.effect-title { color: var(--accent-cyan); }
.modal-sec-title.secret-title { color: var(--accent-gold); }
.modal-sec-title.patter-title { color: var(--primary); }
.modal-sec-title.emergency-title { color: var(--accent-rose); }

/* Pasos ilustrados */
.steps-carousel-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.step-item-card {
  display: flex;
  gap: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 10px;
  padding: 1rem;
}

.step-num-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-text h4 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  color: var(--text-main);
}

.step-text p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--text-muted);
}

/* SECCIÓN 3: MESA DE PRÁCTICA */
.practice-deck-stage {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--card-radius);
  padding: 2rem;
  text-align: center;
  margin-bottom: 2rem;
}

.practice-deck-fan {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
  position: relative;
  margin: 2rem auto;
  max-width: 600px;
}

.practice-card-slot {
  width: 90px;
  height: 130px;
  position: absolute;
  transform-origin: bottom center;
  transition: transform 0.3s ease;
  cursor: pointer;
}

.practice-card-slot:hover {
  transform: translateY(-25px) scale(1.1) !important;
  z-index: 50;
}

/* Metrónomo de práctica */
.metronome-box {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--card-radius);
  padding: 1.8rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.metronome-indicator {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--bg-input);
  border: 3px solid var(--border-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--text-muted);
  transition: transform 0.1s ease;
}

.metronome-indicator.pulse {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary-glow);
  transform: scale(1.2);
  box-shadow: 0 0 25px var(--primary-glow);
}

/* SECCIÓN 4: PRINCIPIOS Y CÓDIGO ÉTICO */
.commandments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.commandment-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--card-radius);
  padding: 1.4rem;
  border-left: 4px solid var(--primary);
}

.commandment-num {
  font-family: var(--font-mono);
  font-weight: 800;
  color: var(--accent-gold);
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
}

.commandment-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: var(--text-main);
}

.commandment-desc {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-muted);
  margin: 0;
}

/* Responsividad */
@media (max-width: 768px) {
  .magic-hero-banner {
    padding: 1.5rem 1.25rem;
  }

  .magic-stage-container {
    padding: 1.25rem;
  }

  .gergonne-columns-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .gergonne-cards-stack {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    min-height: auto;
  }

  .playing-card {
    margin-top: 0;
    width: 65px;
    height: 95px;
  }

  .playing-card:hover {
    transform: translateY(-4px) scale(1.05);
  }

  .card-suit-big {
    font-size: 1.1rem;
  }

  .magic-grid-4x4 {
    gap: 0.5rem;
  }

  .grid-cell {
    font-size: 1.2rem;
  }

  .academy-filters-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-pills-group {
    overflow-x: auto;
    padding-bottom: 0.5rem;
  }
}
