/* THEMES & VARIABLES - LINEAR/VERCEL AESTHETIC */
:root {
  --bg: #09090b; --bg-gradient: #09090b; --card: #18181b; --card-hover: #27272a;
  --accent: #ffffff; --accent-glow: rgba(255, 255, 255, 0.15); --text: #e4e4e7; --text-muted: #a1a1aa;
  --border: rgba(255,255,255,0.1); 
  --grid-color: rgba(255,255,255,0.15); /* Balanced visibility */
  --btn-text: #000000; --input-bg: #18181b; --editor-bg: transparent; 
  --gutter-bg: transparent; --gutter-text: #52525b;
  --success: #10b981; --error: #ef4444; --warning: #f59e0b; --iframe-bg: #ffffff;
}
html.light-mode {
  --bg: #f3f4f6; --bg-gradient: #f3f4f6; --card: #ffffff; --card-hover: #f9fafb;
  --accent: #000000; --accent-glow: rgba(0, 0, 0, 0.08); --text: #1f2937; --text-muted: #6b7280;
  --border: rgba(0,0,0,0.1); 
  --grid-color: rgba(0,0,0,0.15); /* Balanced visibility */
  --btn-text: #ffffff; --input-bg: #ffffff; --editor-bg: transparent; 
  --gutter-bg: transparent; --gutter-text: #a1a1aa; --iframe-bg: #ffffff;
}

/* GLOBAL UI & RESET */
* { margin:0; padding:0; box-sizing:border-box; font-family: 'Inter', -apple-system, system-ui, sans-serif; }
html { background: var(--bg-gradient); scroll-behavior: smooth;}
body { background: transparent; color: var(--text); min-height: 100vh; min-height: 100dvh; transition: background 0.3s, color 0.3s; line-height: 1.6; -webkit-font-smoothing: antialiased; margin: 0; overflow-x: hidden; }
i[class^="ph"] { vertical-align: middle; display: inline-flex; align-items: center; justify-content: center; }

.hide-on-desktop { display: none !important; }

/* CUSTOM PREMIUM SCROLLBARS */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(161, 161, 170, 0.2); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(161, 161, 170, 0.4); }

/* Infinite Dotted Blueprint Grid */
/* Fixed: Back to 1px dots so it looks like a sleek blueprint, not polka dots! */
.bg-grid { position: fixed; top: -50px; left: 0; right: 0; bottom: -50px; background-image: radial-gradient(var(--grid-color) 1px, transparent 1px); background-size: 32px 32px; z-index: 0; pointer-events: none; will-change: background-position-y;}
.container { max-width: 1200px; margin: 0 auto; padding: 20px 20px; transition: 0.3s; position: relative; z-index: 1;}
.relative-z { position: relative; z-index: 1; }

/* ==========================================================================
   ISOLATED BETA BANNER (ZERO CONFLICTS)
   ========================================================================== */
.nitro-alert-bar-wrapper {
  background: rgba(0, 229, 255, 0.08);
  border-bottom: 1px solid rgba(0, 229, 255, 0.2);
  padding: 8px 15px;
  text-align: center;
  position: relative;
  z-index: 1001; /* Keeps it strictly above the background grid */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  width: 100%;
  box-sizing: border-box;
}

html.light-mode .nitro-alert-bar-wrapper {
  background: rgba(0, 229, 255, 0.05);
}

.nitro-alert-content-flex {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--text);
  flex-wrap: wrap; /* Allows text to drop cleanly on small screens */
  margin: 0;
  padding: 0;
}

.nitro-alert-badge-pill {
  background: #00e5ff;
  color: #000;
  font-weight: 800;
  font-size: 0.65rem;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  line-height: 1;
  display: inline-block;
}

.nitro-alert-message-text {
  display: inline-block;
}

.nitro-alert-action-btn {
  background: transparent;
  border: none;
  color: #00e5ff;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: opacity 0.2s ease, text-decoration 0.2s ease;
  padding: 0;
  margin: 0;
}

.nitro-alert-action-btn:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* FLOATING GLASS NAVBAR & STATUS PING */
.floating-nav {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%) translateY(-20px);
  background: rgba(10, 10, 10, 0.7); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border); border-radius: 100px; padding: 8px 12px 8px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 30px;
  opacity: 0; pointer-events: none; transition: 0.4s cubic-bezier(0.16, 1, 0.3, 1); z-index: 1000;
  width: max-content; max-width: 90%; box-shadow: 0 20px 40px rgba(0,0,0,0.6);
}
html.light-mode .floating-nav { background: rgba(255, 255, 255, 0.8); box-shadow: 0 10px 30px rgba(0,0,0,0.05); }
.floating-nav.scrolled { opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0); }

.floating-nav .logo { display: flex; align-items: center; gap: 15px; font-size: 0.95rem; text-decoration: none !important; }
.floating-nav .logo span { display: flex; align-items: center; gap: 8px; }

.nav-actions { display:flex; gap:8px; align-items: center; }

.status-ping { display: flex; align-items: center; gap: 6px; font-size: 0.7rem; font-weight: 600; color: var(--text-muted); background: rgba(255,255,255,0.05); padding: 4px 10px; border-radius: 20px; border: 1px solid var(--border); font-family: 'JetBrains Mono', monospace;}
html.light-mode .status-ping { background: rgba(0,0,0,0.03); }
.ping-dot { width: 6px; height: 6px; background: var(--success); border-radius: 50%; display: inline-block; box-shadow: 0 0 8px var(--success); animation: pingPulse 2s infinite ease-in-out; }
@keyframes pingPulse { 0% { opacity: 0.4; transform: scale(0.8); } 50% { opacity: 1; transform: scale(1.2); } 100% { opacity: 0.4; transform: scale(0.8); } }

.header-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; padding: 15px 0; border-bottom: 1px solid transparent;}
.fixed-nav { position: fixed; top:0; left:0; right:0; background: rgba(0,0,0,0.8); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); z-index: 1000; padding: 15px 40px; margin: 0; border-bottom: 1px solid var(--border); }
html.light-mode .fixed-nav { background: rgba(255,255,255,0.8); }

.logo { font-size:1.1rem; font-weight:700; letter-spacing: -0.5px; display: flex; align-items: center; gap: 8px; text-decoration: none !important; color: var(--text);}
.theme-toggle { background: transparent; border: 1px solid var(--border); color: var(--text-muted); padding: 8px 14px; border-radius: 8px; cursor: pointer; font-weight: 500; font-size: 0.85rem; transition: 0.2s; display: flex; align-items: center; gap: 6px;}
.theme-toggle:hover { color: var(--text); border-color: var(--text-muted); background: var(--card); }
.cmd-badge { font-size:0.7rem; font-weight:700; background:var(--border); padding:2px 6px; border-radius:4px; }

