/* Download Page Styles */

/* ========== Hero Section ========== */
.download-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 60px 80px;
    overflow: hidden;
}

/* Animated Background Container */
.download-hero .animated-bg-container {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    z-index: 0;
    transform: rotate(18deg);
    transform-origin: center center;
    animation: downloadBgScroll 45s ease-in-out infinite alternate;
}

@keyframes downloadBgScroll {
    0% {
        transform: rotate(18deg) translate(0, 0);
    }

    50% {
        transform: rotate(18deg) translate(-100px, -100px);
    }

    100% {
        transform: rotate(18deg) translate(-200px, -200px);
    }
}

.download-hero .image-row {
    display: flex;
    gap: 15px;
    height: 250px;
    margin-bottom: 15px;
    will-change: transform;
}

.download-hero .image-row.even {
    animation: downloadRowSlideLeft 50s cubic-bezier(0.1, 0.6, 0.2, 1) infinite alternate;
}

.download-hero .image-row.odd {
    animation: downloadRowSlideRight 55s cubic-bezier(0.1, 0.6, 0.2, 1) infinite alternate;
}

@keyframes downloadRowSlideLeft {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-150px);
    }
}

@keyframes downloadRowSlideRight {
    0% {
        transform: translateX(-100px);
    }

    100% {
        transform: translateX(50px);
    }
}

.download-hero .bg-image {
    height: 100%;
    width: auto;
    object-fit: cover;
    opacity: 0.7;
    border-radius: 8px;
    flex-shrink: 0;
}

.download-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

/* Bottom gradient fade */
.download-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 200px;
    background: linear-gradient(to top, #0a0a0a 0%, transparent 100%);
    z-index: 2;
    pointer-events: none;
}

/* Hero Wrapper - 50/50 layout */
.download-hero-wrapper {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    gap: 60px;
    z-index: 3;
}

/* Left side: Content - 50% */
.download-hero-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.download-left {
    margin-bottom: 24px;
}

.download-title {
    font-size: 64px;
    font-weight: 800;
    line-height: 1.1;
    color: white;
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.8);
    margin: 0;
}

.title-highlight {
    background: linear-gradient(135deg, #DC2626 0%, #ff4d4d 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.download-right {
    max-width: 100%;
}

.download-subtitle {
    font-size: 22px;
    font-weight: 600;
    color: white;
    margin: 0 0 12px 0;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.6);
}

.download-desc {
    font-size: 14px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.75);
    margin: 0 0 24px 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.download-buttons {
    display: flex;
    align-items: center;
    gap: 20px;
}

.btn-download-primary {
    display: flex;
    align-items: center;
    gap: 16px;
    background: white;
    color: black;
    border: none;
    padding: 14px 32px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.btn-download-primary:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(255, 255, 255, 0.3);
}

.btn-download-primary .btn-icon {
    width: 24px;
    height: 24px;
}

.btn-download-primary .btn-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.btn-download-primary .btn-label {
    font-size: 11px;
    opacity: 0.7;
}

.btn-download-primary .btn-platform {
    font-size: 16px;
    font-weight: 700;
}

.download-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
}

.version-badge {
    background: rgba(255, 255, 255, 0.1);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}

.file-size {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
}

/* Right side: Launcher Preview - 50% */
.download-hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.launcher-preview {
    perspective: 1000px;
}

.preview-window {
    background: #1a1a1a;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.5);
    transform: rotateY(-5deg) rotateX(5deg);
    transition: transform 0.3s ease;
}

.preview-window:hover {
    transform: rotateY(0) rotateX(0);
}

.preview-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    background: #2a2a2a;
    border-bottom: 1px solid #333;
}

.preview-dots {
    display: flex;
    gap: 8px;
}

.preview-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #444;
}

.preview-dots span:nth-child(1) {
    background: #ff5f57;
}

.preview-dots span:nth-child(2) {
    background: #febc2e;
}

.preview-dots span:nth-child(3) {
    background: #28c840;
}

.preview-title {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}

.preview-content {
    position: relative;
}

.preview-screenshot {
    width: 500px;
    height: auto;
    display: block;
}

/* ========== Features Section ========== */
.features-section {
    padding: 100px 60px;
    background: var(--color-bg, #0a0a0a);
}

.section-title {
    font-size: 36px;
    font-weight: 700;
    color: #f0f0f0;
    text-align: center;
    margin: 0 0 60px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    transition: all 0.3s ease;
}

.feature-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(220, 38, 38, 0.3);
    transform: translateY(-4px);
}

.feature-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.2) 0%, rgba(220, 38, 38, 0.05) 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-icon svg {
    width: 32px;
    height: 32px;
    color: #DC2626;
}

