/* ===== Variables ===== */
:root {
    --bg: #050505;
    --bg-secondary: #0a0a0a;
    --bg-card: #0f0f0f;
    --bg-card-hover: #141414;
    --border: #1a1a1a;
    --border-light: #2a2a2a;
    --text: #fafafa;
    --text-secondary: #888888;
    --text-muted: #555555;
    --accent: #f97316;
    --accent-light: #fb923c;
    --accent-dark: #ea580c;
    --accent-glow: rgba(249, 115, 22, 0.5);
    --radius: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; height: auto; }

/* ===== Particles Canvas ===== */
#particles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

/* ===== Cursor Glow ===== */
.cursor-glow {
    position: fixed;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    opacity: 0.15;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s;
    z-index: 1;
}

/* ===== Typography ===== */
h1, h2, h3 { font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.text-gradient {
    background: linear-gradient(135deg, #ff8c42 0%, #f97316 40%, #ea580c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== Animations ===== */
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
@keyframes glow { 0%, 100% { box-shadow: 0 0 20px var(--accent-glow); } 50% { box-shadow: 0 0 40px var(--accent-glow), 0 0 60px var(--accent-glow); } }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.animate-in { opacity: 0; animation: fadeInUp 0.8s ease forwards; }
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
}
.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s;
}
.btn:hover::before { transform: translateX(100%); }
.btn-primary { background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%); color: white; }
.btn-primary:hover { transform: translateY(-2px); }
.btn-glow:hover { box-shadow: 0 0 30px var(--accent-glow), 0 0 60px rgba(249, 115, 22, 0.3); }
.btn-secondary { background: var(--bg-card); color: var(--text); border: 1px solid var(--border-light); }
.btn-secondary:hover { background: var(--bg-card-hover); border-color: var(--text-muted); transform: translateY(-2px); }
.btn-nav { padding: 10px 20px; background: transparent; border: 1px solid var(--border); }
.btn-nav:hover { border-color: var(--accent); background: rgba(249, 115, 22, 0.1); }
.btn-large { padding: 18px 36px; font-size: 16px; border-radius: var(--radius-lg); }

/* ===== Header ===== */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}
header nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 18px; }
.logo img { width: 36px; height: 36px; border-radius: 10px; }
.nav-links { display: flex; gap: 40px; }
.nav-links a { color: var(--text-secondary); font-size: 14px; font-weight: 500; transition: color 0.2s; position: relative; }
.nav-links a::after { content: ''; position: absolute; bottom: -4px; left: 0; width: 0; height: 2px; background: var(--accent); transition: width 0.3s; }
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }
.nav-right { display: flex; align-items: center; gap: 16px; }
.lang-switch {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
.lang-switch:hover { border-color: var(--accent); color: var(--text); }
.mobile-menu-btn { display: none; flex-direction: column; gap: 6px; background: none; border: none; cursor: pointer; padding: 8px; }
.mobile-menu-btn span { width: 24px; height: 2px; background: var(--text); transition: all 0.3s; border-radius: 2px; }

/* ===== Hero ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding: 120px 0 80px;
    overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; overflow: hidden; }
.hero-gradient {
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 150%;
    height: 100%;
    background: radial-gradient(ellipse 50% 80% at 50% 0%, var(--accent-glow) 0%, transparent 60%);
    opacity: 0.4;
}
.hero-grid {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 80% 50% at 50% 0%, black 0%, transparent 70%);
}
.hero .container { 
    display: flex; 
    gap: 80px; 
    align-items: center; 
    justify-content: space-between;
    position: relative; 
    z-index: 2; 
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 60px;
}
.hero-content { 
    flex: 1;
    max-width: 520px;
}
.hero-visual {
    flex: 0 0 auto;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(249, 115, 22, 0.08);
    border: 1px solid rgba(249, 115, 22, 0.2);
    border-radius: 100px;
    font-size: 12px;
    color: var(--accent-light);
    margin-bottom: 24px;
}
.badge-dot { width: 5px; height: 5px; background: var(--accent); border-radius: 50%; animation: pulse 2s infinite; }
.hero h1 { font-size: 56px; margin-bottom: 24px; font-weight: 800; }
.hero-desc { font-size: 16px; color: var(--text-secondary); margin-bottom: 36px; line-height: 1.7; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 40px; }
.hero-stats { display: flex; gap: 28px; }
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat-value { font-size: 16px; font-weight: 600; }
.stat-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; }
.stat-divider { width: 1px; background: var(--border); }

/* ===== Hero Visual ===== */
.hero-visual { position: relative; }
.phone-mockup { position: relative; animation: float 6s ease-in-out infinite; }
.phone-frame {
    width: 260px;
    height: 540px;
    background: linear-gradient(145deg, #222 0%, #111 100%);
    border-radius: 36px;
    padding: 8px;
    box-shadow: 0 40px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.08);
    position: relative;
}
.phone-notch {
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 24px;
    background: #000;
    border-radius: 16px;
    z-index: 10;
}
.phone-screen { width: 100%; height: 100%; background: #000; border-radius: 30px; overflow: hidden; }
.phone-screen img { width: 100%; height: 100%; object-fit: cover; }
.phone-reflection {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.06) 0%, transparent 40%);
    border-radius: 36px;
    pointer-events: none;
}
.floating-cards { position: absolute; inset: -60px; pointer-events: none; }
.float-card {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(20,20,20,0.9);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text);
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    backdrop-filter: blur(10px);
    animation: float 5s ease-in-out infinite;
}
.float-card svg { color: var(--accent); }
.card-1 { top: 10%; left: 0; animation-delay: 0s; }
.card-2 { top: 45%; right: -10%; animation-delay: 1.5s; }
.card-3 { bottom: 15%; left: -5%; animation-delay: 0.8s; }

