/* ===== CSS Variables & Reset ===== */
:root {
    /* Primary Colors - matching IDE cyan/blue */
    --primary-50: #ecfeff;
    --primary-100: #cffafe;
    --primary-200: #a5f3fc;
    --primary-300: #67e8f9;
    --primary-400: #22d3ee;
    --primary-500: #06b6d4;
    --primary-600: #0891b2;
    --primary-700: #0e7490;
    --primary-800: #155e75;
    --primary-900: #164e63;

    /* Accent Blue - now matching the brighter cyan */
    --accent-400: #22d3ee;
    --accent-500: #22d3ee;
    --accent-600: #0fb9d0;

    /* Neutrals */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Semantic */
    --white: #ffffff;
    --background: #f8fafc;
    --surface: #ffffff;
    --border: #e2e8f0;
    --text-primary: #1e293b;
    --text-secondary: #64748b;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Spacing */
    --nav-height: 64px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ===== Navigation ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: var(--white);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
}

.logo-icon {
    width: 48px;
    height: 48px;
}

.logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Convert to solid cyan color */
    filter: brightness(0) saturate(100%) invert(73%) sepia(68%) saturate(497%) hue-rotate(144deg) brightness(97%) contrast(92%);
}

.logo-icon.small {
    width: 32px;
    height: 32px;
}

.brand-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--accent-500);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--accent-500);
}

.nav-github {
    display: flex;
    align-items: center;
    color: var(--text-secondary);
}

.nav-github:hover {
    color: var(--text-primary);
}

/* ===== Hero Section ===== */
.hero {
    padding-top: calc(var(--nav-height) + 60px);
    padding-bottom: 80px;
    background: linear-gradient(180deg, var(--white) 0%, var(--background) 100%);
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-badge {
    display: inline-block;
    padding: 6px 14px;
    background: var(--primary-50);
    color: var(--primary-700);
    font-size: 13px;
    font-weight: 500;
    border-radius: 20px;
    border: 1px solid var(--primary-200);
    margin-bottom: 20px;
}

.hero h1 {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.1;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.hero h1 .highlight {
    color: var(--accent-500);
}

.hero-description {
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 32px;
    max-width: 480px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 40px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
}

.btn svg {
    width: 18px;
    height: 18px;
}

.btn-primary {
    background: var(--accent-500);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--accent-600);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--white);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--gray-50);
    border-color: var(--gray-300);
}

/* Hero Stats */
.hero-stats {
    display: flex;
    align-items: center;
    gap: 24px;
}

.stat {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--accent-500);
}

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border);
}

/* IDE Preview */
.hero-visual {
    display: flex;
    justify-content: center;
}

.ide-preview {
    width: 100%;
    max-width: 600px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border);
    overflow: hidden;
}

.ide-preview img {
    width: 100%;
    height: auto;
    display: block;
}

.ide-titlebar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--gray-50);
    border-bottom: 1px solid var(--border);
}

.window-controls {
    display: flex;
    gap: 6px;
}

.control {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--gray-300);
}

.control.close {
    background: #f87171;
}

.control.minimize {
    background: #fbbf24;
}

.control.maximize {
    background: #34d399;
}

.ide-title {
    font-size: 12px;
    color: var(--text-secondary);
}

.ide-content {
    display: grid;
    grid-template-columns: 44px 140px 1fr 160px;
    height: 280px;
}

