/* ==========================================================================
   BuildeX Web Platform — Minimalist & Professional Dark Glassmorphism
   Clean Obsidian Black · Living Interactive IDE Tour & Demo
   ========================================================================== */

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

:root {
  /* Minimalist Monochromatic Surfaces */
  --bg-primary: #000000;
  --bg-secondary: #08080a;
  --bg-surface: #0e0e12;
  --bg-card: rgba(14, 14, 18, 0.7);
  --bg-card-hover: rgba(22, 22, 28, 0.85);
  --bg-glass-nav: rgba(12, 12, 16, 0.65);

  /* Precise Technical Accents */
  --accent-blue: #3b82f6;
  --accent-blue-hover: #2563eb;
  --accent-emerald: #10b981;
  --accent-rose: #ef4444;

  /* Subtle Crisp Borders */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-light: rgba(255, 255, 255, 0.1);
  --border-hover: rgba(255, 255, 255, 0.2);

  /* Typography */
  --text-primary: #f4f4f6;
  --text-secondary: #9e9ea7;
  --text-muted: #666672;
  --text-dim: #44444e;

  /* Shadows */
  --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 16px 40px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 30px 90px rgba(0, 0, 0, 0.85);

  /* Geometry */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
  background-color: var(--bg-primary);
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

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

/* Minimal Subtle Grid (Zero Color Blush) */
.minimal-grid-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 50% 25%, black 40%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 25%, black 40%, transparent 85%);
  z-index: 0;
}

/* ==========================================================================
   1. Floating Centered Translucent Glassmorphic Pill Navigation Bar
   ========================================================================== */
.site-header-wrap {
  position: fixed;
  top: 18px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  z-index: 1000;
  padding: 0 16px;
  pointer-events: none;
}

.site-header {
  pointer-events: auto;
  width: 100%;
  max-width: 820px;
  height: 52px;
  background: var(--bg-glass-nav);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px 0 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.site-header:hover {
  border-color: var(--border-hover);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.3px;
}

.brand-logo {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.brand-name {
  color: #ffffff;
  font-weight: 700;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  list-style: none;
}

@media (max-width: 720px) {
  .nav-links {
    display: none;
  }
}

.nav-link {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.15s;
}

.nav-link:hover {
  color: #ffffff;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Pill Buttons */
.btn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-full);
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-pill-subtle {
  background: transparent;
  color: var(--text-secondary);
}
.btn-pill-subtle:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.btn-pill-primary {
  background: #ffffff;
  color: #000000;
  box-shadow: 0 2px 12px rgba(255, 255, 255, 0.15);
}
.btn-pill-primary:hover {
  background: #e4e4e7;
  transform: translateY(-1px);
}

.btn-pill-blue {
  background: var(--accent-blue);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
}
.btn-pill-blue:hover {
  background: var(--accent-blue-hover);
  transform: translateY(-1px);
}

/* User Pill in Nav */
.user-nav-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
}

.user-nav-badge:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.22);
}

.user-avatar-sm {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

.user-avatar-placeholder {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-blue);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}

.badge-lock {
  font-size: 10px;
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ==========================================================================
   2. Hero Section
   ========================================================================== */
.hero-section {
  position: relative;
  min-height: 100vh;
  padding-top: 150px;
  padding-bottom: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  z-index: 1;
}

.hero-container {
  max-width: 1160px;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
}

.hero-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-light);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-secondary);
  backdrop-filter: blur(12px);
  margin-bottom: 26px;
}

.hero-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-emerald);
}

