/* CleverTree Landing Page Styles */
/* Premium Production Design */

:root {
    /* Backgrounds */
    --bg-primary: #0a0f1a;
    --bg-surface: #111827;
    --bg-elevated: #1f2937;
    --bg-hover: #374151;

    /* Text */
    --text-primary: #f9fafb;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;

    /* Brand Colors - Teal */
    --primary: #14b8a6;
    --primary-hover: #0d9488;
    --primary-light: #2dd4bf;
    --primary-glow: rgba(20, 184, 166, 0.3);

    /* Accent */
    --accent: #22d3ee;
    --accent-purple: #a78bfa;

    /* Borders */
    --border: rgba(255, 255, 255, 0.1);
    --border-light: rgba(255, 255, 255, 0.05);

    /* Semantic */
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;

    /* Gradients */
    --gradient-text: linear-gradient(135deg, #14b8a6 0%, #22d3ee 50%, #a78bfa 100%);
    --gradient-hero: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(20, 184, 166, 0.15), transparent);

    /* Spacing */
    --container-max: 1200px;
    --section-padding: 100px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 25px 50px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 60px rgba(20, 184, 166, 0.2);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms ease;
}

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Compensate for fixed header when scrolling to anchors */
section[id] {
    scroll-margin-top: 90px; /* 72px header + 18px padding */
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Container */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

a {
    color: var(--primary-light);
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 15px;
    transition: all var(--transition-base);
    cursor: pointer;
    border: none;
    text-decoration: none;
}

.btn svg {
    flex-shrink: 0;
}

.btn-primary {
    background: var(--primary);
    color: var(--bg-primary);
    box-shadow: 0 0 20px var(--primary-glow);
}

.btn-primary:hover {
    background: var(--primary-hover);
    color: var(--bg-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 30px var(--primary-glow);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: var(--bg-elevated);
    border-color: var(--primary);
    color: var(--text-primary);
}

.btn-large {
    padding: 16px 32px;
    font-size: 16px;
    border-radius: 12px;
}

.btn-download {
    width: 100%;
    justify-content: center;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 15, 26, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    transition: all var(--transition-base);
}

.header.scrolled {
    background: rgba(10, 15, 26, 0.95);
    border-bottom-color: var(--border);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    gap: 32px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 20px;
    text-decoration: none;
}

.logo:hover {
    color: var(--text-primary);
}

.logo-svg {
    flex-shrink: 0;
}

.nav {
    display: flex;
    gap: 36px;
    margin-right: auto;
    margin-left: 48px;
}

.nav a {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: color var(--transition-fast);
}

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

.header-cta {
    padding: 10px 20px;
    font-size: 14px;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.mobile-menu-btn span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition-fast);
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Hero */
.hero {
    padding: 160px 0 80px;
    text-align: center;
    background: var(--gradient-hero);
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-glow), transparent);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.badge-icon {
    font-size: 16px;
}

.badge-divider {
    color: var(--text-muted);
}

.badge-free {
    color: var(--success);
    font-weight: 600;
}

.hero-title {
    font-size: clamp(40px, 6vw, 64px);
    margin-bottom: 24px;
    line-height: 1.1;
}

.gradient-text {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

/* Hero Screenshot */
.hero-screenshot {
    position: relative;
    max-width: 900px;
    margin: 0 auto 48px;
}

.hero-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 60%;
    background: radial-gradient(ellipse, var(--primary-glow), transparent 70%);
    z-index: -1;
    filter: blur(60px);
}

/* macOS Window Frame */
.macos-window {
    background: var(--bg-surface);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-xl), var(--shadow-glow);
    border: 1px solid var(--border);
}

.macos-window-small {
    border-radius: 10px;
}

.macos-window-light {
    background: #f5f5f7;
    border-color: rgba(0, 0, 0, 0.1);
}

.macos-window-light .macos-titlebar {
    background: #e5e5e7;
}

.macos-titlebar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border-light);
}

.macos-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--text-muted);
}

