/* ========================================
   XiaoClaw - Modern Tech Style
   ======================================== */

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #1a1a24;
    --accent-cyan: #00d4ff;
    --accent-purple: #7c3aed;
    --accent-gradient: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --text-muted: #606070;
    --border-color: #2a2a3a;
    --shadow-glow: 0 0 40px rgba(0, 212, 255, 0.15);
}

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

html {
    scroll-behavior: smooth;
}

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

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

/* ========================================
   Particles Canvas
   ======================================== */
#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ========================================
   Language Toggle
   ======================================== */
.lang-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.lang-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 6px 14px;
    border-radius: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.lang-btn:hover:not(.active) {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
}

.lang-btn.active {
    color: #fff;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    box-shadow: 0 2px 10px rgba(0, 210, 255, 0.3);
}

.lang-divider {
    display: none;
}

/* ========================================
   Navigation
   ======================================== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
}

.logo-img {
    height: 32px;
    width: auto;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-5px) rotate(5deg); }
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    transition: width 0.3s;
}

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

.nav-links a:hover::after {
    width: 100%;
}

.nav-github {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--bg-card);
    transition: all 0.3s;
}

.nav-github:hover {
    background: var(--accent-purple);
    color: white;
    transform: scale(1.1);
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 120px 24px 80px;
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(0, 212, 255, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 60%, rgba(124, 58, 237, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse 40% 30% at 20% 80%, rgba(0, 212, 255, 0.08) 0%, transparent 50%);
    pointer-events: none;
    animation: bgPulse 8s ease-in-out infinite;
}

@keyframes bgPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 24px;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: #00ff88;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 0 rgba(0, 255, 136, 0.4); }
    50% { opacity: 0.5; transform: scale(1.2); box-shadow: 0 0 0 10px rgba(0, 255, 136, 0); }
}

.hero-title {
    font-size: clamp(48px, 12vw, 100px);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 16px;
}

.title-main {
    display: inline-block;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 80px rgba(0, 212, 255, 0.5);
}

.hero-subtitle {
    font-size: clamp(18px, 3vw, 24px);
    color: var(--text-secondary);
    margin-bottom: 24px;
    min-height: 1.6em;
}

.hero-desc {
    font-size: 16px;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 40px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

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

.btn-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 40px rgba(0, 212, 255, 0.5);
}

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

.btn-secondary:hover {
    background: var(--bg-secondary);
    border-color: var(--accent-cyan);
    transform: translateY(-2px);
}

.hero-stats {
    display: flex;
    gap: 48px;
    justify-content: center;
    margin-top: 60px;
}

.stat {
    text-align: center;
    position: relative;
}

.stat::after {
    content: '';
    position: absolute;
    right: -24px;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 40px;
    background: var(--border-color);
}

.stat:last-child::after {
    display: none;
}

.stat-value {
    display: block;
    font-size: 32px;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 14px;
    color: var(--text-muted);
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 12px;
    animation: bounce 2s infinite;
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    border-right: 2px solid var(--text-muted);
    border-bottom: 2px solid var(--text-muted);
    transform: rotate(45deg);
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
}

/* ========================================
   Section Styles
   ======================================== */
section {
    padding: 100px 0;
    position: relative;
    z-index: 1;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 16px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-desc {
    font-size: 18px;
    color: var(--text-secondary);
}

/* ========================================
   Features Section
   ======================================== */
.features {
    background: var(--bg-secondary);
}

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

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 40px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
    transform: scaleX(0);
    transition: transform 0.3s;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-glow);
}

.feature-card.voice:hover {
    border-color: var(--accent-cyan);
}

.feature-card.agent:hover {
    border-color: var(--accent-purple);
}

.feature-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    transition: transform 0.3s;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
}

.feature-icon svg {
    width: 32px;
    height: 32px;
}

.voice .feature-icon {
    background: rgba(0, 212, 255, 0.1);
    color: var(--accent-cyan);
}

.agent .feature-icon {
    background: rgba(124, 58, 237, 0.1);
    color: var(--accent-purple);
}

.feature-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
}

.feature-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.feature-list {
    list-style: none;
}

.feature-list li {
    padding: 10px 0;
    color: var(--text-secondary);
    font-size: 15px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s;
}

.feature-list li:last-child {
    border-bottom: none;
}

.feature-list li:hover {
    color: var(--text-primary);
    padding-left: 8px;
}

.feature-list li::before {
    content: '✓';
    color: var(--accent-cyan);
    font-weight: bold;
    transition: transform 0.3s;
}

.feature-list li:hover::before {
    transform: scale(1.2);
}

.agent .feature-list li::before {
    color: var(--accent-purple);
}

/* ========================================
   Architecture Section
   ======================================== */
