:root {
  --bg-deep: #071422;
  --bg-surface: #0c1e31;
  --bg-card: #112840;
  --bg-card-hover: #16324f;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(0, 229, 192, 0.45);
  
  --brand-cyan: #00e5c0;
  --brand-cyan-glow: rgba(0, 229, 192, 0.25);
  --brand-blue: #2575fc;
  --brand-amber: #f59e0b;
  --brand-coral: #ef4444;

  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --font-main: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-deep);
  color: var(--text-main);
  font-family: var(--font-main);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* LAYOUT PRINCIPAL */
.shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 270px;
  background-color: var(--bg-surface);
  border-right: 1px solid var(--border-subtle);
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 50;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 36px;
}

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--brand-cyan), var(--brand-blue));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 20px;
  color: #03101c;
  box-shadow: 0 4px 16px var(--brand-cyan-glow);
}

.brand-title {
  display: flex;
  flex-direction: column;
}

.brand-title strong {
  font-size: 16px;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.brand-title strong span {
  color: var(--brand-cyan);
}

.brand-title small {
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

.nav-group-label {
  font-size: 11px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  margin: 18px 0 8px 10px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.nav-link:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
}

.nav-link.active {
  color: var(--brand-cyan);
  background: rgba(0, 229, 192, 0.08);
  font-weight: 600;
  border-left: 3px solid var(--brand-cyan);
}

.nav-link-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
}

.side-footer {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--brand-cyan);
  background: rgba(0, 229, 192, 0.1);
  padding: 4px 10px;
  border-radius: 20px;
  width: fit-content;
}

.badge-status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-cyan);
  box-shadow: 0 0 8px var(--brand-cyan);
}

.side-footer span {
  font-size: 11px;
  color: var(--text-dim);
}

/* ÁREA DE CONTENIDO */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  height: 72px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(7, 20, 34, 0.85);
  backdrop-filter: blur(12px);
  padding: 0 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 40;
}

.breadcrumb {
  font-size: 13px;
  font-family: var(--font-mono);
  color: var(--text-dim);
}

.breadcrumb span {
  color: var(--brand-cyan);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 30px;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-blue), #6366f1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: white;
}

.user-info {
  display: flex;
  flex-direction: column;
}

.user-info strong {
  font-size: 12px;
  line-height: 1.1;
}

.user-info small {
  font-size: 10px;
  color: var(--text-muted);
}

.content-container {
  padding: 40px 48px;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

/* HERO SECTION */
.hero-section {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
  margin-bottom: 72px;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(0, 229, 192, 0.08);
  border: 1px solid rgba(0, 229, 192, 0.2);
  border-radius: 20px;
  color: var(--brand-cyan);
  font-size: 12px;
  font-family: var(--font-mono);
  margin-bottom: 20px;
}

.hero-title {
  font-size: 46px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 20px;
}

.hero-title span {
  background: linear-gradient(120deg, var(--brand-cyan), #60a5fa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 32px;
  max-width: 560px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  margin-bottom: 44px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand-cyan), #00bfa5);
  color: #03101c;
  font-weight: 700;
  font-size: 15px;
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 20px var(--brand-cyan-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 26px rgba(0, 229, 192, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  font-weight: 600;
  font-size: 15px;
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.2);
}

.hero-metrics {
  display: flex;
  gap: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--border-subtle);
}

.metric-item strong {
  display: block;
  font-size: 26px;
  font-weight: 800;
  color: var(--text-main);
  font-family: var(--font-mono);
}

.metric-item span {
  font-size: 12px;
  color: var(--text-dim);
}

/* HERO VISUAL BOX */
.hero-visual-card {
  background: linear-gradient(145deg, rgba(17, 40, 64, 0.8), rgba(11, 30, 49, 0.95));
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

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

.card-callout {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.callout-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(0, 229, 192, 0.12);
  border: 1px solid rgba(0, 229, 192, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--brand-cyan);
}

.card-callout h4 {
  font-size: 16px;
  font-weight: 700;
}

.card-callout p {
  font-size: 13px;
  color: var(--text-muted);
}

.visual-checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.visual-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  color: var(--text-muted);
}

.visual-checklist li strong {
  color: var(--text-main);
}

.check-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(0, 229, 192, 0.15);
  color: var(--brand-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 2px;
}

/* SECCIONES */
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 30px;
}

.section-label {
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--brand-cyan);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.section-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-title em {
  font-style: normal;
  color: var(--brand-cyan);
}

