/* ============================================================
   GUÍA FLASK - SISTEMA DE DISEÑO COMPLETO
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* === CSS VARIABLES === */
:root {
  /* Colors */
  --bg-primary: #0d1117;
  --bg-secondary: rgba(255, 255, 255, 0.05);
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.08);
  --bg-sidebar: rgba(13, 17, 23, 0.8);
  --bg-code: #060a14;

  --accent-flask: #00d4aa;
  --accent-flask-dark: #00a882;
  --accent-flask-glow: rgba(0, 212, 170, 0.15);
  --accent-python: #3776ab;
  --accent-python-light: #4a9fd4;
  --accent-orange: #ff6b35;
  --accent-purple: #7c3aed;
  --accent-yellow: #f59e0b;
  --accent-red: #ef4444;
  --accent-green: #22c55e;

  --text-primary: #e8edf5;
  --text-secondary: #8b95a8;
  --text-muted: #4a5568;
  --text-accent: #00d4aa;

  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-accent: rgba(0, 212, 170, 0.3);

  /* Shadows */
  --shadow-card: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-glow: 0 0 30px rgba(0, 212, 170, 0.2);
  --shadow-glow-strong: 0 0 60px rgba(0, 212, 170, 0.3);

  /* Spacing */
  --sidebar-width: 300px;
  --header-height: 64px;

  /* Glassmorphism */
  --glass-blur: 16px;
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);

  /* Transitions */
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);

  /* Border radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

/* === RESET & BASE === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
}

/* === SCROLLBAR === */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: rgba(0, 212, 170, 0.3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-flask); }

/* === LAYOUT === */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* === SIDEBAR === */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--glass-border);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
  display: flex;
  flex-direction: column;
  transition: var(--transition-slow);
}

.sidebar-header {
  padding: 24px 20px;
  border-bottom: 1px solid var(--border-subtle);
  background: linear-gradient(135deg, rgba(0,212,170,0.08), rgba(124,58,237,0.05));
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  margin-bottom: 12px;
}

.sidebar-logo .logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--accent-flask), var(--accent-purple));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: var(--shadow-glow);
}

.sidebar-logo .logo-text {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-flask), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar-subtitle {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 600;
}

/* Progress Overview */
.progress-overview {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.progress-bar-container {
  height: 4px;
  background: var(--bg-card);
  border-radius: 2px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-flask), var(--accent-purple));
  border-radius: 2px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  width: 0%;
  box-shadow: 0 0 10px rgba(0, 212, 170, 0.3);
}

#xp-progress-fill {
  background: linear-gradient(90deg, var(--accent-yellow), var(--accent-orange));
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

/* User Stats in Sidebar */
.user-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.stat-badge {
  display: flex;
  flex-direction: column;
}

.stat-badge span {
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.stat-badge small {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.xp-badge {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-yellow);
  box-shadow: var(--glass-shadow);
}

/* XP Toast */
.xp-toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--bg-sidebar);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-accent);
  padding: 16px 24px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  gap: 15px;
  z-index: 2000;
  transform: translateX(120%);
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: var(--glass-shadow);
}

.xp-toast.show {
  transform: translateX(0);
}

.xp-toast-icon {
  font-size: 24px;
  animation: pulse 2s infinite;
}

.xp-toast-amount {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: var(--accent-flask);
}

.xp-toast-reason {
  font-size: 12px;
  color: var(--text-secondary);
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

/* Module Navigation */
.module-nav {
  flex: 1;
  padding: 12px 0;
}

.module-section-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  padding: 16px 20px 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  cursor: pointer;
  transition: var(--transition);
  border-left: 3px solid transparent;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 500;
  position: relative;
}

.nav-item:hover {
  background: var(--accent-flask-glow);
  color: var(--text-primary);
  border-left-color: rgba(0, 212, 170, 0.4);
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(0,212,170,0.12), transparent);
  color: var(--accent-flask);
  border-left-color: var(--accent-flask);
}

.nav-item .nav-icon {
  font-size: 16px;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}

