/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Lexend:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --bg-primary: #080b11;
  --bg-secondary: #0f131a;
  --bg-glass: rgba(15, 22, 36, 0.7);
  --bg-glass-hover: rgba(25, 35, 56, 0.8);
  
  --border-light: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(65, 184, 131, 0.2);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --color-laravel: #ff2d20;
  --color-laravel-glow: rgba(255, 45, 32, 0.15);
  --color-laravel-border: rgba(255, 45, 32, 0.3);
  
  --color-vue: #41b883;
  --color-vue-glow: rgba(65, 184, 131, 0.15);
  --color-vue-border: rgba(65, 184, 131, 0.3);

  --color-flutter: #02569b;
  --color-flutter-glow: rgba(2, 86, 155, 0.15);
  --color-flutter-border: rgba(2, 86, 155, 0.3);

  --color-inertia: #8b5cf6;
  --color-inertia-glow: rgba(139, 92, 246, 0.15);
  
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-info: #06b6d4;
  
  --font-title: 'Lexend', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --sidebar-width: 280px;
}

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(255, 45, 32, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(65, 184, 131, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.03) 0%, transparent 60%);
  background-attachment: fixed;
}

/* Scrollbar customization */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Main Layout */
#app-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar styling */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--border-light);
  padding: 2.5rem 1.5rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  z-index: 100;
  transition: var(--transition-smooth);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 3rem;
  text-decoration: none;
}

.brand-logo {
  display: flex;
  align-items: center;
  position: relative;
}

.brand-logo .logo-l {
  color: var(--color-laravel);
  font-size: 2rem;
  font-weight: 800;
  font-family: var(--font-title);
}

.brand-logo .logo-v {
  color: var(--color-vue);
  font-size: 2.2rem;
  font-weight: 800;
  font-family: var(--font-title);
  margin-left: -5px;
}

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

.brand-name {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.5px;
  color: var(--text-primary);
  line-height: 1.2;
}

.brand-subtitle {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.nav-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nav-item {
  width: 100%;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.2rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  border-radius: 12px;
  transition: var(--transition-smooth);
  border: 1px solid transparent;
}

.nav-link i {
  font-size: 1.2rem;
  width: 20px;
  text-align: center;
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-glass-hover);
  border-color: rgba(255, 255, 255, 0.03);
  transform: translateX(4px);
}

.nav-link.active {
  color: var(--text-primary);
  background: linear-gradient(135deg, rgba(255, 45, 32, 0.1) 0%, rgba(65, 184, 131, 0.1) 100%);
  border: 1px solid var(--border-light);
  box-shadow: 
    0 4px 20px -2px rgba(0, 0, 0, 0.2),
    inset 0 0 12px rgba(255, 255, 255, 0.02);
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-light);
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
}

/* Content Area */
.main-content {
  margin-left: var(--sidebar-width);
  flex-grow: 1;
  padding: 3rem 4rem;
  min-width: 0; /* Prevents flex items from overflowing */
  transition: var(--transition-smooth);
}

/* View Sections */
.view-section {
  display: none;
  animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.view-section.active {
  display: block;
}

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

/* Responsive Containers */
.container-wide {
  max-width: 1200px;
  margin: 0 auto;
}

/* Glass Cards & Elements */
.glass-card {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.glass-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.4);
}

/* Buttons */
.btn-premium {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  font-family: var(--font-title);
  cursor: pointer;
  transition: var(--transition-smooth);
  border: 1px solid transparent;
}

.btn-laravel {
  background: linear-gradient(135deg, #ff2d20, #e02216);
  color: white;
  box-shadow: 0 4px 15px rgba(255, 45, 32, 0.3);
}

.btn-laravel:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 45, 32, 0.45);
}

.btn-vue {
  background: linear-gradient(135deg, #41b883, #35495e);
  color: white;
  box-shadow: 0 4px 15px rgba(65, 184, 131, 0.3);
}

.btn-vue:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(65, 184, 131, 0.45);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
}

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

/* Headings */
h1, h2, h3, h4 {
  font-family: var(--font-title);
  font-weight: 700;
  color: var(--text-primary);
}

h1 {
  font-size: 2.5rem;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h2 {
  font-size: 1.85rem;
  margin-bottom: 1.5rem;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 2.5rem;
}

/* Home view specific styling */
.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  align-items: center;
  margin-bottom: 4rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-light);
  border-radius: 99px;
  font-size: 0.8rem;
  color: var(--color-vue);
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.hero-badge i {
  animation: pulse 2s infinite;
}

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

