/* ==========================================
   MODERN FLEX DOWNLOAD PAGE - 2025
   ========================================== */

/* CSS Variables */
:root {
    /* Colors */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #ec4899;
    --accent: #14b8a6;
    
    --bg-primary: #0a0a0f;
    --bg-secondary: #13131a;
    --bg-tertiary: #1a1a24;
    
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --text-tertiary: #71717a;
    
    --border: rgba(255, 255, 255, 0.1);
    --shadow: rgba(0, 0, 0, 0.5);
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
    --gradient-secondary: linear-gradient(135deg, #14b8a6 0%, #06b6d4 100%);
    
    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 4rem;
    --space-3xl: 6rem;
    
    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    /* Transitions */
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================
   RESET & BASE STYLES
   ========================================== */

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

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ==========================================
   ANIMATED BACKGROUND
   ========================================== */

.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(ellipse at top, #13131a 0%, #0a0a0f 100%);
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.3;
    animation: float 20s ease-in-out infinite;
}

.orb-1 {
    width: 500px;
    height: 500px;
    top: -250px;
    right: -200px;
    background: var(--gradient-primary);
    animation-delay: 0s;
}

.orb-2 {
    width: 600px;
    height: 600px;
    bottom: -300px;
    left: -250px;
    background: var(--gradient-secondary);
    animation-delay: 7s;
}

.orb-3 {
    width: 400px;
    height: 400px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%);
    animation-delay: 14s;
}

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

/* ==========================================
   NAVIGATION
   ========================================== */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: var(--space-md) 0;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-weight: 700;
    font-size: 1.25rem;
}

.nav-logo {
    width: 40px;
    height: 40px;
    border-radius: 12px;
}

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

.nav-links {
    display: flex;
    gap: var(--space-lg);
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition);
}

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

.nav-link:hover::after {
    width: 100%;
}

/* ==========================================
   HERO SECTION
   ========================================== */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: calc(80px + var(--space-3xl)) 0 var(--space-3xl);
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: center;
}

.hero-content {
    max-width: 600px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-md);
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary-light);
    margin-bottom: var(--space-lg);
    animation: slideInUp 0.8s ease-out;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: var(--space-md);
    animation: slideInUp 0.8s ease-out 0.1s both;
}

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

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
    line-height: 1.7;
    animation: slideInUp 0.8s ease-out 0.2s both;
}

.hero-actions {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
    animation: slideInUp 0.8s ease-out 0.3s both;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

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

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

.platform-icons {
    display: flex;
    gap: var(--space-md);
    animation: slideInUp 0.8s ease-out 0.4s both;
}

.platform-pill {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-md);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.platform-pill svg {
    width: 16px;
    height: 16px;
}

/* Hero Visual */
.hero-visual {
    animation: slideInRight 1s ease-out 0.2s both;
    position: relative;
}

.app-screenshot {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    box-shadow: 
        0 50px 100px -20px rgba(0, 0, 0, 0.5),
        0 30px 60px -30px rgba(99, 102, 241, 0.3);
    transition: var(--transition-slow);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.app-screenshot:hover {
    transform: translateY(-10px);
    box-shadow: 
        0 60px 120px -20px rgba(0, 0, 0, 0.6),
        0 40px 80px -30px rgba(99, 102, 241, 0.5);
}

/* ==========================================
   FEATURES SECTION
   ========================================== */

.features {
    padding: var(--space-3xl) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-3xl);
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: var(--space-md);
}

.section-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
}

.feature-card {
    padding: var(--space-xl);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 20px;
    transition: var(--transition);
    cursor: default;
}

.feature-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.feature-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: 16px;
    margin-bottom: var(--space-md);
}

.feature-icon svg {
    width: 32px;
    height: 32px;
    color: white;
}

.feature-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
}

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

/* ==========================================
   DOWNLOAD SECTION
   ========================================== */

