/* ═══════════════════════════════════════════
   HTML Preview — Landing Page Styles
   ═══════════════════════════════════════════ */

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

:root {
    --bg-0: #0e0e11;
    --bg-1: #141418;
    --bg-2: #1a1a20;
    --bg-3: #222228;
    --border: #2a2a32;
    --border-subtle: #1e1e24;
    --text: #e4e4e8;
    --text-dim: #8888a0;
    --text-dimmer: #555568;
    --accent: #a78bfa;
    --accent-dim: rgba(167, 139, 250, 0.12);
    --green: #4ade80;
    --green-dim: rgba(74, 222, 128, 0.1);
    --orange: #fb923c;
    --red: #f87171;
    --yellow: #facc15;
    --blue: #60a5fa;
    --radius: 10px;
    --mono: 'JetBrains Mono', monospace;
    --sans: 'Inter', -apple-system, sans-serif;
}

html {
    scroll-behavior: smooth;
}

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

/* ─── NAV ─── */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 0 40px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(14, 14, 17, 0.85);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-subtle);
}

.nav-logo {
    font-family: var(--mono);
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-logo .tag {
    font-size: 10px;
    font-weight: 500;
    padding: 2px 7px;
    border-radius: 4px;
    background: var(--accent-dim);
    color: var(--accent);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-links a {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-dim);
    text-decoration: none;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--text);
}

.nav-links .btn-nav {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    border-radius: 6px;
    background: var(--accent-dim);
    color: var(--accent);
    border: 1px solid rgba(167, 139, 250, 0.2);
    transition: all 0.2s;
}

.nav-links .btn-nav:hover {
    background: rgba(167, 139, 250, 0.2);
    border-color: rgba(167, 139, 250, 0.35);
}

/* ─── HERO ─── */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 100px 40px 80px;
    max-width: 1200px;
    margin: 0 auto;
    gap: 80px;
}

.hero-text {
    flex: 1;
    min-width: 0;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    color: var(--green);
    background: var(--green-dim);
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 24px;
    border: 1px solid rgba(74, 222, 128, 0.15);
}

.hero-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green);
}

.hero-text h1 {
    font-size: clamp(36px, 5vw, 56px);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -1.5px;
    margin-bottom: 20px;
}

.hero-text h1 span {
    color: var(--accent);
}

.hero-text p {
    font-size: 17px;
    color: var(--text-dim);
    line-height: 1.7;
    max-width: 480px;
    margin-bottom: 32px;
}

.hero-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}

.btn-primary:hover {
    background: #9678f0;
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(167, 139, 250, 0.3);
}

.btn-secondary {
    background: var(--bg-2);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-3);
    border-color: var(--text-dimmer);
}

.btn svg {
    width: 16px;
    height: 16px;
}

/* ─── HERO PREVIEW ─── */
.hero-preview {
    flex: 1;
    min-width: 0;
    position: relative;
}

.preview-window {
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.preview-titlebar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    background: var(--bg-2);
    border-bottom: 1px solid var(--border-subtle);
}

.preview-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.preview-dot.r { background: #f87171; }
.preview-dot.y { background: #facc15; }
.preview-dot.g { background: #4ade80; }

.preview-titlebar span {
    margin-left: 8px;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-dimmer);
}

.preview-body {
    padding: 0;
    position: relative;
}

.preview-code {
    padding: 20px;
    font-family: var(--mono);
    font-size: 12.5px;
    line-height: 1.8;
    overflow: hidden;
    min-height: 260px;
}

.preview-code .line {
    opacity: 0;
    transform: translateX(-8px);
    white-space: pre;
}

.preview-code .line.visible {
    opacity: 1;
    transform: translateX(0);
    transition: all 0.3s ease;
}

/* Syntax colors */
.tag-h { color: var(--red); }
.tag-a { color: var(--orange); }
.tag-c { color: var(--text-dimmer); }
.str  { color: var(--green); }
.kw   { color: var(--accent); }
.fn   { color: var(--blue); }
.cm   { color: var(--text-dimmer); font-style: italic; }

/* ─── DIVIDER ─── */
.divider {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

.divider hr {
    border: none;
    height: 1px;
    background: var(--border-subtle);
}

/* ─── FEATURES ─── */
.features {
    max-width: 1200px;
    margin: 0 auto;
    padding: 100px 40px;
}

.features-header {
    margin-bottom: 60px;
}

.features-header h2 {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 12px;
}

.features-header p {
    color: var(--text-dim);
    font-size: 16px;
    max-width: 500px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.feature-card {
    background: var(--bg-1);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    padding: 28px;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0;
    transition: opacity 0.25s;
}

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

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

.feature-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    font-size: 18px;
}

.fi-purple { background: var(--accent-dim); color: var(--accent); }
.fi-green  { background: var(--green-dim); color: var(--green); }
.fi-orange { background: rgba(251, 146, 60, 0.1); color: var(--orange); }
.fi-blue   { background: rgba(96, 165, 250, 0.1); color: var(--blue); }
.fi-yellow { background: rgba(250, 204, 21, 0.1); color: var(--yellow); }
.fi-red    { background: rgba(248, 113, 113, 0.1); color: var(--red); }

.feature-card h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
}

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

/* ─── DEMO ─── */
.demo {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 40px 100px;
}

.demo-header {
    text-align: center;
    margin-bottom: 48px;
}

.demo-header h2 {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 12px;
}

.demo-header p {
    color: var(--text-dim);
    font-size: 16px;
}

.demo-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    background: var(--bg-1);
    padding: 4px;
    border-radius: 8px;
    border: 1px solid var(--border-subtle);
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.demo-tab {
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-dim);
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    background: none;
    font-family: var(--sans);
}

.demo-tab.active {
    background: var(--bg-3);
    color: var(--text);
}

.demo-tab:hover:not(.active) {
    color: var(--text);
}

.demo-output {
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.demo-output-header {
    padding: 10px 16px;
    background: var(--bg-2);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.demo-output-header span {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-dimmer);
}

.demo-iframe-wrapper {
    position: relative;
}

.demo-iframe {
    width: 100%;
    height: 340px;
    border: none;
    background: var(--bg-0);
}

/* ─── HOW IT WORKS ─── */
.how {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 40px 100px;
}

.how-header {
    margin-bottom: 60px;
}

.how-header h2 {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 12px;
}

.how-header p {
    color: var(--text-dim);
    font-size: 16px;
    max-width: 500px;
}

.how-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.step {
    position: relative;
    padding: 32px 28px;
    background: var(--bg-1);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
}

.step-num {
    font-family: var(--mono);
    font-size: 48px;
    font-weight: 700;
    color: var(--accent);
    opacity: 0.15;
    position: absolute;
    top: 16px;
    right: 20px;
    line-height: 1;
}

.step h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
}

.step p {
    font-size: 13.5px;
    color: var(--text-dim);
    line-height: 1.65;
}

.step code {
    display: inline;
    font-family: var(--mono);
    font-size: 12px;
    background: var(--bg-3);
    padding: 2px 7px;
    border-radius: 4px;
    color: var(--accent);
}

/* ─── INSTALL ─── */
.install {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 40px 100px;
}

.install-box {
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 48px;
    display: flex;
    align-items: center;
    gap: 60px;
}

.install-text {
    flex: 1;
}

.install-text h2 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 12px;
}

