:root {
    --bg: #0A0A0A;
    --surface: #121212;
    --surface-hover: #1A1A1A;
    --border: #26262B;
    --text: #E6E6E6;
    --text-muted: #8A8F98;
    --primary: #388BFD;
    --primary-glow: rgba(56, 139, 253, 0.15);
    --success: #3FB950;
    --font-main: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: "JetBrains Mono", "Fira Code", ui-monospace, SFMono-Regular, monospace;
    --radius: 6px;
}

[data-theme='light'] {
    --bg: #FAFAFA;
    --surface: #FFFFFF;
    --surface-hover: #F2F2F2;
    --border: #EAEAEA;
    --text: #1A1A1A;
    --text-muted: #6E6E73;
    --primary: #0066CC;
    --primary-glow: rgba(0, 102, 204, 0.1);
    --success: #34C759;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-family: var(--font-main); background: var(--bg); color: var(--text); }
body { transition: background 0.3s, color 0.3s; line-height: 1.6; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
.mono { font-family: var(--font-mono); }

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* Top Marquee */
.top-marquee {
    background: var(--surface); border-bottom: 1px solid var(--border);
    font-size: 12px; color: var(--text-muted); font-family: var(--font-mono);
    padding: 6px 0; overflow: hidden; white-space: nowrap; text-align: center;
}
.top-marquee span { display: inline-block; animation: marquee 25s linear infinite; }
@keyframes marquee { 0% { transform: translateX(100%); } 100% { transform: translateX(-100%); } }

/* Header */
header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(10, 10, 10, 0.85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}
[data-theme='light'] header { background: rgba(250, 250, 250, 0.85); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { font-size: 1.1rem; font-weight: 600; letter-spacing: -0.5px; display: flex; align-items: center; gap: 8px; }
.logo-icon { width: 16px; height: 16px; background: var(--text); border-radius: 2px; }

.uptime-badge {
    display: flex; align-items: center; gap: 6px; font-family: var(--font-mono);
    font-size: 11px; border: 1px solid var(--border); padding: 4px 8px; border-radius: 12px;
    background: var(--surface); color: var(--success); margin-left: 16px;
}
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); box-shadow: 0 0 8px var(--success); }

.nav-links { display: flex; gap: 24px; margin-left: auto; margin-right: 24px; }
.nav-links a { font-size: 13px; font-weight: 500; color: var(--text-muted); transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }

.theme-toggle {
    background: transparent; border: 1px solid var(--border); border-radius: var(--radius);
    width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: var(--text); transition: all 0.2s;
}
.theme-toggle:hover { background: var(--surface-hover); }
.theme-toggle svg { width: 14px; height: 14px; fill: currentColor; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--text); color: var(--bg) !important; font-weight: 500; font-size: 14px;
    padding: 0 24px; height: 40px; border-radius: var(--radius);
    transition: all 0.2s; cursor: pointer; border: 1px solid transparent;
}
.btn:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--text) !important; border: 1px solid var(--border); }
.btn-outline:hover { background: var(--surface-hover); }

/* Layout Grid System */
section { padding: 90px 0; border-bottom: 1px solid var(--border); }
.section-title { font-size: 24px; font-weight: 500; margin-bottom: 12px; letter-spacing: -0.5px; }
.section-subtitle { font-size: 15px; color: var(--text-muted); margin-bottom: 48px; }