.macos-btn.close { background: #ff5f57; }
.macos-btn.minimize { background: #febc2e; }
.macos-btn.maximize { background: #28c840; }

.macos-title {
    flex: 1;
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    margin-right: 36px;
}

.macos-content {
    position: relative;
}

.macos-content img {
    display: block;
    width: 100%;
    height: auto;
    /* Reserve space to prevent layout shift during lazy loading */
    aspect-ratio: 1071 / 857;
    object-fit: contain;
    background: var(--bg-elevated);
    cursor: zoom-in;
    transition: transform var(--transition-base);
}

.macos-content img:hover {
    transform: scale(1.01);
}

/* Hero Stats */
.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 32px;
    font-weight: 800;
    color: var(--primary-light);
    letter-spacing: -0.02em;
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border);
}

/* Hero Platforms */
.hero-platforms {
    display: flex;
    gap: 24px;
    justify-content: center;
    flex-wrap: wrap;
}

.platform {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 14px;
}

.platform svg {
    opacity: 0.7;
}

/* Hero Languages */
.hero-languages {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 32px;
    padding: 16px 24px;
    background: rgba(20, 184, 166, 0.08);
    border: 1px solid rgba(20, 184, 166, 0.2);
    border-radius: 100px;
}

.hero-lang-label {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

.hero-flags {
    display: flex;
    gap: 8px;
}

.hero-flag {
    font-size: 20px;
    cursor: default;
    transition: transform var(--transition-fast);
}

.hero-flag:hover {
    transform: scale(1.2);
}

/* Badge languages highlight */
.badge-languages {
    color: var(--primary-light);
    font-weight: 600;
}

/* Section Styles */
.section-header {
    text-align: center;
    margin-bottom: 64px;
    opacity: 0;
    transform: translateY(20px);
}

.section-header.animate-in {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.6s ease-out;
}

.section-badge {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(20, 184, 166, 0.1);
    border: 1px solid rgba(20, 184, 166, 0.2);
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.section-title {
    font-size: clamp(28px, 4vw, 40px);
    margin-bottom: 16px;
}

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

/* Visualizations Section */
.visualizations {
    padding: var(--section-padding) 0;
    background: var(--bg-surface);
}

.viz-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 48px;
    flex-wrap: wrap;
}

.viz-tab {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-base);
}

.viz-tab:hover {
    background: var(--bg-elevated);
    border-color: var(--primary);
    color: var(--text-primary);
}

.viz-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--bg-primary);
}

.viz-tab.active svg {
    stroke: var(--bg-primary);
}

.viz-showcase {
    position: relative;
}

.viz-content {
    display: none;
    grid-template-columns: 1fr 1.5fr;
    gap: 48px;
    align-items: center;
    opacity: 0;
    transform: translateY(20px);
}

.viz-content.active {
    display: grid;
}

.viz-content.animate-in {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.5s ease-out;
}

.viz-description h3 {
    font-size: 28px;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.viz-description p {
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.7;
}

.viz-features {
    list-style: none;
}

.viz-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.viz-features li::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
}

.viz-image {
    position: relative;
}

/* Themes Section */
.themes {
    padding: var(--section-padding) 0;
}

.theme-showcase {
    max-width: 900px;
    margin: 0 auto;
}

.theme-toggle-container {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 32px;
}

.theme-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-base);
}

.theme-toggle:hover {
    background: var(--bg-elevated);
    border-color: var(--primary);
}

.theme-toggle.active {
    background: var(--bg-elevated);
    border-color: var(--primary);
    color: var(--text-primary);
}

.theme-images {
    position: relative;
}

.theme-image {
    display: none;
}

.theme-image.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}

/* Features Section */
.features {
    padding: var(--section-padding) 0;
    background: var(--bg-surface);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    align-items: stretch;
}

.features-grid > .feature-card {
    display: flex;
    flex-direction: column;
}

.features-grid > .feature-card > p {
    flex: 1;
}

.feature-card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
    transition: all var(--transition-base);
    opacity: 0;
    transform: translateY(20px);
}

.feature-card.animate-in {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.5s ease-out;
}

.feature-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-card.feature-highlight {
    grid-column: span 1;
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.1), rgba(20, 184, 166, 0.02));
    border-color: rgba(20, 184, 166, 0.3);
}

.feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: var(--bg-elevated);
    border-radius: 12px;
    margin-bottom: 20px;
    color: var(--primary-light);
}

