:root {
    /* Color Palette */
    --bg-dark: #0f172a;
    --bg-darker: #020617;
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --accent: #8b5cf6;
    --accent-glow: rgba(99, 102, 241, 0.5);
    --text-light: #f8fafc;
    --text-muted: #94a3b8;
    --border-glass: rgba(255, 255, 255, 0.1);
    --bg-glass: rgba(30, 41, 59, 0.7);
    --bg-glass-hover: rgba(30, 41, 59, 0.9);
    --bg-code: #0d1117;

    /* Syntax Highlighting */
    --keyword: #c084fc;
    --string: #86efac;
    --function: #60a5fa;
    --comment: #6b7280;
    --number: #fbbf24;
    --radius-md: 12px;
    --radius-lg: 20px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-darker);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Abstract Background Effects */
.bg-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(circle at top right, #1e1b4b 0%, var(--bg-darker) 100%);
}

.shape {
    position: absolute;
    filter: blur(80px);
    border-radius: 50%;
    opacity: 0.5;
    animation: float 20s infinite alternate ease-in-out;
}

.shape-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: rgba(99, 102, 241, 0.2);
    animation-delay: 0s;
}

.shape-2 {
    bottom: -20%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: rgba(139, 92, 246, 0.15);
    animation-duration: 25s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(5%, 5%) scale(1.1);
    }
}

/* Global Reusables */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.glass-card {
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.4);
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(2, 6, 23, 0.2);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid transparent;
    padding: 1.2rem 0;
    transition: all 0.3s ease;
}

nav.scrolled {
    background: rgba(2, 6, 23, 0.9);
    border-bottom: 1px solid var(--border-glass);
    padding: 1rem 0;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 1001;
}

.logo i {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: #fff;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a.active {
    color: #fff;
}

.hamburger {
    display: none;
    font-size: 1.5rem;
    color: #fff;
    cursor: pointer;
    z-index: 1001;
}

/* Hero Section */
.hero {
    padding: 12rem 0 6rem;
    text-align: center;
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero h1 {
    font-size: clamp(3rem, 5vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.hero .highlight {
    background: linear-gradient(135deg, var(--primary), var(--accent), #d946ef);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 3rem;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    box-shadow: 0 4px 15px var(--accent-glow);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--accent-glow);
}

.btn-secondary {
    background: var(--bg-glass);
    color: white;
    border: 1px solid var(--border-glass);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Code Display Area */
.code-showcase {
    max-width: 800px;
    margin: 4rem auto 0;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-glass);
    background: var(--bg-darker);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    position: relative;
}

.code-showcase::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0.5;
}

.window-header {
    background: #1e293b;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #0f172a;
}

.window-controls {
    display: flex;
    gap: 8px;
}

.control {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.control.close {
    background: #ff5f56;
}

.control.min {
    background: #ffbd2e;
}

.control.max {
    background: #27c93f;
}

.file-name {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-family: 'JetBrains Mono', monospace;
    display: flex;
    align-items: center;
    gap: 6px;
}

pre {
    padding: 2rem;
    overflow-x: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
    line-height: 1.6;
    background: var(--bg-code);
    margin: 0;
    text-align: left;
}

.keyword {
    color: var(--keyword);
}

.string {
    color: var(--string);
}

.function {
    color: var(--function);
}

.comment {
    color: var(--comment);
    font-style: italic;
}

.number {
    color: var(--number);
}

/* Sections General */
section {
    padding: 6rem 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Features */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.feature-card {
    padding: 2.5rem 2rem;
    text-align: center;
}

.icon-wrapper {
    width: 70px;
    height: 70px;
    margin: 0 auto 1.5rem;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary);
    border: 1px solid rgba(99, 102, 241, 0.2);
    transition: transform 0.3s ease, background 0.3s;
}

.feature-card:hover .icon-wrapper {
    transform: scale(1.1) rotate(5deg);
    background: rgba(99, 102, 241, 0.2);
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-glass);
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 1.25rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid var(--border-glass);
}

th {
    background: rgba(0, 0, 0, 0.2);
    font-weight: 600;
    color: #fff;
    font-size: 1.05rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

td code {
    background: var(--bg-darker);
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: var(--string);
    border: 1px solid var(--border-glass);
}

.translation {
    color: var(--text-muted);
}

/* StdLib Grid */
.stdlib-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.stdlib-card {
    padding: 2rem;
}

.stdlib-card h4 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: #fff;
}

.stdlib-card h4 i {
    color: var(--accent);
}

.stdlib-card ul {
    list-style: none;
}

.stdlib-card li {
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.stdlib-card li:last-child {
    border-bottom: none;
}

.stdlib-card code {
    font-family: 'JetBrains Mono', monospace;
    color: var(--primary);
    margin-right: 10px;
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 6px;
    border-radius: 4px;
}

/* Installation Banner */
.install-section {
    margin: 2rem auto 6rem;
}

.install-box {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.9));
    position: relative;
    overflow: hidden;
}

.install-box::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

.install-command {
    background: #000;
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem 2rem;
    border-radius: 12px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.1rem;
    margin-top: 1.5rem;
    border: 1px solid var(--border-glass);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.prompt {
    color: var(--primary);
}

.command {
    color: #fff;
}

.copy-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.3s;
    font-size: 1.1rem;
}

.copy-btn:hover {
    color: #fff;
}

/* Animations for JS */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.165, 0.84, 0.44, 1), transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 {
    transition-delay: 0.1s;
}

.delay-2 {
    transition-delay: 0.3s;
}

.delay-3 {
    transition-delay: 0.5s;
}

/* Global Footer */
footer {
    border-top: 1px solid var(--border-glass);
    padding: 4rem 0 2rem;
    background: rgba(2, 6, 23, 0.9);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-logo h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer-logo p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.footer-links a:hover {
    color: #fff;
}

.copyright {
    width: 100%;
    text-align: center;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: -100%;
        width: 100%;
        background: rgba(2, 6, 23, 0.95);
        backdrop-filter: blur(20px);
        padding: 2rem;
        transition: left 0.3s ease;
        text-align: center;
    }

    .nav-links.active {
        left: 0;
    }

    .hamburger {
        display: block;
    }

    .hero {
        padding: 8rem 0 4rem;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .install-command {
        font-size: 0.9rem;
        padding: 1rem;
        width: 100%;
        justify-content: space-between;
    }

    section {
        padding: 4rem 1rem;
    }
}