/**
 * Endlessus Learning Hub - Unified Theme Stylesheet
 * Supports dual presentation modes:
 * 1. Normal View (.theme-normal): Clean, light, spacious, educational, professional academy design.
 * 2. Hacker View (.theme-hacker): Dark, neon accents, monospace typography, technical HUD and terminal aesthetic.
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200');

/* ==========================================================================
   THEME VARIABLES
   ========================================================================== */

:root,
body.theme-normal {
  --lh-bg: #f8fafc;
  --lh-bg-deep: #f1f5f9;
  --lh-surface: #ffffff;
  --lh-surface-hover: #f8fafc;
  --lh-surface-subtle: #f1f5f9;
  --lh-surface-border: #e2e8f0;
  --lh-surface-border-subtle: #f1f5f9;
  
  --lh-text: #0f172a;
  --lh-text-muted: #475569;
  --lh-text-subtle: #94a3b8;
  
  --lh-primary: #0d9488;
  --lh-primary-hover: #0f766e;
  --lh-primary-light: #ccfbf1;
  --lh-primary-dim: rgba(13, 148, 136, 0.08);
  --lh-primary-glow: rgba(13, 148, 136, 0.2);
  
  --lh-secondary: #2563eb;
  --lh-secondary-hover: #1d4ed8;
  --lh-secondary-dim: rgba(37, 99, 235, 0.08);
  
  --lh-accent: #6366f1;
  --lh-warning: #d97706;
  --lh-warning-dim: rgba(217, 119, 6, 0.08);
  --lh-success: #16a34a;
  --lh-success-dim: rgba(22, 163, 74, 0.08);
  --lh-danger: #dc2626;
  --lh-danger-dim: rgba(220, 38, 38, 0.08);
  
  --lh-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --lh-font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --lh-font-mono: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
  
  --lh-radius-sm: 8px;
  --lh-radius-md: 12px;
  --lh-radius-lg: 16px;
  --lh-radius-pill: 9999px;
  
  --lh-card-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.05);
  --lh-card-hover-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  
  --lh-grid-display: none;
  --lh-hud-display: none;
  --lh-terminal-bg: #1e293b;
  --lh-terminal-text: #f8fafc;
}

body.theme-hacker {
  --lh-bg: #090D12;
  --lh-bg-deep: #05070A;
  --lh-surface: #0E131B;
  --lh-surface-hover: #151D28;
  --lh-surface-subtle: #121924;
  --lh-surface-border: #1F2937;
  --lh-surface-border-subtle: #111827;
  
  --lh-text: #F3F4F6;
  --lh-text-muted: #8692A6;
  --lh-text-subtle: #64748B;
  
  --lh-primary: #4EDEA3;
  --lh-primary-hover: #38c78c;
  --lh-primary-light: rgba(78, 222, 163, 0.2);
  --lh-primary-dim: rgba(78, 222, 163, 0.12);
  --lh-primary-glow: rgba(78, 222, 163, 0.35);
  
  --lh-secondary: #4CD7F6;
  --lh-secondary-hover: #38c2e0;
  --lh-secondary-dim: rgba(76, 215, 246, 0.12);
  
  --lh-accent: #A855F7;
  --lh-warning: #F59E0B;
  --lh-warning-dim: rgba(245, 158, 11, 0.15);
  --lh-success: #4EDEA3;
  --lh-success-dim: rgba(78, 222, 163, 0.15);
  --lh-danger: #EF4444;
  --lh-danger-dim: rgba(239, 68, 68, 0.15);
  
  --lh-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --lh-font-heading: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --lh-font-mono: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
  
  --lh-radius-sm: 4px;
  --lh-radius-md: 6px;
  --lh-radius-lg: 8px;
  --lh-radius-pill: 4px;
  
  --lh-card-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  --lh-card-hover-shadow: 0 0 20px rgba(78, 222, 163, 0.18);
  
  --lh-grid-display: block;
  --lh-hud-display: inline-flex;
  --lh-terminal-bg: #05070A;
  --lh-terminal-text: #4EDEA3;
}

/* ==========================================================================
   BASE RESET & GLOBAL LAYOUT
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--lh-font-sans);
  background-color: var(--lh-bg);
  color: var(--lh-text);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.25s ease, color 0.25s ease;
  position: relative;
}

body.theme-hacker {
  background-image:
    radial-gradient(ellipse at 50% 0%, rgba(78, 222, 163, 0.05) 0%, transparent 60%),
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 100% 100%, 48px 48px, 48px 48px;
}

body.theme-normal {
  background-image:
    radial-gradient(at 100% 0%, rgba(13, 148, 136, 0.03) 0px, transparent 50%),
    radial-gradient(at 0% 100%, rgba(37, 99, 235, 0.03) 0px, transparent 50%);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}

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

/* Container */
.lh-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */

.lh-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--lh-surface);
  border-bottom: 1px solid var(--lh-surface-border);
  backdrop-filter: blur(12px);
  transition: background 0.25s ease, border-color 0.25s ease;
}

body.theme-normal .lh-header {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
}

body.theme-hacker .lh-header {
  background: rgba(14, 19, 27, 0.95);
}

.lh-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 1rem;
}

.lh-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--lh-text);
}

.lh-brand-mark {
  width: 34px;
  height: 34px;
  border-radius: var(--lh-radius-sm);
  background: var(--lh-primary-dim);
  border: 1px solid var(--lh-primary);
  color: var(--lh-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--lh-font-mono);
  font-weight: 700;
  font-size: 1rem;
}

body.theme-hacker .lh-brand-mark {
  box-shadow: 0 0 10px var(--lh-primary-glow);
}

.lh-brand-text {
  display: flex;
  flex-direction: column;
}