.download-section {
    padding: var(--space-3xl) 0;
    background: radial-gradient(ellipse at center, rgba(99, 102, 241, 0.05) 0%, transparent 70%);
}

.download-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.download-card {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-xl);
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid var(--border);
    border-radius: 20px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.download-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: var(--transition);
    z-index: 0;
}

.download-card:hover::before {
    opacity: 0.1;
}

.download-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.2);
}

.download-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 16px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.download-icon svg {
    width: 32px;
    height: 32px;
    color: var(--primary-light);
}

.download-info {
    flex: 1;
    position: relative;
    z-index: 1;
}

.download-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.download-info p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.download-format {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-tertiary);
}

.download-arrow {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 10px;
    flex-shrink: 0;
    transition: var(--transition);
    position: relative;
    z-index: 1;
}

.download-card:hover .download-arrow {
    background: var(--primary);
    transform: translateY(2px);
}

.download-arrow svg {
    width: 24px;
    height: 24px;
    color: var(--primary-light);
    transition: var(--transition);
}

.download-card:hover .download-arrow svg {
    color: white;
}

.download-footer {
    text-align: center;
    margin-top: var(--space-xl);
}

.releases-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition);
}

.releases-link:hover {
    color: var(--primary-light);
}

.releases-link svg {
    width: 16px;
    height: 16px;
}

/* ==========================================
   macOS GATEKEEPER NOTE
   ========================================== */

.macos-note {
    padding: var(--space-2xl) 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(236, 72, 153, 0.05) 100%);
}

.note-card {
    display: flex;
    gap: var(--space-lg);
    padding: var(--space-xl);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 16px;
    align-items: flex-start;
}

.note-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: 12px;
}

.note-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

.note-content {
    flex: 1;
}

.note-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
}

.note-content p {
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
    line-height: 1.6;
}

.note-hint {
    font-size: 0.875rem;
    margin-bottom: 0 !important;
    color: var(--text-tertiary);
}

.command-box {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: var(--space-md);
}

.command-box code {
    flex: 1;
    font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
    font-size: 0.875rem;
    color: var(--primary-light);
    user-select: all;
}

.copy-btn {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 0.5rem 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.copy-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.copy-btn:active {
    transform: translateY(0);
}

.copy-icon {
    width: 16px;
    height: 16px;
}

.copy-btn.copied {
    background: #10b981;
}

.copy-btn.copied .copy-text::after {
    content: 'd!';
}

/* ==========================================
   FOOTER
   ========================================== */

.footer {
    padding: var(--space-3xl) 0 var(--space-xl);
    border-top: 1px solid var(--border);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-lg);
    text-align: center;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-weight: 700;
    font-size: 1.25rem;
}

.footer-logo {
    width: 40px;
    height: 40px;
    border-radius: 12px;
}

.footer-links {
    display: flex;
    gap: var(--space-lg);
}

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

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

.footer-copy {
    color: var(--text-tertiary);
    font-size: 0.875rem;
}

/* ==========================================
   ANIMATIONS
   ========================================== */

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

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */

@media (max-width: 1024px) {
    .hero .container {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
    }
    
    .hero-visual {
        order: -1;
    }
    
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .nav-links {
        gap: var(--space-md);
    }
    
    .nav-link {
        font-size: 0.875rem;
    }
    
    .hero {
        padding: calc(80px + var(--space-xl)) 0 var(--space-xl);
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .platform-icons {
        flex-wrap: wrap;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .download-grid {
        grid-template-columns: 1fr;
    }
    
    .note-card {
        flex-direction: column;
        gap: var(--space-md);
    }
    
    .command-box {
        flex-direction: column;
        align-items: stretch;
    }
    
    .copy-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-md);
    }
    
    .navbar {
        padding: var(--space-sm) 0;
    }
    
    .nav-brand {
        font-size: 1rem;
    }
    
    .nav-logo, .footer-logo {
        width: 32px;
        height: 32px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    .feature-card,
    .download-card {
        padding: var(--space-lg);
    }
}