/* ANIMATIONS */
@keyframes slideUpFade { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulseGlow { 0% { opacity: 0.15; transform: translate(-50%, -50%) scale(0.8); } 50% { opacity: 0.3; transform: translate(-50%, -50%) scale(1); } 100% { opacity: 0.15; transform: translate(-50%, -50%) scale(0.8); } }

.ambient-glow { position: fixed; top: 0; left: 50%; width: 800px; height: 800px; background: radial-gradient(circle, var(--accent-glow) 0%, transparent 60%); transform: translate(-50%, -50%); z-index: 0; pointer-events: none; animation: pulseGlow 8s infinite ease-in-out; will-change: transform, opacity; }
.global-spotlight { position: fixed; width: 600px; height: 600px; background: radial-gradient(circle, rgba(255,255,255,0.04) 0%, transparent 50%); border-radius: 50%; pointer-events: none; z-index: 0; transform: translate(-50%, -50%); opacity: 0; transition: opacity 0.4s ease; }
html.light-mode .global-spotlight { background: radial-gradient(circle, rgba(0,0,0,0.03) 0%, transparent 50%); }

.reveal-1.active { animation: slideUpFade 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.1s forwards; }
.reveal-2.active { animation: slideUpFade 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards; }
.reveal-3.active { animation: slideUpFade 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards; }
.reveal-4.active { animation: slideUpFade 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.4s forwards; }
.reveal-5.active { animation: slideUpFade 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.5s forwards; }
.reveal-6.active { animation: slideUpFade 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.6s forwards; }
.reveal-7.active { animation: slideUpFade 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards; } 
.reveal-8.active { animation: slideUpFade 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards; }

/* HERO SECTION */
.premium-hero { text-align: center; padding: 0 15px 20px 15px; display: flex; flex-direction: column; align-items: center; position: relative;}
.badge-row { display: flex; gap: 10px; justify-content: center; margin-bottom: 15px; }
.badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 16px; background: transparent; border: 1px solid var(--border); border-radius: 30px; font-size: 0.8rem; color: var(--text); font-weight: 500; margin-bottom: 30px; position: relative; z-index: 1;}
.badge-primary { border-color: rgba(0, 229, 255, 0.3); color: #00e5ff; background: rgba(0, 229, 255, 0.05); margin: 0; }
.badge-secondary { border-color: rgba(187, 154, 247, 0.3); color: #bb9af7; background: rgba(187, 154, 247, 0.05); margin: 0; }
.hero-subtitle { font-size: 1.1rem; max-width: 650px; margin: 0 auto 25px auto; line-height: 1.5; font-weight: 400; color: var(--text-muted); }

/* VISITOR COUNTER */
.visitor-counter {
  text-align: center;
  margin-bottom: 25px; /* Preserves spacing above the pipeline/CTAs */
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  position: relative;
  z-index: 1;
}

#visitor-count {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
}

.visitor-label {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-left: 6px;
  font-weight: 400;
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
  .visitor-counter {
    margin-bottom: 20px;
  }
  #visitor-count {
    font-size: 1.2rem;
  }
  .visitor-label {
    font-size: 0.85rem;
  }
}

/* SCROLL TO TOP FAB */
.fab { position: fixed; bottom: 30px; right: 30px; width: 50px; height: 50px; border-radius: 50%; background: rgba(255,255,255,0.05); border: 1px solid var(--border); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: var(--text); font-size: 1.2rem; display: flex; align-items: center; justify-content: center; cursor: pointer; opacity: 0; pointer-events: none; transform: translateY(20px); transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1); z-index: 9999; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
html.light-mode .fab { background: rgba(0,0,0,0.05); box-shadow: 0 10px 30px rgba(0,0,0,0.05); }
.fab.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.fab:hover { background: rgba(255,255,255,0.1); border-color: var(--text-muted); }
html.light-mode .fab:hover { background: rgba(0,0,0,0.1); }

/* BUTTONS */
.hero-ctas { display: flex; gap: 15px; justify-content: center; margin-bottom: 20px; flex-wrap: wrap; position: relative; z-index: 1;}
.magnetic-btn { transition: transform 0.1s ease-out, opacity 0.3s, background 0.3s, border-color 0.3s; will-change: transform; }

/* Added text-decoration: none !important to fix the underline issue */
.btn { flex: 1; min-width: 100px; padding: 8px 14px; background: var(--card); color: var(--text); border: 1px solid var(--border); border-radius: 6px; font-weight: 500; font-size: 0.85rem; cursor: pointer; transition: all 0.2s ease; text-align: center; display: flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; text-decoration: none !important;}
.btn:hover { background: transparent; border-color: var(--text-muted); }
.primary-btn { background: var(--text) !important; color: var(--bg) !important; border: none !important;}
.primary-btn:hover { opacity: 0.9; }

.btn-launch { background: var(--text); color: var(--bg); padding: 14px 32px; font-size: 1rem; border-radius: 8px; font-weight: 600; text-decoration: none !important; display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 1px solid transparent;}
.btn-launch:hover { opacity: 0.9; }
.btn-secondary { background: var(--card); color: var(--text); border: 1px solid var(--border); padding: 14px 32px; font-size: 1rem; border-radius: 8px; font-weight: 500; text-decoration: none !important; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 10px;}
.btn-secondary:hover { background: transparent; border-color: var(--text-muted); }
.btn-compact { flex: none; width: auto; padding: 6px 12px; margin: 0; font-size: 0.8rem; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text-muted); }
.btn-outline:hover { border-color: var(--text-muted); color: var(--text); background: transparent;}
.full-width { width: 100%; justify-content: center; margin-top: 10px;}

/* MARQUEE TECH LOGOS */
.marquee-wrapper { display: flex; overflow: hidden; width: 100%; max-width: 600px; margin: 30px auto 0 auto; mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent); -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent); position: relative; z-index: 1;}
.marquee-content { display: flex; gap: 40px; padding-right: 40px; animation: scrollMarquee 15s linear infinite; white-space: nowrap; }
.marquee-wrapper:hover .marquee-content { animation-play-state: paused; }
@keyframes scrollMarquee { 100% { transform: translateX(-100%); } }
.tech-logos { display: flex; align-items: center; gap: 8px; color: var(--text-muted); font-size: 1rem; font-weight: 500; }
.tech-logos i { font-size: 1.4rem; }

/* GLOBAL SECTION HEADER */
.content-section { margin-bottom: 50px; }
.section-header { text-align: center; margin-bottom: 30px; max-width: 700px; margin-left: auto; margin-right: auto; }
.section-header h2 { font-size: 2.5rem; font-weight: 700; letter-spacing: -1px; margin-bottom: 15px; color: var(--text); }
.section-header p { font-size: 1.1rem; color: var(--text-muted); line-height: 1.6; }

/* BENTO GRID */
.bento-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.bento-card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 35px; display: flex; flex-direction: column; position: relative; overflow: hidden; z-index: 1; }
.bento-card::before { content: ""; position: absolute; inset: 0; background: radial-gradient(800px circle at var(--mouse-x, 0) var(--mouse-y, 0), var(--accent-glow), transparent 40%); z-index: 1; opacity: 0; transition: opacity 0.3s ease; pointer-events: none; }
.bento-card:hover::before { opacity: 1; }
.bento-card > * { position: relative; z-index: 2; }
.bento-large { grid-column: span 2; }
.bento-icon { font-size: 2rem; color: var(--text); margin-bottom: 20px; }
.bento-card h3 { font-size: 1.2rem; font-weight: 600; margin-bottom: 12px; color: var(--text); z-index: 2;}

.bento-content-swap { position: relative; flex: 1; display: flex; flex-direction: column; z-index: 2;}
.bento-text { transition: opacity 0.3s ease; opacity: 1; margin: 0; font-size: 0.95rem; color: var(--text-muted); line-height: 1.6;}
.bento-code { position: absolute; top: 0; left: 0; right: 0; opacity: 0; transition: opacity 0.3s ease; pointer-events: none; font-family: 'JetBrains Mono', monospace; font-size: 0.85rem; line-height: 1.5; color: var(--text); }
.bento-card:hover .bento-text { opacity: 0; }
.bento-card:hover .bento-code { opacity: 1; pointer-events: auto; }