.lh-brand-title {
  font-size: 1rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.lh-brand-sub {
  font-size: 0.72rem;
  color: var(--lh-text-muted);
  font-family: var(--lh-font-mono);
  font-weight: 500;
}

.lh-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.lh-nav-link {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--lh-text-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.6rem;
  border-radius: var(--lh-radius-sm);
  transition: all 0.15s ease;
}

.lh-nav-link:hover,
.lh-nav-link.active {
  color: var(--lh-text);
  background: var(--lh-surface-hover);
}

.lh-nav-link.active {
  color: var(--lh-primary);
  font-weight: 600;
}

/* ==========================================================================
   THEME TOGGLE SWITCH: NORMAL VIEW VS HACKER VIEW
   ========================================================================== */

.lh-theme-toggle {
  display: inline-flex;
  align-items: center;
  background: var(--lh-bg-deep);
  border: 1px solid var(--lh-surface-border);
  border-radius: var(--lh-radius-pill);
  padding: 3px;
  position: relative;
  user-select: none;
}

.lh-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: var(--lh-radius-pill);
  color: var(--lh-text-muted);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.lh-toggle-btn.active {
  background: var(--lh-surface);
  color: var(--lh-text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

body.theme-normal .lh-toggle-btn.normal-btn.active {
  color: var(--lh-primary);
  border: 1px solid var(--lh-surface-border);
}

body.theme-hacker .lh-toggle-btn.hacker-btn.active {
  background: var(--lh-surface-hover);
  color: var(--lh-primary);
  border: 1px solid var(--lh-primary);
  box-shadow: 0 0 10px var(--lh-primary-glow);
}

/* Telemetry pill (Hacker view only) */
.lh-telemetry-badge {
  display: var(--lh-hud-display);
  align-items: center;
  gap: 0.35rem;
  font-family: var(--lh-font-mono);
  font-size: 0.7rem;
  padding: 0.25rem 0.5rem;
  background: var(--lh-primary-dim);
  border: 1px solid var(--lh-primary);
  color: var(--lh-primary);
  border-radius: var(--lh-radius-sm);
}

.lh-pulse-dot {
  width: 6px;
  height: 6px;
  background: var(--lh-primary);
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

/* ==========================================================================
   HERO & ONBOARDING LEVEL ASSESSMENT
   ========================================================================== */

.lh-hero {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--lh-surface-border);
  position: relative;
  overflow: hidden;
}

.lh-hero-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 2.5rem;
}

.lh-hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  background: var(--lh-primary-dim);
  border: 1px solid var(--lh-primary);
  color: var(--lh-primary);
  font-family: var(--lh-font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--lh-radius-pill);
  margin-bottom: 1rem;
}

.lh-hero-title {
  font-family: var(--lh-font-heading);
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
  color: var(--lh-text);
}

body.theme-normal .lh-hero-title span {
  color: var(--lh-primary);
}

body.theme-hacker .lh-hero-title span {
  color: var(--lh-primary);
  text-shadow: 0 0 20px var(--lh-primary-glow);
}

.lh-hero-subtitle {
  font-size: 1.05rem;
  color: var(--lh-text-muted);
  max-width: 680px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Assessment Card Box */
.lh-assessment-box {
  background: var(--lh-surface);
  border: 1px solid var(--lh-surface-border);
  border-radius: var(--lh-radius-lg);
  padding: 1.75rem;
  max-width: 900px;
  margin: 0 auto;
  box-shadow: var(--lh-card-shadow);
  transition: all 0.2s ease;
}

.lh-assessment-prompt {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  text-align: center;
  color: var(--lh-text);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.lh-level-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.lh-level-btn {
  padding: 1rem 0.85rem;
  border: 1px solid var(--lh-surface-border);
  background: var(--lh-bg);
  border-radius: var(--lh-radius-md);
  text-align: center;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.lh-level-btn:hover {
  background: var(--lh-surface-hover);
  border-color: var(--lh-primary);
  transform: translateY(-2px);
}

.lh-level-btn.active {
  background: var(--lh-primary-dim);
  border-color: var(--lh-primary);
  color: var(--lh-primary);
  font-weight: 600;
}

body.theme-hacker .lh-level-btn.active {
  box-shadow: 0 0 12px var(--lh-primary-glow);
}

.lh-level-icon {
  font-size: 1.5rem;
}

.lh-level-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--lh-text);
}

.lh-level-desc {
  font-size: 0.72rem;
  color: var(--lh-text-muted);
}

/* Recommendation Output Banner */
.lh-recommendation-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--lh-bg-deep);
  border: 1px solid var(--lh-surface-border);
  border-left: 4px solid var(--lh-primary);
  border-radius: var(--lh-radius-md);
  transition: all 0.2s ease;
}

.lh-rec-left {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.lh-rec-label {
  font-family: var(--lh-font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--lh-primary);
}

.lh-rec-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--lh-text);
}

.lh-rec-sub {
  font-size: 0.82rem;
  color: var(--lh-text-muted);
}

.lh-rec-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--lh-primary);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.88rem;
  border-radius: var(--lh-radius-pill);
  transition: all 0.15s ease;
  white-space: nowrap;
}

body.theme-hacker .lh-rec-btn {
  color: #090D12;
  font-family: var(--lh-font-mono);
  box-shadow: 0 0 15px var(--lh-primary-glow);
}

.lh-rec-btn:hover {
  background: var(--lh-primary-hover);
  transform: translateY(-1px);
}

/* ==========================================================================
   FILTER & SEARCH CONTROLS
   ========================================================================== */

.lh-controls {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--lh-surface-border);
}

.lh-controls-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.lh-search-box {
  position: relative;
  flex: 1;
  min-width: 260px;
  max-width: 420px;
}

.lh-search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--lh-text-subtle);
  font-size: 1.1rem;
  pointer-events: none;
}

.lh-search-input {
  width: 100%;
  padding: 0.65rem 0.75rem 0.65rem 2.4rem;
  background: var(--lh-surface);
  border: 1px solid var(--lh-surface-border);
  border-radius: var(--lh-radius-pill);
  font-family: inherit;
  font-size: 0.85rem;
  color: var(--lh-text);
  transition: all 0.15s ease;
}

.lh-search-input:focus {
  outline: none;
  border-color: var(--lh-primary);
  box-shadow: 0 0 0 3px var(--lh-primary-dim);
}

.lh-filter-pills {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.lh-filter-pill {
  padding: 0.4rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 500;
  border: 1px solid var(--lh-surface-border);
  border-radius: var(--lh-radius-pill);
  background: var(--lh-surface);
  color: var(--lh-text-muted);
  transition: all 0.15s ease;
}

.lh-filter-pill:hover,
.lh-filter-pill.active {
  background: var(--lh-primary-dim);
  border-color: var(--lh-primary);
  color: var(--lh-primary);
  font-weight: 600;
}

.lh-stats-summary {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.82rem;
  color: var(--lh-text-muted);
  font-family: var(--lh-font-mono);
}

.lh-progress-bar-wrap {
  width: 140px;
  height: 6px;
  background: var(--lh-surface-border);
  border-radius: 99px;
  overflow: hidden;
}

.lh-progress-bar-fill {
  height: 100%;
  background: var(--lh-primary);
  transition: width 0.3s ease;
}

/* ==========================================================================
   CURRICULUM STAGES & ROOM CARDS
   ========================================================================== */

.lh-curriculum {
  padding: 2.5rem 0;
}

.lh-stage-section {
  margin-bottom: 3rem;
  scroll-margin-top: 80px;
}

.lh-stage-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--lh-surface-border);
}

.lh-stage-header-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.lh-stage-number {
  font-family: var(--lh-font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  background: var(--lh-surface-subtle);
  border: 1px solid var(--lh-surface-border);
  border-radius: var(--lh-radius-sm);
  color: var(--lh-primary);
}

.lh-stage-title-wrap {
  display: flex;
  flex-direction: column;
}

.lh-stage-title {
  font-family: var(--lh-font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--lh-text);
  line-height: 1.2;
}

.lh-stage-desc {
  font-size: 0.82rem;
  color: var(--lh-text-muted);
}

.lh-stage-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.78rem;
  color: var(--lh-text-subtle);
  font-family: var(--lh-font-mono);
}

/* Room Grid */
.lh-room-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

/* Room Card */
.lh-room-card {
  background: var(--lh-surface);
  border: 1px solid var(--lh-surface-border);
  border-radius: var(--lh-radius-md);
  padding: 1.35rem;
  box-shadow: var(--lh-card-shadow);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  cursor: pointer;
}

.lh-room-card:hover {
  transform: translateY(-2px);
  border-color: var(--lh-primary);
  box-shadow: var(--lh-card-hover-shadow);
}

.lh-room-card.completed {
  border-color: var(--lh-success);
}