.nav-item .nav-badge {
  margin-left: auto;
  font-size: 10px;
  background: var(--accent-flask-glow);
  color: var(--accent-flask);
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 600;
}

.nav-item .nav-check {
  margin-left: auto;
  color: var(--accent-green);
  font-size: 14px;
}

.nav-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 8px 20px;
}

/* === MAIN CONTENT === */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-height: 100vh;
}

/* === TOP HEADER === */
.top-header {
  height: var(--header-height);
  background: rgba(10, 14, 26, 0.95);
  border-bottom: 1px solid var(--border-subtle);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  padding: 0 40px;
  gap: 20px;
}

.header-breadcrumb {
  font-size: 14px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-breadcrumb .current {
  color: var(--text-primary);
  font-weight: 600;
}

.header-actions {
  margin-left: auto;
  display: flex;
  gap: 12px;
}

.btn-header {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  font-family: 'Inter', sans-serif;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-flask), var(--accent-flask-dark));
  color: var(--bg-primary);
  box-shadow: 0 4px 15px rgba(0, 212, 170, 0.3);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 212, 170, 0.4);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.btn-ghost:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}

/* === MODULE PAGES === */
.module-page {
  display: none;
  animation: fadeInUp 0.4s ease forwards;
}

.module-page.active {
  display: block;
}

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

/* === MODULE HERO === */
.module-hero {
  padding: 60px 60px 40px;
  background: linear-gradient(135deg, var(--bg-secondary), var(--bg-primary));
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
  overflow: hidden;
}

.module-hero::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(0,212,170,0.08), transparent 70%);
  pointer-events: none;
}

.module-number {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-flask-glow);
  border: 1px solid var(--border-accent);
  color: var(--accent-flask);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 20px;
}

.module-hero h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 42px;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.module-hero .hero-description {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 700px;
  line-height: 1.8;
}

.module-meta {
  display: flex;
  gap: 24px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.meta-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--bg-card);
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border-subtle);
}

.meta-chip .chip-icon { font-size: 14px; }

/* === CONTENT CONTAINER === */
.content-container {
  padding: 48px 60px;
  max-width: 960px;
}

/* === SECTION TITLES === */
.section-title {
  font-family: 'Outfit', sans-serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title .title-icon {
  font-size: 22px;
}

.section-subtitle {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 28px;
  line-height: 1.6;
}

/* === CARDS === */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 24px;
  transition: var(--transition);
}

.card:hover {
  border-color: var(--border-accent);
  background: var(--bg-card-hover);
  box-shadow: var(--glass-shadow);
  transform: translateY(-2px);
}

.card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* === CALLOUTS === */
.callout {
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin: 20px 0;
  border-left: 4px solid;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.callout .callout-icon {
  font-size: 20px;
  flex-shrink: 0;
  margin-top: 2px;
}

.callout .callout-content { flex: 1; }
.callout .callout-title {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 6px;
}

.callout-info {
  background: rgba(55, 118, 171, 0.1);
  border-color: var(--accent-python-light);
  color: #90cdf4;
}

.callout-info .callout-title { color: var(--accent-python-light); }

.callout-success {
  background: rgba(34, 197, 94, 0.08);
  border-color: var(--accent-green);
  color: #86efac;
}

.callout-success .callout-title { color: var(--accent-green); }

.callout-warning {
  background: rgba(245, 158, 11, 0.08);
  border-color: var(--accent-yellow);
  color: #fcd34d;
}

.callout-warning .callout-title { color: var(--accent-yellow); }

.callout-tip {
  background: rgba(0, 212, 170, 0.08);
  border-color: var(--accent-flask);
  color: var(--text-secondary);
}

.callout-tip .callout-title { color: var(--accent-flask); }

/* === CODE BLOCKS === */
.code-block-wrapper {
  background: var(--bg-code);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 20px 0;
  box-shadow: var(--shadow-card);
}

.code-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--border-subtle);
}

.code-filename {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
}

.code-filename .file-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent-flask);
}

.code-filename .file-dot.python { background: var(--accent-python-light); }
.code-filename .file-dot.html { background: var(--accent-orange); }
.code-filename .file-dot.css { background: var(--accent-purple); }
.code-filename .file-dot.bash { background: var(--accent-yellow); }