.feature-icon-large {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    background: var(--bg-elevated);
    border-radius: 16px;
    margin-bottom: 24px;
    color: var(--primary-light);
}

.feature-card h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--text-primary);
}

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

/* Swap GUI+CLI and History cards on desktop only */
@media (min-width: 769px) {
    .feature-card.feature-gui-cli {
        order: 7;
    }
    .feature-card.feature-history {
        order: 4;
    }
    /* Don't stretch paragraph in cross-platform card */
    .feature-card.feature-crossplatform > p {
        flex: none;
    }
}

.feature-stat {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.feature-stat-number {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-light);
}

.feature-stat-label {
    font-size: 13px;
    color: var(--text-muted);
}

/* Language badges for i18n feature */
.feature-languages {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.lang-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.lang-badge .flag {
    font-size: 16px;
    line-height: 1;
}

.lang-badge:hover {
    border-color: var(--primary);
    color: var(--primary-light);
    background: rgba(20, 184, 166, 0.1);
}

/* Platform badges for cross-platform feature */
.feature-platforms {
    display: flex;
    gap: 8px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.platform-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(20, 184, 166, 0.1);
    border: 1px solid rgba(20, 184, 166, 0.3);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-light);
    transition: all var(--transition-fast);
    flex: 1;
}

.platform-badge svg {
    flex-shrink: 0;
}

.platform-badge:hover {
    border-color: var(--primary);
    background: rgba(20, 184, 166, 0.15);
}

/* Free Banner Section */
.free-banner {
    padding: 80px 0;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(20, 184, 166, 0.05));
    border-top: 1px solid rgba(34, 197, 94, 0.2);
    border-bottom: 1px solid rgba(34, 197, 94, 0.2);
}

.free-content {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 48px;
    align-items: center;
}

.free-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    background: rgba(34, 197, 94, 0.15);
    border-radius: 24px;
    color: var(--success);
}

.free-text h2 {
    font-size: 28px;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.free-text p {
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.7;
    max-width: 500px;
}

.free-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.free-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 14px;
    white-space: nowrap;
}

.free-feature svg {
    color: var(--success);
    flex-shrink: 0;
}

@media (max-width: 1024px) {
    .free-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 32px;
    }

    .free-icon {
        margin: 0 auto;
    }

    .free-text p {
        max-width: 100%;
    }

    .free-features {
        justify-content: center;
        display: flex;
        flex-wrap: wrap;
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .free-features {
        flex-direction: column;
        align-items: flex-start;
        padding-left: 48px;
    }
}

/* Quick Start Section */
.quickstart {
    padding: var(--section-padding) 0;
}

.quickstart-content {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 64px;
    align-items: center;
}

.quickstart-text h2 {
    font-size: 32px;
    margin-bottom: 16px;
    margin-top: 16px;
}

.quickstart-text > p {
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.7;
}

.quickstart-steps {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.step {
    display: flex;
    align-items: center;
    gap: 16px;
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--primary);
    border-radius: 50%;
    font-size: 14px;
    font-weight: 700;
    color: var(--bg-primary);
    flex-shrink: 0;
}

.step-text {
    color: var(--text-secondary);
    font-size: 15px;
}

/* CLI Section */
.cli-section {
    padding: var(--section-padding) 0;
    background: var(--bg-surface);
}

.cli-demo {
    max-width: 750px;
    margin: 0 auto 40px;
}

