/* ====== CSS Variables ====== */
:root {
    /* Cyberpunk Colors */
    --color-primary: #6366f1;
    --color-primary-dark: #4f46e5;
    --color-primary-glow: rgba(99, 102, 241, 0.5);
    --color-accent: #a855f7;
    --color-success: #10b981;
    --color-danger: #e81123;

    /* Backgrounds */
    --bg-dark: #0a0a0f;
    --bg-darker: #050509;
    --bg-glass: rgba(20, 24, 38, 0.62);
    --bg-glass-hover: rgba(30, 34, 48, 0.75);

    /* Text Colors */
    --text-primary: #f9fafb;
    --text-secondary: rgba(229, 231, 235, 0.7);
    --text-muted: rgba(229, 231, 235, 0.5);

    /* Glass Effects */
    --glass-border: rgba(255, 255, 255, 0.18);
    --glass-blur: 28px;

    /* Spacing */
    --radius-lg: 28px;
    --radius-md: 16px;
    --radius-sm: 8px;

    /* Shadows & Glows */
    --shadow-glow: 0 0 40px var(--color-primary-glow);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.5);
}

/* ====== Reset & Base Styles ====== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

/* ====== Three.js Canvas Background ====== */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* ====== Layout Container ====== */
.container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ====== Header ====== */
.header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInDown 1s ease-out;
}

.logo-section {
    display: inline-block;
}

.title {
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 30px var(--color-primary-glow);
}

.title-chrono {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.title-ghost {
    color: var(--text-primary);
    opacity: 0.9;
}

.subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    font-weight: 300;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ====== Main Content ====== */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* ====== Glass Card Effect ====== */
.glass-card {
    background: var(--bg-glass);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
    padding: 2.5rem;
    box-shadow: var(--shadow-card);
    transition: all 0.3s ease;
}

.glass-card:hover {
    background: var(--bg-glass-hover);
    box-shadow: var(--shadow-card), var(--shadow-glow);
    transform: translateY(-2px);
}

/* ====== Download Card ====== */
.download-card {
    text-align: center;
    position: relative;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.version-badge {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    box-shadow: 0 4px 12px var(--color-primary-glow);
    animation: pulse 2s ease-in-out infinite;
}

.download-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

#os-name {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ====== Download Button ====== */
.download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.25rem 3rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px var(--color-primary-glow);
    position: relative;
    overflow: hidden;
}

.download-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.download-btn:hover::before {
    left: 100%;
}

.download-btn:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 32px var(--color-primary-glow);
}

.download-btn:active {
    transform: translateY(-2px) scale(0.98);
}

.download-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.download-icon {
    width: 28px;
    height: 28px;
}

/* ====== Alternative Downloads ====== */
.alt-downloads {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
}

.toggle-alt {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: 1px solid var(--glass-border);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.toggle-alt:hover {
    color: var(--text-primary);
    border-color: var(--color-primary);
    background: rgba(99, 102, 241, 0.1);
}

.chevron {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.toggle-alt.active .chevron {
    transform: rotate(180deg);
}

.alt-downloads-list {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.4s ease;
    margin-top: 0;
}

.alt-downloads-list.expanded {
    max-height: 1000px;
    opacity: 1;
    margin-top: 2rem;
}

/* ====== Platform Sections ====== */
.platform-section {
    text-align: left;
    margin-bottom: 2rem;
}

.platform-section:last-child {
    margin-bottom: 0;
}

.platform-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.platform-icon {
    width: 24px;
    height: 24px;
    opacity: 1;
    color: var(--text-primary, #e0e0e0);
}

.download-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.download-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.download-link:hover {
    background: rgba(99, 102, 241, 0.3);
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--color-primary-glow);
}

.file-size {
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.loading-text {
    color: var(--text-muted);
    font-style: italic;
}

/* ====== GitHub Link ====== */
.github-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    padding: 0.75rem 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
}

.github-link:hover {
    color: var(--text-primary);
    border-color: var(--color-primary);
    background: rgba(99, 102, 241, 0.1);
}

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

/* ====== Screenshot Card ====== */
.screenshot-card {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    animation: fadeInUp 1s ease-out 0.3s both;
}

.screenshot-img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* ====== Features Grid ====== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    animation: fadeInUp 1s ease-out 0.4s both;
}

.feature-card {
    text-align: center;
    padding: 2rem;
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 20px var(--color-primary-glow));
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

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

/* ====== Footer ====== */
.footer {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.tech-stack {
    color: var(--color-primary);
    font-weight: 600;
}

.warning-note {
    margin-top: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    font-style: italic;
}

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

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

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

/* ====== Responsive Design ====== */
@media (max-width: 768px) {
    .container {
        padding: 1.5rem 1rem;
    }

    .glass-card {
        padding: 1.5rem;
    }

    .download-card {
        padding: 2rem 1.5rem;
    }

    .version-badge {
        position: static;
        display: inline-block;
        margin-bottom: 1.5rem;
    }

    .download-title {
        font-size: 1.5rem;
    }

    .download-btn {
        padding: 1rem 2rem;
        font-size: 1.125rem;
    }

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

@media (max-width: 480px) {
    .title {
        font-size: 2.5rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .download-btn {
        width: 100%;
    }
}

/* ====== Loading States ====== */
.loading {
    animation: shimmer 2s ease-in-out infinite;
}

@keyframes shimmer {
    0% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0.6;
    }
}