.code-actions {
  display: flex;
  gap: 8px;
}

.copy-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  cursor: pointer;
  transition: var(--transition);
  font-family: 'Inter', sans-serif;
  display: flex;
  align-items: center;
  gap: 5px;
}

.copy-btn:hover {
  background: var(--accent-flask-glow);
  color: var(--accent-flask);
  border-color: var(--border-accent);
}

.copy-btn.copied {
  background: rgba(34, 197, 94, 0.1);
  color: var(--accent-green);
  border-color: rgba(34, 197, 94, 0.3);
}

pre.hljs-pre {
  margin: 0 !important;
  padding: 24px !important;
  background: transparent !important;
  overflow-x: auto;
  font-family: 'JetBrains Mono', monospace !important;
  font-size: 14px !important;
  line-height: 1.7 !important;
}

code.hljs {
  background: transparent !important;
  font-family: 'JetBrains Mono', monospace !important;
}

/* Line annotations */
.code-annotation {
  display: block;
  color: #4a5568;
  font-style: italic;
}

/* === INLINE CODE === */
code:not(.hljs) {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  background: rgba(0, 212, 170, 0.08);
  color: var(--accent-flask);
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid rgba(0, 212, 170, 0.15);
}

/* === SIMULATORS === */
.simulator-card {
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 30px 0;
  box-shadow: var(--glass-shadow);
}

.sim-header {
  padding: 16px 24px;
  background: var(--accent-flask-glow);
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sim-header h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  color: var(--accent-flask);
}

.sim-controls {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 15px;
  margin-bottom: 20px;
}

.sim-select {
  width: 100%;
  background: var(--bg-code);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  padding: 10px;
  border-radius: var(--radius-md);
  font-family: inherit;
  outline: none;
  cursor: pointer;
}

.quiz-question {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 25px;
  color: var(--text-primary);
}

.quiz-options {
  display: grid;
  gap: 12px;
}

.quiz-option-btn {
  text-align: left;
  padding: 15px 20px;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Inter', sans-serif;
}

.quiz-option-btn:hover {
  background: var(--accent-flask-glow);
  border-color: var(--accent-flask);
  transform: translateX(5px);
}

.quiz-option-btn.correct {
  background: rgba(0, 212, 170, 0.2);
  border-color: var(--accent-flask);
  color: var(--accent-flask);
  font-weight: 700;
}

.quiz-option-btn.incorrect {
  background: rgba(249, 115, 22, 0.2);
  border-color: var(--accent-orange);
  animation: shake 0.5s ease;
}

.quiz-feedback {
  padding: 15px 24px;
  min-height: 50px;
  display: flex;
  align-items: center;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.victory-shimmer {
  position: relative;
  overflow: hidden;
}

.victory-shimmer::before {
  content: '';
  position: absolute;
  top: 0;
  left: -150%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  transform: skewX(-20deg);
  animation: victory-shimmer 3s infinite;
  pointer-events: none;
}

@keyframes victory-shimmer {
  0% { left: -150%; }
  30% { left: 150%; }
  100% { left: 150%; }
}

.sim-input-group {
  margin-bottom: 20px;
}

.sim-input-group label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.url-input-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-code);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
}

.url-input-wrapper span {
  color: var(--text-muted);
  font-size: 14px;
}

.url-input-wrapper input {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  flex: 1;
  outline: none;
}

.browser-preview {
  background: #fff;
  color: #333;
  padding: 20px;
  border-radius: var(--radius-md);
  font-family: sans-serif;
  min-height: 60px;
  display: flex;
  align-items: center;
  border: 4px solid #e2e8f0;
}

.code-header {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
}

.sim-footer {
  padding: 16px 24px;
  background: rgba(0,0,0,0.2);
  display: flex;
  justify-content: flex-end;
}

.sim-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.sim-textarea {
  width: 100%;
  height: 100px;
  background: var(--bg-code);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  color: var(--accent-flask);
  font-family: 'JetBrains Mono', monospace;
  padding: 12px;
  resize: none;
  outline: none;
  font-size: 13px;
}