.gradient-text {
  background: linear-gradient(135deg, #fff 30%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

/* Highlight boxes for home features */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}

.feature-card {
  padding: 2.5rem 2rem;
}

.feature-icon-wrapper {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
}

.laravel-theme .feature-icon-wrapper {
  background: var(--color-laravel-glow);
  color: var(--color-laravel);
  border: 1px solid var(--color-laravel-border);
}

.vue-theme .feature-icon-wrapper {
  background: var(--color-vue-glow);
  color: var(--color-vue);
  border: 1px solid var(--color-vue-border);
}

.flutter-theme .feature-icon-wrapper {
  background: var(--color-flutter-glow);
  color: var(--color-flutter);
  border: 1px solid var(--color-flutter-border);
}

.feature-title {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
}

.feature-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Visual stack connector illustration (using pure CSS) */
.stack-connector-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 350px;
}

.visual-node {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  font-weight: 700;
  font-size: 1.1rem;
  color: white;
  transition: var(--transition-smooth);
}

.visual-node-laravel {
  background: radial-gradient(circle at 30% 30%, #ff5247, #ff2d20);
  border: 2px solid #ff7e75;
  animation: float-laravel 6s ease-in-out infinite;
}

.visual-node-vue {
  background: radial-gradient(circle at 30% 30%, #4ae3a4, #34a873);
  border: 2px solid #7bf5c2;
  animation: float-vue 6s ease-in-out infinite;
}

.visual-node-inertia {
  width: 80px;
  height: 80px;
  background: radial-gradient(circle at 30% 30%, #a78bfa, var(--color-inertia));
  border: 2px solid #c4b5fd;
  font-size: 0.9rem;
  animation: float-inertia 6s ease-in-out infinite;
  z-index: 3;
}

.visual-node-api {
  width: 80px;
  height: 80px;
  background: radial-gradient(circle at 30% 30%, #a78bfa, var(--color-inertia));
  border: 2px solid #c4b5fd;
  font-size: 0.85rem;
  animation: float-api 6s ease-in-out infinite;
  z-index: 3;
}

.visual-node-flutter {
  background: radial-gradient(circle at 30% 30%, #05a0e6, var(--color-flutter));
  border: 2px solid #54c5f8;
  animation: float-flutter 6s ease-in-out infinite;
}

.visual-svg-lines {
  position: absolute;
  width: 400px;
  height: 400px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  pointer-events: none;
}

.svg-dash-anim {
  stroke-dasharray: 6 6;
  animation: svgDashOffset 1.5s linear infinite;
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.2));
}

@keyframes svgDashOffset {
  to {
    stroke-dashoffset: -12;
  }
}

@keyframes float-laravel {
  0% { transform: translate(-100px, -10px); }
  50% { transform: translate(-100px, 10px); }
  100% { transform: translate(-100px, -10px); }
}

@keyframes float-inertia {
  0% { transform: translate(10px, -75px); }
  50% { transform: translate(10px, -65px); }
  100% { transform: translate(10px, -75px); }
}

@keyframes float-vue {
  0% { transform: translate(120px, -85px); }
  50% { transform: translate(120px, -95px); }
  100% { transform: translate(120px, -85px); }
}

@keyframes float-api {
  0% { transform: translate(10px, 65px); }
  50% { transform: translate(10px, 75px); }
  100% { transform: translate(10px, 65px); }
}

@keyframes float-flutter {
  0% { transform: translate(120px, 95px); }
  50% { transform: translate(120px, 85px); }
  100% { transform: translate(120px, 95px); }
}

/* Roadmap styles */
.roadmap-container {
  position: relative;
  padding-left: 3rem;
  margin-top: 2rem;
}

.roadmap-line {
  position: absolute;
  left: 15px;
  top: 10px;
  bottom: 10px;
  width: 3px;
  background: linear-gradient(to bottom, 
    var(--text-muted) 0%, 
    var(--color-vue) 25%, 
    var(--color-laravel) 60%, 
    var(--color-inertia) 100%);
  opacity: 0.3;
}

.roadmap-step {
  position: relative;
  margin-bottom: 3.5rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.roadmap-indicator {
  position: absolute;
  left: -3rem;
  top: 5px;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 3px solid var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
  z-index: 2;
  transition: var(--transition-smooth);
}

.roadmap-step:hover .roadmap-indicator {
  border-color: white;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
}

.roadmap-step.completed .roadmap-indicator {
  background: var(--color-vue);
  border-color: #7bf5c2;
  color: var(--bg-primary);
}

.roadmap-step.active .roadmap-indicator {
  background: var(--color-laravel);
  border-color: #ff7e75;
  color: white;
  box-shadow: 0 0 20px rgba(255, 45, 32, 0.6);
  animation: glow-pulse 2s infinite;
}

@keyframes glow-pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 45, 32, 0.7); }
  70% { box-shadow: 0 0 0 12px rgba(255, 45, 32, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 45, 32, 0); }
}

.roadmap-content {
  padding: 1.5rem;
  background: var(--bg-glass);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  transition: var(--transition-smooth);
}

.roadmap-step:hover .roadmap-content {
  transform: translateX(8px);
  background: var(--bg-glass-hover);
  border-color: rgba(255, 255, 255, 0.15);
}

.roadmap-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.roadmap-title {
  font-size: 1.2rem;
  font-weight: 600;
}

.roadmap-badge {
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-basics { background: rgba(255,255,255,0.06); color: var(--text-secondary); }
.badge-vue { background: var(--color-vue-glow); color: var(--color-vue); }
.badge-laravel { background: var(--color-laravel-glow); color: var(--color-laravel); }
.badge-fullstack { background: var(--color-inertia-glow); color: var(--color-inertia); }

.roadmap-details {
  display: none;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-light);
  animation: slideDown 0.3s ease forwards;
}

.roadmap-step.open .roadmap-details {
  display: block;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

.roadmap-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.keyword-tag {
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-light);
  border-radius: 4px;
  color: var(--text-secondary);
}

/* QuickDocs design */
.docs-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2.5rem;
  align-items: start;
}