/* Syntax Highlighting */
.code-keyword { color: #ff7b72; }
.code-string { color: #a5d6ff; }
.code-func { color: #d2a8ff; }
.code-comment { color: #8b949e; font-style: italic; }
.code-tag { color: #888888; } 
.code-attr { color: var(--text); } 
.code-str { color: #888888; } 
.code-text { color: var(--text); }
.ml-1 { margin-left: 15px; } .ml-2 { margin-left: 30px; }

/* FEATURE SHOWCASE */
.feature-showcase { display: flex; align-items: center; gap: 60px; margin-top: 50px; margin-bottom: 50px;}
.feature-showcase.reverse { flex-direction: row-reverse; }
.showcase-text { flex: 1; }
.showcase-text .badge { margin-bottom: 20px; }
.showcase-text h2 { font-size: 2.5rem; font-weight: 700; letter-spacing: -1px; margin-bottom: 20px; color: var(--text); line-height: 1.1;}
.showcase-text p { font-size: 1.1rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 30px; }
.feature-list { list-style: none; padding: 0; margin: 0; }
.feature-list li { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 15px; font-size: 0.95rem; color: var(--text-muted); line-height: 1.5;}
.feature-list li i { color: var(--text); font-size: 1.1rem; margin-top: 2px;}
.feature-list li strong { color: var(--text); font-weight: 600;}
.showcase-visual { flex: 1; min-width: 0; }

/* PIPELINE VISUAL */
.execution-pipeline { display: flex; align-items: center; justify-content: space-between; background: rgba(10,10,10,0.6); border: 1px solid rgba(255,255,255,0.1); border-radius: 20px; box-shadow: 0 30px 60px rgba(0,0,0,0.5), inset 0 0 40px rgba(0,229,255,0.05); position: relative; padding: 20px 30px; height: 220px; max-width: 650px; width: 100%; margin: 20px auto 40px auto; }
html.light-mode .execution-pipeline { background: #fff; box-shadow: 0 30px 60px rgba(0,0,0,0.05), inset 0 0 40px rgba(0,229,255,0.1); border-color: rgba(0,0,0,0.1);}

.pipe-left { width: 280px; flex: none; z-index: 3; display: flex; justify-content: flex-start;}
.pipe-center { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; height: 100%; z-index: 1; min-width: 80px; margin: 0 10px; } 
.pipe-right { width: 110px; flex: none; display: flex; justify-content: flex-end; align-items: center; z-index: 3; perspective: 1000px;}

.code-block-anim { font-family: 'JetBrains Mono', monospace; font-size: 0.75rem; background: var(--card); border: 1px solid var(--border); padding: 15px; border-radius: 12px; width: 100%; box-shadow: 0 20px 40px rgba(0,0,0,0.4); text-align: left;}
html.light-mode .code-block-anim { box-shadow: 0 20px 40px rgba(0,0,0,0.05); }

/* Animation slowed down to 4s loop */
.typewriter-line { overflow: hidden; white-space: nowrap; border-right: 2px solid transparent; width: 24ch; animation: typing 4s steps(24, end) infinite; }
@keyframes typing { 
  0%, 5% { width: 0; border-color: transparent; } 
  10% { border-color: #00e5ff; } 
  35%, 85% { width: 24ch; border-color: #00e5ff; } 
  86%, 100% { width: 24ch; border-color: transparent; } 
}

.energy-beam-track { width: 100%; height: 2px; background: rgba(255,255,255,0.1); position: relative; }
html.light-mode .energy-beam-track { background: rgba(0,0,0,0.1); }

/* Particle synced to 4s loop */
.energy-particle { position: absolute; top: -4px; left: 0; width: 10px; height: 10px; background: #00e5ff; border-radius: 50%; box-shadow: 0 0 20px 5px rgba(0, 229, 255, 0.6); animation: shootBeam 4s linear infinite; opacity: 0;}
@keyframes shootBeam { 
  0%, 38% { left: 0; opacity: 0; transform: scale(0.5); } 
  40% { left: 0; opacity: 1; transform: scale(1); } 
  65% { left: 100%; opacity: 1; transform: scale(1); } 
  67%, 100% { left: 100%; opacity: 0; transform: scale(0.5); } 
}

/* Core animations updated. Wave uses a cubic-bezier to naturally slow down as it expands */
.engine-core { width: 90px; height: 90px; background: rgba(0, 229, 255, 0.1); border: 1px solid rgba(0, 229, 255, 0.4); border-radius: 20px; display: flex; align-items: center; justify-content: center; position: relative; transform-style: preserve-3d; animation: floatCore 6s ease-in-out infinite, emitPulseWave 4s cubic-bezier(0.1, 0.5, 0.3, 1) infinite; box-shadow: inset 0 0 30px rgba(0,229,255,0.2); }
.engine-core::before, .engine-core::after { content: ''; position: absolute; inset: -1px; border: 1px solid rgba(187, 154, 247, 0.4); border-radius: 20px; transform: translateZ(-15px); transition: 0.5s; }
.engine-core::after { transform: translateZ(-30px); border-color: rgba(0, 229, 255, 0.2); }

/* Slower, half-sized pulse wave expanding to 350px radius */
@keyframes emitPulseWave {
  0%, 64% { box-shadow: inset 0 0 30px rgba(0,229,255,0.2), 0 0 0 0 rgba(0,229,255,0.4); }
  66% { box-shadow: inset 0 0 30px rgba(0,229,255,0.2), 0 0 0 15px rgba(0,229,255,0.25); }
  100% { box-shadow: inset 0 0 30px rgba(0,229,255,0.2), 0 0 0 350px rgba(0,229,255,0); }
}

/* Flash synced to the new 4s timeline */
.core-icon { font-size: 2.2rem; color: #00e5ff; animation: pulseCore 4s ease-out infinite; }
@keyframes floatCore { 0%, 100% { transform: rotateY(-20deg) rotateX(10deg) translateY(0); } 50% { transform: rotateY(-20deg) rotateX(10deg) translateY(-15px); } }
@keyframes pulseCore { 
  0%, 60% { filter: drop-shadow(0 0 0px rgba(0,229,255,0)); transform: scale(1); } 
  65% { filter: drop-shadow(0 0 30px #00e5ff); transform: scale(1.2); } 
  85%, 100% { filter: drop-shadow(0 0 0px rgba(0,229,255,0)); transform: scale(1); } 
}

/* MOCKUP WINDOWS */
.mockup-window { background: var(--card); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; box-shadow: 0 30px 60px rgba(0,0,0,0.4); text-align: left; display: flex; flex-direction: column; transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1); will-change: transform;}
html.light-mode .mockup-window { box-shadow: 0 30px 60px rgba(0,0,0,0.05); }
.glass-mockup { background: transparent; border: 1px solid rgba(255,255,255,0.2); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.glass-mockup .mockup-header { border-bottom: 1px solid rgba(255,255,255,0.1); }
html.light-mode .glass-mockup { border: 1px solid rgba(0,0,0,0.1); }
html.light-mode .glass-mockup .mockup-header { border-bottom: 1px solid rgba(0,0,0,0.1); }

.mockup-header { padding: 12px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; position: relative;}
.mockup-header-flex { background: rgba(0,0,0,0.2); justify-content: space-between; }
.mockup-dots { display:flex; align-items:center; }
.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; margin-right: 6px; }
.dot.red { background: #ff5f56; } .dot.yellow { background: #ffbd2e; } .dot.green { background: #27c93f; }
.mockup-title { position: absolute; left: 50%; transform: translateX(-50%); font-size: 0.8rem; font-weight: 600; color: var(--text-muted); }
.mockup-panel { flex: 1; padding: 15px; font-family: 'JetBrains Mono', monospace; font-size: 0.8rem; background: var(--card); min-height: 180px; transition: opacity 0.2s ease; }
.code-panel { padding: 20px; font-size: 0.85rem; background: transparent; }

/* TERMINAL MOCKUP */
.terminal-tabs { display: flex; gap: 15px; font-size: 0.75rem; font-weight: 600; font-family: 'JetBrains Mono', monospace; }
.term-tab { color: var(--text-muted); cursor: pointer; transition: 0.2s; }
.term-tab:hover { color: var(--text); }
.term-tab.active { color: var(--success); }
.terminal-comment { color: var(--text-muted); margin-bottom: 10px; }
.terminal-line { margin-bottom: 5px; }
.terminal-prompt { color: var(--text-muted); margin-right: 6px;}
.terminal-success { color: var(--success); margin-bottom: 15px; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
.cursor-blink { font-weight: bold; animation: blink 1s step-end infinite; color: var(--text); }

/* PRICING & STATS */
.pricing-section { margin-top: 60px; margin-bottom: 80px;}
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 50px; }
.stat-card { background: transparent; border: 1px solid var(--border); padding: 25px; border-radius: 16px; text-align: center;}
.stat-num { font-size: 2.8rem; font-weight: 800; color: var(--text); line-height: 1; margin-bottom: 5px; font-family: 'JetBrains Mono', monospace; letter-spacing: -2px;}
.stat-label { color: var(--text-muted); font-size: 0.95rem; font-weight: 500;}

.pricing-card { max-width: 500px; margin: 0 auto; background: var(--card); border: 1px solid var(--border); border-radius: 20px; padding: 40px; text-align: left;}
.pricing-header { border-bottom: 1px solid var(--border); padding-bottom: 25px; margin-bottom: 25px; }
.pricing-header h3 { font-size: 1.2rem; font-weight: 600; color: var(--text); margin-bottom: 10px; }
.pricing-header .price { font-size: 3rem; font-weight: 800; letter-spacing: -2px; color: var(--text); display: flex; align-items: baseline; gap: 8px;}
.pricing-header .price span { font-size: 1rem; font-weight: 500; color: var(--text-muted); letter-spacing: 0;}
.pricing-header p { color: var(--text-muted); font-size: 0.95rem; margin-top: 10px;}
.pricing-features { display: flex; flex-direction: column; gap: 15px; }
.pricing-features div { display: flex; align-items: center; gap: 10px; font-size: 0.95rem; color: var(--text-muted); }
.pricing-features div i { color: var(--text); font-size: 1.2rem;}

/* FOOTER */
.pro-footer { margin-top: 60px; padding: 40px 0 20px 0; border-top: 1px solid var(--border); background: transparent; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1.5fr 1fr 1fr; gap: 30px; margin-bottom: 50px; text-align: left; }
.footer-brand .logo { font-size: 1.1rem; font-weight: 700; display: flex; align-items: center; gap: 8px; color: var(--text); margin-bottom: 15px; }
.footer-desc { color: var(--text-muted); font-size: 0.9rem; line-height: 1.6; }
.footer-col h4 { color: var(--text); font-weight: 600; margin-bottom: 20px; font-size: 0.95rem; }
.footer-col a { display: block; color: var(--text-muted); text-decoration: none; margin-bottom: 12px; font-size: 0.9rem; transition: 0.2s; }
.footer-col a:hover { color: var(--text); }
.footer-bottom { text-align: center; padding-top: 30px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 0.85rem; }

/* FEEDBACK WIDGET */
.feedback-fab { position: fixed; bottom: 30px; left: 30px; width: 50px; height: 50px; border-radius: 50%; background: var(--card); border: 1px solid var(--border); color: var(--text); font-size: 1.4rem; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1); z-index: 9990; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.feedback-fab:hover { transform: scale(1.05); border-color: #00e5ff; color: #00e5ff; box-shadow: 0 10px 30px rgba(0, 229, 255, 0.2); }
html.light-mode .feedback-fab { box-shadow: 0 10px 30px rgba(0,0,0,0.05); }

.feedback-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); z-index: 10005; opacity: 0; pointer-events: none; transition: 0.3s ease; display: flex; align-items: flex-end; justify-content: flex-start; padding: 30px; }
.feedback-backdrop.active { opacity: 1; pointer-events: auto; }

.feedback-card { background: var(--card); border: 1px solid var(--border); width: 100%; max-width: 350px; border-radius: 16px; padding: 20px; box-shadow: 0 40px 80px rgba(0,0,0,0.6); transform: translateY(20px) scale(0.95); transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1); transform-origin: bottom left; }
.feedback-backdrop.active .feedback-card { transform: translateY(0) scale(1); }
html.light-mode .feedback-card { box-shadow: 0 40px 80px rgba(0,0,0,0.1); }

.feedback-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.feedback-header h3 { font-size: 1.1rem; color: var(--text); font-weight: 600; margin: 0; }
.feedback-header button { background: transparent; border: none; color: var(--text-muted); cursor: pointer; font-size: 1.2rem; transition: 0.2s; display: flex; }
.feedback-header button:hover { color: var(--error); }
.feedback-desc { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 15px; line-height: 1.5; }

.feedback-body textarea { width: 100%; height: 120px; background: var(--input-bg); border: 1px solid var(--border); border-radius: 8px; padding: 12px; color: var(--text); font-family: inherit; font-size: 0.9rem; resize: none; transition: 0.2s; outline: none; margin-bottom: 10px;}
.feedback-body textarea:focus { border-color: #00e5ff; box-shadow: 0 0 0 2px rgba(0, 229, 255, 0.1); }

.spinner { width: 18px; height: 18px; border: 2px solid rgba(0,0,0,0.3); border-left-color: #000; border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* COMMAND PALETTE (SEARCH / ⌘K) */
.cmd-palette-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); z-index: 10005; opacity: 0; pointer-events: none; transition: 0.2s ease; display: flex; align-items: flex-start; justify-content: center; padding-top: 15vh;}
.cmd-palette-backdrop.active { opacity: 1; pointer-events: auto; }

.cmd-palette { background: var(--card); border: 1px solid var(--border); width: 90%; max-width: 550px; border-radius: 12px; box-shadow: 0 40px 80px rgba(0,0,0,0.6); overflow: hidden; transform: translateY(-20px) scale(0.98); transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1); }
html.light-mode .cmd-palette { box-shadow: 0 40px 80px rgba(0,0,0,0.1); }
.cmd-palette-backdrop.active .cmd-palette { transform: translateY(0) scale(1); }

.cmd-input-wrap { display: flex; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--border); font-size: 1.2rem; color: var(--text-muted); }
.cmd-input { flex: 1; border: none; background: transparent; color: var(--text); font-size: 1rem; outline: none; margin-left: 15px; margin-top: 0; margin-bottom: 0; box-shadow: none; width: 100%;}

.cmd-list { padding: 10px; max-height: 350px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.cmd-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 15px; color: var(--text-muted); cursor: pointer; border-radius: 8px; transition: all 0.2s ease; text-decoration: none; font-size: 0.95rem; font-weight: 500; }
.cmd-item:hover { background: var(--border); color: var(--text); padding-left: 20px; }
.cmd-item-left { display: flex; align-items: center; gap: 10px; }
.cmd-item-right { background: var(--border); padding: 2px 8px; border-radius: 4px; font-size: 0.7rem; font-weight: bold; }

/* MISC PAGES: Docs, Changelog, Legal */
.docs-container, .legal-container, .changelog-container { max-width: 1200px; margin: 100px auto 0; padding: 0 20px;}
.docs-container { display: flex; gap: 50px; align-items: flex-start;}
.legal-container { max-width: 750px; margin-bottom: 100px; }
.changelog-container { max-width: 800px; margin-bottom: 100px; }

.docs-sidebar { width: 260px; position: sticky; top: 100px; display: flex; flex-direction: column; gap: 8px; border-right: 1px solid var(--border); padding-right: 20px; max-height: calc(100vh - 120px); overflow-y: auto;}
.docs-sidebar::-webkit-scrollbar { display: none; }
.docs-sidebar a { color: var(--text-muted); text-decoration: none; font-size: 0.95rem; padding: 8px 12px; border-radius: 6px; transition: all 0.2s ease; border-left: 2px solid transparent;}
.docs-sidebar a:hover { color: var(--text); background: rgba(255,255,255,0.05); }
html.light-mode .docs-sidebar a:hover { background: rgba(0,0,0,0.05); }
.docs-sidebar a.active { color: var(--text); background: var(--border); border-left-color: #00e5ff; font-weight: 500;}
.sidebar-heading { font-weight: 700; margin: 20px 0 5px; color: var(--text); padding-left: 12px; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1.5px; opacity: 0.7;}

.docs-content { flex: 1; max-width: 800px; padding-bottom: 100px;}
.docs-content h1, .legal-container h1, .changelog-title { font-size: 3.5rem; letter-spacing: -1.5px; margin-bottom: 20px; color: var(--text);}
.legal-container h1 { font-size: 3rem; text-align: center; }
.changelog-title { text-align: center; font-size: 3.5rem; letter-spacing: -2px; margin-bottom: 60px;}

.docs-content h2, .legal-container h2 { font-size: 2rem; margin: 60px 0 20px; border-bottom: 1px solid var(--border); padding-bottom: 15px; color: var(--text); letter-spacing: -0.5px;}
.legal-container h2 { font-size: 1.5rem; margin: 50px 0 15px; }
.docs-content h3 { font-size: 1.3rem; margin: 30px 0 15px; color: var(--text); display: flex; align-items: center; gap: 10px;}
.docs-content p, .legal-container p { color: var(--text-muted); font-size: 1.05rem; margin-bottom: 20px; line-height: 1.8; }
.docs-content ul { color: var(--text-muted); line-height: 1.8; margin-left: 20px; margin-bottom: 25px; font-size: 1.05rem;}
.docs-content li { margin-bottom: 10px; }

.docs-code { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 25px; font-family: 'JetBrains Mono', monospace; font-size: 0.9rem; color: #a5d6ff; overflow-x: auto; margin-bottom: 30px; box-shadow: inset 0 0 20px rgba(0,0,0,0.5); line-height: 1.6; position: relative;}
html.light-mode .docs-code { color: #0a3069; box-shadow: none; background: #f1f5f9; border-color: #e2e8f0;}
.docs-code::before { content: "TERMINAL"; position: absolute; top: 0; right: 0; background: var(--border); color: var(--text-muted); font-size: 0.65rem; padding: 4px 10px; border-bottom-left-radius: 8px; font-weight: bold; letter-spacing: 1px;}
.key { display: inline-block; background: var(--border); border: 1px solid var(--text-muted); padding: 3px 8px; border-radius: 6px; font-family: 'JetBrains Mono'; font-size: 0.8rem; color: var(--text); box-shadow: 0 2px 0 rgba(0,0,0,0.3); margin: 0 4px;}
.pro-tip { background: rgba(0, 229, 255, 0.05); border: 1px solid rgba(0, 229, 255, 0.3); padding: 20px; border-radius: 12px; margin-bottom: 30px; display: flex; gap: 15px; align-items: flex-start;}
.pro-tip i { font-size: 1.5rem; color: #00e5ff; margin-top: 2px;}
.pro-tip div p { margin: 0; color: var(--text); font-size: 0.95rem; line-height: 1.6;}

.highlight-box { background: rgba(16, 185, 129, 0.1); border: 1px solid var(--success); padding: 20px; border-radius: 12px; margin-bottom: 30px;}
.highlight-box p { color: var(--success); margin: 0; font-weight: 500;}
.os-list { list-style: none; padding: 0; margin-top: 20px;}
.os-list li { padding: 15px; background: var(--card); border: 1px solid var(--border); border-radius: 8px; margin-bottom: 10px; display: flex; flex-direction: column;}
.os-list li strong { color: var(--text); font-size: 1.1rem; margin-bottom: 5px;}
.os-list li span { color: var(--text-muted); font-size: 0.9rem;}

.timeline { border-left: 2px solid var(--border); padding-left: 40px; position: relative;}
.timeline .log-entry { 
  margin-bottom: 60px; 
  position: relative; 
  display: block; 
}
.log-dot { position: absolute; left: -47px; top: 0; width: 12px; height: 12px; background: var(--card); border: 2px solid var(--text); border-radius: 50%; box-shadow: 0 0 10px var(--text);}
.log-dot.dim { background: var(--text-muted); border-color: var(--border); box-shadow: none; }
.log-date { font-family: 'JetBrains Mono', monospace; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 5px; display: block;}
.log-version { font-size: 2rem; font-weight: 700; letter-spacing: -1px; display: flex; align-items: center; gap: 12px; margin-bottom: 15px; color: var(--text);}
.log-version.dim-text { color: var(--text-muted); }
.log-badge { font-size: 0.7rem; padding: 4px 10px; border-radius: 20px; background: rgba(0, 229, 255, 0.1); border: 1px solid #00e5ff; color: #00e5ff; font-weight: 600; text-transform: uppercase; letter-spacing: 1px;}
.log-badge.dim-badge { border-color: var(--text-muted); color: var(--text-muted); background: transparent; }
.log-content { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 25px; }
.changelog-desc { color: var(--text); font-size: 1.1rem; margin-bottom: 20px; }
.log-content ul { list-style: none; margin-top: 15px;}
.log-content li { display: flex; align-items: flex-start; gap: 10px; color: var(--text-muted); margin-bottom: 15px; font-size: 1.05rem; line-height: 1.5;}
.log-content li i { color: var(--text); margin-top: 4px;}
.tag { background: var(--border); color: var(--text); padding: 2px 6px; border-radius: 4px; font-size: 0.75rem; font-weight: bold; font-family: 'JetBrains Mono'; margin-right: 5px;}
.tag.new { background: rgba(16, 185, 129, 0.15); color: var(--success); border: 1px solid rgba(16, 185, 129, 0.3);}


/* ==========================================================================
   CODEBOX IDE STYLES 
   ========================================================================== */

.workspace-body { background: var(--bg); overflow: hidden; }

.container-ide { max-width: 100%; padding: 0; position: relative; z-index: 10; height: 100vh; height: 100dvh; width: 100vw; overflow: hidden; } 
.ide-card { display: flex; flex-direction: column; padding: 0; margin: 0; border-radius: 0; border: none; background: var(--card); height: 100vh; height: 100dvh; width: 100vw; overflow: hidden; }
html.light-mode .ide-card { box-shadow: none; }

.ide-toolbar { padding: 10px 16px; display: flex; flex-wrap: wrap; gap: 10px; width: 100%; justify-content: space-between; align-items: center; background: transparent; border-bottom: 1px solid var(--border); position: relative; z-index: 50;}

.ide-workspace { display: flex; flex: 1; min-height: 0; overflow: hidden; position: relative; }

/* SIDEBAR & BACKDROP */
.sidebar-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 9998; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);}
.sidebar-backdrop.active { opacity: 1; pointer-events: auto; }

.file-sidebar { width: 220px; display: flex; flex-direction: column; border-right: 1px solid var(--border); transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s; overflow: hidden; white-space: nowrap; background: transparent; flex-shrink: 0; z-index: 9999;}
.file-sidebar.collapsed { width: 0; border-right-color: transparent; opacity: 0; pointer-events: none;}

.sidebar-header { padding: 15px 20px 10px 20px; font-size: 0.7rem; font-weight: 700; color: var(--text-muted); letter-spacing: 1px; display: flex; justify-content: space-between; align-items: center; }
.sidebar-header button:hover { color: var(--text); }

.file-list { padding: 0 10px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.file-item { padding: 8px 12px; border-radius: 6px; font-size: 0.85rem; color: var(--text-muted); display: flex; align-items: center; gap: 8px; cursor: pointer; transition: 0.2s; font-family: 'JetBrains Mono', monospace; border-left: 2px solid transparent;}
.file-item:hover { color: var(--text); background: rgba(255,255,255,0.03); }
html.light-mode .file-item:hover { background: rgba(0,0,0,0.03); }
.file-item.active { color: var(--text); background: var(--border); }

/* IDE VFS FILE ACTIONS */
.file-actions { display: flex; gap: 4px; opacity: 0; transition: opacity 0.2s ease; margin-left: auto;}
.file-item:hover .file-actions { opacity: 1; }
.file-action-btn { padding: 4px; border-radius: 4px; cursor: pointer; transition: 0.2s; color: var(--text-muted); display: flex; align-items: center; justify-content: center;}
.file-action-btn:hover { color: var(--text); background: var(--border); }
.file-action-btn.del:hover { color: var(--error); background: rgba(239, 68, 68, 0.1); }

.ide-split { flex: 1; min-height: 0; min-width: 0; height: 100%; display: flex; flex-direction: column; background: var(--border); gap: 1px; width: 100%; overflow: hidden;}

.editor-half { display: flex; flex-direction: row; flex-wrap: nowrap; width: 100%; height: 55%; min-height: 100px; overflow: hidden; background: var(--card); position: relative;}
.editor-panel { display: flex; flex-direction: column; height: 100%; transition: width 0.2s ease, flex-grow 0.2s ease; background: transparent; flex: 1 1 0; min-width: 0; position: relative;}

.editor-header-pill { position: absolute; top: 12px; right: 20px; background: var(--bg); border: 1px solid var(--border); padding: 4px 12px; border-radius: 20px; font-family: 'JetBrains Mono', monospace; font-size: 0.75rem; color: var(--text-muted); display: flex; align-items: center; gap: 6px; z-index: 10; cursor: pointer; transition: 0.2s;}
.editor-header-pill:hover { border-color: var(--text-muted); color: var(--text); }

.output-half { flex: 1; display: flex; flex-direction: column-reverse; min-height: 100px; overflow: hidden; background: var(--card); transition: height 0.3s ease; }

.iframe-wrap { width: 100%; flex: 1; background: transparent; display: none; position: relative; overflow: auto; padding: 0;}
.iframe-wrap.active { display: flex; }

.console-wrap { width: 100%; flex: 1; background: transparent; overflow: hidden; font-family: 'JetBrains Mono', Consolas, Monaco, monospace; font-size: 0.85rem; display: none; flex-direction: column;}
.console-wrap.active { display: flex !important; } 

.console-header { background: transparent; border-bottom: 1px solid var(--border); padding: 8px 15px; display: flex; justify-content: space-between; align-items: center; flex-shrink: 0;}
.console-input-wrap { display: flex; border-top: 1px solid var(--border); background: transparent; flex-shrink: 0;}

.output-tabs { display: flex; border-top: 1px solid var(--border); background: transparent; align-items: center; justify-content: space-between; padding: 0 10px; flex: none; height: 46px; }
.out-tab-group { display: flex; gap: 10px; padding: 8px 0; overflow-x: auto; scrollbar-width: none;}
.out-tab-group::-webkit-scrollbar { display: none; }
.out-tab { background: transparent; border: 1px solid transparent; border-radius: 6px; color: var(--text-muted); cursor: pointer; font-weight: 500; font-size: 0.8rem; padding: 6px 12px; transition: 0.2s; display: flex; align-items: center; gap: 6px; white-space: nowrap;}
.out-tab:hover { color: var(--text); background: var(--border);}
.out-tab.active { background: var(--border); color: var(--text); border-color: var(--border);}

.monaco-editor, .monaco-editor-background, .monaco-editor .margin { background-color: transparent !important; }

.toolbar-left { display: flex; align-items: center; gap: 15px; }
.back-btn { color: var(--text-muted); text-decoration: none; font-size: 1.2rem; transition: 0.2s; padding: 0 5px; }
.back-btn:hover { color: var(--text); transform: translateX(-2px); }
.ide-logo { font-weight: 600; font-size: 0.95rem; color: var(--text); display: flex; align-items: center; gap: 8px;}
.toolbar-right { display: flex; gap: 8px; flex-wrap: wrap; align-items: center;}

.options-dropdown { position: absolute; top: calc(100% + 5px); right: 20px; background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 10px; min-width: 220px; box-shadow: 0 10px 40px rgba(0,0,0,0.5); display: none; flex-direction: column; gap: 4px; z-index: 1000; }
.options-dropdown.active { display: flex; animation: slideDown 0.2s ease; }
@keyframes slideDown { from{opacity:0; transform:translateY(-10px);} to{opacity:1; transform:translateY(0);} }
.dropdown-divider { height: 1px; background: var(--border); margin: 6px 0; }
.dropdown-item { background: transparent; border: none; color: var(--text-muted); padding: 8px 12px; text-align: left; cursor: pointer; border-radius: 6px; font-size: 0.85rem; transition: 0.2s; font-weight: 500; display: flex; align-items: center; gap: 8px; text-decoration: none;}
.dropdown-item:hover { background: var(--border); color: var(--text); }
.toggle-wrap { display: flex; justify-content: space-between; align-items: center; font-size: 0.85rem; font-weight: 500; color: var(--text-muted); padding: 8px 12px; cursor: pointer; transition: 0.2s; }
.toggle-wrap:hover { color: var(--text); }
.toggle-wrap input { width: auto; margin: 0; cursor: pointer; accent-color: var(--text);}

input, textarea, select { width:100%; padding:10px 14px; margin-top:5px; margin-bottom: 15px; border-radius:6px; border:1px solid var(--border); background: transparent; color: var(--text); font-size: 0.9rem; transition: 0.2s; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--text-muted); }

body.is-dragging .editor-panel, body.is-dragging iframe, body.is-dragging .editor-half, body.is-dragging .output-half { transition: none !important; }

.editor-panel.collapsed { width: 40px !important; flex: none !important; overflow: hidden; background: var(--card); border-right: 1px solid var(--border); }
.editor-panel.collapsed .editor-header-pill { 
  position: relative; top: auto; right: auto; 
  width: 100%; height: 100%; 
  border-radius: 0; border: none; background: transparent; 
  flex-direction: column; justify-content: flex-start; align-items: center; 
  padding: 15px 0; gap: 15px; 
}
.editor-panel.collapsed .editor-header-pill i { transform: rotate(90deg); font-size: 1.1rem; }
.editor-panel.collapsed .editor-header-pill span { writing-mode: vertical-rl; text-orientation: mixed; letter-spacing: 1px; }

/* DRAG RESIZERS */
.ide-resizer { background-color: var(--border); position: relative; z-index: 10; display: flex; align-items: center; justify-content: center; transition: background-color 0.2s ease; }
.ide-resizer:hover, .ide-resizer.active-drag { background-color: var(--text-muted); }
.ide-resizer.horiz { width: 4px; cursor: col-resize; flex: 0 0 4px; margin: 0 2px; border-radius: 4px; }
.ide-resizer.vert { height: 4px; cursor: row-resize; flex: 0 0 4px; margin: 2px 0; border-radius: 4px; }

iframe { flex: none; width: 100%; height: 100%; border: 1px solid var(--border); background: var(--iframe-bg); border-radius: 6px; transition: width 0.3s ease; box-shadow: 0 8px 30px rgba(0,0,0,0.1);}
iframe.mobile-view { width: 375px; height: 100%; border-radius: 12px; margin: 0 auto; }
iframe.tablet-view { width: 768px; height: 100%; border-radius: 8px; margin: 0 auto; }

.filter-btn { background: transparent; border: 1px solid transparent; color: var(--text-muted); padding: 4px 10px; border-radius: 6px; font-size: 0.75rem; cursor: pointer; transition: 0.2s; white-space: nowrap;}
.filter-btn:hover { background: var(--border); }
.filter-btn.active { background: var(--text); color: var(--bg); }
.console-logs { flex: 1; overflow-y: auto; padding: 10px; }
.console-logs .console-entry { 
  padding: 6px 12px; 
  border-bottom: 1px solid var(--border); 
  display: flex; 
  align-items: center; 
  font-family: 'JetBrains Mono', monospace;
  min-height: 28px;
}
.console-logs .json-block { 
  margin: 4px 0; 
  padding: 6px 10px; 
  background: rgba(0, 0, 0, 0.2); 
  border: 1px solid var(--border); 
  border-radius: 4px; 
  font-size: 0.8rem;
  width: fit-content; 
  display: inline-block;
}
.log-time { color: var(--text-muted); font-size: 0.7rem; margin-right: 10px; opacity: 0.5; padding-top: 2px; min-width: 55px;}
.console-content { flex: 1; }
.con-err-line { color: var(--error); background: rgba(239, 68, 68, 0.05); border-left: 2px solid var(--error);}
.con-warn-line { color: var(--warning); background: rgba(234, 179, 8, 0.05); border-left: 2px solid var(--warning);}
.console-prompt { padding: 10px 12px; color: var(--text-muted); font-weight: bold; user-select: none; }
.console-input { flex: 1; background: transparent; border: none; color: var(--text); font-family: inherit; font-size: 0.85rem; padding: 10px 10px 10px 0; outline: none;}

.con-str { color: #a5d6ff; } .con-num { color: #79c0ff; } .con-key { color: #7ee787; }
.con-null { color: #ff7b72; font-style: italic; } .con-func { color: #d2a8ff; font-style: italic; }
.con-tag { color: #ff7b72; } .con-error-text { color: #ff7b72; font-weight: bold;}
.con-details { margin: 2px 0; cursor: pointer; outline: none; }
.con-details summary { color: #8b949e; user-select: none; transition: 0.2s; outline: none;}
.con-details summary:hover { color: var(--text); }
.con-nested { padding-left: 15px; border-left: 1px solid var(--border); margin-left: 5px; margin-top: 2px;}

html.light-mode .con-str { color: #0a3069; } html.light-mode .con-num { color: #0550ae; }
html.light-mode .con-key { color: #116329; } html.light-mode .con-null { color: #cf222e; }
html.light-mode .con-func { color: #8250df; } html.light-mode .con-tag { color: #cf222e; }
html.light-mode .con-error-text { color: #cf222e; }

.toast { visibility: hidden; min-width: 250px; background-color: var(--text); color: var(--bg); text-align: center; border-radius: 8px; padding: 12px; position: fixed; z-index: 100000; left: 50%; bottom: 40px; transform: translateX(-50%); font-weight: 500; box-shadow: 0 8px 20px rgba(0,0,0,0.3); opacity: 0; transition: opacity 0.3s, visibility 0.3s; font-size: 0.9rem;}
.toast.show { visibility: visible; opacity: 1; }

.cdn-manager { background: transparent; border-bottom: 1px solid var(--border); padding: 12px 20px; display: none; font-size: 0.85rem;}
.cdn-manager.active { display: block; }
.quick-add-cdns { margin-top: 10px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap;}
.quick-add-cdns button { background: transparent; border: 1px solid var(--border); color: var(--text-muted); font-size: 0.75rem; padding: 4px 8px; border-radius: 4px; cursor: pointer; transition: 0.2s;}
.quick-add-cdns button:hover { background: var(--border); color: var(--text); }


/* ==========================================================================
   MOBILE OVERHAUL & RESPONSIVENESS
   ========================================================================== */

@media (max-width: 900px) {
  .premium-hero h1 { font-size: 3.5rem; letter-spacing: -1.5px;}
  .stats-grid { grid-template-columns: 1fr; gap: 15px; }
  .bento-grid { grid-template-columns: 1fr; }
  .bento-large { grid-column: span 1; }
  
  .feature-showcase { flex-direction: column; gap: 40px; margin-top: 50px; margin-bottom: 50px;}
  .feature-showcase.reverse { flex-direction: column; }
  
  .footer-grid { grid-template-columns: 1fr; gap: 30px; text-align: center; }
  .footer-brand { align-items: center; display: flex; flex-direction: column; }
}

@media (max-width: 768px) {
  .hide-on-desktop { display: flex !important; }
  .hide-in-mobile { display: none !important; }
  
  .premium-hero h1 { font-size: 2.8rem; letter-spacing: -1px; }
  .premium-hero p { font-size: 1rem; padding: 0 10px; }
  .hero-ctas { flex-direction: column; width: 100%; padding: 0 20px; }
  .hero-ctas a { width: 100%; }
  
  .floating-nav { width: 95%; gap: 10px; padding: 10px 15px; }
  .bento-card { padding: 25px; }
  .stat-num { font-size: 2.2rem; }
  
  /* IDE MOBILE OVERHAUL */
  .container-ide, .ide-card, #codebox { height: 100dvh; max-height: 100dvh; overflow: hidden; }
    
  
  /* ==========================================================================
     NEW UNIQUE WORKSPACE HEADER (MOBILE)
     ========================================================================== */
  .ws-header {
    padding: 8px 10px;
    height: 52px;
  }
  
  .ws-left { gap: 10px; }
  .ws-right { gap: 8px; }

  /* Hide the text, make the logo icon slightly larger */
  .ws-logo-text { display: none; }
  .ws-logo i { font-size: 1.5rem; }
  
  /* Hide the "Preferences" text and shrink it to a square icon */
  .ws-hide-mobile { display: none !important; }
  
  .ws-icon-text-btn {
    width: 36px; 
    padding: 0;
  }
  .ws-icon-text-btn i { font-size: 1.2rem; margin: 0; }

  /* Keep the compile button exactly the right size */
  .ws-compile-btn {
    padding: 0 14px;
    font-size: 0.8rem;
  }
  
  /* FORCE SINGLE ROW MOBILE TOOLBAR */
  .ide-toolbar { 
    padding: 8px 10px !important; 
    display: flex !important;
    flex-direction: row !important; 
    flex-wrap: nowrap !important; 
    justify-content: space-between !important; 
    align-items: center !important; 
    height: 54px !important; /* Locks the height to a single line */
  }

  /* Left Side: Sidebar & Logo */
  .toolbar-left { 
    width: auto !important; 
    display: flex !important; 
    flex-direction: row !important;
    align-items: center !important; 
    gap: 12px !important; 
    margin: 0 !important;
  }
  .ide-logo-text { display: none !important; } /* Hide text, keep icon */

  /* Right Side: Action Buttons */
  .toolbar-right { 
    width: auto !important; 
    display: flex !important; 
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-end !important; 
    gap: 8px !important; 
  }
  
  /* Force Icon Buttons to be Perfect Squares */
  .toolbar-right .btn.action-icon { 
    width: 36px !important; 
    height: 36px !important; 
    flex: 0 0 36px !important; 
    padding: 0 !important; 
    display: flex !important; 
    justify-content: center !important; 
    align-items: center !important; 
    font-size: 1.2rem !important;
  }
  
  /* Force Compile Button to Fit */
  .toolbar-right .primary-btn { 
    height: 36px !important; 
    flex: 0 0 auto !important; 
    padding: 0 14px !important; 
    display: flex !important;
    align-items: center !important;
    white-space: nowrap !important;
  }
  
  .file-sidebar { 
    position: fixed; top: 0; left: 0; height: 100dvh; 
    width: 260px !important; 
    opacity: 1 !important; 
    pointer-events: auto !important; 
    background: var(--card); border-right: 1px solid var(--border);
    z-index: 9999; transform: translateX(-100%); 
    box-shadow: none !important; /* Fixes the black shadow bleeding onto the screen */
    display: flex !important; 
  }
  html.light-mode .file-sidebar { box-shadow: none !important; }
  
  /* Apply the shadow ONLY when the sidebar is open */
  .file-sidebar.mobile-open { 
    transform: translateX(0); 
    box-shadow: 10px 0 30px rgba(0,0,0,0.5) !important; 
  }
  html.light-mode .file-sidebar.mobile-open { 
    box-shadow: 10px 0 30px rgba(0,0,0,0.05) !important; 
  }
  
  /* Vertical stacking for panels */
  .ide-split { flex-direction: column; height: 100%; min-height: 0; overflow: hidden; }
  .editor-half { height: 50%; min-height: 150px; width: 100%; flex: none; border-bottom: 1px solid var(--border); flex-direction: column; }
  /* Push Output Tabs to the absolute bottom of the screen */
  .output-half { 
    height: 50%; width: 100%; flex: 1; min-height: 150px;
    flex-direction: column-reverse !important; 
  }
  
  /* Swap the border so it looks like a bottom nav bar */
  .output-tabs {
    border-bottom: none !important;
    border-top: 1px solid var(--border) !important;
  }
  
  /* Swap resizers */
  .ide-resizer.horiz { display: none !important; }
  .ide-resizer.vert { display: flex !important; height: 4px; width: 100%; flex: 0 0 4px; cursor: row-resize; margin: 2px 0; border-radius: 4px; }
  
  .ide-resizer:active { 
    background-color: var(--text-muted) !important; 
  }
  
  .out-tab-group, .console-filters { overflow-x: auto; padding-bottom: 2px; }
  
  .editor-panel { display: none !important; width: 100% !important; height: 100% !important; border: none !important; }
  .editor-panel.active-mobile { display: flex !important; }
  
  .editor-header-pill { display: none; } 
  .options-dropdown { width: 90vw; right: 5vw; top: 110px; position: fixed; }

  /* MOBILE FILE TABS */
  .mobile-vfs-tabs {
    width: 100%; overflow-x: auto; background: var(--bg); border-bottom: 1px solid var(--border);
    padding: 8px 10px; gap: 8px; align-items: center; flex: none; display: flex;
    scrollbar-width: none;
  }
  .mobile-vfs-tabs::-webkit-scrollbar { display: none; }
  .mob-tab {
    background: var(--card); border: 1px solid transparent; color: var(--text-muted);
    padding: 6px 12px; border-radius: 6px; font-size: 0.75rem; font-family: 'JetBrains Mono', monospace;
    white-space: nowrap; cursor: pointer; transition: 0.2s; display: flex; align-items: center; gap: 6px;
  }
  .mob-tab.active { background: var(--border); color: var(--text); border-color: var(--text-muted); }

 /* Docs page fixes */
  .docs-container { flex-direction: column; margin-top: 80px; width: 100%; padding: 0 15px; overflow-x: hidden;} 
  .docs-sidebar { width: 100%; position: static; border-right: none; border-bottom: 1px solid var(--border); padding-bottom: 20px; max-height: 300px; } 
  .docs-content { width: 100%; max-width: 100%; min-width: 0; }
  .docs-content h1 { font-size: 2.5rem; }
  .docs-content p, .docs-content ul, .docs-content li { word-wrap: break-word; overflow-wrap: break-word; }
  .docs-code { padding: 15px; font-size: 0.8rem; white-space: pre-wrap; word-break: break-word; overflow-x: auto; }
}

/* ==========================================================================
   NEW UNIQUE WORKSPACE HEADER (DESKTOP)
   ========================================================================== */
.ws-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  height: 56px;
  background: var(--card); /* Replaces the transparent background to look clean */
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: 999;
  width: 100%;
  box-sizing: border-box;
}

.ws-left, .ws-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ws-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 1rem;
}
.ws-logo i { font-size: 1.4rem; }

/* Fully isolated button class - no overlap with standard .btn */
.ws-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0 12px;
  white-space: nowrap;
}
.ws-btn:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

.ws-icon-btn { width: 36px; padding: 0; }
.ws-icon-btn i { font-size: 1.2rem; }

.ws-compile-btn {
  background: var(--text) !important;
  color: var(--bg) !important;
  border: none;
}
.ws-compile-btn:hover { 
  opacity: 0.9; 
  color: var(--bg) !important; /* Stops the text from turning white */
}

.ws-hide-mobile { display: inline; }

/* --- CUSTOM LOGO SIZING FIX --- */
.logo img {
  height: 28px !important; /* Adjust this number to make it bigger/smaller */
  width: auto !important;
  max-width: 200px !important; /* Safety net so it never takes over the screen */
  object-fit: contain !important;
}

/* Default Dark Mode: Show White Logo */
.logo-light { display: none !important; }
.logo-dark { display: block !important; }

/* Light Mode: Show Black Logo */
html.light-mode .logo-light { display: block !important; }
html.light-mode .logo-dark { display: none !important; }

/* --- CUSTOM LOGO SIZING FIX --- */
.logo img, .ws-logo img {
  height: 28px !important; 
  width: auto !important;
  max-width: 200px !important; 
  object-fit: contain !important;
}

/* --- VFS Long Filename Fix --- */
.file-item {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden; /* Prevents container from expanding */
}

.vfs-filename {
  flex: 1; /* Tells the text to take up available space */
  white-space: nowrap; /* Prevents wrapping to a new line */
  overflow: hidden;
  text-overflow: ellipsis; /* Adds the "..." */
  min-width: 0; /* CRITICAL: Forces flexbox to respect the overflow */
}

.file-actions {
  flex-shrink: 0; /* Prevents the buttons from being crushed */
  display: flex;
}