.sim-input {
  width: 100%;
  background: var(--bg-code);
  border: 1px solid var(--glass-border);
  color: var(--accent-flask);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-family: 'JetBrains Mono', monospace;
  outline: none;
  margin-bottom: 20px;
}

.db-results {
  background: #f8fafc;
  padding: 15px;
  border-radius: var(--radius-md);
  border: 1px solid #e2e8f0;
  min-height: 80px;
}

.db-row {
  padding: 8px 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  margin-bottom: 5px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: #475569;
}

.db-empty {
  color: #94a3b8;
  font-style: italic;
  text-align: center;
  margin-top: 15px;
}

@media (max-width: 768px) {
  .sim-split { grid-template-columns: 1fr; }
}
.diagram-container {
  background: var(--bg-code);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin: 20px 0;
  text-align: center;
}

.diagram-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 24px;
}

.diagram-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

.diagram-node {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 600;
  min-width: 120px;
  text-align: center;
  position: relative;
  transition: var(--transition);
}

.diagram-node:hover {
  border-color: var(--accent-flask);
  box-shadow: 0 0 15px rgba(0,212,170,0.15);
}

.diagram-node.flask { border-color: var(--accent-flask); color: var(--accent-flask); }
.diagram-node.python { border-color: var(--accent-python-light); color: var(--accent-python-light); }
.diagram-node.html { border-color: var(--accent-orange); color: var(--accent-orange); }
.diagram-node.db { border-color: var(--accent-purple); color: var(--accent-purple); }
.diagram-node.browser { border-color: var(--accent-yellow); color: var(--accent-yellow); }

.diagram-arrow {
  color: var(--text-muted);
  font-size: 20px;
  font-weight: 300;
}

.diagram-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* === STEP LIST === */
.step-list { list-style: none; margin: 20px 0; }

.step-item {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-subtle);
  align-items: flex-start;
}

.step-item:last-child { border-bottom: none; }

.step-number {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--accent-flask), var(--accent-purple));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--bg-primary);
  flex-shrink: 0;
  box-shadow: 0 0 10px rgba(0,212,170,0.3);
}

.step-content h4 { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.step-content p { font-size: 14px; color: var(--text-secondary); }

/* === CONCEPT GRID === */
.concept-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin: 20px 0;
}

.concept-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: var(--transition);
  cursor: default;
}

.concept-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.concept-card .concept-icon {
  font-size: 28px;
  margin-bottom: 12px;
  display: block;
}

.concept-card h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.concept-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* === EXERCISE BLOCK === */
.exercise-block {
  background: linear-gradient(135deg, rgba(0,212,170,0.06), rgba(124,58,237,0.04));
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin: 32px 0;
}

.exercise-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.exercise-badge {
  background: var(--accent-flask);
  color: var(--bg-primary);
  font-size: 11px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.exercise-badge.challenge {
  background: linear-gradient(135deg, var(--accent-orange), #ff4757);
}

.exercise-badge.project {
  background: linear-gradient(135deg, var(--accent-purple), #5b21b6);
}

.exercise-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.exercise-desc {
  color: var(--text-secondary);
  font-size: 14.5px;
  line-height: 1.7;
  margin-bottom: 16px;
}

.exercise-tasks {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.exercise-task {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--text-secondary);
}

.exercise-task::before {
  content: '→';
  color: var(--accent-flask);
  font-weight: 700;
  flex-shrink: 0;
}

/* === CHALLENGE BLOCK === */
.challenge-block {
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.08), rgba(255, 71, 87, 0.04));
  border: 1px solid rgba(255, 107, 53, 0.3);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin: 32px 0;
}

.challenge-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #ff6b35, #ef4444);
  color: white !important;
  border: none;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.3);
  margin-top: 15px;
}

.challenge-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 25px rgba(255, 107, 53, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.4);
  filter: brightness(1.1);
}

.challenge-btn:active {
  transform: translateY(1px) scale(0.98);
}

/* === TABS === */
.tabs-container {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 20px 0;
}

.tabs-header {
  display: flex;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(255,255,255,0.02);
}