.docs-subnav {
  position: sticky;
  top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  list-style: none;
  background: var(--bg-glass);
  padding: 1rem;
  border-radius: 12px;
  border: 1px solid var(--border-light);
}

.docs-subnav-link {
  display: block;
  padding: 0.6rem 1rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  border-radius: 8px;
  font-weight: 500;
  transition: var(--transition-smooth);
}

.docs-subnav-link:hover, .docs-subnav-link.active {
  color: var(--text-primary);
  background: rgba(255,255,255,0.04);
}

.laravel-theme .docs-subnav-link.active {
  color: var(--color-laravel);
  border-left: 3px solid var(--color-laravel);
  padding-left: calc(1rem - 3px);
  background: var(--color-laravel-glow);
}

.vue-theme .docs-subnav-link.active {
  color: var(--color-vue);
  border-left: 3px solid var(--color-vue);
  padding-left: calc(1rem - 3px);
  background: var(--color-vue-glow);
}

.flutter-theme .docs-subnav-link.active {
  color: var(--color-flutter);
  border-left: 3px solid var(--color-flutter);
  padding-left: calc(1rem - 3px);
  background: var(--color-flutter-glow);
}

.docs-main-content {
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
}

.docs-section {
  scroll-margin-top: 2rem;
}

.docs-section h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.docs-section h3 i {
  font-size: 1.3rem;
}

.laravel-theme .docs-section h3 i { color: var(--color-laravel); }
.vue-theme .docs-section h3 i { color: var(--color-vue); }
.flutter-theme .docs-section h3 i { color: var(--color-flutter); }

.docs-desc {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-size: 1rem;
}

.docs-highlight-badge {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-weight: 600;
  margin-bottom: 1rem;
}

.laravel-theme .docs-highlight-badge {
  background: var(--color-laravel-glow);
  color: var(--color-laravel);
  border: 1px solid var(--color-laravel-border);
}

.vue-theme .docs-highlight-badge {
  background: var(--color-vue-glow);
  color: var(--color-vue);
  border: 1px solid var(--color-vue-border);
}

.flutter-theme .docs-highlight-badge {
  background: var(--color-flutter-glow);
  color: var(--color-flutter);
  border: 1px solid var(--color-flutter-border);
}

