:root {
    --bg-color: #05060a;
    --card-bg: rgba(20, 22, 30, 0.6);
    --primary: #4f46e5;
    --primary-light: #818cf8;
    --accent: #06b6d4;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.1);
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

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

html {
    scroll-behavior: smooth;
}

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

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

/* Background Effects */
.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
    opacity: 0.15;
    filter: blur(80px);
    border-radius: 50%;
}

.blob-1 {
    top: -200px;
    right: -100px;
}

.blob-2 {
    bottom: -200px;
    left: -100px;
    background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
}

.grid-overlay {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* Navigation */
#main-nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    padding: 1.5rem 0;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    background: rgba(5, 6, 10, 0.8);
}

#main-nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.logo-img {
    height: 48px;
    width: auto;
    vertical-align: middle;
}

.highlight {
    color: var(--primary-light);
}

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

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.nav-links a:not(.btn-secondary):not(.lang-btn):hover {
    color: var(--primary-light);
}

.lang-switch {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.lang-btn {
    color: var(--text-muted) !important;
    text-decoration: none;
    transition: color 0.3s;
}

.lang-btn.active {
    color: var(--primary-light) !important;
    font-weight: 800;
}

.lang-btn:hover {
    color: #fff !important;
}

.sep {
    opacity: 0.3;
}

/* Hero Section */
.hero {
    padding: 12rem 0 10rem;
    text-align: center;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    background: url('hero-bg.png') no-repeat center center;
    background-size: cover;
    opacity: 0.1;
    z-index: -1;
    mask-image: radial-gradient(circle, black 0%, transparent 70%);
    -webkit-mask-image: radial-gradient(circle, black 0%, transparent 70%);
}

.hero h1 {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -2px;
}

.gradient-text {
    background: linear-gradient(135deg, #fff 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 3rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Buttons */
.btn-primary {
    background: var(--primary);
    color: white;
    padding: 1rem 2rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 10px 20px rgba(79, 70, 229, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(79, 70, 229, 0.4);
}

.btn-outline {
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 1rem 2rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s ease;
    backdrop-filter: blur(5px);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Sections */
.section {
    padding: 8rem 0;
}

.dark-bg {
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 3rem;
    text-align: center;
}

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

.feature-card {
    background: var(--card-bg);
    padding: 3rem 2rem;
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-light);
}

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

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--text-muted);
}

/* API Section */
.api-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.api-text h2 {
    text-align: left;
}

.api-features {
    list-style: none;
    margin-top: 2rem;
}

.api-features li {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
}

.api-features li::before {
    content: '✓';
    color: var(--accent);
    font-weight: bold;
}

.api-code-block {
    background: #0d1117;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    border: 1px solid var(--glass-border);
}

.code-header {
    background: rgba(255,255,255,0.05);
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.red { background: #ff5f56; }
.yellow { background: #ffbd2e; }
.green { background: #27c93f; }

.code-title {
    margin-left: 10px;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

pre {
    padding: 2rem;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

.comment { color: #8b949e; }
.keyword { color: #ff7b72; }
.string { color: #a5d6ff; }

.cursor {
    display: inline-block;
    width: 8px;
    height: 16px;
    background-color: #a5d6ff; /* Matches string color for a unified look or white for terminal cursor */
    vertical-align: middle;
    margin-left: 4px;
    animation: blink 1s step-end infinite;
}

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


/* Github Section */
.max-600 {
    max-width: 600px;
    margin: 0 auto 3rem;
    font-size: 1.1rem;
    color: var(--text-muted);
}

.github-stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
    margin-bottom: 3rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-main);
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-github {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    color: #000;
    padding: 1rem 2rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.3s ease;
}

.btn-github:hover {
    opacity: 0.9;
}

/* Footer */
.main-footer {
    padding: 6rem 0 3rem;
    border-top: 1px solid var(--border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-brand p {
    color: var(--text-muted);
    margin-top: 1rem;
    max-width: 300px;
}

.footer-links h4 {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

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

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-bottom a {
    color: var(--primary-light);
    text-decoration: none;
}

/* Animations */
.animate-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }

/* Responsive */
@media (max-width: 968px) {
    .api-content {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .nav-links {
        display: none;
    }
}

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