.hero-title {
  font-size: clamp(38px, 6vw, 68px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -2px;
  margin-bottom: 20px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  color: #ffffff;
}

.hero-desc {
  font-size: clamp(16px, 2vw, 19px);
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 640px;
  margin: 0 auto 36px auto;
  font-weight: 400;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.hero-cta-group .btn-pill {
  padding: 12px 24px;
  font-size: 14px;
  border-radius: var(--radius-full);
}

/* ==========================================================================
   Living Interactive IDE Showcase & Guided Tour
   ========================================================================== */
.interactive-ide-container {
  max-width: 1100px;
  width: 100%;
  margin: 0 auto 48px auto;
  display: flex;
  flex-direction: column;
}

/* Tour Control Bar Ribbon */
.tour-control-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(16, 16, 22, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-light);
  border-bottom: none;
  border-radius: 14px 14px 0 0;
  gap: 12px;
  flex-wrap: wrap;
}

.tour-modes {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.4);
  padding: 4px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}

.tour-mode-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  transition: all 0.15s;
}

.tour-mode-btn:hover {
  color: #ffffff;
}

.tour-mode-btn.active {
  background: #ffffff;
  color: #000000;
}

.tour-steps {
  display: flex;
  align-items: center;
  gap: 6px;
}

@media (max-width: 768px) {
  .tour-steps {
    display: none;
  }
}

.tour-step-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 12px;
  color: var(--text-secondary);
  transition: all 0.15s;
}

.tour-step-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-color: var(--border-light);
}

.tour-step-pill.active {
  background: rgba(59, 130, 246, 0.15);
  border-color: var(--accent-blue);
  color: #ffffff;
  font-weight: 600;
}

.step-num {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
}

.tour-playback-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tour-ctrl-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all 0.15s;
}