.feature-title {
    font-size: 18px;
    font-weight: 600;
    color: #f0f0f0;
    margin: 0 0 12px;
}

.feature-desc {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    line-height: 1.6;
}

/* ========== Stats Section ========== */
.stats-section {
    padding: 80px 60px;
    background: linear-gradient(180deg, #0a0a0a 0%, #111 100%);
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    max-width: 1200px;
    margin: 0 auto;
}

.stats-section .stat-item {
    text-align: center;
    padding: 32px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.stats-section .stat-number {
    display: block;
    font-size: 48px;
    font-weight: 800;
    color: #DC2626;
    margin-bottom: 8px;
}

.stats-section .stat-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ========== FAQ Section ========== */
.faq-section {
    padding: 100px 60px;
    background: var(--color-bg, #0a0a0a);
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 0;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
}

.faq-question span {
    font-size: 18px;
    font-weight: 500;
    color: #f0f0f0;
}

.faq-icon {
    width: 24px;
    height: 24px;
    color: rgba(255, 255, 255, 0.5);
    transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 200px;
}

.faq-answer p {
    padding: 0 0 24px;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.7;
    margin: 0;
}

/* ========== CTA Section ========== */
.cta-section {
    position: relative;
    padding: 120px 60px;
    text-align: center;
    overflow: hidden;
}

/* CTA Animated Background */
.cta-section .animated-bg-container {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    z-index: 0;
    transform: rotate(-15deg);
    transform-origin: center center;
    animation: ctaBgScroll 50s ease-in-out infinite alternate;
    filter: grayscale(100%);
}

@keyframes ctaBgScroll {
    0% {
        transform: rotate(-15deg) translate(0, 0);
    }

    100% {
        transform: rotate(-15deg) translate(-150px, -100px);
    }
}

.cta-section .image-row {
    display: flex;
    gap: 15px;
    height: 250px;
    margin-bottom: 15px;
    will-change: transform;
}

.cta-section .image-row.even {
    animation: ctaRowSlideLeft 55s cubic-bezier(0.1, 0.6, 0.2, 1) infinite alternate;
}

.cta-section .image-row.odd {
    animation: ctaRowSlideRight 60s cubic-bezier(0.1, 0.6, 0.2, 1) infinite alternate;
}

@keyframes ctaRowSlideLeft {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-120px);
    }
}

@keyframes ctaRowSlideRight {
    0% {
        transform: translateX(-80px);
    }

    100% {
        transform: translateX(40px);
    }
}

.cta-section .bg-image {
    height: 100%;
    width: auto;
    object-fit: cover;
    opacity: 0.6;
    border-radius: 8px;
    flex-shrink: 0;
}

.cta-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1;
}

/* Top gradient fade for CTA */
.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 150px;
    background: linear-gradient(to bottom, #0a0a0a 0%, transparent 100%);
    z-index: 2;
    pointer-events: none;
}

.cta-content {
    position: relative;
    z-index: 3;
    max-width: 600px;
    margin: 0 auto;
}

.cta-title {
    font-size: 42px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 16px;
}

.cta-desc {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 40px;
}

.cta-section .btn-download-primary {
    margin: 0 auto;
}

/* ========== Responsive ========== */
@media (max-width: 1200px) {
    .download-hero-wrapper {
        flex-direction: column;
        text-align: center;
        gap: 40px;
    }

    .download-hero-content {
        align-items: center;
    }

    .download-left {
        text-align: center;
    }

    .download-right {
        text-align: center;
    }

    .download-buttons {
        justify-content: center;
    }

    .preview-screenshot {
        width: 100%;
        max-width: 500px;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .download-hero {
        padding: 100px 24px 60px;
    }

    .download-title {
        font-size: 36px;
    }

    .features-section,
    .faq-section,
    .cta-section,
    .stats-section {
        padding: 60px 24px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .stats-container {
        grid-template-columns: 1fr 1fr;
    }

    .cta-title {
        font-size: 32px;
    }
}

/* Footer override */
.footer.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* ========== Grayscale Scroll Effect ========== */
.download-hero .animated-bg-container {
    filter: grayscale(0%);
    transition: filter 0.8s ease-in-out;
}

.download-hero .animated-bg-container.grayscale {
    filter: grayscale(100%);
}

/* Smooth transition for overlay when grayscale is active */
.download-hero .download-hero-overlay {
    transition: background 0.8s ease-in-out;
}

.download-hero .animated-bg-container.grayscale~.download-hero-overlay {
    background: rgba(0, 0, 0, 0.7);
}