.tab-btn {
  padding: 14px 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
  font-family: 'Inter', sans-serif;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tab-btn:hover { color: var(--text-primary); }

.tab-btn.active {
  color: var(--accent-flask);
  border-bottom-color: var(--accent-flask);
  background: var(--accent-flask-glow);
}

.tab-panel { display: none; padding: 24px; }
.tab-panel.active { display: block; }

/* === COMPARISON TABLE === */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 14px;
}

.comparison-table th {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-weight: 600;
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.comparison-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  vertical-align: top;
}

.comparison-table tr:hover td { background: var(--bg-card-hover); }

.comparison-table .highlight-col {
  color: var(--accent-flask);
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
}

/* === ACCORDION === */
.accordion { border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); overflow: hidden; margin: 16px 0; }

.accordion-item { border-bottom: 1px solid var(--border-subtle); }
.accordion-item:last-child { border-bottom: none; }

.accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  color: var(--text-primary);
  transition: var(--transition);
  background: var(--bg-card);
}

.accordion-header:hover { background: var(--bg-card-hover); color: var(--accent-flask); }

.accordion-header.open { color: var(--accent-flask); background: var(--accent-flask-glow); }

.accordion-icon {
  font-size: 18px;
  transition: transform 0.3s ease;
  color: var(--text-muted);
}

.accordion-header.open .accordion-icon { transform: rotate(180deg); color: var(--accent-flask); }

.accordion-body {
  display: none;
  padding: 20px 24px;
  background: var(--bg-secondary);
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  border-top: 1px solid var(--border-subtle);
}

.accordion-body.open { display: block; }

/* === FILE TREE === */
.file-tree {
  background: var(--bg-code);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13.5px;
  line-height: 2;
  margin: 16px 0;
}

.file-tree .folder { color: var(--accent-yellow); font-weight: 600; }
.file-tree .file { color: var(--text-secondary); }
.file-tree .file.python { color: var(--accent-python-light); }
.file-tree .file.html { color: var(--accent-orange); }
.file-tree .file.css { color: var(--accent-purple); }
.file-tree .file.config { color: var(--text-muted); }
.file-tree .comment { color: #3d4a5f; font-style: italic; }
.file-tree .indent { padding-left: 20px; border-left: 1px dashed #1e2d40; margin-left: 10px; }

/* === RELATION DIAGRAM === */
.relation-diagram {
  background: var(--bg-code);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin: 20px 0;
  overflow-x: auto;
}

.entity-box {
  background: var(--bg-card);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: inline-block;
  min-width: 200px;
}

.entity-header {
  background: rgba(0,212,170,0.1);
  border-bottom: 2px solid var(--border-accent);
  padding: 10px 16px;
  font-weight: 700;
  color: var(--accent-flask);
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.entity-fields { padding: 12px 0; }

.entity-field {
  padding: 6px 16px;
  display: flex;
  gap: 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
}

.entity-field:last-child { border-bottom: none; }

.field-name { color: var(--text-primary); font-weight: 500; }
.field-type { color: var(--accent-purple); }
.field-pk { color: var(--accent-yellow); font-weight: 700; font-size: 10px; padding: 1px 5px; background: rgba(245,158,11,0.1); border-radius: 3px; }
.field-fk { color: var(--accent-flask); font-weight: 700; font-size: 10px; padding: 1px 5px; background: rgba(0,212,170,0.1); border-radius: 3px; }

/* === MODULE NAVIGATION === */
.module-nav-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 60px;
  padding-top: 32px;
  border-top: 1px solid var(--border-subtle);
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  font-size: 14px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  text-decoration: none;
}

.nav-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-accent);
}

.nav-btn.nav-next {
  background: linear-gradient(135deg, var(--accent-flask), var(--accent-flask-dark));
  color: var(--bg-primary);
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(0,212,170,0.3);
}

.nav-btn.nav-next:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0,212,170,0.4);
}

/* === LANDING / WELCOME === */
.welcome-hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 40px;
  background: radial-gradient(ellipse at 50% 0%, rgba(0,212,170,0.08) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 80%, rgba(124,58,237,0.06) 0%, transparent 50%);
  position: relative;
  overflow: hidden;
}