.cli-window {
    background: #0d1117;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.cli-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 16px;
    background: #161b22;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.cli-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.cli-dot.red { background: #ff5f57; }
.cli-dot.yellow { background: #febc2e; }
.cli-dot.green { background: #28c840; }

.cli-title {
    flex: 1;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    margin-right: 36px;
}

.cli-content {
    padding: 24px;
    overflow-x: auto;
}

.cli-content pre {
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 13px;
    line-height: 1.7;
    color: #c9d1d9;
    margin: 0;
}

.cli-prompt {
    color: var(--success);
    font-weight: 600;
}

.cli-output {
    color: #8b949e;
}

.cli-comment {
    color: #6e7681;
}

.cli-string {
    color: #a5d6ff;
}

.cli-formats {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.format-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 32px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.format-card code {
    font-family: 'SF Mono', monospace;
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-light);
}

.format-card span {
    font-size: 13px;
    color: var(--text-muted);
}

/* Comparison Section */
.comparison {
    padding: var(--section-padding) 0;
}

.table-wrapper {
    overflow-x: auto;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: var(--bg-surface);
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.comparison-table th,
.comparison-table td {
    padding: 18px 24px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.comparison-table th {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 14px;
    background: var(--bg-elevated);
}

.comparison-table tbody tr:last-child td {
    border-bottom: none;
}

.comparison-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.comparison-table th.highlight {
    background: rgba(20, 184, 166, 0.15);
    color: var(--primary-light);
}

.comparison-table td.highlight {
    background: rgba(20, 184, 166, 0.05);
}

.check {
    color: var(--success);
    font-weight: 700;
    font-size: 18px;
}

.platforms-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.platform-item {
    display: inline-block;
    padding: 4px 10px;
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.2), rgba(34, 211, 238, 0.15));
    border: 1px solid rgba(20, 184, 166, 0.4);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-light);
    text-align: center;
}

.cross {
    color: var(--text-muted);
}

.partial {
    color: var(--warning);
}

/* Download Section */
.download {
    padding: 64px 0 var(--section-padding);
    background: var(--bg-surface);
}

#download {
    scroll-margin-top: 130px; /* Compensate for reduced padding */
}

.download-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 48px;
}

.download-card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 40px 32px;
    text-align: center;
    transition: all var(--transition-base);
    opacity: 0;
    transform: translateY(20px);
}

.download-card.animate-in {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.5s ease-out;
}

.download-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
}

.download-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--text-secondary);
}

.download-card h3 {
    font-size: 22px;
    margin-bottom: 8px;
}

.download-card > p {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 24px;
}

.download-alt {
    display: block;
    margin-top: 16px;
}

.download-alt code {
    display: inline-block;
    padding: 8px 16px;
    background: var(--bg-elevated);
    border-radius: 8px;
    font-family: 'SF Mono', monospace;
    font-size: 13px;
    color: var(--text-secondary);
}

/* Download Dropdown */
.download-dropdown {
    position: relative;
}

.dropdown-trigger {
    position: relative;
}

.dropdown-arrow {
    transition: transform var(--transition-fast);
    margin-left: 4px;
}

.download-dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-base);
    z-index: 100;
    box-shadow: var(--shadow-lg);
}

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

.dropdown-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 16px;
    border-radius: 8px;
    color: var(--text-primary);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.dropdown-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.dropdown-item span:first-child {
    font-weight: 500;
    font-size: 14px;
}

.dropdown-meta {
    font-size: 12px;
    color: var(--text-muted);
}

.dropdown-item:hover .dropdown-meta {
    color: var(--text-secondary);
}

.download-source {
    text-align: center;
    padding: 40px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 16px;
}

.download-source h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-secondary);
}

.source-code {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    background: var(--bg-elevated);
    border-radius: 12px;
    margin-bottom: 16px;
}

.source-code code {
    font-family: 'SF Mono', monospace;
    font-size: 16px;
    color: var(--primary-light);
}

.copy-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.copy-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.download-source > p {
    font-size: 14px;
    color: var(--text-muted);
}

/* Footer */
.footer {
    padding: 80px 0 40px;
    background: var(--bg-primary);
    border-top: 1px solid var(--border);
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 2fr;
    gap: 80px;
    margin-bottom: 60px;
}

.footer-brand .logo {
    margin-bottom: 16px;
}

.footer-brand > p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.7;
}

.footer-links {
    display: flex;
    gap: 80px;
}

.footer-col h4 {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
}

.footer-col a {
    display: block;
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 12px;
    transition: color var(--transition-fast);
}

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

.footer-bottom {
    padding-top: 32px;
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 8px;
}

.footer-copy {
    font-size: 13px !important;
}

.rust-heart {
    display: inline-block;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 40px;
    cursor: zoom-out;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
    box-shadow: var(--shadow-xl);
}