/* Code card component */
.code-card {
  background: #0b0e14;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.code-header {
  background: rgba(255, 255, 255, 0.02);
  padding: 0.6rem 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.code-lang {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.btn-copy {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: var(--transition-smooth);
}

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

.code-body {
  padding: 1.25rem;
  overflow-x: auto;
}

.code-body pre {
  font-family: 'Fira Code', 'Courier New', Courier, monospace;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #abb2bf;
}

/* Syntax Highlighting primitives (simulated inside HTML) */
.code-keyword { color: #c678dd; font-weight: 600; }
.code-function { color: #61afef; }
.code-string { color: #98c379; }
.code-comment { color: #5c6370; font-style: italic; }
.code-variable { color: #e06c75; }
.code-constant { color: #d19a66; }
.code-tag { color: #e06c75; }
.code-attr { color: #d19a66; }

/* Visualizer Specifics */
.visualizer-switch {
  display: flex;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.visualizer-tab-btn {
  padding: 0.75rem 1.5rem;
  background: var(--bg-glass);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  color: var(--text-secondary);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.visualizer-tab-btn:hover {
  color: var(--text-primary);
  background: var(--bg-glass-hover);
}

.visualizer-tab-btn.active[data-type="laravel"] {
  border-color: var(--color-laravel);
  background: var(--color-laravel-glow);
  color: white;
}

.visualizer-tab-btn.active[data-type="vue"] {
  border-color: var(--color-vue);
  background: var(--color-vue-glow);
  color: white;
}

.visualizer-pane {
  display: none;
}

.visualizer-pane.active {
  display: block;
}

/* Laravel simulator board */
.laravel-board {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  align-items: center;
  position: relative;
  padding: 2rem 0;
}

.laravel-stages {
  display: flex;
  justify-content: space-between;
  width: 100%;
  max-width: 900px;
  position: relative;
}

.laravel-stages::after {
  content: '';
  position: absolute;
  left: 40px;
  right: 40px;
  top: 40px;
  height: 4px;
  background: rgba(255, 255, 255, 0.05);
  z-index: 1;
}

.stage-connector-progress {
  position: absolute;
  left: 40px;
  top: 40px;
  height: 4px;
  background: linear-gradient(90deg, var(--color-laravel), var(--color-inertia));
  width: 0%;
  z-index: 1;
  transition: width 0.1s linear;
}

.laravel-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  z-index: 2;
  position: relative;
  width: 80px;
  text-align: center;
}

.stage-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 3px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--text-secondary);
  transition: var(--transition-smooth);
}

.laravel-stage.active .stage-icon {
  border-color: var(--color-laravel);
  background: var(--color-laravel-glow);
  color: white;
  box-shadow: 0 0 20px rgba(255, 45, 32, 0.4);
}

.laravel-stage.completed .stage-icon {
  border-color: var(--color-vue);
  background: var(--color-vue-glow);
  color: white;
}

.stage-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.laravel-stage.active .stage-name {
  color: white;
}

.sim-ball {
  position: absolute;
  width: 20px;
  height: 20px;
  background: #ff5247;
  border-radius: 50%;
  z-index: 3;
  top: 32px;
  left: 40px;
  display: none;
  box-shadow: 0 0 15px #ff2d20;
}

.visualizer-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  width: 100%;
}

.stage-info-box {
  width: 100%;
  max-width: 600px;
  min-height: 120px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 1.25rem;
  text-align: center;
}

.stage-info-title {
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--color-laravel);
}

.stage-info-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* Vue reactivity simulator */
.vue-reactivity-board {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: stretch;
}

.reactivity-demo {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  justify-content: center;
}

.interactive-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.reactivity-input {
  width: 100%;
  padding: 0.8rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  color: white;
  font-family: var(--font-body);
  font-size: 1rem;
  transition: var(--transition-smooth);
}

.reactivity-input:focus {
  outline: none;
  border-color: var(--color-vue);
  box-shadow: 0 0 10px rgba(65, 184, 131, 0.2);
}

.vue-btn-group {
  display: flex;
  gap: 0.75rem;
}

.vue-counter-btn {
  flex-grow: 1;
  padding: 0.8rem;
  background: rgba(65, 184, 131, 0.1);
  border: 1px solid rgba(65, 184, 131, 0.3);
  border-radius: 8px;
  color: var(--color-vue);
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.vue-counter-btn:hover {
  background: var(--color-vue);
  color: var(--bg-primary);
}

.reactivity-flow {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  justify-content: center;
}

.flow-step {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  position: relative;
  transition: var(--transition-smooth);
}

.flow-step.active {
  border-color: var(--color-vue);
  background: var(--color-vue-glow);
  transform: scale(1.02);
}

.flow-step-num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 2px solid var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: var(--transition-smooth);
}

.flow-step.active .flow-step-num {
  background: var(--color-vue);
  border-color: #7bf5c2;
  color: var(--bg-primary);
}

.flow-step-content {
  flex-grow: 1;
}

.flow-step-title {
  font-weight: 600;
  font-size: 0.95rem;
}

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

.flow-arrow {
  display: flex;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1.2rem;
  margin: -0.5rem 0;
  transition: var(--transition-smooth);
}

.flow-arrow.active {
  color: var(--color-vue);
}

/* Quiz Specifics */
.quiz-wrapper {
  max-width: 700px;
  margin: 0 auto;
}

.quiz-progress-bar-container {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 2rem;
}

.quiz-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--color-laravel), var(--color-vue));
  width: 0%;
  transition: width 0.3s ease;
}

.quiz-question-counter {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.quiz-question-text {
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 2rem;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.quiz-option {
  padding: 1.2rem 1.5rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-body);
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 500;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.quiz-option:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.quiz-option-letter {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  transition: var(--transition-smooth);
}

.quiz-option:hover .quiz-option-letter {
  border-color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.1);
}

/* Quiz Option States after submission */
.quiz-option.correct {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.4);
}
.quiz-option.correct .quiz-option-letter {
  background: var(--color-success);
  border-color: var(--color-success);
  color: white;
}

.quiz-option.incorrect {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.4);
}
.quiz-option.incorrect .quiz-option-letter {
  background: #ef4444;
  border-color: #ef4444;
  color: white;
}

.quiz-feedback {
  margin-top: 1.5rem;
  padding: 1.25rem;
  border-radius: 10px;
  display: none;
  animation: slideDown 0.3s ease;
}

.quiz-feedback.correct-feedback {
  display: block;
  background: rgba(16, 185, 129, 0.05);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: #a7f3d0;
}

.quiz-feedback.incorrect-feedback {
  display: block;
  background: rgba(239, 68, 68, 0.05);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

.quiz-feedback-title {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.3rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.quiz-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 1.5rem;
}

/* Quiz Result Page */
.quiz-result-view {
  text-align: center;
  padding: 3rem 1.5rem;
}

.result-circle {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  margin: 0 auto 2rem auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 30% 30%, rgba(139, 92, 246, 0.2), rgba(139, 92, 246, 0.05));
  border: 3px solid var(--color-inertia);
  box-shadow: 0 0 30px rgba(139, 92, 246, 0.2);
}

.result-score {
  font-size: 2.2rem;
  font-weight: 800;
  color: white;
}

.result-total {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.result-msg {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.result-desc {
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* Toast styling for copy notifications */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--color-vue);
  padding: 0.8rem 1.5rem;
  border-radius: 10px;
  color: white;
  font-weight: 500;
  font-size: 0.9rem;
  z-index: 1000;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  display: none;
  animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1), toastOut 0.3s cubic-bezier(0.16, 1, 0.3, 1) 2.2s forwards;
}

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

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

/* Responsive Styles */
@media (max-width: 1024px) {
  .docs-layout {
    grid-template-columns: 180px 1fr;
    gap: 1.5rem;
  }
}

/* Mobile-only Elements Desktop/General Defaults */
.mobile-header {
  display: none;
}

.sidebar-backdrop,
.chapters-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.sidebar-backdrop.active,
.chapters-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

/* Force hide FAB on desktop width to prevent JS inline display: flex from showing it */
@media (min-width: 769px) {
  .mobile-fab-chapters {
    display: none !important;
  }
}

@media (max-width: 768px) {
  #app-layout {
    flex-direction: column;
    padding-top: 60px; /* Space for fixed mobile header */
  }

  .view-section {
    animation: none;
  }

  /* Mobile Top Header styling */
  .mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: rgba(8, 11, 17, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    z-index: 999;
    padding: 0 1rem;
  }

  .mobile-menu-toggle {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    transition: var(--transition-smooth);
  }

  .mobile-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.05);
  }

  .mobile-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .mobile-brand .logo-l {
    color: var(--color-laravel);
    font-size: 1.6rem;
    font-weight: 800;
    font-family: var(--font-title);
  }

  .mobile-brand .logo-v {
    color: var(--color-vue);
    font-size: 1.75rem;
    font-weight: 800;
    font-family: var(--font-title);
    margin-left: -5px;
  }

  .mobile-brand-name {
    font-family: var(--font-title);
    font-weight: 700;
    font-size: 1.1rem;
    color: white;
  }

  /* Main Sidebar as a slide-in Drawer */
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    z-index: 1001;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-light);
    border-bottom: none;
    padding: 2.5rem 1.5rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .brand {
    margin-bottom: 2rem;
  }

  .nav-menu {
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 0.5rem;
  }

  .nav-link {
    padding: 0.85rem 1.2rem;
    font-size: 1rem;
    gap: 1rem;
  }

  /* Content area adjustments */
  .main-content {
    margin-left: 0;
    padding: 2rem 1rem;
  }

  /* Typography scale down */
  h1 {
    font-size: 1.85rem;
    margin-bottom: 0.75rem;
  }

  h2 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
  }

  .section-subtitle {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
  }

  /* Hero section adjustments */
  .hero {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
    padding: 1rem 0;
    margin-bottom: 2rem;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
    gap: 0.75rem;
    justify-content: center;
  }

  .hero-actions .btn-premium {
    width: 100%;
    justify-content: center;
  }

  .stack-connector-visual {
    height: 320px;
    width: 100%;
    max-width: 320px;
    margin: 1.5rem auto;
  }

  .visual-svg-lines {
    display: none !important;
  }

  .stack-connector-visual .visual-node {
    position: absolute !important;
    width: 70px !important;
    height: 70px !important;
    font-size: 0.75rem !important;
  }

  .stack-connector-visual .visual-node i {
    font-size: 1.4rem !important;
    margin-bottom: 2px !important;
  }

  .stack-connector-visual .visual-node-laravel {
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 80px !important;
    height: 80px !important;
    animation: none !important;
    font-size: 0.85rem !important;
  }

  .stack-connector-visual .visual-node-inertia {
    left: 10% !important;
    top: 15% !important;
    transform: none !important;
    animation: none !important;
    width: 60px !important;
    height: 60px !important;
  }

  .stack-connector-visual .visual-node-vue {
    left: 10% !important;
    top: 65% !important;
    transform: none !important;
    animation: none !important;
  }

  .stack-connector-visual .visual-node-api {
    right: 10% !important;
    top: 15% !important;
    left: auto !important;
    transform: none !important;
    animation: none !important;
    width: 60px !important;
    height: 60px !important;
  }

  .stack-connector-visual .visual-node-flutter {
    right: 10% !important;
    top: 65% !important;
    left: auto !important;
    transform: none !important;
    animation: none !important;
  }

  /* Docs Layout and Chapters Drawer */
  .docs-layout {
    grid-template-columns: 1fr;
  }

  .docs-sidebar {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    width: 280px !important;
    height: 100vh !important;
    max-height: 100vh !important;
    z-index: 1001 !important;
    transform: translateX(100%) !important;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    background: var(--bg-glass) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-left: 1px solid var(--border-light) !important;
    border-right: none !important;
    border-top: none !important;
    border-bottom: none !important;
    border-radius: 0 !important;
    padding: 4.5rem 1.25rem 1.5rem 1.25rem !important;
    margin: 0 !important;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5) !important;
  }

  .docs-sidebar.open {
    transform: translateX(0) !important;
  }

  .docs-sidebar::before {
    content: 'MỤC LỤC CHƯƠNG';
    display: block;
    font-family: var(--font-title);
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-light);
  }

  /* Sub-navigation bar */
  .docs-subnav {
    position: relative;
    top: 0;
    flex-direction: row;
    overflow-x: auto;
    padding: 0.5rem;
    margin-bottom: 1.5rem;
    gap: 0.5rem;
    border-radius: 8px;
  }

  .docs-subnav-link {
    white-space: nowrap;
    padding: 0.5rem 0.8rem;
    font-size: 0.85rem;
  }

  .laravel-theme .docs-subnav-link.active,
  .vue-theme .docs-subnav-link.active,
  .flutter-theme .docs-subnav-link.active {
    border-left: none;
    border-bottom: 3px solid;
    padding-left: 0.8rem;
    padding-bottom: calc(0.5rem - 3px);
  }

  /* Floating Action Button (FAB) */
  .mobile-fab-chapters {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-inertia), #7c3aed);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1.25rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    z-index: 998;
    transition: var(--transition-smooth);
  }

  .mobile-fab-chapters:active {
    transform: scale(0.9);
  }

  .mobile-fab-chapters.laravel-fab {
    background: linear-gradient(135deg, var(--color-laravel), #e02216);
    box-shadow: 0 10px 25px rgba(255, 45, 32, 0.3);
    border-color: var(--color-laravel-border);
  }

  .mobile-fab-chapters.vue-fab {
    background: linear-gradient(135deg, var(--color-vue), #35495e);
    box-shadow: 0 10px 25px rgba(65, 184, 131, 0.3);
    border-color: var(--color-vue-border);
  }

  .mobile-fab-chapters.flutter-fab {
    background: linear-gradient(135deg, var(--color-flutter), #014a87);
    box-shadow: 0 10px 25px rgba(2, 86, 155, 0.3);
    border-color: var(--color-flutter-border);
  }

  /* Table styling auto-scroll */
  .docs-table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Code block responsive styling */
  .code-body {
    padding: 0.75rem 1rem;
  }

  .code-body pre {
    font-size: 0.8rem;
  }

  /* Reactivity Simulator styling */
  .vue-reactivity-board {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .interactive-box {
    padding: 1.25rem;
  }

  /* Laravel Simulator vertical responsive layout */
  .laravel-stages {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
    padding-left: 1rem;
  }

  .laravel-stages::after {
    display: none;
  }

  .stage-connector-progress {
    display: none;
  }

  .sim-ball {
    display: none !important;
  }

  .laravel-stage {
    width: 100%;
    flex-direction: row;
    text-align: left;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-light);
    padding: 0.75rem 1rem;
    border-radius: 12px;
  }

  .stage-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    font-size: 1.1rem;
  }

  .stage-name {
    font-size: 0.9rem;
  }
}

/* ==========================================================================
   INTERACTIVE TEXTBOOK STYLES
   ========================================================================== */

/* Textbook Chapter Sidebar */
.docs-sidebar {
  background: var(--bg-glass);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 1.25rem 1rem;
  position: sticky;
  top: 2rem;
  max-height: calc(100vh - 4rem);
  overflow-y: auto;
}

.chapter-group {
  margin-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  padding-bottom: 0.75rem;
}

.chapter-group:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.chapter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0.8rem;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border-radius: 8px;
  transition: var(--transition-smooth);
}