.tour-ctrl-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.demo-progress-track {
  width: 60px;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.demo-progress-fill {
  height: 100%;
  background: var(--accent-blue);
  border-radius: var(--radius-full);
  transition: width 0.1s linear;
}

.demo-timer {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  min-width: 32px;
}

/* ====================================================================
   Native Pixel-Perfect BuildeX Coder IDE Showcase
   ==================================================================== */
.hero-ide-window {
  position: relative;
  width: 100%;
  border-radius: 0 0 14px 14px;
  border: 1px solid var(--border-light);
  background: #141417;
  box-shadow: 0 32px 100px -20px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(255, 255, 255, 0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 560px;
  user-select: none;
}

/* Titlebar */
.ide-titlebar {
  height: 38px;
  background: #18181c;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  font-size: 12px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.ide-mac-dots {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 60px;
}

.mac-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
}
.mac-dot-red { background: #ff5f56; border: 1px solid #e0443e; }
.mac-dot-yellow { background: #ffbd2e; border: 1px solid #dea123; }
.mac-dot-green { background: #27c93f; border: 1px solid #1aab29; }

.ide-titlebar-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  color: #d4d4d8;
  font-family: var(--font-sans);
  font-size: 11.5px;
}

.ide-titlebar-badges {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ide-env-badge {
  font-size: 10px;
  font-family: var(--font-mono);
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  padding: 2px 8px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* IDE Main Body */
.ide-body {
  display: flex;
  flex: 1;
  min-height: 0;
  position: relative;
  background: #121215;
}

/* Activity Bar (Leftmost) */
.ide-activity-bar {
  width: 44px;
  background: #121215;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  flex-shrink: 0;
}

.act-top, .act-bottom {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.act-btn {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: transparent;
  border: none;
  color: #71717a;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all 0.15s ease;
}

.act-btn:hover {
  color: #f4f4f5;
  background: rgba(255, 255, 255, 0.05);
}

.act-btn.active {
  color: #ffffff;
  border-left: 2px solid var(--accent-blue);
  border-radius: 0 6px 6px 0;
}

.act-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background: var(--accent-blue);
  color: #ffffff;
  font-size: 9px;
  font-weight: 700;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Explorer Sidebar */
.ide-sidebar {
  width: 165px;
  background: #16161a;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

@media (max-width: 960px) {
  .ide-sidebar {
    display: none;
  }
}

.sidebar-header {
  height: 32px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: #a1a1aa;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.sidebar-actions {
  display: flex;
  gap: 6px;
  color: #71717a;
}

.file-tree {
  padding: 6px 0;
  overflow-y: auto;
  font-size: 11px;
  color: #d4d4d8;
  display: flex;
  flex-direction: column;
}

.tree-node {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  cursor: pointer;
  transition: background 0.1s;
  white-space: nowrap;
}

.tree-node:hover {
  background: rgba(255, 255, 255, 0.04);
}

.tree-node.file.active {
  background: rgba(59, 130, 246, 0.15);
  color: #ffffff;
}

.tree-children {
  padding-left: 10px;
  display: flex;
  flex-direction: column;
}

.file-icon {
  font-size: 8.5px;
  font-weight: 700;
  padding: 1px 3px;
  border-radius: 2px;
}
.file-icon.ts-icon { color: #3b82f6; background: rgba(59, 130, 246, 0.15); }
.file-icon.json-icon { color: #eab308; }
.file-icon.cfg-icon { color: #a1a1aa; }

/* Center Workspace (Editor + Terminal) */
.ide-center-workspace {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #121215;
  position: relative;
}

/* Editor Panel (Step 2) */
.ide-editor-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #141418;
  position: relative;
  transition: box-shadow 0.25s ease;
}

.editor-tabs-bar {
  height: 32px;
  background: #121215;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: stretch;
}

.editor-tab {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 14px;
  font-size: 11px;
  color: #a1a1aa;
  background: #16161b;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  position: relative;
}

.editor-tab.active {
  background: #141418;
  color: #ffffff;
  border-top: 2px solid var(--accent-blue);
}

.tab-dirty-dot {
  font-size: 8px;
  color: #60a5fa;
}

.tab-close {
  font-size: 10px;
  color: #71717a;
  margin-left: 2px;
}

.editor-breadcrumb {
  height: 22px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: #71717a;
  background: #141418;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.editor-breadcrumb .current { color: #d4d4d8; font-weight: 500; }
.editor-breadcrumb .fn-name { color: #60a5fa; }

/* Editor Code Lines Area */
.editor-code-container {
  flex: 1;
  display: flex;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.6;
  padding: 6px 0;
  text-align: left;
}

.code-line-numbers {
  width: 34px;
  color: #52525b;
  text-align: right;
  padding-right: 10px;
  user-select: none;
  font-size: 10px;
  flex-shrink: 0;
}

.code-editor-text {
  flex: 1;
  padding-right: 12px;
  overflow-x: auto;
  color: #e4e4e7;
}

.code-line {
  white-space: pre;
}

.code-diff-line-insert {
  background: rgba(16, 185, 129, 0.12);
  border-left: 2px solid var(--accent-emerald);
  padding-left: 4px;
  margin-left: -4px;
  border-radius: 0 3px 3px 0;
}

.syn-kw { color: #c084fc; font-weight: 600; }
.syn-fn { color: #60a5fa; }
.syn-type { color: #38bdf8; }
.syn-str { color: #34d399; }
.syn-num { color: #fbbf24; }
.syn-comment { color: #71717a; font-style: italic; }

/* Step 3: Terminal Panel */
.ide-terminal-panel {
  height: 175px;
  background: #0d0d10;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: box-shadow 0.25s ease;
}

.terminal-tabs-bar {
  height: 30px;
  background: #121216;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  flex-shrink: 0;
}

.terminal-tab-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.term-tab {
  background: transparent;
  border: none;
  color: #71717a;
  font-size: 10.5px;
  font-family: var(--font-sans);
  cursor: pointer;
  padding: 5px 0;
  position: relative;
}

.term-tab.active {
  color: #ffffff;
  font-weight: 600;
  border-bottom: 2px solid var(--accent-blue);
}

.badge-zero {
  font-size: 9px;
  background: rgba(255, 255, 255, 0.08);
  color: #a1a1aa;
  padding: 1px 4px;
  border-radius: 4px;
  margin-left: 2px;
}

.terminal-actions-group {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #71717a;
}

.term-shell-badge {
  font-size: 9.5px;
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.06);
  padding: 1px 6px;
  border-radius: 3px;
  color: #d4d4d8;
}

.terminal-screen {
  flex: 1;
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1.5;
  color: #d4d4d8;
  overflow-y: auto;
  text-align: left;
}

.term-line {
  margin-bottom: 4px;
  white-space: nowrap;
}

.term-user { color: #10b981; font-weight: 600; }
.term-path { color: #3b82f6; }
.term-git { color: #f59e0b; }
.term-cmd { color: #ffffff; font-weight: 600; }

.term-cursor {
  color: var(--accent-emerald);
  animation: blink 1s step-end infinite;
}

.term-logs {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 10px;
}

.log-dim { color: #71717a; }
.log-pass { color: var(--accent-emerald); font-weight: 500; }
.log-bold-pass { color: #ffffff; font-weight: 700; margin-top: 3px; }

/* Step 1: Right AI Chat Panel */
.ide-chat-panel {
  width: 310px;
  background: #16161b;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: relative;
  transition: box-shadow 0.25s ease;
}

@media (max-width: 1100px) {
  .ide-chat-panel {
    width: 270px;
  }
}

@media (max-width: 800px) {
  .ide-chat-panel {
    display: none;
  }
}

.chat-panel-header {
  height: 38px;
  background: #141418;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  flex-shrink: 0;
}

.chat-header-left {
  display: flex;
  align-items: center;
  gap: 7px;
}

.chat-cube-badge {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: var(--accent-blue);
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-title {
  font-weight: 600;
  font-size: 11.5px;
  color: #ffffff;
}

.chat-header-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.model-badge {
  font-size: 9.5px;
  padding: 2px 7px;
  background: rgba(59, 130, 246, 0.12);
  color: #60a5fa;
  border-radius: var(--radius-full);
  font-weight: 600;
}

.status-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 6px var(--accent-emerald);
}

.chat-panel-body {
  flex: 1;
  padding: 10px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}

.chat-bubble {
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 11px;
  line-height: 1.45;
}

.user-bubble {
  align-self: flex-end;
  background: #25252e;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.08);
  max-width: 92%;
}

.ai-bubble {
  align-self: flex-start;
  background: #111114;
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  width: 100%;
}

.ai-bubble-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
  font-size: 10px;
}

.ai-model-tag {
  color: var(--accent-blue);
  font-weight: 600;
}

.tag-sub {
  color: var(--text-muted);
  font-weight: 400;
  font-size: 9px;
}

.ai-tokens-tag {
  font-size: 9px;
  color: #71717a;
  font-family: var(--font-mono);
}

.ai-bubble-text {
  font-size: 10.5px;
  color: #e4e4e7;
  margin-bottom: 6px;
  white-space: pre-wrap;
}

.code-diff-card {
  background: #09090b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 8px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: #e4e4e7;
}

.diff-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 9px;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 4px;
  margin-bottom: 6px;
}

.diff-action-btn {
  color: #60a5fa;
  cursor: pointer;
  font-weight: 600;
}

.diff-action-btn:hover {
  text-decoration: underline;
}

.diff-add {
  color: #34d399;
  display: block;
}

.chat-panel-footer {
  padding: 8px 10px;
  background: #141418;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.chat-input-wrapper {
  padding: 7px 9px;
  background: #0e0e11;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-ghost-input {
  font-size: 10px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-send-circle {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  color: #000000;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

/* Step 4: Bottom Status Bar */
.ide-status-bar {
  height: 24px;
  background: #0e639c;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  font-size: 10px;
  color: #ffffff;
  user-select: none;
  position: relative;
  transition: box-shadow 0.25s ease;
  flex-shrink: 0;
}

.status-left, .status-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-sans);
}

.highlight-sync {
  background: rgba(255, 255, 255, 0.15);
  padding: 1px 7px;
  border-radius: 3px;
  font-weight: 600;
}

.buildex-brand {
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* Tour Focus Highlight Effect */
.tour-focus-active {
  box-shadow: inset 0 0 0 2px var(--accent-blue), 0 0 20px rgba(59, 130, 246, 0.4) !important;
  z-index: 10;
}

/* Tour Hotspots Layer & Pulsing Pins */
.tour-hotspots-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 15;
}

.tour-hotspot {
  position: absolute;
  pointer-events: auto;
  cursor: pointer;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%);
}

.hotspot-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-blue);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 16px rgba(59, 130, 246, 0.9);
  border: 2px solid #ffffff;
  transition: transform 0.2s;
}

.tour-hotspot:hover .hotspot-dot {
  transform: scale(1.15);
}

.hotspot-pulse {
  position: absolute;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.6);
  animation: pulse-ring 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); opacity: 0.8; }
  60% { transform: scale(2.2); opacity: 0; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* Tour Explanation Popover Card */
.tour-popover-card {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  width: 320px;
  background: #141419;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9);
  z-index: 20;
  text-align: left;
}

.tour-popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.tour-popover-tag {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-blue);
  letter-spacing: 0.5px;
}

.tour-popover-close {
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
}

.tour-popover-title {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 6px;
}

.tour-popover-desc {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 14px;
}

.tour-popover-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
}

.tour-popover-shortcut {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 6px;
  border-radius: 4px;
}

/* Hero Feature Strip */
.hero-features-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  max-width: 1100px;
  margin: 0 auto;
  text-align: left;
}

.strip-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: all 0.2s;
}

.strip-item:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-light);
}

.strip-icon {
  width: 20px;
  height: 20px;
  color: var(--accent-blue);
  flex-shrink: 0;
  margin-top: 2px;
}

.strip-title {
  font-size: 13.5px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 2px;
}

.strip-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* ==========================================================================
   3. Sections & Bento Grid
   ========================================================================== */
.section {
  padding: 100px 20px;
  position: relative;
  z-index: 1;
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 56px auto;
}

.section-tag {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--accent-blue);
  margin-bottom: 10px;
  display: inline-block;
}

.section-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  letter-spacing: -1px;
  color: #ffffff;
  margin-bottom: 14px;
}

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

.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
}

.bento-col-12 { grid-column: span 12; }
.bento-col-8  { grid-column: span 8; }
.bento-col-6  { grid-column: span 6; }
.bento-col-4  { grid-column: span 4; }

@media (max-width: 900px) {
  .bento-col-8, .bento-col-6, .bento-col-4 {
    grid-column: span 12;
  }
}

.bento-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.bento-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

.bento-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
  color: var(--accent-blue);
}

.bento-title {
  font-size: 19px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 10px;
  letter-spacing: -0.4px;
}

.bento-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Cloud Agents Preview Card */
.agents-preview-card {
  max-width: 920px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  background: var(--bg-card);
  padding: 56px 32px;
  text-align: center;
  box-shadow: var(--shadow-md);
}

.agents-preview-inner {
  max-width: 680px;
  margin: 0 auto;
}

.agents-preview-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-light);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

/* ==========================================================================
   4. Pricing Section
   ========================================================================== */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  max-width: 1080px;
  margin: 0 auto;
  align-items: stretch;
}

.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 38px 30px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.2s, border-color 0.2s;
}

.pricing-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-hover);
}

.pricing-card.featured {
  border-color: rgba(59, 130, 246, 0.5);
  background: rgba(18, 20, 28, 0.85);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
}

.pricing-badge {
  position: absolute;
  top: 18px;
  right: 18px;
  background: var(--accent-blue);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

.pricing-plan-name {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
}

.pricing-plan-desc {
  font-size: 13.5px;
  color: var(--text-secondary);
  min-height: 40px;
  margin-bottom: 24px;
}

.pricing-price-wrap {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-subtle);
}

.pricing-price {
  font-size: 40px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -1.5px;
}

.pricing-period {
  font-size: 14px;
  color: var(--text-muted);
}

.pricing-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 32px;
  flex-grow: 1;
}

