:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: rgba(20, 20, 30, 0.7);
    --text-primary: #f8f9fa;
    --text-secondary: #a0a0b0;
    --accent-blue: #3b82f6;
    --accent-purple: #8b5cf6;
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-bg: rgba(25, 25, 35, 0.6);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Animated Custom Scrollbar Theme (OverlayScrollbars) */
.os-theme-omni {
    --os-size: 14px;
    --os-handle-bg: rgba(59, 130, 246, 0.5);
    --os-handle-bg-hover: rgba(59, 130, 246, 0.8);
    --os-handle-bg-active: rgba(59, 130, 246, 1);
    --os-track-bg: transparent;
    --os-track-bg-hover: transparent;
    --os-track-bg-active: transparent;
}

/* Long Hexagon Shape for the Handles */
.os-theme-omni.os-scrollbar-horizontal .os-scrollbar-handle {
    border-radius: 0 !important;
    clip-path: polygon(0% 50%, 7px 0%, calc(100% - 7px) 0%, 100% 50%, calc(100% - 7px) 100%, 7px 100%);
}

.os-theme-omni.os-scrollbar-vertical .os-scrollbar-handle {
    border-radius: 0 !important;
    clip-path: polygon(50% 0%, 100% 7px, 100% calc(100% - 7px), 50% 100%, 0% calc(100% - 7px), 0% 7px);
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

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

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
    animation: float 20s ease-in-out infinite alternate;
}

.orb-1 {
    top: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent-blue) 0%, transparent 70%);
}

.orb-2 {
    bottom: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-purple) 0%, transparent 70%);
    animation-delay: -5s;
}

.orb-3 {
    top: 40%;
    left: 60%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #0ea5e9 0%, transparent 70%);
    animation-delay: -10s;
}

/* Hexagons */
.glow-hexagon {
    position: absolute;
    opacity: 0.05;
    animation: float 25s ease-in-out infinite alternate-reverse;
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
}

.hex-1 {
    top: 20%;
    right: 5%;
    width: 350px;
    height: 350px;
    background: var(--accent-purple);
    animation-delay: -2s;
}

.hex-2 {
    bottom: 5%;
    left: 15%;
    width: 400px;
    height: 400px;
    background: #0ea5e9;
    animation-delay: -6s;
}

.hex-3 {
    top: 60%;
    left: 50%;
    width: 250px;
    height: 250px;
    background: var(--accent-blue);
    animation-delay: -12s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(50px, 50px) scale(1.1); }
    100% { transform: translate(-20px, 80px) scale(0.9); }
}

/* Glassmorphism Utilities */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