/* Hero Section */
.hero { padding: 100px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.hero-content h1 { font-size: 42px; font-weight: 600; line-height: 1.1; margin-bottom: 24px; letter-spacing: -1.5px; }
.hero-content p { font-size: 16px; color: var(--text-muted); margin-bottom: 32px; max-width: 450px; }
.code-snippet {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 12px 16px; font-family: var(--font-mono); font-size: 12px; color: var(--text-muted);
    display: flex; align-items: center; justify-content: space-between; margin-bottom: 32px;
}
.code-snippet span { color: var(--primary); }

/* Dashboard Mock */
.dashboard {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    overflow: hidden; box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}
[data-theme='light'] .dashboard { box-shadow: 0 20px 40px rgba(0,0,0,0.05); }
.dash-header {
    border-bottom: 1px solid var(--border); padding: 12px 16px; font-size: 11px;
    font-family: var(--font-mono); color: var(--text-muted); display: flex; align-items: center; gap: 8px; text-transform: uppercase; letter-spacing: 0.5px;
}
.dash-list { display: flex; flex-direction: column; }
.dash-row {
    display: grid; grid-template-columns: 120px 1fr 60px; gap: 16px; align-items: center;
    padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 12px; font-family: var(--font-mono);
}
.dash-row:last-child { border-bottom: none; }
.sparkline-container { width: 100%; height: 16px; position: relative; display: flex; align-items: center; }
.sparkline-line { height: 2px; background: var(--primary); width: 100%; opacity: 0.5; position: relative; }
.sparkline-line::after { content: ''; position: absolute; right: 0; top: -3px; width: 8px; height: 8px; background: var(--primary); border-radius: 50%; box-shadow: 0 0 10px var(--primary); }
.dash-ms { text-align: right; color: var(--text); }

/* Features Tabs */
.tabs-nav { display: flex; gap: 12px; border-bottom: 1px solid var(--border); margin-bottom: 32px; overflow-x: auto; padding-bottom: 1px; }
.tab-btn {
    background: transparent; border: none; color: var(--text-muted); font-size: 14px; font-weight: 500;
    padding: 10px 4px; cursor: pointer; position: relative; display: flex; align-items: center; gap: 8px;
}
.tab-btn.active { color: var(--text); }
.tab-btn.active::after { content: ''; position: absolute; bottom: -1px; left: 0; right: 0; height: 2px; background: var(--text); }
.kbd { background: var(--surface); border: 1px solid var(--border); font-family: var(--font-mono); font-size: 10px; padding: 2px 6px; border-radius: 4px; }
.tab-pane { display: none; animation: fadeIn 0.2s ease; }
.tab-pane.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature-card { background: var(--surface); border: 1px solid var(--border); padding: 24px; border-radius: var(--radius); }
.feature-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.feature-card-header svg { width: 18px; height: 18px; fill: var(--text-muted); }
.feature-card h3 { font-size: 15px; font-weight: 500; margin-bottom: 8px; }
.feature-card p { font-size: 13px; color: var(--text-muted); line-height: 1.5; }

/* Media/AI Modules */
.media-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.media-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.media-graph {
    height: 140px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: center;
    background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 20px 20px; background-position: center center; opacity: 0.6;
}
.media-graph svg { width: 32px; height: 32px; stroke: var(--text); fill: none; stroke-width: 1.5; }
.media-info { padding: 24px; flex: 1; }
.media-info h3 { font-size: 15px; font-weight: 500; margin-bottom: 8px; }
.media-info p { font-size: 13px; color: var(--text-muted); }

/* Pricing */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.pricing-card { background: var(--surface); border: 1px solid var(--border); padding: 32px; border-radius: var(--radius); display: flex; flex-direction: column; }
.pricing-card.popular { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); position: relative; }
.popular-label { position: absolute; top: -1px; right: 24px; background: var(--primary); color: #fff; font-size: 10px; font-family: var(--font-mono); padding: 4px 8px; border-bottom-left-radius: var(--radius); border-bottom-right-radius: var(--radius); }
.pricing-card h3 { font-size: 16px; font-weight: 500; color: var(--text-muted); }
.price { font-size: 32px; font-weight: 600; font-family: var(--font-mono); margin: 16px 0 24px; display: flex; align-items: baseline; gap: 4px; }
.price span { font-size: 13px; color: var(--text-muted); font-weight: 400; font-family: var(--font-main); }
.pricing-features { margin-bottom: 32px; flex: 1; font-size: 13px; color: var(--text); }
.pricing-features li { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.pricing-features li::before { content: ''; width: 4px; height: 4px; background: var(--primary); border-radius: 50%; }
.pricing-card .btn { width: 100%; }

/* Reviews & FAQ */
.faq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.faq-item h4 { font-size: 15px; font-weight: 500; margin-bottom: 8px; }
.faq-item p { font-size: 14px; color: var(--text-muted); }

.review-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.review-card { background: var(--surface); border: 1px solid var(--border); padding: 24px; border-radius: var(--radius); }
.review-card p { font-size: 14px; color: var(--text); margin-bottom: 24px; line-height: 1.5; }
.review-author { display: flex; align-items: center; justify-content: space-between; font-size: 12px; font-family: var(--font-mono); color: var(--text-muted); }

/* Footer */
footer { padding: 60px 0; font-size: 13px; }
.footer-links { display: flex; gap: 32px; margin-bottom: 24px; }
.footer-links a { color: var(--text-muted); }
.footer-links a:hover { color: var(--text); }
.footer-copy { color: var(--text-muted); font-family: var(--font-mono); font-size: 11px; }

/* Subpages */
.page-header { padding: 80px 0 40px; border-bottom: 1px solid var(--border); margin-bottom: 40px; }
.page-header h1 { font-size: 28px; font-weight: 500; letter-spacing: -0.5px; }
.page-content { max-width: 700px; margin: 0 auto 100px; font-size: 15px; color: var(--text-muted); }
.page-content h2 { color: var(--text); font-size: 18px; font-weight: 500; margin: 40px 0 16px; }
.page-content p { margin-bottom: 16px; }
.page-content ul { list-style: disc; padding-left: 20px; margin-bottom: 24px; }
.page-content a { color: var(--text); text-decoration: underline; }

/* Insights Grid */
.insights-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; max-width: 1000px; margin: 0 auto 100px; }
.insight-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 32px; display: flex; flex-direction: column; transition: all 0.2s;
}
.insight-card:hover { border-color: var(--text-muted); transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
[data-theme='light'] .insight-card:hover { box-shadow: 0 10px 30px rgba(0,0,0,0.05); border-color: var(--primary); }
.insight-meta { font-family: var(--font-mono); font-size: 11px; color: var(--primary); margin-bottom: 16px; letter-spacing: 0.5px; }
.insight-title { font-size: 18px; font-weight: 500; margin-bottom: 12px; color: var(--text); line-height: 1.4; }
.insight-excerpt { font-size: 14px; color: var(--text-muted); margin-bottom: 24px; flex: 1; }
.insight-link { font-size: 13px; font-weight: 500; color: var(--text); display: inline-flex; align-items: center; gap: 4px; transition: color 0.2s; text-decoration: none !important; }
.insight-link:hover { color: var(--primary); }
.insight-link svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 2; fill: none; }

/* Responsive */
@media (max-width: 900px) {
    .nav-links, .uptime-badge, .top-marquee { display: none; }
    .hero { grid-template-columns: 1fr; padding: 60px 0; gap: 40px; }
    .hero-content h1 { font-size: 32px; }
    .feature-grid, .media-grid, .pricing-grid, .review-grid, .faq-grid, .insights-grid { grid-template-columns: 1fr; }
}