.pricing-feat-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--text-secondary);
}

.check-icon {
  width: 16px;
  height: 16px;
  color: var(--accent-emerald);
  flex-shrink: 0;
}

/* ==========================================================================
   5. Authenticated App Container & Sidebar (Overview & Agents Dashboard)
   ========================================================================== */
.app-view-container {
  display: none;
  position: fixed;
  inset: 0;
  background: #000000;
  z-index: 2000;
}

.app-view-container.active {
  display: flex;
}

.app-sidebar {
  width: 250px;
  background: #0a0a0c;
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  padding: 16px 12px;
  position: relative;
}

.app-sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px 16px 8px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 16px;
}

.app-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 14.5px;
  cursor: pointer;
}

.app-nav-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.app-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}

.app-nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}

.app-nav-item.active {
  background: rgba(255, 255, 255, 0.09);
  color: #ffffff;
  font-weight: 600;
}

.app-profile-footer {
  position: relative;
  border-top: 1px solid var(--border-subtle);
  padding-top: 12px;
}

.app-upgrade-btn {
  width: 100%;
  padding: 8px;
  margin-bottom: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 600;
  text-align: center;
  transition: all 0.15s;
}

.app-upgrade-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.app-user-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s;
}

.app-user-card:hover {
  background: rgba(255, 255, 255, 0.06);
}

