/* ==========================================================
   css/teoria.css - Estilos Didácticos para "Teoría y Repaso"
   Plataforma AprendeCódigo Secundaria
   Rediseñado: Estilo Cartoon, Sin Desplazamientos Verticales y
   Cero Empalmes de Barra de Navegación
   ========================================================== */

/* CONTENEDOR MAESTRO DE NAVEGACIÓN (Evita al 100% el empalme entre barras) */
.sticky-header-container {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 2px solid rgba(56, 189, 248, 0.25);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.sticky-header-container .navbar {
  position: static !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.75rem 2rem;
}

/* Barra de Píldoras de Temas (Sub-navegación directa) */
.topic-nav-strip {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.6rem 1.5rem;
  background: rgba(2, 6, 23, 0.6);
  scrollbar-width: thin;
}

.topic-nav-strip::-webkit-scrollbar {
  height: 4px;
}
.topic-nav-strip::-webkit-scrollbar-thumb {
  background: #38bdf8;
  border-radius: 4px;
}

.topic-pill {
  white-space: nowrap;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.topic-pill:hover,
.topic-pill.active {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  border-color: #38bdf8;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(56, 189, 248, 0.3);
}

/* SECCIONES DE TEMA */
.topic-section {
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  margin-bottom: 3.5rem;
  position: relative;
  box-shadow: var(--shadow-md);
  scroll-margin-top: 150px;
}

.topic-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid rgba(255, 255, 255, 0.08);
}

.topic-title-group h2 {
  font-size: 1.85rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  letter-spacing: -0.02em;
}

.topic-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 0.3rem 0.85rem;
  border-radius: var(--radius-full);
  letter-spacing: 0.05em;
}

.tag-cyan {
  background: rgba(6, 182, 212, 0.15);
  color: #22d3ee;
  border: 1px solid rgba(6, 182, 212, 0.35);
}

.tag-purple {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.35);
}

.tag-amber {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.tag-emerald {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.tag-rose {
  background: rgba(244, 63, 94, 0.15);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.35);
}

/* Callout escolar didáctico */
.didactic-callout {
  background: rgba(15, 23, 42, 0.75);
  border-left: 5px solid #38bdf8;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 1.15rem 1.4rem;
  margin: 1.25rem 0 1.75rem 0;
  font-size: 1.05rem;
  line-height: 1.65;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.didactic-callout strong {
  color: #38bdf8;
}

/* Grid de Tarjetas Conceptuales */
.concept-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.concept-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.concept-grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0;
}

/* -------------------------------------------------------------
   TARJETAS CARTOON DE PARTES DE LA COMPUTADORA
   ------------------------------------------------------------- */
.cartoon-component-card {
  background: rgba(15, 23, 42, 0.75);
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.cartoon-component-card:hover {
  transform: translateY(-5px);
  border-color: #38bdf8;
  box-shadow: 0 12px 28px -5px rgba(56, 189, 248, 0.35);
}

.cartoon-illustration-wrapper {
  height: 140px;
  background: radial-gradient(circle at center, rgba(56, 189, 248, 0.15), transparent 70%);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  position: relative;
}

.cartoon-illustration-wrapper svg {
  max-height: 110px;
  max-width: 100%;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.4));
  transition: transform 0.3s ease;
}

.cartoon-component-card:hover .cartoon-illustration-wrapper svg {
  transform: scale(1.08);
}

.component-role-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.5rem;
}