.chapter-header:hover {
  background: rgba(255, 255, 255, 0.03);
  color: white;
}

.chapter-header i.chevron {
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: transform 0.3s ease;
}

.chapter-group.open .chapter-header i.chevron {
  transform: rotate(180deg);
}

.section-list {
  list-style: none;
  margin-top: 0.25rem;
  padding-left: 0.5rem;
  display: none;
}

.chapter-group.open .section-list {
  display: block;
}

.section-item {
  margin: 0.15rem 0;
}

.section-link {
  display: block;
  padding: 0.5rem 0.8rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  border-radius: 6px;
  transition: var(--transition-smooth);
  cursor: pointer;
}

.section-link:hover {
  background: rgba(255, 255, 255, 0.03);
  color: white;
}

/* Active states based on theme */
.laravel-theme .section-link.active {
  background: var(--color-laravel-glow);
  color: white;
  font-weight: 600;
  border-left: 3px solid var(--color-laravel);
  padding-left: calc(0.8rem - 3px);
}

.vue-theme .section-link.active {
  background: var(--color-vue-glow);
  color: white;
  font-weight: 600;
  border-left: 3px solid var(--color-vue);
  padding-left: calc(0.8rem - 3px);
}

.flutter-theme .section-link.active {
  background: var(--color-flutter-glow);
  color: white;
  font-weight: 600;
  border-left: 3px solid var(--color-flutter);
  padding-left: calc(0.8rem - 3px);
}

