:root {
    --primary: #e50914;
    --bg-dark: #0a0a0a;
    --bg-card: #141414;
    --text-main: #ffffff;
    --text-dim: #8c8c8c;
    --accent-gold: #FFD700;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
    padding: 20px;
}

/* Animated background */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #0a0a0a, #1a0a0a, #0a0a1a);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    z-index: 0;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Particle effects */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: rgba(229, 9, 20, 0.5);
    border-radius: 50%;
    animation: float 10s infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) translateX(50px);
        opacity: 0;
    }
}

/* Main container */
.container {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 20px;
    max-width: 650px;
    width: 95%;
    margin: auto;
}

/* Logo */
.logo {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 48px;
    color: var(--primary);
    margin-bottom: 20px;
    letter-spacing: 3px;
    text-shadow: 0 0 20px rgba(229, 9, 20, 0.5);
}

/* Timer card */
.timer-card {
    background: rgba(20, 20, 20, 0.9);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 40px 30px 35px 30px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(229, 9, 20, 0.3);
    position: relative;
    overflow: hidden;
}

.timer-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--primary), var(--accent-gold), var(--primary));
    border-radius: 20px;
    z-index: -1;
    opacity: 0;
    animation: borderGlow 3s ease-in-out infinite;
}

@keyframes borderGlow {
    0%, 100% { opacity: 0; }
    50% { opacity: 0.3; }
}

/* Title */
.download-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-main);
}

.download-subtitle {
    font-size: 16px;
    color: var(--text-dim);
    margin-bottom: 30px;
}

/* Countdown timer */
.timer-display {
    margin: 30px 0 25px 0;
}

.timer-number {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 120px;
    line-height: 1;
    color: var(--primary);
    text-shadow: 0 0 30px rgba(229, 9, 20, 0.8);
    animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        text-shadow: 0 0 30px rgba(229, 9, 20, 0.8);
    }
    50% {
        transform: scale(1.05);
        text-shadow: 0 0 50px rgba(229, 9, 20, 1);
    }
}

.timer-label {
    font-size: 18px;
    color: var(--text-dim);
    margin-top: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Progress bar */
.progress-container {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin: 25px 0 20px 0;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent-gold));
    border-radius: 10px;
    width: 0%;
    transition: width 1s linear;
    position: relative;
    overflow: hidden;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Status message */
.status-message {
    font-size: 16px;
    color: var(--accent-gold);
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 215, 0, 0.3);
    border-top-color: var(--accent-gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Success message (after download opens) */
.success-message {
    display: none;
    background: rgba(46, 204, 113, 0.2);
    border: 2px solid #2ecc71;
    border-radius: 12px;
    padding: 25px;
    margin-top: 25px;
    animation: slideIn 0.5s ease;
}

.success-message.show {
    display: block;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.success-title {
    font-size: 20px;
    font-weight: 700;
    color: #2ecc71;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.success-text {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
    margin-bottom: 20px;
}

.manual-download-btn {
    display: inline-block;
    padding: 14px 35px;
    background: linear-gradient(135deg, var(--primary), #ff4d5e);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 16px;
    transition: all 0.3s;
    box-shadow: 0 4px 20px rgba(229, 9, 20, 0.4);
    animation: buttonPulse 2s ease-in-out infinite;
}

.manual-download-btn:hover {
    background: linear-gradient(135deg, #ff0a1a, #ff6b6b);
    transform: translateY(-3px);
    box-shadow: 0 6px 30px rgba(229, 9, 20, 0.6);
}

@keyframes buttonPulse {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(229, 9, 20, 0.4);
    }
    50% {
        box-shadow: 0 4px 30px rgba(229, 9, 20, 0.7);
    }
}

/* Buttons */
.btn-container {
    margin-top: 25px;
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.cancel-btn, .return-btn {
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    border: none;
}

.cancel-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-main);
}

.cancel-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

.return-btn {
    background: var(--primary);
    color: white;
    display: none;
}

.return-btn.show {
    display: inline-block;
}

.return-btn:hover {
    background: #ff0a1a;
    transform: translateY(-2px);
}

/* File info */
.file-info {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 20px;
    margin-top: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.file-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.file-info-item:last-child {
    border-bottom: none;
}

.file-info-label {
    color: var(--text-dim);
    font-size: 14px;
}

.file-info-value {
    color: var(--text-main);
    font-weight: 600;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 15px;
    }

    .container {
        padding: 15px;
        width: 100%;
    }

    .logo {
        font-size: 32px;
        margin-bottom: 20px;
    }

    .timer-card {
        padding: 35px 20px;
    }

    .download-title {
        font-size: 22px;
    }

    .timer-number {
        font-size: 80px;
    }

    .download-subtitle {
        font-size: 14px;
        margin-bottom: 30px;
    }

    .timer-display {
        margin: 30px 0;
    }

    .file-info {
        padding: 15px;
        margin-top: 25px;
    }

    .btn-container {
        margin-top: 25px;
        flex-direction: column;
    }

    .cancel-btn, .return-btn {
        padding: 12px 25px;
        font-size: 14px;
        width: 100%;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 10px;
        width: 100%;
    }

            .logo {
                font-size: 24px;
                margin-bottom: 15px;
            }

            .timer-card {
                padding: 25px 15px;
                border-radius: 15px;
            }

            .download-title {
                font-size: 18px;
                margin-bottom: 10px;
            }

            .download-subtitle {
                font-size: 13px;
                margin-bottom: 25px;
            }

            .timer-number {
                font-size: 64px;
            }

            .timer-label {
                font-size: 14px;
                margin-top: 8px;
            }

            .timer-display {
                margin: 25px 0;
            }

            .progress-container {
                height: 6px;
                margin: 20px 0;
            }

            .status-message {
                font-size: 14px;
                margin-top: 15px;
            }

            .loading-spinner {
                width: 16px;
                height: 16px;
                border-width: 2px;
            }

            .success-title {
                font-size: 18px;
            }

            .success-text {
                font-size: 14px;
            }

            .manual-download-btn {
                padding: 12px 28px;
                font-size: 15px;
                width: 100%;
                text-align: center;
            }

            .file-info {
                padding: 15px 12px;
                margin-top: 20px;
                border-radius: 8px;
            }

            .file-info-item {
                padding: 6px 0;
                flex-direction: column;
                align-items: flex-start;
                gap: 5px;
            }

            .file-info-label {
                font-size: 12px;
            }

            .file-info-value {
                font-size: 13px;
            }

            .btn-container {
                margin-top: 20px;
            }

            .cancel-btn, .return-btn {
                padding: 10px 20px;
                font-size: 13px;
            }
        }

        /* Extra small devices */
        @media (max-width: 360px) {
            .logo {
                font-size: 20px;
            }

            .timer-card {
                padding: 20px 12px;
            }

            .download-title {
                font-size: 16px;
            }

            .timer-number {
                font-size: 56px;
            }

            .timer-label {
                font-size: 12px;
            }
        }