/* ===== Sections ===== */
section { padding: 140px 0; position: relative; }
.section-header { text-align: center; margin-bottom: 72px; }
.section-tag {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(249, 115, 22, 0.1);
    border: 1px solid rgba(249, 115, 22, 0.2);
    border-radius: 100px;
    font-size: 11px;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 0.1em;
    margin-bottom: 20px;
}
.section-header h2 { font-size: 44px; margin-bottom: 16px; }
.section-header p { font-size: 18px; color: var(--text-secondary); max-width: 500px; margin: 0 auto; }

/* ===== Features ===== */
.features { background: var(--bg-secondary); }
.features::before, .features::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-light), transparent);
}
.features::before { top: 0; }
.features::after { bottom: 0; }
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature-card {
    position: relative;
    padding: 36px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}
.card-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: radial-gradient(ellipse at 50% 0%, var(--accent-glow) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
}
.feature-card:hover { border-color: var(--border-light); transform: translateY(-8px); }
.feature-card:hover .card-glow { opacity: 0.15; }
.feature-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.2) 0%, rgba(249, 115, 22, 0.05) 100%);
    border: 1px solid rgba(249, 115, 22, 0.3);
    border-radius: var(--radius);
    margin-bottom: 24px;
    color: var(--accent);
}
.feature-card h3 { font-size: 20px; margin-bottom: 12px; }
.feature-card p { font-size: 14px; color: var(--text-secondary); line-height: 1.7; }

