/* ===== CSS Variables ===== */
:root {
    --primary-gradient: linear-gradient(135deg, #00d4ff 0%, #7b2ff7 100%);
    --bg-dark: #0a0a0f;
    --bg-darker: #050508;
    --bg-card: #1a1a24;
    --bg-card-hover: #232332;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --text-muted: #6b6b7b;
    --accent-blue: #00d4ff;
    --accent-purple: #7b2ff7;
    --accent-green: #00ff88;
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(0, 212, 255, 0.3);
}

/* ===== Global Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Animated background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(0, 212, 255, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(123, 47, 247, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(0, 255, 136, 0.03) 0%, transparent 50%);
    animation: pulse 15s ease-in-out infinite;
    z-index: 0;
    pointer-events: none;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    font-weight: 700;
}

.gradient-text {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

code {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 0.9em;
}

/* ===== Navigation ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(10, 10, 15, 0.95);
    box-shadow: var(--shadow-md);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
}

.nav-logo {
    width: 40px;
    height: 40px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-menu a:hover {
    color: var(--accent-blue);
}

.nav-github {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.nav-github:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-blue);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s ease;
}

/* ===== Hero Section ===== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 8rem 2rem 4rem;
    max-width: 1400px;
    margin: 0 auto;
    gap: 4rem;
}

.hero-content {
    flex: 1;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 20px;
    font-size: 0.875rem;
    color: var(--accent-blue);
    margin-bottom: 2rem;
    animation: fadeInUp 0.6s ease;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-green);
    border-radius: 50%;
    animation: blink 2s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.6s ease 0.1s both;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    line-height: 1.8;
    animation: fadeInUp 0.6s ease 0.2s both;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
    animation: fadeInUp 0.6s ease 0.3s both;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    animation: fadeInUp 0.6s ease 0.4s both;
}

.stat {
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hero-visual {
    flex: 1;
    z-index: 1;
    animation: fadeInRight 0.8s ease 0.3s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===== Code Window ===== */
.code-window {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.window-header {
    background: rgba(255, 255, 255, 0.03);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.window-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ff5f56;
}

.window-dot:nth-child(2) {
    background: #ffbd2e;
}

.window-dot:nth-child(3) {
    background: #27c93f;
}

.window-title {
    margin-left: auto;
    font-size: 0.875rem;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
}

.code-content {
    padding: 1.5rem;
    overflow-x: auto;
}

.code-content code {
    color: var(--accent-blue);
    font-size: 0.9rem;
    line-height: 1.8;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 212, 255, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-purple);
    transform: translateY(-2px);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* ===== Sections ===== */
section {
    position: relative;
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    z-index: 1;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
}

/* ===== Features Section ===== */
.features {
    background: linear-gradient(180deg, transparent 0%, rgba(26, 26, 36, 0.5) 100%);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.feature-card {
    padding: 2rem;
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.feature-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-blue);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.feature-description {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ===== Architecture Section ===== */
.architecture {
    background: rgba(26, 26, 36, 0.3);
}

.architecture-diagram {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    padding: 2rem;
}

.arch-module {
    flex: 1;
    min-width: 220px;
    max-width: 260px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.arch-module:hover {
    transform: translateY(-8px);
    border-color: var(--accent-purple);
    box-shadow: 0 8px 24px rgba(123, 47, 247, 0.3);
}

.module-header {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--accent-blue);
}

.module-details {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.module-size {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent-green);
}

.module-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.module-list {
    list-style: none;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.module-list li {
    padding: 0.25rem 0;
    padding-left: 1rem;
    position: relative;
}

.module-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent-blue);
}

.arch-arrow {
    font-size: 2rem;
    color: var(--accent-purple);
    font-weight: bold;
}

/* ===== Quick Start Section ===== */
.quickstart-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
}

.step {
    position: relative;
}

.step-number {
    width: 50px;
    height: 50px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-glow);
}

.step-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.step-description {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ===== Code Blocks ===== */
.code-block {
    background: var(--bg-darker);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    overflow-x: auto;
    margin-top: 1rem;
}

.code-block pre {
    margin: 0;
}

.code-block code {
    color: var(--accent-blue);
    font-size: 0.875rem;
    line-height: 1.8;
}

/* ===== SDK Section ===== */
.sdk-section {
    background: linear-gradient(180deg, rgba(26, 26, 36, 0.3) 0%, transparent 100%);
}

.sdk-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: center;
}

.tab-btn {
    padding: 0.75rem 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn.active {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
}

.tab-btn:hover:not(.active) {
    border-color: var(--accent-blue);
    color: var(--text-primary);
}

.sdk-content {
    max-width: 800px;
    margin: 0 auto;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.sdk-example {
    max-width: 800px;
    margin: 3rem auto 0;
}

.sdk-example h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* ===== Documentation Section ===== */
.docs-section {
    background: rgba(26, 26, 36, 0.3);
}

.docs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.doc-card {
    padding: 2rem;
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    display: block;
}

.doc-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-purple);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(123, 47, 247, 0.3);
}

.doc-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.doc-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.doc-card p {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ===== CTA Section ===== */
.cta-section {
    text-align: center;
    padding: 8rem 2rem;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1) 0%, rgba(123, 47, 247, 0.1) 100%);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.cta-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 1rem;
}

.cta-subtitle {
    font-size: clamp(1rem, 2vw, 1.5rem);
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== Footer ===== */
.footer {
    background: var(--bg-darker);
    border-top: 1px solid var(--border-color);
    padding: 4rem 2rem 2rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    margin-bottom: 3rem;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3rem;
}

.footer-logo {
    width: 50px;
    height: 50px;
}

.footer-tagline {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.footer-column h4 {
    margin-bottom: 1rem;
    font-size: 1rem;
    color: var(--text-primary);
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 0.75rem;
}

.footer-column a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-column a:hover {
    color: var(--accent-blue);
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.footer-tech {
    margin-top: 0.5rem;
    color: var(--text-secondary);
}

/* ===== Responsive Design ===== */
@media (max-width: 968px) {
    .hero {
        flex-direction: column;
        text-align: center;
    }

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

    .architecture-diagram {
        flex-direction: column;
    }

    .arch-arrow {
        transform: rotate(90deg);
    }

    .footer-links {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        flex-direction: column;
        background: rgba(10, 10, 15, 0.98);
        width: 100%;
        padding: 2rem;
        gap: 1.5rem;
        transition: left 0.3s ease;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: flex;
    }

    section {
        padding: 4rem 1.5rem;
    }

    .hero {
        padding: 6rem 1.5rem 3rem;
    }

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

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

    .footer-links {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-brand {
        align-items: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .btn-lg {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .code-window {
        font-size: 0.8rem;
    }
}

/* ===== Animations ===== */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Add scroll reveal animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}