.install-text p {
    color: var(--text-dim);
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 24px;
}

.install-cmd {
    flex: 1;
    background: var(--bg-0);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 16px 20px;
    font-family: var(--mono);
    font-size: 13px;
    color: var(--text-dim);
    position: relative;
    overflow: hidden;
}

.install-cmd .prompt {
    color: var(--accent);
    margin-right: 8px;
    user-select: none;
}

.install-cmd code {
    color: var(--text);
}

.install-cmd .line {
    margin-bottom: 6px;
    white-space: nowrap;
    overflow-x: auto;
}

.install-cmd .line:last-child {
    margin-bottom: 0;
}

.copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-family: var(--sans);
    color: var(--text-dimmer);
    background: var(--bg-2);
    border: 1px solid var(--border-subtle);
    cursor: pointer;
    transition: all 0.2s;
}

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

.copy-btn.copied {
    color: var(--green);
    border-color: rgba(74, 222, 128, 0.3);
}

/* ─── COMMUNITY PLUGIN ─── */
.community {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 40px 100px;
}

.community-box {
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 48px;
    display: flex;
    align-items: center;
    gap: 48px;
}

.community-mock {
    flex: 1;
    min-width: 0;
    background: var(--bg-0);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    overflow: hidden;
}

.mock-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-subtle);
}

.mock-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--bg-2);
    border-radius: 6px;
    border: 1px solid var(--border-subtle);
    color: var(--text-dimmer);
    font-size: 13px;
}

.mock-result {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    transition: background 0.2s;
}

.mock-result:hover {
    background: var(--bg-2);
}

.mock-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--accent-dim);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--mono);
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.mock-info {
    flex: 1;
    min-width: 0;
}

.mock-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.coming-soon-badge {
    font-size: 10px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(251, 146, 60, 0.12);
    color: var(--orange);
    border: 1px solid rgba(251, 146, 60, 0.2);
    letter-spacing: 0.3px;
    text-transform: uppercase;
    animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.mock-desc {
    font-size: 12.5px;
    color: var(--text-dim);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mock-meta {
    display: flex;
    gap: 12px;
    font-size: 11px;
    color: var(--text-dimmer);
}

.mock-toggle {
    flex-shrink: 0;
}

.mock-switch {
    width: 36px;
    height: 20px;
    border-radius: 10px;
    background: var(--bg-3);
    border: 1px solid var(--border);
    position: relative;
    transition: background 0.2s;
}

.mock-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--text-dimmer);
    transition: transform 0.2s;
}

.community-text {
    flex: 1;
}

.community-text h2 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 12px;
}

.community-text p {
    color: var(--text-dim);
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 16px;
}

.community-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(251, 146, 60, 0.06);
    border: 1px solid rgba(251, 146, 60, 0.15);
    border-radius: 8px;
    font-size: 13px !important;
    color: var(--orange) !important;
    margin-bottom: 24px !important;
    line-height: 1.5 !important;
}

.community-note svg {
    flex-shrink: 0;
    margin-top: 1px;
}

/* ─── FOOTER ─── */
footer {
    border-top: 1px solid var(--border-subtle);
    padding: 40px;
    text-align: center;
}

footer p {
    font-size: 13px;
    color: var(--text-dimmer);
}

footer a {
    color: var(--accent);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* ─── ANIMATIONS ─── */
.fade-up {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
    nav {
        padding: 0 20px;
    }

    .hero {
        flex-direction: column;
        padding: 100px 20px 60px;
        gap: 40px;
        text-align: center;
    }

    .hero-text p {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-actions {
        justify-content: center;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .how-steps {
        grid-template-columns: 1fr;
    }

    .community-box {
        flex-direction: column;
        gap: 24px;
        padding: 32px 24px;
    }

    .install-box {
        flex-direction: column;
        gap: 24px;
        padding: 32px 24px;
    }
}

@media (max-width: 600px) {
    .hero-text h1 {
        font-size: 32px;
    }

    .nav-links {
        gap: 16px;
    }

    .nav-links .nav-gh {
        display: none;
    }

    .demo-tabs {
        flex-wrap: wrap;
        justify-content: center;
    }
}