.lh-room-card.completed::after {
  content: "✓ COMPLETED";
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  font-family: var(--lh-font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: var(--lh-radius-pill);
  background: var(--lh-success-dim);
  color: var(--lh-success);
  border: 1px solid var(--lh-success);
}

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

.lh-room-id {
  font-family: var(--lh-font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--lh-primary);
}

.lh-room-difficulty {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: var(--lh-radius-pill);
  border: 1px solid currentColor;
}

.lh-diff-beginner { color: #10b981; background: rgba(16, 185, 129, 0.08); }
.lh-diff-foundation { color: #0284c7; background: rgba(2, 132, 199, 0.08); }
.lh-diff-intermediate { color: #8b5cf6; background: rgba(139, 92, 246, 0.08); }
.lh-diff-advanced { color: #ef4444; background: rgba(239, 68, 68, 0.08); }

.lh-room-title {
  font-family: var(--lh-font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--lh-text);
  line-height: 1.35;
  margin-bottom: 0.6rem;
}

.lh-room-desc {
  font-size: 0.82rem;
  color: var(--lh-text-muted);
  line-height: 1.5;
  margin-bottom: 1.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.lh-room-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.85rem;
  border-top: 1px solid var(--lh-surface-border-subtle);
  font-size: 0.75rem;
  color: var(--lh-text-subtle);
}

.lh-room-time {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--lh-font-mono);
}

.lh-room-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.85rem;
  background: var(--lh-primary-dim);
  border: 1px solid var(--lh-primary);
  color: var(--lh-primary);
  font-weight: 600;
  font-size: 0.78rem;
  border-radius: var(--lh-radius-pill);
  transition: all 0.15s ease;
}

.lh-room-card:hover .lh-room-btn {
  background: var(--lh-primary);
  color: #ffffff;
}

body.theme-hacker .lh-room-card:hover .lh-room-btn {
  color: #090D12;
}

/* Prerequisite Guidance Banner */
.lh-prereq-badge {
  font-size: 0.7rem;
  color: var(--lh-text-muted);
  font-family: var(--lh-font-mono);
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-bottom: 0.5rem;
}

/* ==========================================================================
   PRACTICAL LABS SPOTLIGHT
   ========================================================================== */

.lh-labs-spotlight {
  padding: 3rem 0;
  background: var(--lh-bg-deep);
  border-top: 1px solid var(--lh-surface-border);
  border-bottom: 1px solid var(--lh-surface-border);
  margin-top: 2rem;
}

.lh-labs-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 2.5rem;
}

.lh-labs-title {
  font-family: var(--lh-font-heading);
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.lh-labs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.25rem;
}

.lh-lab-card {
  background: var(--lh-surface);
  border: 1px solid var(--lh-surface-border);
  border-radius: var(--lh-radius-md);
  padding: 1.25rem;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.lh-lab-card:hover {
  transform: translateY(-2px);
  border-color: var(--lh-secondary);
  box-shadow: var(--lh-card-hover-shadow);
}

.lh-lab-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--lh-font-mono);
  font-size: 0.68rem;
  padding: 0.2rem 0.5rem;
  border-radius: var(--lh-radius-pill);
  background: var(--lh-secondary-dim);
  border: 1px solid var(--lh-secondary);
  color: var(--lh-secondary);
  margin-bottom: 0.6rem;
}

.lh-lab-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--lh-text);
  margin-bottom: 0.4rem;
}

.lh-lab-desc {
  font-size: 0.78rem;
  color: var(--lh-text-muted);
  line-height: 1.45;
  margin-bottom: 1rem;
}

.lh-lab-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  background: var(--lh-secondary);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: var(--lh-radius-pill);
  transition: all 0.15s ease;
}

.lh-lab-btn:hover {
  background: var(--lh-secondary-hover);
}

/* ==========================================================================
   ROOM MODAL / PLAYER INTERFACE (12-PART TEMPLATE)
   ========================================================================== */

.lh-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 1.5rem;
}

.lh-modal-backdrop.open {
  display: flex;
  opacity: 1;
  visibility: visible;
}

.lh-room-player {
  background: var(--lh-surface);
  border: 1px solid var(--lh-surface-border);
  border-radius: var(--lh-radius-lg);
  width: 100%;
  max-width: 1100px;
  height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  transform: scale(0.96) translateY(10px);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.lh-modal-backdrop.open .lh-room-player {
  transform: scale(1) translateY(0);
}

/* Player Header */
.lh-player-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--lh-surface-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--lh-surface);
}

.lh-player-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.lh-player-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--lh-radius-sm);
  border: 1px solid var(--lh-surface-border);
  color: var(--lh-text-muted);
  transition: all 0.15s ease;
}

.lh-player-close:hover {
  background: var(--lh-surface-hover);
  color: var(--lh-text);
  border-color: var(--lh-danger);
}

/* Player Body (Split View) */
.lh-player-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* Left Sidebar Outline */
.lh-player-sidebar {
  width: 250px;
  border-right: 1px solid var(--lh-surface-border);
  background: var(--lh-bg);
  padding: 1.25rem 0.75rem;
  overflow-y: auto;
  flex-shrink: 0;
}

.lh-toc-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--lh-radius-sm);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--lh-text-muted);
  transition: all 0.15s ease;
  margin-bottom: 0.2rem;
}

.lh-toc-item:hover,
.lh-toc-item.active {
  background: var(--lh-surface);
  color: var(--lh-text);
}

.lh-toc-item.active {
  color: var(--lh-primary);
  font-weight: 600;
  border-left: 2px solid var(--lh-primary);
}

/* Right Content Area */
.lh-player-content {
  flex: 1;
  padding: 2rem 2.5rem;
  overflow-y: auto;
  scroll-behavior: smooth;
}

/* Content Sections */
.lh-section-block {
  margin-bottom: 2.75rem;
  scroll-margin-top: 20px;
}

.lh-section-heading {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--lh-font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--lh-text);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--lh-surface-border-subtle);
}

.lh-section-badge {
  font-family: var(--lh-font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.45rem;
  border-radius: var(--lh-radius-sm);
  background: var(--lh-primary-dim);
  color: var(--lh-primary);
}

/* Vocabulary Grid */
.lh-vocab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.85rem;
}

.lh-vocab-card {
  padding: 0.85rem 1rem;
  background: var(--lh-bg);
  border: 1px solid var(--lh-surface-border);
  border-radius: var(--lh-radius-md);
}

.lh-vocab-term {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--lh-primary);
  margin-bottom: 0.25rem;
  font-family: var(--lh-font-mono);
}

.lh-vocab-def {
  font-size: 0.78rem;
  color: var(--lh-text-muted);
  line-height: 1.45;
}

/* Code & Diagram Displays */
.lh-code-box {
  background: var(--lh-terminal-bg);
  color: var(--lh-terminal-text);
  border: 1px solid var(--lh-surface-border);
  border-radius: var(--lh-radius-md);
  padding: 1.25rem;
  font-family: var(--lh-font-mono);
  font-size: 0.82rem;
  line-height: 1.6;
  overflow-x: auto;
  margin: 1rem 0;
  position: relative;
}

/* Interactive Sandbox Widget */
.lh-sandbox-widget {
  background: var(--lh-terminal-bg);
  border: 1px solid var(--lh-surface-border);
  border-radius: var(--lh-radius-md);
  overflow: hidden;
  margin: 1.25rem 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.lh-sandbox-header {
  padding: 0.6rem 1rem;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--lh-font-mono);
  font-size: 0.75rem;
  color: var(--lh-text-subtle);
}

.lh-sandbox-dots {
  display: flex;
  gap: 6px;
}