.ide-sidebar {
    background: var(--accent-500);
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-icon {
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 6px;
}

.sidebar-icon.active {
    background: rgba(255, 255, 255, 0.4);
}

.ide-panel {
    background: var(--primary-100);
    padding: 12px;
    border-right: 1px solid var(--border);
}

.panel-header {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

.block-item {
    background: var(--accent-500);
    color: var(--white);
    padding: 8px 10px;
    border-radius: 4px;
    font-size: 11px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.block-item span {
    background: var(--white);
    color: var(--text-primary);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
}

.ide-workspace {
    background: var(--gray-50);
    position: relative;
}

.workspace-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--gray-200) 1px, transparent 1px),
        linear-gradient(90deg, var(--gray-200) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.5;
}

.ide-packages {
    background: var(--white);
    padding: 12px;
    border-left: 1px solid var(--border);
}

.package-tree {
    font-size: 11px;
    color: var(--text-secondary);
}

.tree-item {
    padding: 4px 0;
}

.tree-item.indent {
    padding-left: 16px;
}

/* ===== Features Section ===== */
.features {
    padding: 80px 0;
    background: var(--white);
}

.section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-header h2 {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.section-header p {
    font-size: 18px;
    color: var(--text-secondary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature-card {
    background: var(--gray-50);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 28px;
    transition: all 0.2s;
}

.feature-card:hover {
    border-color: var(--primary-300);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-100);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.feature-icon svg {
    width: 24px;
    height: 24px;
    color: var(--accent-500);
}

.feature-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ===== How It Works ===== */
.how-it-works {
    padding: 80px 0;
    background: var(--background);
}

.steps {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 20px;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 280px;
}

.step-number {
    width: 56px;
    height: 56px;
    background: var(--accent-500);
    color: var(--white);
    font-size: 24px;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.step-content h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.step-content p {
    font-size: 14px;
    color: var(--text-secondary);
}

.step-connector {
    width: 80px;
    height: 2px;
    background: var(--border);
    margin-top: 28px;
}

/* ===== Tutorials Section ===== */
.tutorials {
    padding: 80px 0;
    background: var(--white);
    overflow: hidden;
}

.tutorials-scroll-container {
    margin: 0 -24px;
    padding: 0 24px;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--gray-300) transparent;
}

.tutorials-scroll-container::-webkit-scrollbar {
    height: 6px;
}

.tutorials-scroll-container::-webkit-scrollbar-track {
    background: transparent;
}

.tutorials-scroll-container::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 3px;
}

.tutorials-track {
    display: flex;
    gap: 20px;
    padding-bottom: 16px;
    width: max-content;
}

.tutorial-card {
    width: 280px;
    flex-shrink: 0;
    background: var(--gray-50);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s;
    cursor: pointer;
}

.tutorial-card:hover {
    border-color: var(--primary-300);
    box-shadow: var(--shadow-md);
}

.tutorial-thumbnail {
    height: 160px;
    background: linear-gradient(135deg, var(--primary-200) 0%, var(--primary-300) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.thumbnail-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.play-button {
    width: 56px;
    height: 56px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    transition: transform 0.2s;
}

.tutorial-card:hover .play-button {
    transform: scale(1.1);
}

.play-button svg {
    width: 24px;
    height: 24px;
    color: var(--accent-500);
    margin-left: 3px;
}

.duration {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: var(--white);
    font-size: 11px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 4px;
}

.tutorial-info {
    padding: 16px;
}

.tutorial-info h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.tutorial-info p {
    font-size: 13px;
    color: var(--text-secondary);
}

.scroll-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
    color: var(--text-secondary);
    font-size: 13px;
}

.scroll-hint svg {
    width: 16px;
    height: 16px;
    animation: bounce-right 1s ease-in-out infinite;
}

@keyframes bounce-right {

    0%,
    100% {
        transform: translateX(0);
    }

    50% {
        transform: translateX(4px);
    }
}

/* ===== Download Section ===== */
.download {
    padding: 80px 0;
    background: var(--background);
}

.download-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 48px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 48px;
    align-items: center;
}

.download-content h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.download-content>p {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.system-requirements h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.system-requirements ul {
    list-style: none;
}

.system-requirements li {
    font-size: 14px;
    color: var(--text-secondary);
    padding: 4px 0;
    padding-left: 20px;
    position: relative;
}

.system-requirements li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--accent-500);
    font-weight: 600;
}

.install-note {
    margin-top: 12px;
    font-size: 13px;
    color: var(--accent-500);
    font-style: italic;
}

.download-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-download {
    background: var(--accent-500);
    color: var(--white);
    padding: 16px 32px;
    font-size: 16px;
}

.btn-download:hover {
    background: var(--accent-600);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-download .version {
    font-size: 12px;
    opacity: 0.8;
    margin-left: 8px;
}

.btn-github {
    background: var(--gray-800);
    color: var(--white);
    justify-content: center;
}

.btn-github:hover {
    background: var(--gray-900);
}

/* ===== Footer ===== */
.footer {
    background: var(--white);
    border-top: 1px solid var(--border);
    padding: 40px 0;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--accent-500);
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 14px;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--accent-500);
}

.footer-copyright p {
    font-size: 13px;
    color: var(--text-secondary);
}

/* ===== Responsive Design ===== */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-description {
        max-width: 100%;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .ide-preview {
        max-width: 480px;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .download-card {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .download-actions {
        align-items: center;
    }
}

@media (max-width: 768px) {
    .nav-links {
        gap: 20px;
    }

    .nav-links a:not(.nav-github) {
        display: none;
    }

    .hero h1 {
        font-size: 36px;
    }

    .hero-description {
        font-size: 16px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .ide-content {
        grid-template-columns: 44px 1fr;
    }

    .ide-panel,
    .ide-packages {
        display: none;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .steps {
        flex-direction: column;
        align-items: center;
    }

    .step-connector {
        width: 2px;
        height: 40px;
        margin: 0;
    }

    .footer-container {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 28px;
    }

    .section-header h2 {
        font-size: 28px;
    }

    .download-card {
        padding: 24px;
    }
}

/* ===== Video Modal ===== */
.video-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.video-modal.active {
    display: flex;
}

.video-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    cursor: pointer;
}

.video-modal-content {
    position: relative;
    width: 90%;
    max-width: 900px;
    z-index: 2001;
}

.video-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: var(--white);
    font-size: 32px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.video-modal-close:hover {
    opacity: 0.7;
}

.video-modal video {
    width: 100%;
    border-radius: 12px;
    box-shadow: var(--shadow-xl);
}