.architecture {
    background: var(--bg-primary);
}

.arch-diagram {
    max-width: 800px;
    margin: 0 auto;
}

.arch-layer {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s;
}

.arch-layer:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-glow);
}

.arch-layer-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 16px;
    text-align: center;
}

.voice-layer .arch-layer-label {
    color: var(--accent-cyan);
}

.agent-layer .arch-layer-label {
    color: var(--accent-purple);
}

.arch-items {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.arch-item {
    background: var(--bg-secondary);
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    transition: all 0.3s;
}

.arch-item:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    transform: translateY(-2px);
}

.agent-layer .arch-item:hover {
    border-color: var(--accent-purple);
    color: var(--accent-purple);
}

.arch-bridge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 24px 0;
}

.bridge-line {
    flex: 1;
    height: 2px;
    background: var(--accent-gradient);
    animation: bridgeGlow 2s infinite;
}

@keyframes bridgeGlow {
    0%, 100% { box-shadow: 0 0 10px rgba(0, 212, 255, 0.3); }
    50% { box-shadow: 0 0 20px rgba(124, 58, 237, 0.5); }
}

.bridge-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    animation: bridgeGlow 2s infinite;
}

/* ========================================
   Hardware Section
   ======================================== */
.hardware {
    background: var(--bg-secondary);
}

.hardware-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
}

.hardware-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 32px 20px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.hardware-card:hover {
    border-color: var(--accent-cyan);
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 20px 40px rgba(0, 212, 255, 0.2);
}

.hardware-icon {
    font-size: 40px;
    margin-bottom: 16px;
    display: block;
    transition: transform 0.3s;
}

.hardware-card:hover .hardware-icon {
    transform: scale(1.2) rotate(10deg);
}

.hardware-card h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
}

/* ========================================
   Quick Start Section
   ======================================== */
.quickstart {
    background: var(--bg-primary);
}

.steps {
    max-width: 700px;
    margin: 0 auto;
}

.step {
    display: flex;
    gap: 24px;
    margin-bottom: 40px;
    position: relative;
}

.step:last-child {
    margin-bottom: 0;
}

.step-number {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent-gradient);
    color: white;
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

.step-content {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s;
}

.step:hover .step-content {
    border-color: var(--accent-cyan);
    transform: translateX(8px);
}

.step-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.step-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.step-code {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    font-family: 'SF Mono', 'Fira Code', Consolas, monospace;
    font-size: 13px;
    color: var(--accent-cyan);
    overflow-x: auto;
}

.step-code code {
    color: var(--text-secondary);
}

.step-code code::before {
    content: '$ ';
    color: var(--text-muted);
}

/* ========================================
   Built On Section
   ======================================== */
.built-on {
    background: var(--bg-primary);
    padding: 100px 0;
}

.built-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 32px;
    max-width: 900px;
    margin: 0 auto;
}

.built-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 40px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.built-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent-gradient);
}

.built-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-purple);
    box-shadow: 0 20px 60px rgba(124, 58, 237, 0.2);
}

.built-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 24px;
    border-radius: 20px;
    background: rgba(124, 58, 237, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s;
}

.built-icon svg {
    width: 36px;
    height: 36px;
    color: var(--accent-purple);
}

.built-card:hover .built-icon {
    transform: scale(1.1) rotate(5deg);
}

.built-card h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.built-card p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.6;
}

.built-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.built-link:hover {
    background: var(--accent-purple);
    border-color: var(--accent-purple);
    color: white;
}

.built-link svg {
    transition: transform 0.3s;
}

.built-link:hover svg {
    transform: scale(1.1);
}

/* ========================================
   Links Section
   ======================================== */
.links {
    background: var(--bg-secondary);
    padding: 80px 0;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.link-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 28px;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.link-card:hover {
    border-color: var(--accent-purple);
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(124, 58, 237, 0.2);
}

.link-icon {
    width: 32px;
    height: 32px;
    color: var(--accent-purple);
    margin-bottom: 16px;
    transition: transform 0.3s;
}

.link-card:hover .link-icon {
    transform: rotate(15deg) scale(1.1);
}

.link-card h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.link-card p {
    font-size: 13px;
    color: var(--text-muted);
}

/* ========================================
   Footer
   ======================================== */
.footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    padding: 48px 0;
}

.footer-content {
    text-align: center;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.footer-text {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 24px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--accent-cyan);
}

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

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hero-stats {
        gap: 24px;
    }

    .stat-value {
        font-size: 24px;
    }

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

    .step {
        flex-direction: column;
        gap: 16px;
    }

    .step-number {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 32px;
    }
}

/* ========================================
   AOS Custom Styles
   ======================================== */
[data-aos] {
    pointer-events: auto !important;
}