.lh-sandbox-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.lh-sandbox-dot.red { background: #ef4444; }
.lh-sandbox-dot.yellow { background: #f59e0b; }
.lh-sandbox-dot.green { background: #10b981; }

.lh-sandbox-body {
  padding: 1.25rem;
  font-family: var(--lh-font-mono);
}

.lh-sandbox-prompt {
  font-size: 0.82rem;
  color: var(--lh-text-muted);
  margin-bottom: 0.85rem;
}

.lh-terminal-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.lh-terminal-prompt-sym {
  color: #10b981;
  font-weight: 700;
  font-size: 0.85rem;
}

.lh-terminal-input {
  flex: 1;
  background: transparent;
  border: none;
  font-family: var(--lh-font-mono);
  font-size: 0.85rem;
  color: #f8fafc;
  outline: none;
}

.lh-terminal-btn {
  padding: 0.4rem 0.85rem;
  background: var(--lh-primary);
  color: #ffffff;
  border-radius: var(--lh-radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
}

body.theme-hacker .lh-terminal-btn {
  color: #090D12;
}

.lh-terminal-output {
  white-space: pre-wrap;
  font-size: 0.8rem;
  line-height: 1.6;
  color: #94a3b8;
  padding-top: 0.75rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
}

/* Questions Section */
.lh-quiz-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.lh-quiz-card {
  padding: 1.25rem;
  background: var(--lh-bg);
  border: 1px solid var(--lh-surface-border);
  border-radius: var(--lh-radius-md);
}

.lh-quiz-question {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--lh-text);
  margin-bottom: 1rem;
}

.lh-quiz-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.lh-quiz-option {
  padding: 0.75rem 1rem;
  background: var(--lh-surface);
  border: 1px solid var(--lh-surface-border);
  border-radius: var(--lh-radius-sm);
  font-size: 0.85rem;
  color: var(--lh-text);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  transition: all 0.15s ease;
  text-align: left;
}

.lh-quiz-option:hover {
  background: var(--lh-surface-hover);
  border-color: var(--lh-primary);
}

.lh-quiz-option.correct {
  background: var(--lh-success-dim);
  border-color: var(--lh-success);
  color: var(--lh-success);
  font-weight: 600;
}

.lh-quiz-option.incorrect {
  background: var(--lh-danger-dim);
  border-color: var(--lh-danger);
  color: var(--lh-danger);
}

.lh-quiz-explanation {
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--lh-radius-sm);
  font-size: 0.8rem;
  background: var(--lh-primary-dim);
  border-left: 3px solid var(--lh-primary);
  color: var(--lh-text);
}

/* 5-Stage Progressive Hint System */
.lh-hints-accordion {
  border: 1px solid var(--lh-surface-border);
  border-radius: var(--lh-radius-md);
  overflow: hidden;
  background: var(--lh-surface);
}

.lh-hint-step {
  border-bottom: 1px solid var(--lh-surface-border);
}
.lh-hint-step:last-child {
  border-bottom: none;
}

.lh-hint-trigger {
  width: 100%;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--lh-bg);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--lh-text);
  transition: background 0.15s ease;
}

.lh-hint-trigger:hover {
  background: var(--lh-surface-hover);
}

.lh-hint-badge {
  font-family: var(--lh-font-mono);
  font-size: 0.72rem;
  color: var(--lh-text-muted);
}

.lh-hint-content {
  padding: 0.85rem 1.25rem;
  background: var(--lh-surface);
  font-size: 0.82rem;
  color: var(--lh-text-muted);
  line-height: 1.5;
  display: none;
}

.lh-hint-content.revealed {
  display: block;
}

/* Callout Boxes (Explain Result & Security Connection) */
.lh-callout-explain {
  padding: 1.25rem;
  background: var(--lh-primary-dim);
  border-left: 4px solid var(--lh-primary);
  border-radius: 0 var(--lh-radius-md) var(--lh-radius-md) 0;
  margin: 1.5rem 0;
}

.lh-callout-security {
  padding: 1.25rem;
  background: var(--lh-secondary-dim);
  border-left: 4px solid var(--lh-secondary);
  border-radius: 0 var(--lh-radius-md) var(--lh-radius-md) 0;
  margin: 1.5rem 0;
}

.lh-callout-title {
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.lh-callout-explain .lh-callout-title { color: var(--lh-primary); }
.lh-callout-security .lh-callout-title { color: var(--lh-secondary); }

/* Room Completion Celebration Overlay */
.lh-completion-summary {
  background: var(--lh-bg);
  border: 1px solid var(--lh-success);
  border-radius: var(--lh-radius-lg);
  padding: 2rem;
  text-align: center;
  margin-top: 2rem;
}

.lh-completion-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--lh-success-dim);
  color: var(--lh-success);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 1rem;
}

.lh-completion-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--lh-text);
  margin-bottom: 0.5rem;
}

.lh-completion-lists {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  text-align: left;
  margin: 1.5rem 0;
  padding: 1.25rem;
  background: var(--lh-surface);
  border-radius: var(--lh-radius-md);
  border: 1px solid var(--lh-surface-border);
}

.lh-completion-list-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--lh-text);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.lh-completion-list {
  list-style: none;
  font-size: 0.8rem;
  color: var(--lh-text-muted);
}
.lh-completion-list li {
  padding: 0.2rem 0;
}
.lh-completion-list li::before {
  content: "• ";
  color: var(--lh-primary);
  font-weight: bold;
}

.lh-next-room-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  background: var(--lh-primary);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: var(--lh-radius-pill);
  transition: all 0.2s ease;
  margin-top: 1rem;
}

body.theme-hacker .lh-next-room-btn {
  color: #090D12;
  box-shadow: 0 0 20px var(--lh-primary-glow);
}

.lh-next-room-btn:hover {
  transform: translateY(-2px);
  background: var(--lh-primary-hover);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.lh-footer {
  margin-top: auto;
  border-top: 1px solid var(--lh-surface-border);
  padding: 2rem 0;
  background: var(--lh-surface);
  font-size: 0.82rem;
  color: var(--lh-text-muted);
}

.lh-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ==========================================================================
   RESPONSIVE QUERIES
   ========================================================================== */

@media (max-width: 900px) {
  .lh-player-sidebar {
    display: none;
  }
  .lh-player-content {
    padding: 1.5rem;
  }
  .lh-completion-lists {
    grid-template-columns: 1fr;
  }
  .lh-recommendation-card {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .lh-hero-title {
    font-size: 1.85rem;
  }
  .lh-level-options {
    grid-template-columns: 1fr;
  }
  .lh-room-grid {
    grid-template-columns: 1fr;
  }
  .lh-modal-backdrop {
    padding: 0.5rem;
  }
  .lh-room-player {
    height: 96vh;
  }
}

/* ==========================================================================
   ACADEMY EXTENSION: NAVIGATION, POPOVERS, BREADCRUMBS, SEARCH & MOBILE UX
   ========================================================================== */

/* Nav Popovers / Dropdowns */
.lh-nav-dropdown {
  position: relative;
}

.lh-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 250px;
  background: var(--lh-surface);
  border: 1px solid var(--lh-surface-border);
  border-radius: var(--lh-radius-md);
  padding: 0.5rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.08);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: all 0.15s ease;
  z-index: 60;
}

.lh-nav-dropdown:hover .lh-dropdown-menu,
.lh-nav-dropdown:focus-within .lh-dropdown-menu,
.lh-dropdown-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lh-dropdown-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: var(--lh-radius-sm);
  color: var(--lh-text-muted);
  transition: background 0.15s ease, color 0.15s ease;
  text-decoration: none;
}

.lh-dropdown-item:hover {
  background: var(--lh-surface-hover);
  color: var(--lh-text);
}

.lh-dropdown-item strong {
  display: block;
  font-size: 0.85rem;
  color: var(--lh-text);
  line-height: 1.25;
}

.lh-dropdown-item span {
  display: block;
  font-size: 0.72rem;
  color: var(--lh-text-subtle);
  margin-top: 2px;
}

/* Breadcrumb Sub-Bar */
.lh-breadcrumb-bar {
  border-bottom: 1px solid var(--lh-surface-border);
  background: var(--lh-bg-deep);
  padding: 0.5rem 0;
  font-size: 0.78rem;
}