/* CATÁLOGO Y FILTROS */
.catalog-toolbar {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.search-input-wrap {
  position: relative;
  flex: 1;
  min-width: 280px;
  max-width: 440px;
}

.search-input-wrap input {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px 16px 12px 42px;
  color: var(--text-main);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease;
}

.search-input-wrap input:focus {
  border-color: var(--brand-cyan);
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-size: 16px;
}

.filter-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pill-btn {
  padding: 8px 16px;
  border-radius: 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.pill-btn:hover {
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.2);
}

.pill-btn.active {
  background: var(--brand-cyan);
  color: #03101c;
  font-weight: 700;
  border-color: var(--brand-cyan);
}

/* GRID DE SIMULADORES */
.simulators-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 22px;
  margin-bottom: 72px;
}

.simulator-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.simulator-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 229, 192, 0.3);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.simulator-card.featured {
  background: linear-gradient(180deg, rgba(17, 40, 64, 0.95), var(--bg-surface));
  border: 1px solid rgba(0, 229, 192, 0.4);
  position: relative;
}

.simulator-card.featured::after {
  content: 'PILOTO ACTIVO';
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 9px;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--brand-cyan);
  background: rgba(0, 229, 192, 0.12);
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.05em;
}

.card-badge-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.category-tag {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-dim);
  text-transform: uppercase;
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 16px;
  border: 1px solid var(--border-subtle);
}

.simulator-card.featured .card-icon {
  background: rgba(0, 229, 192, 0.1);
  border-color: rgba(0, 229, 192, 0.3);
  color: var(--brand-cyan);
}

.card-name {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 8px;
  color: var(--text-main);
}

.card-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 20px;
  flex: 1;
}

.card-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.state-indicator {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-dim);
}

.state-indicator.ready {
  color: var(--brand-cyan);
  font-weight: 600;
}

.card-link {
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-cyan);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* LABORATORIO 3D EN VIVO */
.lab-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 72px;
}

.lab-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.95fr;
  gap: 28px;
}

.viewport-card {
  background: #040d17;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.viewport-header {
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-dim);
}

.viewport-header span:last-child {
  color: var(--brand-cyan);
}

#viewport {
  width: 100%;
  height: 480px;
  position: relative;
  background: radial-gradient(circle at center, #0e2942 0%, #071422 80%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.viewport-footer {
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.03);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-dim);
}

.btn-icon-text {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  transition: all 0.2s ease;
}

.btn-icon-text:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.1);
}

/* PANEL INTERACTIVO DE DECISIÓN */
.interactive-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 26px;
  display: flex;
  flex-direction: column;
}

.panel-stage-badge {
  font-size: 11px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  color: var(--brand-cyan);
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.panel-step-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
}

.panel-step-desc {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 22px;
  line-height: 1.5;
}

.voice-assistant-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 229, 192, 0.06);
  border: 1px solid rgba(0, 229, 192, 0.2);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 22px;
}

.assistant-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.assistant-info strong {
  font-size: 13px;
  display: block;
}

.assistant-info small {
  font-size: 11px;
  color: var(--text-muted);
}

.btn-audio {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--brand-cyan);
  color: #03101c;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
}

.options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.option-btn {
  text-align: left;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-size: 13.5px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  transition: all 0.2s ease;
}

.option-btn:hover:not(:disabled) {
  border-color: var(--brand-cyan);
  background: rgba(0, 229, 192, 0.05);
}

.option-letter {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.07);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-dim);
  flex-shrink: 0;
  margin-top: 1px;
}

.option-btn.correct {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.15);
}

.option-btn.correct .option-letter {
  background: #10b981;
  color: white;
}

.option-btn.incorrect {
  border-color: var(--brand-coral);
  background: rgba(239, 68, 68, 0.15);
}

.option-btn.incorrect .option-letter {
  background: var(--brand-coral);
  color: white;
}

.feedback-box {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 20px;
  display: none;
}

.feedback-box.active {
  display: block;
}

.feedback-box.success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
}

.feedback-box.warning {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fbbf24;
}

.panel-controls {
  display: flex;
  gap: 12px;
  margin-top: auto;
}

.panel-controls .btn-primary {
  flex: 1;
  justify-content: center;
}

.panel-controls .btn-secondary {
  padding: 12px 18px;
}

.disclaimer-text {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 16px;
  line-height: 1.4;
  border-top: 1px solid var(--border-subtle);
  padding-top: 12px;
}

/* RESULTADO FINAL */
.score-card {
  text-align: center;
  padding: 30px 10px;
}

.score-number {
  font-size: 54px;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--brand-cyan);
  line-height: 1;
  margin-bottom: 8px;
}

.score-label {
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  font-family: var(--font-mono);
  text-transform: uppercase;
}

/* RESPONSIVE */
@media (max-width: 1024px) {
  .shell {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    padding: 18px 24px;
  }
  .side-footer {
    display: none;
  }
  .hero-section {
    grid-template-columns: 1fr;
  }
  .lab-grid {
    grid-template-columns: 1fr;
  }
  #viewport {
    height: 380px;
  }
  .content-container {
    padding: 24px 20px;
  }
}