.lightbox-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.lightbox-close:hover {
    background: var(--bg-hover);
    transform: scale(1.1);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .feature-card.feature-highlight {
        grid-column: span 2;
    }

    .viz-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }

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

    .quickstart-content {
        grid-template-columns: 1fr;
        gap: 48px;
    }

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

    .quickstart-steps {
        align-items: center;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 48px;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 64px;
    }

    .nav {
        display: none;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        background: var(--bg-surface);
        border-bottom: 1px solid var(--border);
        padding: 16px;
        margin-left: 0;
    }

    .nav.active {
        display: flex;
    }

    .nav a {
        padding: 12px 16px;
        border-radius: 8px;
    }

    .nav a:hover {
        background: var(--bg-elevated);
    }

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

    .header-cta {
        display: none;
    }

    .hero {
        padding: 120px 0 60px;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .hero-buttons .btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }

    .hero-stats {
        flex-direction: column;
        gap: 24px;
    }

    .stat-divider {
        width: 60px;
        height: 1px;
    }

    .hero-languages {
        flex-direction: column;
        gap: 12px;
        padding: 16px 20px;
        border-radius: 16px;
    }

    .hero-flags {
        flex-wrap: wrap;
        justify-content: center;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .feature-card.feature-highlight {
        grid-column: span 1;
    }

    .feature-languages {
        grid-template-columns: 1fr;
    }

    .feature-platforms {
        flex-direction: column;
    }

    .download-grid {
        grid-template-columns: 1fr;
    }

    .dropdown-menu {
        max-height: 280px;
        overflow-y: auto;
    }

    .comparison-table {
        font-size: 13px;
    }

    .comparison-table th,
    .comparison-table td {
        padding: 12px 16px;
    }

    .footer-links {
        flex-direction: column;
        gap: 32px;
    }

    /* Visualizations: tabs под изображением на мобильных */
    .visualizations .container {
        display: flex;
        flex-direction: column;
    }

    .visualizations .section-header {
        order: 1;
    }

    .viz-showcase {
        order: 2;
    }

    .viz-tabs {
        order: 3;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 6px;
        margin-bottom: 0;
        margin-top: 16px;
    }

    .viz-tab {
        flex: 1;
        justify-content: center;
        padding: 8px 6px;
        font-size: 12px;
        gap: 4px;
    }

    .viz-tab svg {
        width: 16px;
        height: 16px;
    }

    /* Внутри viz-content: изображение первым, табы вставляются после через JS */
    .viz-content.active {
        display: flex;
        flex-direction: column;
    }

    .viz-image {
        order: 1;
        margin-bottom: 16px;
    }

    .viz-description {
        order: 3;
        margin-top: 0;
    }

    /* Themes: toggle под изображением на мобильных */
    .theme-showcase {
        display: flex;
        flex-direction: column;
    }

    .theme-images {
        order: 1;
    }

    .theme-toggle-container {
        order: 2;
        flex-direction: column;
        align-items: stretch;
        margin-top: 24px;
        margin-bottom: 0;
    }

    .cli-formats {
        flex-direction: column;
        align-items: stretch;
    }

    .format-card {
        padding: 16px;
    }

    /* Quick Start: изображение первым на мобильных */
    .quickstart-content {
        display: flex;
        flex-direction: column;
    }

    .quickstart-image {
        order: 1;
    }

    .quickstart-text {
        order: 2;
    }

    /* Free Banner: вертикальный layout */
    .free-banner {
        padding: 48px 0;
    }

    .free-text h2 {
        font-size: 22px;
    }

    /* Улучшенные отступы для мобильных */
    .section-header {
        margin-bottom: 40px;
    }

    .hero-screenshot {
        margin-bottom: 32px;
    }

    /* Таблица сравнения: горизонтальный скролл */
    .table-wrapper {
        margin: 0 -16px;
        padding: 0 16px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .hero-title {
        font-size: 32px;
    }

    .section-title {
        font-size: 24px;
    }

    .macos-titlebar {
        padding: 10px 12px;
    }

    .macos-title {
        display: none;
    }

    .cli-content {
        padding: 16px;
    }

    .cli-content pre {
        font-size: 11px;
    }
}

/* Print styles */
@media print {
    .header,
    .lightbox,
    .hero-buttons,
    .download {
        display: none;
    }

    body {
        background: white;
        color: black;
    }
}