.welcome-content { max-width: 700px; }

.welcome-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-flask-glow);
  border: 1px solid var(--border-accent);
  color: var(--accent-flask);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 20px;
  border-radius: 30px;
  margin-bottom: 32px;
}

.welcome-hero h1 {
  font-family: 'Poppins', sans-serif;
  font-size: 58px;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 24px;
  background: linear-gradient(135deg, #fff 0%, var(--accent-flask) 60%, var(--accent-purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.welcome-hero p {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 40px;
}

.welcome-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.stat-item { text-align: center; }

.stat-number {
  font-family: 'Poppins', sans-serif;
  font-size: 32px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-flask), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.welcome-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.cta-primary {
  padding: 16px 36px;
  background: linear-gradient(135deg, var(--accent-flask), var(--accent-flask-dark));
  color: var(--bg-primary);
  border: none;
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: var(--transition);
  box-shadow: 0 8px 30px rgba(0,212,170,0.3);
}

.cta-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0,212,170,0.4);
}

.cta-secondary {
  padding: 16px 36px;
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: var(--transition);
}

.cta-secondary:hover {
  background: var(--bg-card);
  border-color: var(--border-accent);
}

/* === FLOATING PARTICLES === */
.particles {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 2px; height: 2px;
  background: var(--accent-flask);
  border-radius: 50%;
  opacity: 0;
  animation: particle-float linear infinite;
}

@keyframes particle-float {
  0% { transform: translateY(100vh); opacity: 0; }
  10% { opacity: 0.6; }
  90% { opacity: 0.6; }
  100% { transform: translateY(-100px); opacity: 0; }
}

/* === SIDEBAR TOGGLE (mobile) === */
.sidebar-toggle {
  display: none;
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 200;
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--accent-flask), var(--accent-purple));
  border-radius: 50%;
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0,212,170,0.4);
  transition: var(--transition);
}

/* === HORIZONTAL RULE === */
hr {
  border: none;
  border-top: 1px solid var(--border-subtle);
  margin: 40px 0;
}

/* === TYPOGRAPHY === */
h2 { font-family: 'Poppins', sans-serif; font-size: 28px; font-weight: 700; margin-bottom: 12px; }
h3 { font-family: 'Poppins', sans-serif; font-size: 20px; font-weight: 600; margin-bottom: 10px; }
h4 { font-size: 17px; font-weight: 600; }
p { line-height: 1.75; color: var(--text-secondary); }
strong { color: var(--text-primary); font-weight: 600; }