/* Search Bar & Instant Search Results */
.docs-search-wrapper {
  position: relative;
  margin-bottom: 2rem;
  max-width: 600px;
}

.docs-search-box {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-glass);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 0 1.25rem;
  transition: var(--transition-smooth);
}

.docs-search-box:focus-within {
  border-color: var(--color-laravel);
  box-shadow: 0 0 15px var(--color-laravel-glow);
}

.vue-search-box:focus-within {
  border-color: var(--color-vue);
  box-shadow: 0 0 15px var(--color-vue-glow);
}

.flutter-search-box:focus-within {
  border-color: var(--color-flutter);
  box-shadow: 0 0 15px var(--color-flutter-glow);
}

.docs-search-box i {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-right: 0.75rem;
}

.docs-search-input {
  width: 100%;
  height: 50px;
  background: transparent;
  border: none;
  color: white;
  font-family: var(--font-body);
  font-size: 0.95rem;
}

.docs-search-input:focus {
  outline: none;
}

.docs-search-kbd {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-light);
  border-radius: 4px;
  color: var(--text-secondary);
  font-size: 0.75rem;
  padding: 0.2rem 0.4rem;
  font-family: monospace;
  pointer-events: none;
}

.docs-search-results {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  right: 0;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  max-height: 350px;
  overflow-y: auto;
  z-index: 50;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
  display: none;
}