.role-cerebro { background: rgba(56, 189, 248, 0.2); color: #38bdf8; border: 1px solid #38bdf8; }
.role-trabajo { background: rgba(234, 179, 8, 0.2); color: #fde047; border: 1px solid #fde047; }
.role-archivero { background: rgba(16, 185, 129, 0.2); color: #4ade80; border: 1px solid #4ade80; }
.role-artista { background: rgba(168, 85, 247, 0.2); color: #c084fc; border: 1px solid #c084fc; }
.role-venas { background: rgba(6, 182, 212, 0.2); color: #22d3ee; border: 1px solid #22d3ee; }
.role-corazon { background: rgba(244, 63, 94, 0.2); color: #fb7185; border: 1px solid #fb7185; }

.cartoon-component-card h3 {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.cartoon-component-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.55;
  flex: 1;
}

/* -------------------------------------------------------------
   GUÍA INTERACTIVA: ¿CÓMO ENCENDER UNA PC DE ESCRITORIO?
   ------------------------------------------------------------- */
.pc-startup-guide {
  background: #020617;
  border: 2px solid rgba(56, 189, 248, 0.3);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin: 1.5rem 0;
}

.startup-steps-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.startup-step-card {
  background: rgba(30, 41, 59, 0.6);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 1.2rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
  user-select: none;
}

.startup-step-card:hover {
  border-color: #38bdf8;
  transform: translateY(-3px);
}

.startup-step-card.completed {
  background: rgba(16, 185, 129, 0.15);
  border-color: #10b981;
}

.startup-step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.startup-step-card.completed .startup-step-num {
  background: #10b981;
  color: white;
}

.startup-step-icon {
  font-size: 2.2rem;
  margin: 0.4rem 0;
}

.startup-step-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.startup-step-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.startup-screen-display {
  background: #000;
  border: 2px solid #334155;
  border-radius: var(--radius-md);
  padding: 1.5rem;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-code);
  font-size: 1rem;
  color: #38bdf8;
  text-align: center;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
}

/* -------------------------------------------------------------
   MÓDULO DE ALGORITMOS Y DIAGRAMAS DE FLUJO
   ------------------------------------------------------------- */
.flowchart-symbols-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0;
}

.flowchart-symbol-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  text-align: center;
}

.symbol-preview-shape {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.symbol-shape-oval {
  border: 3px solid #38bdf8;
  background: rgba(56, 189, 248, 0.15);
  border-radius: 9999px;
  padding: 0.4rem 1.5rem;
  font-weight: 800;
  font-size: 0.85rem;
  color: #38bdf8;
}

.symbol-shape-rect {
  border: 3px solid #10b981;
  background: rgba(16, 185, 129, 0.15);
  border-radius: 4px;
  padding: 0.4rem 1.5rem;
  font-weight: 800;
  font-size: 0.85rem;
  color: #10b981;
}

.symbol-shape-rhombus {
  border: 3px solid #fbbf24;
  background: rgba(245, 158, 11, 0.15);
  transform: rotate(45deg);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.symbol-shape-rhombus span {
  transform: rotate(-45deg);
  font-size: 0.75rem;
  font-weight: 800;
  color: #fbbf24;
}

.symbol-shape-parallelogram {
  border: 3px solid #c084fc;
  background: rgba(168, 85, 247, 0.15);
  transform: skewX(-20deg);
  padding: 0.4rem 1.25rem;
  font-weight: 800;
  font-size: 0.85rem;
  color: #c084fc;
}
.symbol-shape-parallelogram span {
  transform: skewX(20deg);
  display: inline-block;
}

/* Diagrama de Flujo Renderizado */
.flowchart-visual-diagram {
  background: #020617;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin: 1.5rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.flow-node {
  padding: 0.65rem 1.5rem;
  font-weight: 700;
  font-size: 0.95rem;
  text-align: center;
  position: relative;
  max-width: 380px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.flow-node-start {
  border: 3px solid #38bdf8;
  background: rgba(56, 189, 248, 0.2);
  border-radius: 9999px;
  color: #38bdf8;
}

.flow-node-process {
  border: 3px solid #10b981;
  background: rgba(16, 185, 129, 0.2);
  border-radius: 8px;
  color: #a7f3d0;
}

.flow-node-decision {
  border: 3px solid #fbbf24;
  background: rgba(245, 158, 11, 0.2);
  border-radius: 12px;
  color: #fde047;
  padding: 0.85rem 1.5rem;
}

.flow-arrow-down {
  font-size: 1.4rem;
  color: #94a3b8;
}

.flow-branch-row {
  display: flex;
  gap: 2rem;
  width: 100%;
  max-width: 600px;
  justify-content: space-around;
  margin: 0.5rem 0;
}

/* -------------------------------------------------------------
   VISUALIZADOR DE NANÓMETROS CON TARJETAS E IMÁGENES CARTOON
   ------------------------------------------------------------- */
.nano-cards-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.nano-step-card {
  background: rgba(30, 41, 59, 0.6);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 1rem 0.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.nano-step-card:hover,
.nano-step-card.active {
  background: rgba(168, 85, 247, 0.2);
  border-color: #c084fc;
  box-shadow: 0 0 16px rgba(192, 132, 252, 0.35);
  transform: translateY(-3px);
}

.nano-step-card svg {
  height: 52px;
  width: 52px;
  margin-bottom: 0.5rem;
}

.nano-step-name {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.2rem;
}

.nano-step-size {
  font-size: 0.75rem;
  font-family: var(--font-code);
  color: #c084fc;
  font-weight: 700;
}

.nano-detail-callout {
  background: rgba(15, 23, 42, 0.9);
  border: 2px solid #c084fc;
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 95px; /* Altura fija para evitar desplazamientos */
  box-sizing: border-box;
}

/* -------------------------------------------------------------
   SIMULADOR DE GAME LOOP (RECORRIDO VISUAL Y SIN SALTOS)
   ------------------------------------------------------------- */
.gameloop-simulator-box {
  background: #020617;
  border: 2px solid rgba(56, 189, 248, 0.35);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin: 1.5rem 0;
}

.loop-stages-diagram {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.5rem;
  margin: 1.25rem 0;
  position: relative;
}

@media (max-width: 900px) {
  .loop-stages-diagram {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 500px) {
  .loop-stages-diagram {
    grid-template-columns: 1fr;
  }
}

.loop-stage-item {
  background: rgba(30, 41, 59, 0.65);
  border: 2px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.5rem;
  text-align: center;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.loop-stage-item.current {
  background: rgba(56, 189, 248, 0.25);
  border-color: #38bdf8;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.6);
  transform: scale(1.04);
}

.loop-stage-item.current::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: #38bdf8;
  animation: pulseConduit 0.8s infinite alternate;
}

@keyframes pulseConduit {
  from { opacity: 0.4; }
  to { opacity: 1; }
}

.stage-num {
  font-size: 0.7rem;
  font-weight: 800;
  color: #94a3b8;
  font-family: var(--font-code);
}

.stage-icon {
  font-size: 1.6rem;
  margin: 0.25rem 0;
}

.stage-name {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
}

/* Área del Game Loop y Telemetría con Altura Fija */
.gameloop-arena {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.25rem;
  align-items: stretch;
  margin-top: 1.25rem;
}

@media (max-width: 850px) {
  .gameloop-arena {
    grid-template-columns: 1fr;
  }
}

.loop-canvas {
  width: 100%;
  height: 250px;
  background: #090d16;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  display: block;
}

.loop-telemetry {
  background: rgba(15, 23, 42, 0.85);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  font-family: var(--font-code);
  font-size: 0.88rem;
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 250px; /* Altura fija para estabilidad */
  box-sizing: border-box;
}

.telemetry-row {
  display: flex;
  justify-content: space-between;
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.telemetry-val {
  color: #38bdf8;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.stage-current-explanation-card {
  background: rgba(15, 23, 42, 0.85);
  border: 2px solid #38bdf8;
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-top: 1rem;
  min-height: 64px; /* Fijo para que no mueva la página */
  display: flex;
  align-items: center;
  font-size: 0.95rem;
  color: #f8fafc;
  box-sizing: border-box;
}

/* -------------------------------------------------------------
   ESPACIO 2D VS 3D MEJORADO (BOTONES PRESETS Y CONTROLES FÁCILES)
   ------------------------------------------------------------- */
.dimension-interactive-box {
  background: #020617;
  border: 2px solid rgba(168, 85, 247, 0.35);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin: 1.5rem 0;
}

.dim-presets-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-dim-preset {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-main);
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-dim-preset:hover,
.btn-dim-preset.active {
  background: rgba(168, 85, 247, 0.25);
  border-color: #c084fc;
  color: #c084fc;
}

.dim-canvas {
  width: 100%;
  height: 320px;
  background: #080d1a;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  display: block;
}

/* -------------------------------------------------------------
   LABORATORIO DE BINARIO (8 INTERRUPTORES)
   ------------------------------------------------------------- */
.binary-lab {
  background: #020617;
  border: 2px solid rgba(234, 179, 8, 0.35);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin: 1.5rem 0;
}

.switches-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 0.6rem;
  margin: 1.5rem 0;
}

@media (max-width: 680px) {
  .switches-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.bit-switch-card {
  background: rgba(30, 41, 59, 0.7);
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 0.9rem 0.5rem;
  text-align: center;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.bit-switch-card:hover {
  border-color: rgba(234, 179, 8, 0.5);
  transform: translateY(-2px);
}

.bit-switch-card.on {
  background: rgba(234, 179, 8, 0.2);
  border-color: #eab308;
  box-shadow: 0 0 18px rgba(234, 179, 8, 0.4);
}

.bit-bulb {
  font-size: 1.8rem;
  filter: grayscale(100%) opacity(0.35);
  transition: all 0.2s ease;
}

.bit-switch-card.on .bit-bulb {
  filter: grayscale(0%) opacity(1) drop-shadow(0 0 10px #fde047);
}

.bit-value {
  font-size: 1.4rem;
  font-weight: 800;
  font-family: var(--font-code);
  color: #94a3b8;
  margin: 0.3rem 0;
}

.bit-switch-card.on .bit-value {
  color: #fde047;
}

.bit-power {
  font-size: 0.75rem;
  font-family: var(--font-code);
  font-weight: 700;
  color: var(--text-dim);
}

.bit-switch-card.on .bit-power {
  color: #facc15;
}

.binary-readouts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.readout-box {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: center;
}

.readout-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.readout-value {
  font-family: var(--font-code);
  font-size: 1.6rem;
  font-weight: 800;
  color: #fde047;
}

/* Traductor de Texto a Binario y ASCII */
.text-translator-box {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-top: 1.5rem;
}

.text-binary-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  font-size: 0.9rem;
}

.text-binary-table th,
.text-binary-table td {
  padding: 0.6rem 0.75rem;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.text-binary-table th {
  background: rgba(30, 41, 59, 0.8);
  color: #94a3b8;
  font-weight: 700;
}

.text-binary-table td {
  font-family: var(--font-code);
}

.char-badge {
  font-size: 1.2rem;
  font-weight: 800;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.15);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
}

/* Compresor de Color Hexadecimal */
.hex-color-tester {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 1.5rem;
  align-items: center;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-top: 1.5rem;
}

@media (max-width: 600px) {
  .hex-color-tester {
    grid-template-columns: 1fr;
  }
}

.hex-preview-swatch {
  height: 120px;
  border-radius: var(--radius-md);
  box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.4), 0 4px 15px rgba(0, 0, 0, 0.3);
  border: 3px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-code);
  font-weight: 800;
  font-size: 1.2rem;
  text-shadow: 0 1px 4px rgba(0,0,0,0.8);
  color: white;
}

/* Escalera de almacenamiento */
.storage-ladder {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.storage-step {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  transition: all 0.2s ease;
}

.storage-step:hover {
  background: rgba(30, 41, 59, 0.85);
  border-color: rgba(56, 189, 248, 0.3);
  transform: translateX(4px);
}

.step-unit-badge {
  min-width: 130px;
  font-family: var(--font-code);
  font-weight: 800;
  font-size: 1rem;
  color: #38bdf8;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.step-equiv {
  font-family: var(--font-code);
  font-size: 0.9rem;
  color: #94a3b8;
  min-width: 140px;
}

.step-example {
  flex: 1;
  font-size: 0.9rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Comparativa ENIAC vs Smartphone */
.comparison-duel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 1.5rem 0;
}

@media (max-width: 768px) {
  .comparison-duel-grid {
    grid-template-columns: 1fr;
  }
}

.duel-card {
  background: rgba(15, 23, 42, 0.75);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  border: 2px solid;
  position: relative;
}

.duel-card.eniac {
  border-color: rgba(239, 68, 68, 0.35);
  background: linear-gradient(180deg, rgba(239, 68, 68, 0.08), rgba(15, 23, 42, 0.8));
}

.duel-card.phone {
  border-color: rgba(16, 185, 129, 0.35);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.08), rgba(15, 23, 42, 0.8));
}

.duel-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.duel-stat-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 0.95rem;
}

.duel-stat-row strong {
  font-family: var(--font-code);
}

/* 4 Pilares del GDD */
.gdd-pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0;
}

.gdd-card {
  background: rgba(15, 23, 42, 0.75);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  border-top: 5px solid;
  transition: all 0.25s ease;
}

.gdd-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.4);
}

.pillar-1 { border-color: #f97316; }
.pillar-2 { border-color: #38bdf8; }
.pillar-3 { border-color: #a855f7; }
.pillar-4 { border-color: #10b981; }

/* Modo Proyector */
body.projector-mode .sticky-header-container {
  background: #000000 !important;
  border-bottom: 3px solid #38bdf8 !important;
}

body.projector-mode .topic-section,
body.projector-mode .cartoon-component-card,
body.projector-mode .pc-startup-guide,
body.projector-mode .flowchart-visual-diagram,
body.projector-mode .binary-lab,
body.projector-mode .gameloop-simulator-box,
body.projector-mode .dimension-interactive-box {
  background: #000000 !important;
  border: 2px solid #ffffff !important;
}
