:root {
    --primary-color: #4D6BFE;
    --primary-hover: #3D5BEE;
    --secondary-color: #10B981;
    --accent-color: #F59E0B;
    --bg-color: #FAFAFA;
    --bg-secondary: #FFFFFF;
    --text-main: #111827;
    --text-muted: #4B5563;
    --text-light: #9CA3AF;
    --border-color: #E5E7EB;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --card-hover-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
    --header-height: 70px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #0F172A;
        --bg-secondary: #1E293B;
        --text-main: #F9FAFB;
        --text-muted: #D1D5DB;
        --text-light: #9CA3AF;
        --border-color: #374151;
        --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
        --card-hover-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
    }
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Fix browser autofill background in dark mode */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px var(--bg-secondary) inset !important;
    -webkit-text-fill-color: var(--text-main) !important;
    caret-color: var(--text-main);
    transition: background-color 5000s ease-in-out 0s;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--text-main);
}

h1 {
    font-size: 3.5rem;
    background: linear-gradient(135deg, var(--primary-color), #818CF8);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 2.25rem;
    margin-bottom: 2rem;
    text-align: center;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--primary-hover);
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
}

@media (prefers-color-scheme: dark) {
    header {
        background: rgba(15, 23, 42, 0.8);
    }
}

nav {
    max-width: 1100px;
    height: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-main);
}

.logo img {
    width: 32px;
    height: 32px;
}

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

.nav-links a {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
}

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

.github-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.github-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.language-switch {
    padding: 0.4rem 0.8rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-main) !important;
    border-radius: 12px;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.language-switch:hover {
    border-color: var(--primary-color);
    color: var(--primary-color) !important;
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
}

.mobile-menu-btn svg {
    width: 24px;
    height: 24px;
}

/* Announcement Banner */
.announcement-banner {
    margin-top: var(--header-height);
    background: linear-gradient(90deg, #4F46E5 0%, #818CF8 100%);
    color: white;
    padding: 0.5rem;
    text-align: center;
    font-size: 0.95rem;
}

.announcement-content {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.new-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.3rem 0.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
}

.announcement-button {
    background: white;
    color: var(--primary-color);
    padding: 0.1rem 0.4rem;
    border-radius: 16px;
    font-weight: 600;
    font-size: 0.75rem;
    transition: transform 0.2s;
}

.announcement-button:hover {
    color: var(--primary-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Main Layout */
main {
    padding: 0 1.5rem;
}

/* Hero Section */
.hero {
    max-width: 1100px;
    margin: 5rem auto 8rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
}

.hero-content p:not(.install-note) {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 540px;
}

.cta-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    border-radius: 16px;
    font-weight: 600;
    transition: all 0.2s;
}

.cta-button.primary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(79, 70, 229, 0.39);
}

.cta-button.primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 6px 20px 0 rgba(79, 70, 229, 0.23);
}