.lh-breadcrumb-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.lh-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--lh-font-mono);
  color: var(--lh-text-muted);
  font-size: 0.78rem;
}

.lh-breadcrumbs a {
  color: var(--lh-text-muted);
}
.lh-breadcrumbs a:hover {
  color: var(--lh-primary);
}

.lh-breadcrumb-sep {
  color: var(--lh-text-subtle);
}

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

.lh-breadcrumb-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.lh-progress-mini-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--lh-font-mono);
  font-size: 0.75rem;
  color: var(--lh-text-muted);
}

.lh-crumb-lab-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--lh-primary);
}

.lh-crumb-lab-link:hover {
  text-decoration: underline;
}

/* Header Actions */
.lh-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Search Trigger in Header */
.lh-search-trigger-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  border-radius: var(--lh-radius-pill);
  background: var(--lh-bg-deep);
  border: 1px solid var(--lh-surface-border);
  color: var(--lh-text-muted);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.lh-search-trigger-btn:hover {
  border-color: var(--lh-primary);
  color: var(--lh-text);
}

.lh-search-btn-text {
  font-size: 0.8rem;
}

.lh-search-kbd {
  font-family: var(--lh-font-mono);
  font-size: 0.68rem;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  background: var(--lh-surface);
  border: 1px solid var(--lh-surface-border);
  color: var(--lh-text-subtle);
}

/* Universal Search Modal Backdrop */
.lh-search-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(6px);
  z-index: 120;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 4rem 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease;
}

.lh-search-modal-backdrop.open {
  display: flex;
  opacity: 1;
  visibility: visible;
}

.lh-search-modal {
  width: 100%;
  max-width: 640px;
  background: var(--lh-surface);
  border: 1px solid var(--lh-surface-border);
  border-radius: var(--lh-radius-lg);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  transform: translateY(-10px);
  transition: transform 0.2s ease;
}

.lh-search-modal-backdrop.open .lh-search-modal {
  transform: translateY(0);
}

.lh-search-modal-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--lh-surface-border);
}

.lh-universal-search-input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--lh-text);
  font-size: 1rem;
  outline: none;
  font-family: inherit;
}

.lh-search-modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--lh-text-subtle);
  border-radius: 4px;
  padding: 4px;
}

.lh-search-modal-close:hover {
  color: var(--lh-text);
}

.lh-search-results-container {
  max-height: 400px;
  overflow-y: auto;
  padding: 0.5rem;
}

.lh-search-result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.85rem;
  border-radius: var(--lh-radius-sm);
  cursor: pointer;
  transition: background 0.15s ease;
  text-decoration: none;
  color: var(--lh-text);
}

.lh-search-result-item:hover,
.lh-search-result-item.selected {
  background: var(--lh-surface-hover);
}

.lh-search-result-title {
  font-size: 0.88rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lh-search-result-subtitle {
  font-size: 0.72rem;
  color: var(--lh-text-muted);
  margin-top: 2px;
}

.lh-search-type-badge {
  font-family: var(--lh-font-mono);
  font-size: 0.68rem;
  padding: 0.2rem 0.5rem;
  border-radius: var(--lh-radius-pill);
  background: var(--lh-primary-dim);
  color: var(--lh-primary);
  border: 1px solid var(--lh-primary);
  white-space: nowrap;
}

.lh-search-type-badge.badge-lab {
  background: var(--lh-secondary-dim);
  color: var(--lh-secondary);
  border-color: var(--lh-secondary);
}

.lh-search-type-badge.badge-vocab {
  background: var(--lh-warning-dim);
  color: var(--lh-warning);
  border-color: var(--lh-warning);
}

.lh-search-modal-footer {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.65rem 1.25rem;
  border-top: 1px solid var(--lh-surface-border);
  background: var(--lh-bg-deep);
  font-size: 0.72rem;
  color: var(--lh-text-subtle);
}

.lh-search-modal-footer kbd {
  font-family: var(--lh-font-mono);
  padding: 1px 4px;
  background: var(--lh-surface);
  border: 1px solid var(--lh-surface-border);
  border-radius: 3px;
}

/* Stage Pathway Tracker */
.lh-pathway-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.lh-pathway-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--lh-text);
}

.lh-stage-track {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.75rem;
  margin-bottom: 1.25rem;
  scrollbar-width: thin;
}

.lh-stage-node {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.85rem;
  border-radius: var(--lh-radius-pill);
  background: var(--lh-surface);
  border: 1px solid var(--lh-surface-border);
  color: var(--lh-text-muted);
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.lh-stage-node:hover {
  border-color: var(--lh-primary);
  color: var(--lh-text);
}

.lh-stage-node.active {
  background: var(--lh-primary);
  border-color: var(--lh-primary);
  color: #ffffff;
  font-weight: 600;
}

body.theme-hacker .lh-stage-node.active {
  color: #090D12;
  box-shadow: 0 0 10px var(--lh-primary-glow);
}

.lh-stage-node.completed {
  border-color: var(--lh-primary);
  color: var(--lh-primary);
}

.lh-stage-node-num {
  font-family: var(--lh-font-mono);
  font-weight: 700;
  font-size: 0.7rem;
}

/* Mobile Stage Stepper */
.lh-mobile-stage-stepper {
  display: none;
  align-items: center;
  gap: 0.5rem;
}

.lh-stepper-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--lh-radius-sm);
  background: var(--lh-surface);
  border: 1px solid var(--lh-surface-border);
  color: var(--lh-text);
}

.lh-stepper-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--lh-text);
}

/* Hero Direct Actions */
.lh-hero-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.lh-btn-hero-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  background: var(--lh-primary);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: var(--lh-radius-pill);
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.2);
}

body.theme-hacker .lh-btn-hero-primary {
  color: #090D12;
  box-shadow: 0 0 20px var(--lh-primary-glow);
}

.lh-btn-hero-primary:hover {
  transform: translateY(-2px);
  background: var(--lh-primary-hover);
}

.lh-btn-hero-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.85rem 1.5rem;
  background: var(--lh-surface);
  border: 1px solid var(--lh-surface-border);
  color: var(--lh-text);
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--lh-radius-pill);
  transition: all 0.2s ease;
}

.lh-btn-hero-secondary:hover {
  background: var(--lh-surface-hover);
  border-color: var(--lh-primary);
}

/* Compact Practice While You Learn Spotlight */
.lh-practice-spotlight {
  padding: 3.5rem 0;
  background: var(--lh-bg-deep);
  border-top: 1px solid var(--lh-surface-border);
  border-bottom: 1px solid var(--lh-surface-border);
  margin-top: 2rem;
}

.lh-practice-card {
  background: var(--lh-surface);
  border: 1px solid var(--lh-surface-border);
  border-radius: var(--lh-radius-lg);
  padding: 2.25rem;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 2.5rem;
  box-shadow: var(--lh-card-shadow);
}

.lh-practice-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--lh-font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--lh-secondary);
  background: var(--lh-secondary-dim);
  padding: 0.25rem 0.65rem;
  border-radius: var(--lh-radius-pill);
  border: 1px solid var(--lh-secondary);
  margin-bottom: 0.75rem;
}

.lh-practice-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--lh-text);
  margin-bottom: 0.5rem;
  line-height: 1.25;
}

.lh-practice-desc {
  font-size: 0.92rem;
  color: var(--lh-text-muted);
  line-height: 1.6;
  max-width: 650px;
  margin-bottom: 1rem;
}

