/* ===== CSS Variables ===== */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #0ea5e9;
    --accent: #f43f5e;
    --background: #0a0a0f;
    --background-light: #111118;
    --surface: #16161d;
    --surface-light: #1e1e28;
    --text: #f4f4f5;
    --text-muted: #a1a1aa;
    --text-dim: #71717a;
    --border: #27272a;
    --success: #22c55e;
    --warning: #f59e0b;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
    --gradient-hero: linear-gradient(180deg, rgba(99, 102, 241, 0.15) 0%, transparent 50%);
    --gradient-card: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, transparent 100%);

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.3);

    /* Sizing */
    --container-width: 1200px;
    --border-radius: 12px;
    --border-radius-lg: 20px;
    --border-radius-xl: 28px;

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

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--background);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

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

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

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text);
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }

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

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

.btn-sm {
    padding: 8px 16px;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.125rem;
}

.btn-xl {
    padding: 20px 40px;
    font-size: 1.25rem;
    border-radius: var(--border-radius-lg);
}

.btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(99, 102, 241, 0.5);
    background: linear-gradient(135deg, #7577f5 0%, #9d7ff8 100%);
}

.btn-secondary {
    background: var(--surface-light);
    color: var(--text);
    border: 1px solid var(--border);
}

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

/* ===== Navigation ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid transparent;
    transition: all var(--transition-base);
}

.navbar.scrolled {
    border-bottom-color: var(--border);
}

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

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

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

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

.nav-links .btn {
    margin-left: 8px;
}

.nav-links .btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    font-weight: 600;
    padding: 10px 20px;
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.4);
}

.nav-links .btn-primary:hover {
    background: linear-gradient(135deg, #7577f5 0%, #9d7ff8 100%);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.6);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-btn span {
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all var(--transition-base);
}

/* ===== Hero Section ===== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 0 80px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-hero);
    pointer-events: none;
}

.hero-bg::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 20%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(139, 92, 246, 0.08) 0%, transparent 50%);
    animation: pulse 15s ease-in-out infinite;
}

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

.hero .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.hero h1 {
    margin-bottom: 24px;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

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

.hero-platforms {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.hero-platforms span {
    font-size: 0.875rem;
    color: var(--text-dim);
}

.platform-icons {
    display: flex;
    gap: 12px;
}

.platform-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-muted);
    transition: all var(--transition-base);
}

.platform-icon:hover {
    color: var(--primary-light);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.hero-image {
    position: relative;
    z-index: 1;
}

.hero-screenshot-wrapper {
    position: relative;
    border-radius: var(--border-radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl), var(--shadow-glow);
    border: 1px solid var(--border);
}

.hero-screenshot-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.05) 0%, transparent 20%);
    pointer-events: none;
    z-index: 1;
}

.hero-screenshot {
    width: 100%;
    display: block;
}

/* ===== Providers Section ===== */
.providers {
    padding: 80px 0;
    background: var(--background-light);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

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

.provider-card {
    text-align: center;
    padding: 32px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--border-radius-lg);
    transition: all var(--transition-base);
}

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

.provider-logo {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
}

.provider-logo.rd {
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
}

.provider-logo.tb {
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
}

.provider-logo.pp {
    background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
}

.provider-card h3 {
    margin-bottom: 8px;
}

.provider-card p {
    color: var(--text-muted);
    font-size: 0.9375rem;
}

/* ===== Section Header ===== */
.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-header h2 {
    margin-bottom: 16px;
}

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

/* ===== Features Section ===== */
.features {
    padding: 120px 0;
}

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

.feature-card {
    padding: 32px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--border-radius-lg);
    transition: all var(--transition-base);
}

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

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

.feature-card h3 {
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.9375rem;
    line-height: 1.7;
}

/* ===== Screenshots Section ===== */
.screenshots {
    padding: 120px 0;
    background: var(--background-light);
}

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

.tab-btn {
    padding: 12px 32px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 100px;
    cursor: pointer;
    transition: all var(--transition-base);
}

.tab-btn:hover {
    color: var(--text);
    border-color: var(--text-muted);
}

.tab-btn.active {
    color: white;
    background: var(--gradient-primary);
    border-color: transparent;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

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

.screenshot-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.screenshot-item {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    transition: all var(--transition-base);
    cursor: pointer;
}

.screenshot-item:hover {
    border-color: var(--primary);
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-xl);
    z-index: 10;
}

.screenshot-item img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.screenshot-item:hover img {
    transform: scale(1.05);
}

.screenshot-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
}

/* ===== Platforms Section ===== */
.platforms {
    padding: 120px 0;
}

.platforms-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
}

.platform-card {
    text-align: center;
    padding: 32px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--border-radius-lg);
    transition: all var(--transition-base);
}

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

.platform-card svg {
    color: var(--primary-light);
    margin-bottom: 16px;
}

.platform-card h3 {
    font-size: 1rem;
    margin-bottom: 4px;
}

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

/* ===== Download Section ===== */
.download {
    padding: 120px 0;
    background: var(--background-light);
    text-align: center;
}

.download-content {
    max-width: 600px;
    margin: 0 auto;
}

.download h2 {
    margin-bottom: 16px;
}

.download > .container > .download-content > p {
    color: var(--text-muted);
    font-size: 1.125rem;
    margin-bottom: 40px;
}

.download-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 24px;
}

.download-note {
    font-size: 0.875rem;
    color: var(--text-dim);
}

/* ===== Community Section ===== */
.community {
    padding: 80px 0;
    border-top: 1px solid var(--border);
}

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

.community-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 32px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--border-radius-lg);
    transition: all var(--transition-base);
}

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

.community-card svg {
    color: var(--text-muted);
    margin-bottom: 16px;
    transition: color var(--transition-base);
}

.community-card:hover svg {
    color: var(--primary-light);
}

.community-card h3 {
    margin-bottom: 4px;
}

.community-card p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ===== Footer ===== */
.footer {
    padding: 48px 0 24px;
    background: var(--background);
    border-top: 1px solid var(--border);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-top: 8px;
}

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

.footer-links a {
    color: var(--text-muted);
    font-size: 0.9375rem;
    transition: color var(--transition-fast);
}

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

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

.footer-bottom p {
    color: var(--text-dim);
    font-size: 0.875rem;
}

/* ===== Responsive Design ===== */
@media (max-width: 1024px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

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

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

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

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

    .hero-image {
        max-width: 700px;
        margin: 0 auto;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .screenshot-gallery {
        grid-template-columns: repeat(2, 1fr);
    }

    .platforms-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

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

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

    .providers-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

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

    .screenshot-gallery {
        grid-template-columns: 1fr;
    }

    .platforms-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .footer-content {
        flex-direction: column;
        gap: 24px;
        text-align: center;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 16px 24px;
    }
}

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

    .hero-buttons {
        flex-direction: column;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    .platform-icons {
        flex-wrap: wrap;
        justify-content: center;
    }

    .platforms-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .platform-card {
        padding: 20px 12px;
    }

    .platform-card svg {
        width: 36px;
        height: 36px;
    }

    .download-buttons {
        flex-direction: column;
    }

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

/* ===== Lightbox (for screenshot preview) ===== */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all var(--transition-base);
}

.lightbox-close:hover {
    background: var(--primary);
    border-color: var(--primary);
}

/* ===== Animations ===== */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.hero-screenshot-wrapper {
    animation: float 6s ease-in-out infinite;
}

/* Scroll animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}