.cta-button.secondary {
    background: var(--bg-secondary);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.cta-button.secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.install-note {
    font-size: 1.0rem;
    color: var(--accent-color);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(245, 158, 11, 0.1);
    padding: 0.4rem 0.8rem;
    border-radius: 16px;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.install-note svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.product-hunt-badge {
    margin-top: 1.5rem;
    display: inline-block;
}

.product-hunt-badge img {
    border-radius: 8px;
    transition: transform 0.2s;
}

.product-hunt-badge .ph-dark {
    display: none;
}

@media (prefers-color-scheme: dark) {
    .product-hunt-badge .ph-light {
        display: none;
    }

    .product-hunt-badge .ph-dark {
        display: inline-block;
    }
}

.product-hunt-badge:hover img {
    transform: scale(1.02);
}

.hero-image {
    position: relative;
}

.carousel {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--card-hover-shadow);
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    position: relative;
    aspect-ratio: 16/10;
}

.carousel-container {
    display: flex;
    height: 100%;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-slide {
    width: 100%;
    height: 100%;
    object-fit: cover;
    flex-shrink: 0;
}

.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    transition: all 0.2s;
}

.carousel-button:hover {
    background: white;
    transform: translateY(-50%);
}

.carousel-button.prev {
    left: 1rem;
}

.carousel-button.next {
    right: 1rem;
}

.carousel-dots {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 20px;
    backdrop-filter: blur(4px);
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.2s;
}

.dot.active {
    background: white;
    transform: scale(1.2);
}

/* Features Section */
.features {
    max-width: 1100px;
    margin: 0 auto 8rem;
}

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

.feature-card {
    background: var(--bg-secondary);
    padding: 2.0rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
}

.feature-icon {
    width: 56px;
    height: 56px;
    padding: 12px;
    background: rgba(79, 70, 229, 0.1);
    border-radius: 12px;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    stroke-width: 1.5;
    fill: none;
    stroke: currentColor;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

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

/* Install Section */
.install {
    max-width: 1100px;
    margin: 0 auto 8rem;
    text-align: center;
}

.install-steps {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.step {
    flex: 1;
    min-width: 280px;
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    position: relative;
}

.step-number {
    width: 48px;
    height: 48px;
    background: var(--primary-color);
    color: white;
    font-size: 1.25rem;
    font-weight: 700;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.3);
}

/* Compatibility Section */
.compatibility {
    margin-bottom: 8rem;
}

.table-container {
    max-width: 1000px;
    margin: 0 auto;
    background: var(--bg-secondary);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: var(--card-shadow);
}

.compatibility-table {
    width: 100%;
    border-collapse: collapse;
}

.compatibility-table th {
    background: rgba(79, 70, 229, 0.05);
    padding: 1.0rem;
    font-weight: 600;
    text-align: center;
    color: var(--text-main);
}

.compatibility-table td {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-muted);
}

.compatibility-table tr:hover td {
    background: rgba(0, 0, 0, 0.01);
}

.compatibility-table td:first-child {
    text-align: left;
    padding-left: 2rem;
    font-weight: 600;
    color: var(--text-main);
}

/* Status Badges */
.supported,
.not-supported,
.partial {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 600;
}

.supported {
    background: rgba(16, 185, 129, 0.1);
    color: var(--secondary-color);
}

.not-supported {
    background: rgba(239, 68, 68, 0.1);
    color: #EF4444;
}

.partial {
    background: rgba(245, 158, 11, 0.1);
    color: var(--accent-color);
}

.compatibility-note {
    text-align: center;
    margin-top: 2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    background: rgba(79, 70, 229, 0.05);
    padding: 1rem;
    border-radius: 8px;
    display: inline-block;
    left: 50%;
    position: relative;
    transform: translateX(-50%);
}

/* Usage / Demo */
.usage {
    text-align: center;
    margin-bottom: 8rem;
}

.demo-video {
    max-width: 1000px;
    margin: 0 auto;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--card-hover-shadow);
    background: black;
    border: 4px solid var(--bg-secondary);
}

.video-container {
    position: relative;
    padding-top: 56.25%;
    /* 16:9 Aspect Ratio */
    height: 0;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Footer */
footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 4rem 1.5rem;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    margin-bottom: 2rem;
}

.footer-links a {
    color: var(--text-muted);
    font-weight: 500;
}

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

/* Responsive */
@media (max-width: 768px) {
    :root {
        --header-height: 60px;
    }

    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        margin-top: 2rem;
        gap: 3rem;
    }

    .hero-content p {
        margin-left: auto;
        margin-right: auto;
    }

    .cta-buttons {
        justify-content: center;
    }

    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .nav-links.mobile-active {
        display: flex !important;
        flex-direction: column;
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background: var(--bg-secondary);
        padding: 2rem;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        border-bottom: 1px solid var(--border-color);
    }

    .install-steps {
        flex-direction: column;
    }

    .compatibility-table {
        display: block;
        overflow-x: auto;
    }

    .compatibility-table td,
    .compatibility-table th {
        white-space: nowrap;
        padding: 0.75rem;
    }
}