.lh-practice-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.lh-practice-chip {
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: var(--lh-radius-sm);
  background: var(--lh-bg-deep);
  border: 1px solid var(--lh-surface-border);
  color: var(--lh-text-muted);
}

.lh-practice-cta {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 220px;
}

.lh-btn-primary-practice {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  background: var(--lh-secondary);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: var(--lh-radius-pill);
  transition: all 0.2s ease;
  text-align: center;
}

.lh-btn-primary-practice:hover {
  background: var(--lh-secondary-hover);
  transform: translateY(-2px);
}

.lh-btn-secondary-practice {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.25rem;
  background: transparent;
  color: var(--lh-text);
  border: 1px solid var(--lh-surface-border);
  font-weight: 600;
  font-size: 0.85rem;
  border-radius: var(--lh-radius-pill);
  transition: all 0.2s ease;
  text-align: center;
}

.lh-btn-secondary-practice:hover {
  background: var(--lh-surface-hover);
}

/* Mobile section jump in Room Player */
.lh-player-mobile-nav {
  display: none;
}

.lh-mobile-select {
  padding: 0.35rem 0.6rem;
  border-radius: var(--lh-radius-sm);
  border: 1px solid var(--lh-surface-border);
  background: var(--lh-bg-deep);
  color: var(--lh-text);
  font-size: 0.78rem;
  font-family: inherit;
  outline: none;
}

/* Mobile Drawer */
.lh-mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--lh-radius-sm);
  border: 1px solid var(--lh-surface-border);
  background: var(--lh-surface);
  color: var(--lh-text);
  cursor: pointer;
}

.lh-mobile-drawer {
  display: none;
  border-top: 1px solid var(--lh-surface-border);
  background: var(--lh-surface);
  padding: 1rem 1.5rem 1.5rem;
}

.lh-mobile-drawer.open {
  display: block;
}

.lh-mobile-drawer-section {
  margin-bottom: 1rem;
}

.lh-mobile-section-label {
  display: block;
  font-family: var(--lh-font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--lh-text-subtle);
  margin-bottom: 0.4rem;
  letter-spacing: 0.05em;
}

.lh-mobile-item {
  display: block;
  padding: 0.45rem 0;
  font-size: 0.88rem;
  color: var(--lh-text);
  font-weight: 500;
  text-decoration: none;
}
.lh-mobile-item:hover {
  color: var(--lh-primary);
}

@media (max-width: 900px) {
  .lh-player-mobile-nav {
    display: block;
  }
  .lh-mobile-stage-stepper {
    display: inline-flex;
  }
  .lh-stage-track {
    display: none;
  }
  .lh-practice-card {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .lh-nav {
    display: none;
  }
  .lh-mobile-menu-btn {
    display: inline-flex;
  }
  .lh-search-btn-text {
    display: none;
  }
}

/* =========================================================================
   CONTINUE LEARNING BANNER & DUAL TRACK PROGRESS
   ========================================================================= */
.lh-continue-card {
  background: var(--lh-surface);
  border: 1px solid var(--lh-surface-border);
  border-radius: var(--lh-radius-lg);
  padding: 1.5rem;
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
}

@media (min-width: 768px) {
  .lh-continue-card {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 1.75rem 2rem;
  }
}

.lh-continue-info {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-width: 600px;
}

.lh-continue-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--lh-font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--lh-primary);
  background: rgba(13, 148, 136, 0.1);
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  width: fit-content;
}

.lh-continue-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--lh-text);
  margin: 0;
  line-height: 1.3;
}

.lh-continue-desc {
  font-size: 0.875rem;
  color: var(--lh-text-muted);
  margin: 0;
}

.lh-continue-meters {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.lh-meter-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.78rem;
  font-family: var(--lh-font-mono);
}

.lh-meter-label {
  min-width: 140px;
  color: var(--lh-text);
  font-weight: 600;
}

.lh-meter-bar-wrap {
  flex: 1;
  max-width: 180px;
  height: 6px;
  background: var(--lh-surface-border);
  border-radius: 9999px;
  overflow: hidden;
}

.lh-meter-bar-fill {
  height: 100%;
  border-radius: 9999px;
  transition: width 0.3s ease;
}

.lh-meter-count {
  color: var(--lh-text-muted);
  font-size: 0.75rem;
  min-width: 90px;
  text-align: right;
}

.lh-continue-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--lh-primary);
  color: #ffffff;
  padding: 0.85rem 1.5rem;
  border-radius: var(--lh-radius-md);
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.25);
}

html.dark .lh-continue-action-btn {
  color: #090D12;
  box-shadow: 0 4px 12px rgba(78, 222, 163, 0.25);
}

.lh-continue-action-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

/* Stepper States */
.lh-stage-node.completed {
  border-color: rgba(22, 163, 74, 0.5);
  background: rgba(22, 163, 74, 0.08);
  color: var(--lh-success);
}
.lh-stage-node.current {
  border-color: var(--lh-primary);
  box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.2);
  color: var(--lh-primary);
  font-weight: 700;
}

/* Room Player Nav Controls */
.lh-player-nav-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lh-room-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.4rem 0.75rem;
  border-radius: var(--lh-radius-sm);
  border: 1px solid var(--lh-surface-border);
  background: var(--lh-surface-hover);
  color: var(--lh-text);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.lh-room-nav-btn:hover:not(:disabled) {
  border-color: var(--lh-primary);
  color: var(--lh-primary);
}

.lh-room-nav-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* 5 Visual Phases */
.lh-phase-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 2.25rem 0 1.25rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--lh-surface-border);
}

.lh-phase-tag {
  font-family: var(--lh-font-mono);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25rem 0.65rem;
  border-radius: var(--lh-radius-sm);
  background: var(--lh-surface-border);
  color: var(--lh-text);
}

.lh-phase-desc {
  font-size: 0.78rem;
  color: var(--lh-text-muted);
}

.lh-toc-phase-label {
  font-family: var(--lh-font-mono);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--lh-text-subtle);
  margin: 1rem 0 0.4rem 0.5rem;
  letter-spacing: 0.06em;
}

/* Related Practical Lab Card */
.lh-related-lab-card {
  margin-top: 1.25rem;
  padding: 1.25rem;
  border-radius: var(--lh-radius-md);
  border: 1px dashed var(--lh-secondary);
  background: rgba(37, 99, 235, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.lh-related-lab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1rem;
  border-radius: var(--lh-radius-sm);
  background: var(--lh-secondary);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.82rem;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.15s ease;
}

.lh-related-lab-btn:hover {
  opacity: 0.9;
}


/* ==========================================================================
   TRYHACKME-STYLE QUESTION ENGINE & VISUAL SLOTS
   ========================================================================== */

.lh-question-engine {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1.25rem;
}

.lh-question-card {
  background: var(--lh-surface);
  border: 1px solid var(--lh-surface-border);
  border-radius: var(--lh-radius-lg);
  padding: 1.5rem;
  transition: all var(--lh-transition-normal);
  position: relative;
}

.lh-question-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.lh-question-card.solved {
  border-color: rgba(22, 163, 74, 0.4);
  background: rgba(22, 163, 74, 0.02);
}

.lh-question-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.lh-question-num {
  font-family: var(--lh-font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--lh-primary);
  background: var(--lh-primary-dim);
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.lh-question-status-badge {
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.lh-question-status-badge.solved {
  color: var(--lh-success);
}

.lh-question-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--lh-text);
  line-height: 1.5;
  margin-bottom: 1rem;
}

/* Visual Slots */
.lh-visual-slots-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
}

.lh-visual-slots-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--lh-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.lh-visual-slots {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--lh-font-mono);
}

