:root {
    scroll-behavior: smooth;
    --bg-color: #030305;
    --text-primary: #ffffff;
    --text-secondary: #888890;
    --accent: #3b82f6;
    --accent-glow: rgba(59, 130, 246, 0.5);
    --surface: rgba(255, 255, 255, 0.03);
    --surface-border: rgba(255, 255, 255, 0.08);
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 50% 0%, rgba(59, 130, 246, 0.15), transparent 40%),
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 100% 100%, 50px 50px, 50px 50px;
    background-position: center top, center top, center top;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 1.5rem 0;
    background: rgba(3, 3, 5, 0.8);
    backdrop-filter: blur(12px);
    z-index: 100;
    border-bottom: 1px solid var(--surface-border);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
    background: linear-gradient(to right, #fff, #888);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

nav a {
    color: var(--text-secondary);
    text-decoration: none;
    margin-left: 2.5rem;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

nav a:hover {
    color: var(--text-primary);
}

/* Hero */
.hero {
    padding: 12rem 0 8rem;
    text-align: center;
    position: relative;
}

.hero::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    opacity: 0.15;
    z-index: -1;
    pointer-events: none;
}

.hero h1 {
    font-size: 4.5rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.04em;
    margin-bottom: 1.5rem;
    background: linear-gradient(180deg, #fff 0%, #aaa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero .subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 540px;
    margin: 0 auto 4rem;
    font-weight: 400;
}

.install-box {
    display: inline-flex;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--surface-border);
    padding: 1rem 1.5rem;
    border-radius: 999px;
    font-family: var(--font-mono);
    transition: border-color 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
}

.install-box:hover {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.1);
}

.prompt {
    color: var(--text-secondary);
    margin-right: 1rem;
    user-select: none;
}

#install-cmd {
    margin-right: 1.5rem;
    color: #fff;
    font-size: 0.95rem;
}

.copy-btn {
    background: transparent;
    border: none;
    color: var(--accent);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.5rem;
    transition: color 0.3s;
}

.copy-btn:hover {
    color: #60a5fa;
}

/* Features */
.features {
    padding: 8rem 0;
    position: relative;
}

.features::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 10% 50%, rgba(59, 130, 246, 0.05), transparent 30%),
        radial-gradient(circle at 90% 20%, rgba(139, 92, 246, 0.05), transparent 30%);
    pointer-events: none;
    z-index: -1;
}

.features h2 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.04em;
    text-align: center;
    margin-bottom: 5rem;
    color: var(--text-primary);
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.features h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), #8b5cf6);
    border-radius: 2px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    padding: 0 1rem;
}

.feature-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--surface-border);
    padding: 3rem 2.5rem;
    border-radius: 1.5rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.feature-card.large {
    grid-column: span 2;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
}

.feature-card:hover {
    transform: translateY(-8px) scale(1.01);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(800px circle at var(--mouse-x) var(--mouse-y), rgba(255, 255, 255, 0.06), transparent 40%);
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
}

.feature-card:hover::before {
    opacity: 1;
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    background: var(--surface);
    width: fit-content;
    padding: 1rem;
    border-radius: 1rem;
    border: 1px solid var(--surface-border);
}

.feature-card h3 {
    font-family: var(--font-sans);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
}

.feature-card code {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.85em;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

@media (max-width: 900px) {
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .feature-card.large {
        grid-column: span 1;
    }
}

/* Flow Section */
.flow-section {
    padding: 6rem 0;
    background: linear-gradient(180deg, rgba(3, 3, 5, 0) 0%, rgba(59, 130, 246, 0.05) 100%);
    border-bottom: 1px solid var(--surface-border);
}

.flow-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.flow-content h2 {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.flow-content p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 4rem;
}

.flow-stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat .number {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 0.5rem;
    font-family: var(--font-mono);
    text-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

.stat .label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

@media (max-width: 768px) {
    .flow-stats {
        flex-direction: column;
        gap: 2.5rem;
    }
}

/* Architecture Section */
.architecture {
    padding: 4rem 0 8rem;
    background: radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.03), transparent 50%);
}

.architecture h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 5rem;
}

.arch-steps {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.step {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    width: 250px;
    transition: transform 0.3s;
}

.step:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
}

.step-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.step h4 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.step p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.arrow {
    font-size: 2rem;
    color: var(--text-secondary);
    opacity: 0.5;
}

@media (max-width: 768px) {
    .arch-steps {
        flex-direction: column;
    }
    .arrow {
        transform: rotate(90deg);
    }
}

/* Installation */
.installation {
    padding: 6rem 0 10rem;
    border-top: 1px solid var(--surface-border);
}

.installation h2 {
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: -0.03em;
    text-align: center;
    margin-bottom: 4rem;
}

.install-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.option {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    padding: 2.5rem;
    border-radius: 1rem;
}

.option h3 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.option p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.option pre {
    background: #000;
    padding: 1.5rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: #a5f3fc;
    border: 1px solid var(--surface-border);
}

/* Footer */
footer {
    padding: 3rem 0;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
    border-top: 1px solid var(--surface-border);
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 3rem;
    }
    
    .install-box {
        flex-direction: column;
        gap: 1rem;
        padding: 1.5rem;
        border-radius: 1rem;
        width: 100%;
    }

    #install-cmd {
        margin-right: 0;
        text-align: center;
        word-break: break-all;
    }

    .install-options {
    grid-template-columns: 1fr;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-hidden {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    will-change: opacity, transform;
}

.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays for grid items */
.feature-card:nth-child(1) { transition-delay: 0.1s; }
.feature-card:nth-child(2) { transition-delay: 0.2s; }
.feature-card:nth-child(3) { transition-delay: 0.3s; }
.feature-card:nth-child(4) { transition-delay: 0.4s; }

.stat:nth-child(1) { transition-delay: 0.1s; }
.stat:nth-child(2) { transition-delay: 0.2s; }
.stat:nth-child(3) { transition-delay: 0.3s; }

.step:nth-child(1) { transition-delay: 0.1s; }
/* .step:nth-child(2) is arrow */
.step:nth-child(3) { transition-delay: 0.3s; }
/* .step:nth-child(4) is arrow */
.step:nth-child(5) { transition-delay: 0.5s; }

/* Floating Animation for Icons */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

.card-icon, .step-icon {
    animation: float 4s ease-in-out infinite;
}

.feature-card:nth-child(even) .card-icon {
    animation-delay: 2s;
}

/* Typing Cursor Animation */
.cursor {
    display: inline-block;
    width: 8px;
    height: 1.2em;
    background-color: var(--accent);
    margin-left: 2px;
    animation: blink 1s step-end infinite;
    vertical-align: middle;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Architecture Flow Animation */
.arrow {
    position: relative;
    color: var(--accent);
    font-weight: bold;
    opacity: 0.5;
    animation: pulseArrow 2s infinite;
}

@keyframes pulseArrow {
    0% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
    100% { opacity: 0.3; transform: scale(1); }
}

/* Glitch/Shine Effect on Install Box */
.install-box {
    position: relative;
    overflow: hidden;
}

.install-box::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to bottom right,
        rgba(255,255,255,0) 0%,
        rgba(255,255,255,0.05) 50%,
        rgba(255,255,255,0) 100%
    );
    transform: rotate(45deg);
    animation: shine 6s infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%) rotate(45deg); }
    20% { transform: translateX(100%) rotate(45deg); }
    100% { transform: translateX(100%) rotate(45deg); }
}
