/**
 * Resource Download Styles
 * Styling for download button, stats, and countdown modal
 */

:root {
    --primary-gradient: linear-gradient(135deg, #ff6b35 0%, #fc9837 100%);
    --primary-color: #ff6b35;
    --secondary-color: #fc9837;
}

/* Download Section */
.resource-download-section {
    margin: 40px 0;
    padding: 0;
}

.download-box {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 2px solid transparent;
    background-image: linear-gradient(white, white), var(--primary-gradient);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    text-align: center;
}

/* Download Header */
.download-header {
    margin-bottom: 30px;
}

.download-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: var(--primary-gradient);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 36px;
    box-shadow: 0 8px 20px rgba(255, 107, 53, 0.3);
}

.download-header h3 {
    font-size: 28px;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 10px;
}

.download-header p {
    font-size: 16px;
    color: #64748b;
    margin: 0;
}

/* Download Stats */
.download-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 30px 0;
    padding: 25px;
    background: #f8fafc;
    border-radius: 12px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.stat-item i {
    font-size: 24px;
    color: var(--primary-color);
}

.stat-value {
    font-size: 24px;
    font-weight: 800;
    color: #1e293b;
    line-height: 1;
}

.stat-label {
    font-size: 12px;
    color: #64748b;
    font-weight: 600;
}

/* Download Button */
.download-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 18px 40px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(255, 107, 53, 0.3);
    text-decoration: none;
}

.download-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(255, 107, 53, 0.4);
}

.download-button:active {
    transform: translateY(-1px);
}

.download-button i {
    font-size: 20px;
}

.download-note {
    margin-top: 15px;
    font-size: 14px;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.download-note i {
    color: #f59e0b;
}

/* Download Features */
.download-features {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid #e2e8f0;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #475569;
}

.feature-item i {
    color: #10b981;
    font-size: 16px;
}

/* Countdown Modal */
.countdown-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.countdown-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
}

.countdown-modal-content {
    position: relative;
    background: white;
    border-radius: 20px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.countdown-header {
    padding: 30px;
    text-align: center;
    background: var(--primary-gradient);
    color: white;
    border-radius: 20px 20px 0 0;
}

.countdown-header h3 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.countdown-header p {
    font-size: 14px;
    opacity: 0.9;
    margin: 0;
}

.countdown-body {
    padding: 30px;
}

/* Countdown Timer */
.countdown-timer {
    margin-top: 30px;
    text-align: center;
}

.timer-circle {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto 20px;
}

.timer-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.timer-bg {
    fill: none;
    stroke: #e2e8f0;
    stroke-width: 8;
}

.timer-progress {
    fill: none;
    stroke: url(#timer-gradient);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 283;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1s linear;
}

.timer-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
}

#countdown-seconds {
    font-size: 48px;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1;
}

.timer-label {
    font-size: 14px;
    color: #64748b;
    font-weight: 600;
    margin-top: 5px;
}

.countdown-message {
    font-size: 16px;
    color: #475569;
    margin: 0;
}

.countdown-message strong {
    color: var(--primary-color);
}

/* Countdown Footer */
.countdown-footer {
    padding: 30px;
    text-align: center;
    border-top: 1px solid #e2e8f0;
}

.download-now-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 36px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.download-now-btn:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.6;
}

.download-now-btn:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 107, 53, 0.4);
}

.close-modal-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Responsive */
@media (max-width: 768px) {
    .download-box {
        padding: 30px 20px;
    }

    .download-header h3 {
        font-size: 22px;
    }

    .download-header p {
        font-size: 14px;
    }

    .download-stats {
        flex-direction: column;
        gap: 15px;
        padding: 20px;
    }

    .download-button {
        width: 100%;
        justify-content: center;
        padding: 16px 30px;
        font-size: 16px;
    }

    .download-features {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .countdown-modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .countdown-header {
        padding: 20px;
    }

    .countdown-header h3 {
        font-size: 20px;
    }

    .countdown-body {
        padding: 20px;
    }

    .timer-circle {
        width: 120px;
        height: 120px;
    }

    #countdown-seconds {
        font-size: 40px;
    }

    .countdown-footer {
        padding: 20px;
    }
}