.docs-search-results.active {
  display: block;
}

.search-result-item {
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: var(--transition-smooth);
}

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

.search-result-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

.search-result-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: white;
  margin-bottom: 0.15rem;
}

.search-result-chapter {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.search-result-snippet {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-no-results {
  padding: 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Reader Content Styling */
.reader-welcome {
  text-align: center;
  padding: 4rem 2rem;
  background: rgba(255, 255, 255, 0.01);
  border: 1px dashed var(--border-light);
  border-radius: 16px;
}

.reader-welcome h2 {
  margin-bottom: 0.5rem;
  font-size: 1.5rem;
}

.reader-welcome p {
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto;
  font-size: 0.95rem;
}

/* Styles inside rendered HTML content */
.docs-main-content h3 {
  font-size: 1.65rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 0.5rem;
  color: white;
}

.docs-main-content h4 {
  font-size: 1.2rem;
  margin: 1.5rem 0 0.75rem 0;
  color: white;
}

.docs-main-content p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-size: 0.95rem;
  line-height: 1.7;
}

.docs-main-content strong {
  color: white;
}

.docs-main-content code {
  font-family: 'Fira Code', 'Courier New', Courier, monospace;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  font-size: 0.85rem;
  color: #ef4444; /* Standard highlights */
}

.laravel-theme .docs-main-content code {
  color: #fca5a5;
}

.vue-theme .docs-main-content code {
  color: #a7f3d0;
}

.flutter-theme .docs-main-content code {
  color: #93c5fd;
}

.docs-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  overflow: hidden;
}

.docs-table th, .docs-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border: 1px solid var(--border-light);
}

