:root {
    /* New Cool Design System */
    --bg-deep: #020617;
    --bg-surface: #0f172a;
    --bg-elevated: #1e293b;
    
    --primary: #38bdf8;
    --secondary: #818cf8;
    --accent: #f472b6;
    
    --text-main: #f8fafc;
    --text-dim: #94a3b8;
    --text-muted: #64748b;
    
    --grad-primary: linear-gradient(135deg, #38bdf8 0%, #818cf8 50%, #f472b6 100%);
    --grad-surface: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0) 100%);
    
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);
    
    --shadow-premium: 0 20px 50px -12px rgba(0, 0, 0, 0.5);
    
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-heading: 'Outfit', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

[data-theme="light"] {
    --bg-deep: #f8fafc;
    --bg-surface: #ffffff;
    --bg-elevated: #f1f5f9;
    --text-main: #0f172a;
    --text-dim: #475569;
    --text-muted: #94a3b8;
    --border: rgba(0, 0, 0, 0.06);
    --border-hover: rgba(0, 0, 0, 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-deep);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-hover); border-radius: 10px; }

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
    z-index: 1000;
    background: rgba(2, 6, 23, 0.7);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: all 0.3s ease;
}

.nav.scrolled {
    height: 64px;
    background: rgba(2, 6, 23, 0.9);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 24px;
    background: var(--grad-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.02);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 28px;
    border-radius: 99px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text-main);
}

.btn-primary {
    background: var(--grad-primary);
    color: white;
    border: none;
    box-shadow: 0 10px 25px -5px rgba(56, 189, 248, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px -5px rgba(56, 189, 248, 0.6);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    padding-top: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero::before {
    content: '';
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.15) 0%, transparent 70%);
    z-index: -1;
    filter: blur(60px);
}

.domain-badge {
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 32px;
    letter-spacing: 0.05em;
    backdrop-filter: blur(10px);
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: clamp(48px, 10vw, 96px);
    line-height: 0.95;
    font-weight: 900;
    letter-spacing: -0.05em;
    margin-bottom: 32px;
    background: linear-gradient(to bottom, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: clamp(18px, 2vw, 22px);
    color: var(--text-dim);
    max-width: 650px;
    margin-bottom: 48px;
}

.hero-image-container {
    width: 100%;
    max-width: 1100px;
    padding: 20px;
    margin-top: 60px;
}

.hero-mockup {
    width: 100%;
    border-radius: 24px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-premium);
    transition: transform 0.5s ease;
}

.hero-mockup:hover {
    transform: translateY(-10px) rotateX(2deg);
}

/* Features Grid */
.features {
    padding: 120px 40px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
    max-width: 1300px;
    margin: 0 auto;
}

.feature-card {
    background: var(--bg-surface);
    padding: 48px;
    border-radius: 32px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--grad-surface);
    opacity: 0;
    transition: opacity 0.3s;
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
}

.feature-card:hover::after {
    opacity: 1;
}

.feature-icon {
    width: 64px;
    height: 64px;
    background: rgba(56, 189, 248, 0.08);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    margin-bottom: 28px;
    border: 1px solid rgba(56, 189, 248, 0.2);
}

.feature-card h3 {
    font-family: var(--font-heading);
    font-size: 26px;
    margin-bottom: 16px;
    font-weight: 700;
}

.feature-card p {
    color: var(--text-dim);
    font-size: 16px;
    line-height: 1.7;
}

/* Editor Styles */
.app-main {
    display: flex;
    height: calc(100vh - 80px);
    margin-top: 80px;
}

.sidebar {
    width: 72px;
    background: var(--bg-surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 0;
    gap: 16px;
}

.sidebar-item {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.sidebar-item:hover, .sidebar-item.active {
    background: rgba(56, 189, 248, 0.1);
    color: var(--primary);
}

/* Toolbar - Refined & Clean */
.toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  min-height: 48px;
}

.toolbar-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.toolbar-btn:hover {
  background: var(--bg-elevated);
  color: var(--primary);
}

.toolbar-btn i {
  width: 18px;
  height: 18px;
}

.toolbar-sep {
  width: 1px;
  height: 20px;
  background: var(--border);
  margin: 0 4px;
}

/* Side Panels - Fixed Overlap */
.side-panel {
  position: absolute;
  left: 72px; /* Position after sidebar */
  top: 0;
  bottom: 0;
  width: 320px;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  z-index: 100;
  display: flex;
  flex-direction: column;
  box-shadow: 20px 0 50px rgba(0,0,0,0.3);
  transform: translateX(0);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.side-panel.hidden {
  transform: translateX(-150%);
  pointer-events: none;
}

.editor-container {
    flex: 1;
    display: flex;
    background: var(--bg-deep);
}

.pane {
    flex: 1;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border);
}

.pane-header {
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.1em;
}

/* Pane & Editor Styling */
textarea#editor {
  flex: 1;
  background: var(--bg-deep);
  color: var(--text-main);
  border: none;
  resize: none;
  outline: none;
  padding: 40px;
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 1.8;
  tab-size: 4;
}

.preview-area {
    flex: 1;
    overflow-y: auto;
    padding: 60px;
    background: var(--bg-deep);
}

/* Status Bar */
.status-bar {
    height: 36px;
    background: var(--bg-surface);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    padding: 0 24px;
    align-items: center;
    font-size: 11px;
    color: var(--text-muted);
}

/* Footer */
footer {
    padding: 100px 40px 60px;
    text-align: center;
    border-top: 1px solid var(--border);
    background: var(--bg-surface);
}

footer p { color: var(--text-muted); }

@media (max-width: 768px) {
    .nav { padding: 0 20px; }
    .features { padding: 60px 20px; }
    .hero h1 { font-size: 48px; }
    .app-main { flex-direction: column; }
}
$styles
$styles

.hidden { display: none !important; }

$styles

#editor-pane { box-shadow: 10px 0 30px rgba(0,0,0,0.5); z-index: 5; }


.toolbar { flex-shrink: 0; }
.pane-header { flex-shrink: 0; }