/* === HIGHLIGHT.JS THEME OVERRIDE === */
.hljs { background: transparent !important; }
.hljs-keyword { color: #c792ea !important; }
.hljs-built_in { color: #82aaff !important; }
.hljs-string { color: #c3e88d !important; }
.hljs-number { color: #f78c6c !important; }
.hljs-comment { color: #546e7a !important; font-style: italic !important; }
.hljs-function { color: #82aaff !important; }
.hljs-title { color: #82aaff !important; }
.hljs-decorator { color: var(--accent-flask) !important; font-weight: 600 !important; }
.hljs-class { color: #ffcb6b !important; }
.hljs-attr { color: var(--accent-flask) !important; }
.hljs-params { color: #f78c6c !important; }
.hljs-literal { color: #ff5370 !important; }
.hljs-variable { color: #eeffff !important; }
.hljs-name { color: var(--accent-orange) !important; }
.hljs-tag { color: var(--accent-orange) !important; }

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .sidebar-toggle { display: flex; align-items: center; justify-content: center; }
  .module-hero, .content-container { padding: 32px 24px; }
  .module-hero h1 { font-size: 30px; }
  .welcome-hero h1 { font-size: 38px; }
}

@media (max-width: 680px) {
  .diagram-flow { flex-direction: column; }
  .concept-grid { grid-template-columns: 1fr; }
  .welcome-stats { gap: 24px; }
}

/* === UTILITY === */
.hidden { display: none !important; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.text-center { text-align: center; }
.text-accent { color: var(--accent-flask); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

@media (max-width: 768px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* ============================================================
   UX IMPROVEMENTS & MISSING COMPONENTS v2.0
   ============================================================ */

/* === Sidebar toggle button === */
.sidebar-toggle {
  display: none;
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 200;
  background: rgba(13, 17, 23, 0.8);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  color: var(--accent-flask);
  font-size: 20px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
}
.sidebar-toggle:hover { background: var(--accent-flask-glow); border-color: var(--border-accent); }
@media (max-width: 1024px) { .sidebar-toggle { display: flex; align-items: center; justify-content: center; } }

/* === Particles === */
.particles { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; overflow: hidden; }
.particle { position: absolute; bottom: -10px; background: var(--accent-flask); border-radius: 50%; animation: floatUp linear infinite; }
@keyframes floatUp {
  from { transform: translateY(0) rotate(0deg); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 0.3; }
  to   { transform: translateY(-110vh) rotate(720deg); opacity: 0; }
}

/* === Welcome Hero === */
.welcome-hero { min-height: 90vh; display: flex; align-items: center; justify-content: center; padding: 60px 40px; background: radial-gradient(ellipse at top, rgba(0,212,170,0.06), transparent 60%); }
.welcome-content { max-width: 700px; }
.welcome-badge { display: inline-block; background: var(--accent-flask-glow); border: 1px solid var(--border-accent); color: var(--accent-flask); font-size: 12px; font-weight: 700; padding: 6px 14px; border-radius: 20px; text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 24px; }
.welcome-content h1 { font-family: 'Outfit', sans-serif; font-size: 56px; font-weight: 800; line-height: 1.1; background: linear-gradient(135deg, #fff 40%, var(--accent-flask)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; margin-bottom: 20px; }
.welcome-content p { font-size: 18px; color: var(--text-secondary); line-height: 1.8; margin-bottom: 40px; }
.welcome-stats { display: flex; gap: 48px; margin-bottom: 40px; }
.stat-item { display: flex; flex-direction: column; }
.stat-number { font-family: 'Outfit', sans-serif; font-size: 40px; font-weight: 800; color: var(--accent-flask); line-height: 1; }
.stat-label { font-size: 13px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-top: 4px; }
.welcome-cta { display: flex; gap: 16px; flex-wrap: wrap; }
.cta-primary { background: linear-gradient(135deg, var(--accent-flask), var(--accent-flask-dark)); color: var(--bg-primary); padding: 14px 32px; border-radius: var(--radius-md); font-size: 16px; font-weight: 700; cursor: pointer; border: none; font-family: 'Outfit', sans-serif; transition: var(--transition); box-shadow: 0 6px 30px rgba(0,212,170,0.35); }
.cta-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 40px rgba(0,212,170,0.5); }

/* === Entity Box (M7 Relaciones diagrams) === */
.entity-box { background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); overflow: hidden; min-width: 180px; }
.entity-header { background: var(--accent-flask-glow); border-bottom: 1px solid var(--border-accent); padding: 10px 16px; font-weight: 700; font-size: 14px; color: var(--accent-flask); font-family: 'Outfit', sans-serif; }
.entity-fields { padding: 8px 0; }
.entity-field { display: flex; align-items: center; gap: 8px; padding: 6px 16px; font-size: 13px; font-family: 'JetBrains Mono', monospace; color: var(--text-secondary); }
.field-pk { background: rgba(124,58,237,0.2); color: var(--accent-purple); padding: 1px 6px; border-radius: 4px; font-size: 10px; font-weight: 700; width: 30px; text-align: center; flex-shrink: 0; }
.field-fk { background: rgba(255,107,53,0.2); color: var(--accent-orange); padding: 1px 6px; border-radius: 4px; font-size: 10px; font-weight: 700; width: 30px; text-align: center; flex-shrink: 0; }
.field-name { font-weight: 600; color: var(--text-primary); }
.field-type { color: var(--text-muted); margin-left: auto; font-size: 11px; }

/* === Module nav footer === */
.module-nav-footer { display: flex; justify-content: space-between; align-items: center; padding: 32px 0 16px; margin-top: 40px; border-top: 1px solid var(--border-subtle); gap: 12px; flex-wrap: wrap; }
.nav-btn { padding: 10px 22px; border-radius: var(--radius-md); font-size: 14px; font-weight: 600; cursor: pointer; transition: var(--transition); font-family: 'Inter', sans-serif; border: 1px solid var(--border-subtle); background: var(--bg-card); color: var(--text-secondary); }
.nav-btn:hover { background: var(--bg-card-hover); color: var(--text-primary); border-color: var(--border-accent); }
.nav-btn.nav-next { background: linear-gradient(135deg, var(--accent-flask), var(--accent-flask-dark)); color: var(--bg-primary); border-color: transparent; box-shadow: 0 4px 15px rgba(0,212,170,0.25); }
.nav-btn.nav-next:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0,212,170,0.4); }

/* === Misc === */
.comment { color: var(--text-muted); font-size: 11px; }
/* ===== VICTORY MODAL ===== */
.modal {
    position: fixed;
    top: 0; left: 0; 
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    backdrop-filter: blur(8px);
}
.modal.open {
    opacity: 1;
    pointer-events: all;
}
.victory-card {
    max-width: 500px;
    padding: 40px;
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.modal.open .victory-card {
    transform: scale(1);
}
.victory-icon {
    font-size: 80px;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 20px var(--accent-orange));
    animation: pulse-glow 2s infinite alternate;
}
.victory-title {
    font-size: 28px;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #fff, var(--accent-orange));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.victory-desc {
    color: var(--text-muted);
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 30px;
}
.victory-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
}
.v-stat span {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--accent-flask);
}

@keyframes pulse-glow {
    from { transform: scale(1); filter: drop-shadow(0 0 10px var(--accent-orange)); }
    to { transform: scale(1.1); filter: drop-shadow(0 0 30px var(--accent-orange)); }
}

/* Simulator Enhancements */
.simulator-card {
    margin: 32px 0;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.03);
    border-radius: 20px;
    padding: 24px;
}
.sim-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 12px;
}
.sim-icon { font-size: 24px; }
.sim-textarea, .sim-input, .sim-select {
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
    color: #fff;
    padding: 12px;
    border-radius: 10px;
    width: 100%;
    font-family: 'Space Grotesk', monospace;
    font-size: 14px;
}
.browser-preview {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 15px;
    color: #00ffaa;
    font-family: monospace;
    min-height: 50px;
    position: relative;
}
.browser-preview::before {
    content: "🖥️ Preview";
    position: absolute;
    top: -10px; right: 10px;
    font-size: 10px;
    background: #333;
    padding: 2px 6px;
    border-radius: 4px;
    color: #aaa;
}
/* === Sidebar Search === */
.sidebar-search {
    padding: 0 16px 12px;
}
.sidebar-search input {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 8px 16px;
    color: #fff;
    font-size: 13px;
    transition: var(--transition);
}
.sidebar-search input:focus {
    outline: none;
    background: rgba(255,255,255,0.1);
    border-color: var(--accent-flask);
    box-shadow: 0 0 15px rgba(0,212,170,0.2);
}

/* Architecture Simulator Styles */
.drop-zone {
    border: 2px dashed rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 15px;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.3s ease;
    background: rgba(0,0,0,0.2);
}
.drop-zone.over { border-color: var(--accent-flask); background: var(--accent-flask-glow); }
.zone-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; margin-bottom: 10px; font-weight: 700; }
.zone-content { width: 100%; display: flex; justify-content: center; }

.glass-item {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-family: 'JetBrains Mono', monospace;
    cursor: grab;
    user-select: none;
    transition: transform 0.2s;
    color: var(--accent-flask);
}
.glass-item:active { cursor: grabbing; transform: scale(0.95); }

.shake { animation: shake 0.4s ease-in-out; border-color: var(--accent-red) !important; }
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* HUD Pulse */
#hud-status.syncing { animation: pulse-opacity 1s infinite alternate; color: var(--accent-yellow); }
@keyframes pulse-opacity { from { opacity: 1; } to { opacity: 0.4; } }