.docs-table th {
  background: rgba(255, 255, 255, 0.02);
  color: white;
  font-weight: 600;
}

.docs-table td {
  color: var(--text-secondary);
}

.docs-table tr:hover {
  background: rgba(255, 255, 255, 0.01);
}

.docs-main-content ul, .docs-main-content ol {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.docs-main-content li {
  margin-bottom: 0.4rem;
}

/* ==========================================================================
   FLUTTER WIDGET TREE & LIFECYCLE SIMULATOR STYLES
   ========================================================================== */

.flutter-visualizer-board {
  display: grid;
  grid-template-columns: 1.1fr 1.9fr;
  gap: 3rem;
  align-items: stretch;
}

/* Phone Frame Simulator */
.flutter-phone-frame {
  width: 100%;
  max-width: 270px;
  height: 460px;
  border: 10px solid #2e3846;
  border-radius: 36px;
  background: #080b11;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.6);
  margin: 0 auto;
  position: relative;
  display: flex;
  flex-direction: column;
}

.phone-app-bar {
  background: var(--color-flutter);
  color: white;
  padding: 0.85rem;
  text-align: center;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.phone-screen-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 1.5rem;
}

.phone-title-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  text-align: center;
}

.phone-counter-text {
  font-size: 3.5rem;
  font-weight: 800;
  color: white;
  font-family: var(--font-title);
  transition: transform 0.15s ease, color 0.15s ease;
}

.phone-fab {
  position: absolute;
  bottom: 1.25rem;
  right: 1.25rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-flutter);
  color: white;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(2, 86, 155, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.1s ease, background-color 0.2s ease;
}

.phone-fab:active {
  transform: scale(0.9);
}

.phone-fab:hover {
  background: #0366b3;
}

/* Tree Column & Tabs */
.flutter-tree-column {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.tree-switch {
  display: flex;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-light);
  padding: 0.25rem;
  border-radius: 8px;
  align-self: flex-start;
}

.tree-tab-btn {
  padding: 0.4rem 1rem;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.tree-tab-btn.active {
  background: var(--color-flutter);
  color: white;
}

.tree-view-pane {
  display: none;
}

.tree-view-pane.active {
  display: block;
  animation: visualizerFadeIn 0.3s ease forwards;
}

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

/* Widget Tree Graphics */
.widget-tree {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 0.5rem 0;
}

.widget-node {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.85rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  font-size: 0.85rem;
  width: 100%;
  max-width: 320px;
  position: relative;
  transition: var(--transition-smooth);
}

.node-stateless {
  border-left: 4px solid var(--color-vue);
}

.node-stateful {
  border-left: 4px solid var(--color-flutter);
}

.wnode-type {
  font-size: 0.65rem;
  text-transform: uppercase;
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  font-weight: 600;
}

.wnode-name {
  color: white;
}

.wnode-status {
  margin-left: auto;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.1rem 0.45rem;
  border-radius: 20px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: var(--color-success);
  transition: var(--transition-smooth);
}

.wnode-val {
  margin-left: auto;
  font-size: 0.75rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-flutter);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
}

.widget-tree-branch {
  width: 2px;
  height: 15px;
  background: var(--border-light);
  margin-left: 1.5rem;
}

/* Rebuild Pulse Animation styling */
.active-rebuild {
  border-color: #f43f5e !important; /* rose */
  box-shadow: 0 0 15px rgba(244, 63, 94, 0.3);
  transform: scale(1.02);
}

/* Timeline Lifecycle styles */
.lifecycle-timeline {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.lifecycle-step {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  transition: var(--transition-smooth);
}

.lifecycle-step.active-step {
  border-color: var(--color-flutter);
  background: var(--color-flutter-glow);
  transform: scale(1.02);
}

.lifecycle-step.completed-step {
  border-color: rgba(2, 86, 155, 0.3);
  opacity: 0.7;
}

.lstep-indicator {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 2px solid var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
  color: var(--text-secondary);
  transition: var(--transition-smooth);
}

.lifecycle-step.active-step .lstep-indicator {
  background: var(--color-flutter);
  border-color: #54c5f8;
  color: white;
}

.lifecycle-step.completed-step .lstep-indicator {
  background: rgba(2, 86, 155, 0.2);
  border-color: var(--color-flutter);
  color: var(--color-flutter);
}

.lstep-content {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.lifecycle-step.active-step .lstep-content {
  color: white;
}

@media (max-width: 768px) {
  .flutter-visualizer-board {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .flutter-phone-frame {
    height: 400px;
    max-width: 240px;
  }
  
  .phone-counter-text {
    font-size: 2.8rem;
  }
}