.app-user-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.app-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.app-user-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.app-user-name-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.app-user-name-text {
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-user-tier {
  font-size: 11.5px;
  color: var(--text-muted);
}

/* User Popup Menu */
.app-user-popup {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 8px;
  right: 8px;
  background: #141419;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  z-index: 100;
}

.app-user-popup.show {
  display: flex;
  flex-direction: column;
}

.popup-email-header {
  padding: 8px 10px 6px 10px;
  font-size: 11px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.popup-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}

.popup-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.popup-item.logout:hover {
  background: rgba(239, 68, 68, 0.15);
  color: var(--accent-rose);
}

/* App Main Content */
.app-main {
  flex: 1;
  background: #000000;
  overflow-y: auto;
  padding: 40px 48px;
}

.app-tab-pane {
  display: none;
  max-width: 900px;
  margin: 0 auto;
}

.app-tab-pane.active {
  display: block;
}

.overview-heading {
  font-size: 24px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 24px;
}

.overview-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.overview-card {
  background: #0c0c10;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.overview-card-title {
  font-size: 13.5px;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.overview-stat-value {
  font-size: 26px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 14px;
}

.overview-progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 12px;
}

.overview-progress-fill {
  height: 100%;
  background: var(--accent-blue);
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

/* Cloud Agents Chat Area */
.agents-content-wrap {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.agent-input-box {
  background: #0a0a0e;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.agent-textarea {
  width: 100%;
  background: transparent;
  border: none;
  color: #ffffff;
  font-family: inherit;
  font-size: 14px;
  resize: none;
  outline: none;
}

.agent-textarea::placeholder {
  color: var(--text-muted);
}

.send-agent-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ffffff;
  color: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.send-agent-btn:hover {
  background: #e4e4e7;
  transform: scale(1.05);
}

/* ==========================================================================
   6. Modals (SSO Modal & Auth Gate Modal)
   ========================================================================== */
.auth-modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 3000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-modal-backdrop.active {
  display: flex;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: #0e0e12;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.auth-card-title {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
}

.auth-card-desc {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 20px;
}

.auth-user-preview-box {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  text-align: left;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 40px 20px;
  background: #000000;
  position: relative;
  z-index: 1;
}

.footer-container {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-copy {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-left: 10px;
}

/* Toast */
.site-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #141419;
  border: 1px solid var(--border-light);
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: #ffffff;
  box-shadow: var(--shadow-md);
  z-index: 4000;
  display: none;
}