.lh-slot-box {
  width: 24px;
  height: 28px;
  border-bottom: 2px solid var(--lh-border-dark, #334155);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--lh-primary);
  background: var(--lh-bg-deep);
  border-radius: 2px 2px 0 0;
}

.lh-slot-space {
  width: 14px;
}

/* Exact Input Group */
.lh-exact-input-group {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.lh-exact-input {
  flex: 1;
  min-width: 200px;
  padding: 0.65rem 1rem;
  font-family: var(--lh-font-mono);
  font-size: 0.9rem;
  color: var(--lh-text);
  background: var(--lh-surface);
  border: 1.5px solid var(--lh-surface-border);
  border-radius: var(--lh-radius-md);
  outline: none;
  transition: all var(--lh-transition-fast);
}

.lh-exact-input:focus {
  border-color: var(--lh-primary);
  box-shadow: 0 0 0 3px var(--lh-primary-dim);
}

.lh-exact-input.error-shake {
  border-color: var(--lh-danger);
  animation: lh-shake 0.4s ease-in-out;
}

@keyframes lh-shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.lh-btn-submit-answer {
  background: var(--lh-primary);
  color: #ffffff;
  border: none;
  padding: 0.65rem 1.25rem;
  border-radius: var(--lh-radius-md);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all var(--lh-transition-fast);
}

.lh-btn-submit-answer:hover:not(:disabled) {
  background: var(--lh-primary-hover);
  transform: translateY(-1px);
}

.lh-btn-submit-answer:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.lh-btn-hint-toggle {
  background: var(--lh-bg-deep);
  color: var(--lh-text-muted);
  border: 1px solid var(--lh-surface-border);
  padding: 0.65rem 1rem;
  border-radius: var(--lh-radius-md);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all var(--lh-transition-fast);
}

.lh-btn-hint-toggle:hover {
  background: var(--lh-surface-hover);
  color: var(--lh-text);
  border-color: #cbd5e1;
}

/* Callouts for Hints & Explanations */
.lh-feedback-banner {
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--lh-radius-md);
  font-size: 0.85rem;
  line-height: 1.5;
  display: none;
}

.lh-feedback-banner.error {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.25);
  color: #991b1b;
}

.lh-hint-box {
  margin-top: 0.75rem;
  padding: 0.85rem 1rem;
  background: rgba(217, 119, 6, 0.07);
  border-left: 3px solid var(--lh-warning);
  border-radius: 0 var(--lh-radius-md) var(--lh-radius-md) 0;
  font-size: 0.85rem;
  color: #92400e;
  line-height: 1.5;
}

.lh-explanation-box {
  margin-top: 0.75rem;
  padding: 0.85rem 1rem;
  background: rgba(22, 163, 74, 0.08);
  border-left: 3px solid var(--lh-success);
  border-radius: 0 var(--lh-radius-md) var(--lh-radius-md) 0;
  font-size: 0.88rem;
  color: #14532d;
  line-height: 1.5;
}

/* ==========================================================================
   CONNECTED ROOM PROGRESSION MAP (TRYHACKME-INSPIRED)
   ========================================================================== */

.lh-map-view-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.lh-view-toggle-group {
  display: inline-flex;
  background: var(--lh-bg-deep);
  padding: 0.25rem;
  border-radius: var(--lh-radius-md);
  border: 1px solid var(--lh-surface-border);
}

.lh-view-toggle-btn {
  border: none;
  background: transparent;
  padding: 0.5rem 1rem;
  border-radius: calc(var(--lh-radius-md) - 2px);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--lh-text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all var(--lh-transition-fast);
}

.lh-view-toggle-btn.active {
  background: var(--lh-surface);
  color: var(--lh-text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Level Section in Map */
.lh-map-level-section {
  background: var(--lh-surface);
  border: 1px solid var(--lh-surface-border);
  border-radius: var(--lh-radius-xl);
  padding: 2rem;
  margin-bottom: 2rem;
  position: relative;
  transition: all var(--lh-transition-normal);
}

.lh-map-level-section:hover {
  border-color: #cbd5e1;
}

.lh-map-level-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--lh-surface-border);
  padding-bottom: 1.25rem;
}

.lh-map-level-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.lh-map-level-badge {
  font-family: var(--lh-font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #ffffff;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
}

.lh-map-level-duration {
  font-size: 0.8rem;
  color: var(--lh-text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.lh-map-level-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--lh-text);
  letter-spacing: -0.02em;
  margin: 0.25rem 0 0.5rem 0;
}

.lh-map-level-desc {
  font-size: 0.9rem;
  color: var(--lh-text-muted);
  max-width: 650px;
  line-height: 1.55;
  margin: 0;
}

.lh-map-level-progress-pill {
  background: var(--lh-bg-deep);
  border: 1px solid var(--lh-surface-border);
  border-radius: 9999px;
  padding: 0.4rem 1rem;
  font-family: var(--lh-font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

/* Connected Track Grid */
/* ==========================================================================
   GAME-LIKE CONNECTED ROADMAP (TRYHACKME-STYLE ZIGZAG PATHWAY)
   ========================================================================== */

.lh-roadmap-wrapper {
  position: relative;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 1.5rem 0 4rem 0;
}

/* SVG Connector Path Overlay */
.lh-roadmap-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: visible;
}

.lh-svg-track-bg {
  fill: none;
  stroke: var(--lh-surface-border);
  stroke-width: 8px;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 12 8;
  opacity: 0.9;
}

.lh-svg-track-progress {
  fill: none;
  stroke: url(#lh-track-progress-grad);
  stroke-width: 8px;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 8px rgba(16, 185, 129, 0.45));
}

/* Level Section Container */
.lh-roadmap-level-section {
  position: relative;
  z-index: 2;
  margin-bottom: 4rem;
}

/* Level Milestone Banner */
.lh-roadmap-level-banner {
  background: var(--lh-surface);
  border: 1.5px solid var(--lh-surface-border);
  border-top: 5px solid var(--stage-color, var(--lh-primary));
  border-radius: var(--lh-radius-lg);
  padding: 1.5rem 1.75rem;
  margin-bottom: 2.75rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  position: relative;
  z-index: 3;
}

.lh-level-banner-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.lh-level-badge-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.lh-level-number-badge {
  background: var(--stage-color, var(--lh-primary));
  color: #ffffff;
  font-family: var(--lh-font-mono);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.7rem;
  border-radius: var(--lh-radius-sm);
  display: inline-flex;
  align-items: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.lh-level-est-time {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: var(--lh-text-muted);
}

.lh-level-progress-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  background: var(--lh-bg-deep);
  color: var(--lh-text-muted);
  border: 1px solid var(--lh-surface-border);
}

.lh-level-progress-pill.completed {
  background: rgba(16, 185, 129, 0.12);
  color: var(--lh-success);
  border-color: rgba(16, 185, 129, 0.35);
}

.lh-level-banner-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--lh-text);
  margin: 0 0 0.4rem 0;
  line-height: 1.3;
}

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

/* Roadmap Track: Winding Alternating Rows */
.lh-roadmap-track {
  display: flex;
  flex-direction: column;
  gap: 2.75rem;
  position: relative;
  z-index: 2;
  padding: 0.5rem 0;
}

.lh-roadmap-row {
  display: flex;
  width: 100%;
  position: relative;
  z-index: 2;
  box-sizing: border-box;
}

/* Desktop Zigzag Alignments */
.lh-roadmap-row.pos-left {
  justify-content: flex-start;
  padding-left: 6%;
}

.lh-roadmap-row.pos-center {
  justify-content: center;
}

.lh-roadmap-row.pos-right {
  justify-content: flex-end;
  padding-right: 6%;
}