/* ===== Code Demo ===== */
.code-demo { padding: 0 0 120px; }
.demo-window {
    background: #282c34;
    border: 1px solid #3e4451;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 40px 80px rgba(0,0,0,0.5);
}
.window-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    background: #21252b;
    border-bottom: 1px solid #3e4451;
}
.window-dots { display: flex; gap: 8px; }
.window-dots span { width: 12px; height: 12px; border-radius: 50%; }
.window-dots span:nth-child(1) { background: #ff5f57; }
.window-dots span:nth-child(2) { background: #febc2e; }
.window-dots span:nth-child(3) { background: #28c840; }
.window-tabs { display: flex; gap: 2px; margin-left: 16px; }
.window-tabs .tab {
    padding: 6px 16px;
    font-size: 13px;
    color: #5c6370;
    border-radius: 6px 6px 0 0;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'JetBrains Mono', monospace;
}
.window-tabs .tab.active { background: #282c34; color: #abb2bf; }
.window-body { display: grid; grid-template-columns: 1.2fr 1fr; min-height: 400px; }
.code-content {
    padding: 20px 24px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 15px;
    line-height: 1.7;
    border-right: 1px solid #3e4451;
    background: #282c34;
    overflow-x: auto;
}
.code-content pre { margin: 0; }
.code-content .line { display: block; white-space: pre; }
.code-content .ln { display: inline-block; width: 32px; color: #4b5263; user-select: none; text-align: right; padding-right: 16px; }
.code-content .kw { color: #c678dd; }
.code-content .str { color: #98c379; }
.code-content .fn { color: #61afef; }
.code-content .num { color: #d19a66; }
.code-content .type { color: #e5c07b; }
.code-content .op { color: #56b6c2; }
.code-content .cm { color: #5c6370; font-style: italic; }
.code-content .default { color: #abb2bf; }
.terminal-panel { display: flex; flex-direction: column; background: #1e2127; }
.terminal-header { display: flex; gap: 2px; padding: 8px 12px; border-bottom: 1px solid #3e4451; background: #21252b; }
.terminal-tab { padding: 4px 12px; font-size: 12px; color: #5c6370; border-radius: 4px; font-family: 'JetBrains Mono', monospace; }
.terminal-tab.active { background: #1e2127; color: #e06c75; }
.terminal-content { padding: 16px; font-family: 'JetBrains Mono', monospace; font-size: 14px; flex: 1; background: #1e2127; }
.term-line { line-height: 1.8; color: #abb2bf; }
.term-line .prompt { color: #98c379; }
.term-line.output { color: #61afef; }
.term-line .cursor { animation: blink 1s infinite; color: #528bff; }
.typing-cursor { display: inline-block; width: 2px; height: 1.1em; background: #528bff; margin-left: 2px; animation: blink 1s infinite; vertical-align: text-bottom; }

/* ===== Languages ===== */
.languages { padding: 100px 0; }
.lang-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    max-width: 900px;
    margin: 0 auto;
}
.lang-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    cursor: default;
}
.lang-item:hover {
    border-color: var(--accent);
    background: rgba(249, 115, 22, 0.05);
    transform: translateY(-2px);
}
.lang-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.lang-dot.cpp { background: #00599C; }
.lang-dot.python { background: #3776AB; }
.lang-dot.java { background: #ED8B00; }
.lang-dot.js { background: #F7DF1E; }
.lang-dot.ts { background: #3178C6; }
.lang-dot.go { background: #00ADD8; }
.lang-dot.rust { background: #DEA584; }
.lang-dot.lua { background: #000080; }
.lang-dot.csharp { background: #512BD4; }
.lang-dot.kotlin { background: #7F52FF; }

/* ===== Download ===== */
.download { padding: 100px 0 160px; }
.download-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 80px;
    text-align: center;
    overflow: hidden;
}
.download-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 60% 50% at 50% 0%, var(--accent-glow) 0%, transparent 60%);
    opacity: 0.2;
}
.download-content { position: relative; z-index: 1; }
.download-content h2 { font-size: 40px; margin-bottom: 16px; }
.download-content > p { font-size: 18px; color: var(--text-secondary); margin-bottom: 40px; }
.download-content .btn { margin-bottom: 48px; }
.download-meta { display: flex; justify-content: center; gap: 64px; margin-bottom: 32px; }
.meta-item { display: flex; flex-direction: column; gap: 6px; }
.meta-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; }
.meta-value { font-size: 16px; font-weight: 600; }
.download-hash {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 12px;
    color: var(--text-muted);
}
.download-hash code {
    font-family: 'JetBrains Mono', monospace;
    background: var(--bg);
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 11px;
    border: 1px solid var(--border);
}

/* ===== Footer ===== */
footer { border-top: 1px solid var(--border); padding: 48px 0; }
.footer-content { display: flex; justify-content: space-between; align-items: center; margin-bottom: 32px; }
.footer-brand { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.footer-brand img { width: 28px; height: 28px; border-radius: 8px; }
.footer-links { display: flex; gap: 32px; }
.footer-links a { font-size: 14px; color: var(--text-secondary); transition: color 0.2s; }
.footer-links a:hover { color: var(--text); }
.footer-bottom { text-align: center; padding-top: 32px; border-top: 1px solid var(--border); }
.footer-bottom p { font-size: 13px; color: var(--text-muted); }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .hero .container { 
        grid-template-columns: 1fr; 
        text-align: center; 
        gap: 40px; 
        justify-items: center; 
    }
    .hero-content { max-width: 500px; }
    .hero-visual { justify-self: center; order: -1; }
    .hero-actions { justify-content: center; }
    .hero-stats { justify-content: center; }
    .floating-cards { display: none; }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .window-body { grid-template-columns: 1fr; }
    .code-content { border-right: none; border-bottom: 1px solid var(--border); }
    .lang-orbit { width: 350px; height: 350px; }
    .lang-ring.ring-1 { width: 180px; height: 180px; margin: -90px 0 0 -90px; }
    .lang-ring.ring-2 { width: 300px; height: 300px; margin: -150px 0 0 -150px; }
    .ring-1 .lang-node { transform: rotate(calc(360deg / var(--total) * var(--i))) translateX(90px) rotate(calc(-360deg / var(--total) * var(--i))); }
    .ring-2 .lang-node { transform: rotate(calc(360deg / var(--total) * var(--i))) translateX(150px) rotate(calc(-360deg / var(--total) * var(--i))); }
}

@media (max-width: 768px) {
    .nav-links, .nav-right { display: none; }
    .mobile-menu-btn { display: flex; }
    .hero { padding: 100px 0 60px; min-height: auto; }
    .hero .container { gap: 30px; padding: 0 16px; }
    .hero h1 { font-size: 32px; }
    .hero-desc { font-size: 15px; }
    .hero-stats { flex-wrap: wrap; gap: 20px; }
    .stat-divider { display: none; }
    .phone-frame { width: 220px; height: 460px; border-radius: 30px; }
    .phone-notch { width: 70px; height: 20px; }
    .phone-screen { border-radius: 24px; }
    section { padding: 80px 0; }
    .section-header h2 { font-size: 28px; }
    .section-header p { font-size: 15px; }
    .features-grid { grid-template-columns: 1fr; gap: 16px; }
    .feature-card { padding: 24px; }
    .lang-grid { gap: 8px; }
    .lang-item { padding: 10px 14px; font-size: 13px; }
    .lang-orbit { width: 280px; height: 280px; }
    .lang-ring.ring-1 { width: 140px; height: 140px; margin: -70px 0 0 -70px; }
    .lang-ring.ring-2 { width: 240px; height: 240px; margin: -120px 0 0 -120px; }
    .ring-1 .lang-node { transform: rotate(calc(360deg / var(--total) * var(--i))) translateX(70px) rotate(calc(-360deg / var(--total) * var(--i))); }
    .ring-2 .lang-node { transform: rotate(calc(360deg / var(--total) * var(--i))) translateX(120px) rotate(calc(-360deg / var(--total) * var(--i))); }
    .lang-node span { padding: 8px 12px; font-size: 10px; }
    .download { padding: 80px 0 100px; }
    .download-card { padding: 40px 20px; border-radius: var(--radius-lg); }
    .download-content h2 { font-size: 24px; }
    .download-content > p { font-size: 15px; margin-bottom: 30px; }
    .download-meta { flex-direction: column; gap: 16px; }
    .download-hash { flex-direction: column; gap: 8px; }
    .download-hash code { font-size: 9px; word-break: break-all; }
    .footer-content { flex-direction: column; gap: 24px; }
    .footer-links { flex-wrap: wrap; justify-content: center; gap: 20px; }
    .btn { padding: 12px 24px; font-size: 13px; }
    .btn-large { padding: 14px 28px; font-size: 14px; }
}