/* Typography */
.gradient-text {
    background: linear-gradient(135deg, #60a5fa, #c084fc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    font-size: 1rem;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.6);
}

.btn-secondary {
    color: var(--text-primary);
}

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

.openvsx-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.openvsx-btn:hover {
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.icon {
    width: 20px;
    height: 20px;
}

/* Navigation */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    border-top: none;
    border-left: none;
    border-right: none;
    border-radius: 0;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    width: 70px;
    height: 70px;
    filter: drop-shadow(0 0 10px rgba(255,255,255,0.2));
}

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

.logo-text .highlight {
    font-weight: 400;
    color: var(--text-secondary);
}

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

.nav-links a:not(.btn):not(.dropdown-item):hover {
    color: var(--accent-blue);
}

/* Dropdown */
.dropdown {
    position: relative;
    display: inline-block;
    outline: none;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    min-width: 160px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    z-index: 1000;
}

.dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.chevron {
    transition: transform 0.3s ease;
}

.dropdown.active .chevron {
    transform: rotate(180deg);
}

.dropdown-item {
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.dropdown-item:first-child {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}
.dropdown-item:last-child {
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

/* Hero Section */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    min-height: calc(100vh - 70px);
    padding-top: 2rem;
    padding-bottom: 4rem;
}

.glass-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #60a5fa;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 90%;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Mock Editor */
.editor-window {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
    transition: transform 0.5s ease;
}

.editor-window:hover {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

.editor-header {
    background: rgba(15, 15, 20, 0.8);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
}

.mac-buttons {
    display: flex;
    gap: 8px;
}

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

.mac-btn.close { background: #ff5f56; }
.mac-btn.minimize { background: #ffbd2e; }
.mac-btn.maximize { background: #27c93f; }

.editor-title {
    flex-grow: 1;
    text-align: center;
    font-family: 'Fira Code', monospace;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-right: 44px; /* Balance mac buttons */
}

.editor-body {
    padding: 1.5rem;
    font-family: 'Fira Code', monospace;
    font-size: 0.95rem;
    line-height: 1.7;
    background: rgba(10, 10, 15, 0.6);
}

.code-line {
    display: block;
}

.indent-1 {
    padding-left: 2rem;
}

.keyword { color: #ff7b72; }
.function { color: #d2a8ff; }
.string { color: #a5d6ff; }

/* Features Section */
.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    padding-top: 4rem;
    padding-bottom: 6rem;
}

@media (max-width: 900px) {
    .features {
        grid-template-columns: 1fr;
    }
}

.feature-card {
    padding: 2.5rem 2rem;
    border-radius: 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top left, rgba(59, 130, 246, 0.1), transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.5), 0 0 20px rgba(59, 130, 246, 0.1);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-icon-wrapper {
    position: relative;
    width: 60px;
    height: 60px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
}

.feature-icon {
    font-size: 1.8rem;
    z-index: 2;
}

.feature-glow {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(59, 130, 246, 0.5);
    filter: blur(20px);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.feature-card:hover .feature-glow {
    opacity: 0.6;
}

.feature-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.95rem;
}

.feature-card code {
    background: rgba(255,255,255,0.1);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.85rem;
    color: var(--accent-blue);
}

/* Supported Languages Section */
.languages {
    padding-bottom: 8rem;
}

.section-header {
    margin-bottom: 3.5rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #f8f9fa, #a0a0b0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto;
}

.lang-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    max-width: 900px;
    margin: 0 auto;
}

.lang-tag {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    padding: 0.75rem 1.5rem;
    border-radius: 30px;
    font-family: 'Fira Code', monospace;
    font-size: 0.95rem;
    color: var(--text-secondary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: default;
    position: relative;
    overflow: hidden;
}

.lang-tag:hover {
    color: #fff;
    border-color: var(--accent-blue);
    background: rgba(59, 130, 246, 0.1);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 20px -10px rgba(59, 130, 246, 0.5);
}

.highlight-tag {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(59, 130, 246, 0.1));
    border-color: rgba(139, 92, 246, 0.3);
    color: #fff;
}

/* Architecture Section */
.arch-diagram-wrapper {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2rem;
    display: flex;
    justify-content: flex-start;
}

@media (min-width: 1200px) {
    .arch-diagram-wrapper {
        justify-content: center;
    }
}

.arch-diagram {
    display: flex;
    flex-direction: row;
    align-items: center;
    min-width: 1000px;
    padding: 2rem;
}

.arch-node {
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem;
    width: 220px;
    height: 90px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, border-color 0.3s ease;
    z-index: 2;
    position: relative;
    box-sizing: border-box;
    flex-shrink: 0;
}

.arch-node:hover {
    transform: translateY(-5px);
    border-color: var(--accent-blue);
    box-shadow: 0 10px 25px rgba(0,0,0,0.4);
}

.highlight-node {
    background: linear-gradient(145deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
}

.arch-icon {
    font-size: 2rem;
}

.arch-text {
    text-align: left;
}

.arch-text h4 {
    margin: 0 0 0.2rem 0;
    font-size: 1rem;
    color: var(--text-primary);
}

.arch-text span {
    font-size: 0.8rem;
    color: var(--accent-blue);
    font-family: 'Fira Code', monospace;
}

.arch-connector {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100px;
    height: 90px;
    flex-shrink: 0;
}

.arch-connector.short {
    width: 70px;
}

.connector-line {
    position: absolute;
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, rgba(255,255,255,0.1), rgba(59, 130, 246, 0.5));
    z-index: 1;
}

.connector-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-primary);
    padding: 0.2rem 0.5rem;
    border-radius: 20px;
    font-size: 0.7rem;
    color: var(--text-secondary);
    border: 1px solid rgba(59, 130, 246, 0.3);
    z-index: 2;
    white-space: nowrap;
}

.split-lines {
    display: block;
    margin: 0;
    overflow: visible;
}

.arch-split {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 60px;
}

.arch-branch {
    display: flex;
    flex-direction: row;
    align-items: center;
    height: 90px;
}

/* Footer */
.footer {
    padding: 2rem 0;
    border-top: 1px solid var(--glass-border);
    color: var(--text-secondary);
    font-size: 0.875rem;
}

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

.footer-links {
    margin-top: 0.5rem;
}

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

/* Responsive Design */
@media (max-width: 992px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }
    
    .hero-subtitle {
        margin: 0 auto 2.5rem auto;
    }

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

    .editor-window {
        transform: none;
        max-width: 600px;
        margin: 0 auto;
    }
}

@media (max-width: 900px) {
    .features {
        grid-template-columns: 1fr;
    }
    
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 2rem;
        gap: 3rem;
    }
    
    .hero-content {
        max-width: 100%;
        align-items: center;
    }
    
    .hero-cta {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .hero-visual {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
        line-height: 1.1;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .nav-links a:not(.btn) {
        display: none;
    }
    
    .language-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .language-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-title {
        font-size: 2rem;
    }
}

/* Feedback Form */
.feedback-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 2.5rem;
    border-radius: 20px;
    margin-bottom: 4rem;
}

.feedback-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: var(--text-primary);
}

.form-control {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-blue);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.feedback-form button {
    margin-top: 1rem;
    align-self: flex-start;
}
