* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --background: 222.2 84% 4.9%;
    --foreground: 210 40% 98%;
    --card: 217.2 32.6% 12%;
    --card-foreground: 210 40% 98%;
    --border: 217.2 32.6% 17.5%;
    --muted: 217.2 32.6% 17.5%;
    --muted-foreground: 215 20.2% 65.1%;
    --accent: 217.2 32.6% 17.5%;
}

[data-theme="light"] {
    --background: 0 0% 100%;
    --foreground: 222.2 84% 4.9%;
    --card: 0 0% 100%;
    --card-foreground: 222.2 84% 4.9%;
    --border: 214.3 31.8% 91.4%;
    --muted: 210 40% 96.1%;
    --muted-foreground: 215.4 16.3% 46.9%;
    --accent: 210 40% 96.1%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: hsl(var(--background));
    color: hsl(var(--foreground));
    line-height: 1.6;
    overflow-x: hidden;
    transition: background 0.3s ease, color 0.3s ease;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: hsla(var(--background), 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid hsl(var(--border));
    z-index: 100;
    padding: 1rem 0;
}

nav .container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav .logo {
    font-weight: 700;
    font-size: 1.25rem;
    color: hsl(var(--foreground));
}

nav .nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
}

nav a {
    color: hsl(var(--muted-foreground));
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s;
}

nav a:hover {
    color: hsl(var(--foreground));
}

/* Theme Toggle */
.theme-toggle {
    background: hsl(var(--muted));
    border: 1px solid hsl(var(--border));
    border-radius: 0.5rem;
    padding: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    transition: all 0.2s;
}

.theme-toggle:hover {
    background: hsl(var(--accent));
}

.theme-icon {
    font-size: 1.125rem;
    color: hsl(var(--foreground));
}

.desktop-theme-toggle {
    display: flex;
}

.mobile-theme-toggle {
    display: none;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: hsl(var(--muted));
    border: 1px solid hsl(var(--border));
    border-radius: 0.5rem;
    padding: 0.5rem;
    cursor: pointer;
    width: 2.5rem;
    height: 2.5rem;
    align-items: center;
    justify-content: center;
}

.mobile-menu-toggle i {
    font-size: 1.25rem;
    color: hsl(var(--foreground));
}

.mobile-nav {
    display: none;
    position: fixed;
    top: 4.5rem;
    left: 0;
    right: 0;
    background: hsl(var(--background));
    border-bottom: 1px solid hsl(var(--border));
    padding: 1rem 2rem;
    box-shadow: 0 4px 6px hsla(0, 0%, 0%, 0.1);
    z-index: 99;
}

.mobile-nav.active {
    display: block;
}

.mobile-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-nav a {
    color: hsl(var(--foreground));
    text-decoration: none;
    font-weight: 500;
    display: block;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    transition: background 0.2s;
}

.mobile-nav a:hover {
    background: hsl(var(--muted));
}

/* Hero Section */
.hero {
    margin-top: 5rem;
    padding: clamp(3rem, 8vw, 6rem) 2rem clamp(4rem, 10vw, 8rem);
    text-align: center;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: min(800px, 90vw);
    height: min(400px, 50vw);
    background: radial-gradient(circle, hsla(221, 83%, 53%, 0.15), transparent);
    pointer-events: none;
    z-index: -1;
}

[data-theme="light"] .hero::before {
    background: radial-gradient(circle, hsla(221, 83%, 53%, 0.08), transparent);
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: hsl(var(--muted));
    border: 1px solid hsl(var(--border));
    border-radius: 9999px;
    font-size: clamp(0.75rem, 2vw, 0.875rem);
    margin-bottom: 1.5rem;
    color: hsl(var(--foreground));
}

h1 {
    font-size: clamp(2rem, 6vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.gradient-text {
    background: linear-gradient(to right, hsl(var(--foreground)), hsl(var(--muted-foreground)));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: clamp(1rem, 3vw, 1.25rem);
    color: hsl(var(--muted-foreground));
    max-width: 700px;
    margin: 0 auto 2.5rem;
    padding: 0 1rem;
}

.button-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: clamp(0.875rem, 2vw, 0.95rem);
    text-decoration: none;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: hsl(var(--foreground));
    color: hsl(var(--background));
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-secondary {
    background: transparent;
    color: hsl(var(--foreground));
    border: 1px solid hsl(var(--border));
}

.btn-secondary:hover {
    background: hsl(var(--muted));
}

/* Container */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 3vw, 2rem);
}

/* Section */
section {
    padding: clamp(3rem, 8vw, 5rem) 0;
}

h2 {
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.section-header {
    text-align: center;
    margin-bottom: clamp(2rem, 5vw, 4rem);
}

.section-description {
    color: hsl(var(--muted-foreground));
    font-size: clamp(1rem, 2.5vw, 1.125rem);
    max-width: 700px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Feature Cards */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: clamp(1rem, 2vw, 1.5rem);
    margin-top: 3rem;
}

/* Operators Grid - Force 4 columns */
.operators-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(1rem, 2vw, 1.5rem);
    margin-top: 3rem;
}