/* Roadmap Item Wrap (Orb + Capsule Card) */
.lh-roadmap-item {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  position: relative;
  max-width: 480px;
}

/* In right position or when center is heading left: Card is on the left, Orb on the right */
.lh-roadmap-row.pos-right .lh-roadmap-item,
.lh-roadmap-row.pos-center.going-left .lh-roadmap-item {
  flex-direction: row-reverse;
}

/* ==========================================================================
   GAME NODE ORB
   ========================================================================== */
.lh-roadmap-orb {
  width: 68px;
  height: 68px;
  min-width: 68px;
  border-radius: 50%;
  background: var(--lh-surface);
  border: 4px solid var(--lh-surface-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  transition: all 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
  outline: none;
  padding: 0;
  z-index: 3;
}

.lh-roadmap-orb:hover {
  transform: scale(1.14) translateY(-3px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.16);
}

.lh-roadmap-orb:focus-visible {
  box-shadow: 0 0 0 4px var(--lh-primary-dim), 0 8px 24px rgba(0, 0, 0, 0.14);
}

/* Orb State Variants */
.lh-roadmap-orb.completed {
  border-color: #10b981;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.lh-roadmap-orb.current {
  border-color: #0284c7;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  box-shadow: 0 6px 24px rgba(2, 132, 199, 0.48);
}

.lh-roadmap-orb.current::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 3.5px solid rgba(2, 132, 199, 0.55);
  animation: lh-orb-pulse 2.2s infinite ease-out;
}

@keyframes lh-orb-pulse {
  0% { transform: scale(0.92); opacity: 0.95; }
  60% { transform: scale(1.38); opacity: 0; }
  100% { transform: scale(1.38); opacity: 0; }
}

.lh-roadmap-orb.locked {
  border-color: var(--lh-surface-border);
  background: var(--lh-bg-deep);
  color: var(--lh-text-subtle);
  opacity: 0.82;
}

.lh-roadmap-orb.available {
  border-color: #94a3b8;
  background: var(--lh-surface);
  color: var(--lh-text);
}

.lh-orb-core {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-family: var(--lh-font-mono);
  font-size: 1.15rem;
  line-height: 1;
}

.lh-orb-icon {
  font-size: 28px !important;
}

.lh-orb-status-tag {
  position: absolute;
  bottom: -9px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  background: var(--lh-surface);
  border: 1px solid var(--lh-surface-border);
  color: var(--lh-text-muted);
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.lh-orb-status-tag.completed {
  background: #10b981;
  color: #ffffff;
  border-color: #059669;
}

.lh-orb-status-tag.current {
  background: #0284c7;
  color: #ffffff;
  border-color: #0369a1;
}

/* ==========================================================================
   ROADMAP CAPSULE CARD
   ========================================================================== */
.lh-roadmap-card {
  flex: 1;
  min-width: 250px;
  max-width: 380px;
  background: var(--lh-surface);
  border: 1.5px solid var(--lh-surface-border);
  border-radius: var(--lh-radius-lg);
  padding: 1.15rem 1.35rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  cursor: pointer;
  transition: all 0.22s ease;
  outline: none;
  text-align: left;
}

.lh-roadmap-card:hover {
  transform: translateY(-2px);
  border-color: var(--lh-primary);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.lh-roadmap-card:focus-visible {
  border-color: var(--lh-primary);
  box-shadow: 0 0 0 3px var(--lh-primary-dim);
}

.lh-roadmap-card.completed {
  border-left: 4px solid #10b981;
}

.lh-roadmap-card.current {
  border-left: 4px solid #0284c7;
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.12);
}

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

.lh-card-id-badge {
  font-family: var(--lh-font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--lh-primary);
  background: var(--lh-primary-dim);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

.lh-card-duration {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: var(--lh-text-muted);
}

.lh-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--lh-text);
  margin: 0 0 0.35rem 0;
  line-height: 1.35;
}

.lh-card-desc {
  font-size: 0.8rem;
  color: var(--lh-text-muted);
  margin: 0 0 0.75rem 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.lh-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.65rem;
  border-top: 1px solid var(--lh-surface-border-subtle);
}

.lh-card-diff-tag {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--lh-text-muted);
}

.lh-card-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--lh-primary);
}

/* Legacy Card Class Alias for Complete Selector Compatibility */
.lh-map-node-card {
  outline: none;
}

/* Responsive Breakpoints */
@media (max-width: 768px) {
  .lh-roadmap-row.pos-left {
    padding-left: 2%;
  }
  .lh-roadmap-row.pos-right {
    padding-right: 2%;
  }
  .lh-roadmap-orb {
    width: 60px;
    height: 60px;
    min-width: 60px;
  }
  .lh-orb-core {
    font-size: 1.05rem;
  }
  .lh-roadmap-card {
    min-width: 220px;
    padding: 0.9rem 1.1rem;
  }
}

@media (max-width: 600px) {
  .lh-roadmap-track {
    gap: 2.5rem;
  }
  .lh-roadmap-row.pos-left {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    justify-content: flex-start;
  }
  .lh-roadmap-row.pos-right {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    justify-content: flex-end;
  }
  .lh-roadmap-row.pos-center {
    justify-content: center;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
  .lh-roadmap-item {
    gap: 0.75rem;
    max-width: 100%;
  }
  .lh-roadmap-row.pos-left .lh-roadmap-item,
  .lh-roadmap-row.pos-right .lh-roadmap-item {
    width: auto;
    max-width: calc(100% - 0.5rem);
  }
  .lh-roadmap-row.pos-center .lh-roadmap-item {
    flex-direction: column !important;
    align-items: center;
    width: 100%;
    max-width: 340px;
    margin: 0 auto;
  }
  .lh-roadmap-row.pos-center .lh-roadmap-card {
    width: 100%;
    max-width: 320px;
  }
  .lh-roadmap-orb {
    width: 52px;
    height: 52px;
    min-width: 52px;
  }
  .lh-orb-core {
    font-size: 0.95rem;
  }
  .lh-orb-icon {
    font-size: 22px !important;
  }
  .lh-roadmap-card {
    min-width: 0;
    flex: 1;
    padding: 0.8rem 0.9rem;
  }
  .lh-card-desc {
    display: none; /* Keep cards compact on very small screens */
  }
}

@media (max-width: 400px) {
  .lh-roadmap-card {
    padding: 0.7rem 0.75rem;
  }
  .lh-card-title {
    font-size: 0.88rem;
  }
  .lh-roadmap-row.pos-left .lh-roadmap-item {
    gap: 0.5rem;
  }
  .lh-roadmap-row.pos-right .lh-roadmap-item {
    gap: 0.5rem;
  }
}

/* Prefers Reduced Motion Accessibility */
@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .lh-roadmap-orb.current::before {
    animation: none !important;
    border-style: solid;
    opacity: 0.8;
  }
  .lh-roadmap-orb:hover,
  .lh-roadmap-card:hover {
    transform: none !important;
  }
}

/* Accessible List View Alternative */
.lh-accessible-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.lh-list-room-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: var(--lh-surface);
  border: 1px solid var(--lh-surface-border);
  border-radius: var(--lh-radius-md);
  cursor: pointer;
  transition: all var(--lh-transition-fast);
  text-decoration: none;
  color: inherit;
}

.lh-list-room-item:hover {
  border-color: var(--lh-primary);
  background: var(--lh-surface-hover);
}

.lh-list-room-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.lh-list-room-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--lh-text);
}

.lh-list-room-meta {
  font-size: 0.8rem;
  color: var(--lh-text-muted);
}