.feature-card {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: 0.75rem;
    padding: clamp(1.5rem, 3vw, 2rem);
    transition: all 0.3s ease;
}

.feature-card:hover {
    border-color: hsl(var(--muted-foreground));
    transform: translateY(-4px);
    box-shadow: 0 20px 40px hsla(0, 0%, 0%, 0.1);
}

[data-theme="light"] .feature-card:hover {
    box-shadow: 0 20px 40px hsla(0, 0%, 0%, 0.08);
}

.feature-icon {
    width: 3rem;
    height: 3rem;
    background: hsl(var(--muted));
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    font-size: clamp(1.125rem, 2.5vw, 1.25rem);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.feature-card p {
    color: hsl(var(--muted-foreground));
    font-size: clamp(0.875rem, 2vw, 0.95rem);
    line-height: 1.7;
}

/* Benefits Section */
.benefits {
    background: hsl(var(--card));
    border-radius: 1rem;
    padding: clamp(2rem, 4vw, 3rem);
    margin: 3rem 0;
    border: 1px solid hsl(var(--border));
}

.benefits ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
    gap: clamp(1rem, 2vw, 1.5rem);
    margin-top: 2rem;
}

.benefits li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.check-icon {
    width: 1.5rem;
    height: 1.5rem;
    background: hsl(142.1, 76.2%, 36.3%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 0.125rem;
    font-size: 0.875rem;
}

.benefits strong {
    display: block;
    margin-bottom: 0.25rem;
}

.benefits p {
    font-size: clamp(0.875rem, 2vw, 0.95rem);
}

/* Code Sample */
.code-section {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: 0.75rem;
    padding: clamp(1.5rem, 3vw, 2rem);
    margin: 3rem 0;
}

pre {
    background: hsl(var(--muted));
    padding: clamp(1rem, 2vw, 1.5rem);
    border-radius: 0.5rem;
    overflow-x: auto;
    margin-top: 1rem;
    border: 1px solid hsl(var(--border));
}

code {
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: clamp(0.75rem, 2vw, 0.875rem);
    color: hsl(var(--foreground));
}

/* CTA Section */
.cta-section {
    text-align: center;
    padding: clamp(2rem, 5vw, 4rem) clamp(1rem, 3vw, 2rem);
    background: hsl(var(--muted));
    border-radius: 1rem;
    border: 1px solid hsl(var(--border));
}

.cta-section h2 {
    margin-bottom: 1rem;
}

.cta-section p {
    color: hsl(var(--muted-foreground));
    margin-bottom: 2rem;
    font-size: clamp(1rem, 2.5vw, 1.125rem);
}

/* Footer */
footer {
    text-align: center;
    padding: clamp(2rem, 4vw, 3rem) 2rem;
    border-top: 1px solid hsl(var(--border));
    margin-top: clamp(3rem, 6vw, 5rem);
}

footer p {
    color: hsl(var(--muted-foreground));
    font-size: clamp(0.8rem, 2vw, 0.875rem);
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: 0.5rem;
    overflow: hidden;
}

th,
td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid hsl(var(--border));
}

th {
    background: hsl(var(--muted));
    font-weight: 600;
    font-size: 0.875rem;
    color: hsl(var(--foreground));
}

td {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
}

tr:last-child td {
    border-bottom: none;
}

tr:hover {
    background: hsl(var(--muted) / 0.3);
}

/* Comparison Cards */
.comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.comparison-card {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: 0.75rem;
    padding: 1.5rem;
}

.comparison-card h4 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
    color: hsl(var(--foreground));
}

.comparison-card ul {
    list-style: none;
    padding: 0;
}

.comparison-card li {
    padding: 0.5rem 0;
    color: hsl(var(--muted-foreground));
    font-size: 0.875rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.comparison-card li::before {
    content: "→";
    color: hsl(221, 83%, 53%);
    font-weight: bold;
    flex-shrink: 0;
}

/* Content Section Styling */
.content-section {
    margin: 3rem 0;
}

.content-section h3 {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    margin-bottom: 1rem;
    font-weight: 600;
}

.content-section p {
    color: hsl(var(--muted-foreground));
    line-height: 1.7;
    margin-bottom: 1rem;
}

.content-section ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.content-section ul li {
    color: hsl(var(--muted-foreground));
    margin: 0.5rem 0;
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 768px) {
    nav .nav-links {
        display: none;
    }

    .desktop-theme-toggle {
        display: none;
    }

    .mobile-theme-toggle {
        display: flex;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .hero {
        margin-top: 4rem;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .benefits ul {
        grid-template-columns: 1fr;
    }

    .button-group {
        flex-direction: column;
        width: 100%;
        padding: 0 1rem;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    table {
        font-size: 0.75rem;
    }

    th,
    td {
        padding: 0.5rem;
    }

    .comparison-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    nav .container {
        padding: 0 1rem;
    }

    h1 {
        font-size: 1.75rem;
    }

    .badge {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
}