/* Download Progress Styles */
.download-progress-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(18, 24, 37, 0.95);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.download-progress-overlay.active {
    opacity: 1;
    visibility: visible;
}

.download-progress-content {
    background: var(--card-background);
    padding: 40px;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 400px;
    width: 90%;
}

.download-progress-content h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.5rem;
    font-weight: 600;
}

.download-progress-content p {
    color: var(--text-light);
    margin-bottom: 30px;
    font-size: 1rem;
}

/* Sync Animation */
.sync-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    animation: syncRotate 1.5s linear infinite;
    display: inline-block;
}

@keyframes syncRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Progress Bar */
.progress-container {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 20px;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 3px;
    width: 0%;
    transition: width 0.3s ease;
    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: progressShimmer 2s infinite;
}

@keyframes progressShimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Progress Text */
.progress-text {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 15px;
}

/* Success State */
.download-success {
    color: var(--primary-color);
}

.download-success .sync-icon {
    animation: none;
    color: var(--primary-color);
}

.download-success .sync-icon::before {
    content: '\f058'; /* fa-check-circle */
}

/* Error State */
.download-error {
    color: var(--secondary-color);
}

.download-error .sync-icon {
    animation: none;
    color: var(--secondary-color);
}

.download-error .sync-icon::before {
    content: '\f057'; /* fa-times-circle */
}

/* Close Button */
.close-progress {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.close-progress:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* Download Button States */
.cta-button {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.cta-button.downloading {
    pointer-events: none;
    opacity: 0.7;
}

.cta-button.downloading i {
    animation: syncRotate 1.5s linear infinite;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .download-progress-content {
        padding: 30px 20px;
        margin: 20px;
    }

    .sync-icon {
        font-size: 2.5rem;
    }

    .download-progress-content h3 {
        font-size: 1.3rem;
    }
}

/* Notification Style */
.download-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--card-background);
    backdrop-filter: blur(15px);
    padding: 15px 20px;
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    max-width: 300px;
}

.download-notification.show {
    transform: translateX(0);
}

.download-notification.success {
    border-left-color: var(--primary-color);
}

.download-notification.error {
    border-left-color: var(--secondary-color);
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification-content i {
    font-size: 1.2rem;
}

.notification-text {
    font-size: 0.9rem;
    line-height: 1.4;
}

.notification-title {
    font-weight: 600;
    margin-bottom: 2px;
}

.notification-message {
    color: var(--text-light);
    font-size: 0.8rem;
}


.greeting-container {
    margin-bottom: 30px;
    position: relative;
}

.greeting-icon {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
}

.greeting-icon i {
    position: absolute;
    font-size: 2.5rem;
    color: var(--primary-color);
}

.greeting-icon .fa-shield-alt {
    top: 0;
    left: 0;
    transform: scale(1.2);
    z-index: 2;
}

.greeting-icon .fa-biohazard {
    bottom: 0;
    right: 0;
    color: var(--secondary-color);
    opacity: 0.8;
}

/* Animations for greeting icons */
@keyframes shieldPulse {
    0% { transform: scale(1.1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1.1); }
}

@keyframes biohazardFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-5px) rotate(5deg); }
    50% { transform: translateY(0) rotate(0deg); }
    75% { transform: translateY(5px) rotate(-5deg); }
}

.wave {
    display: inline-block;
    animation: waveHand 2s infinite;
}

@keyframes waveHand {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(15deg); }
    50% { transform: rotate(0deg); }
    75% { transform: rotate(-15deg); }
}

/* Sync Animation */
.sync-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    animation: syncRotate 1.5s linear infinite;
    display: inline-block;
}

/* Initialization Loading Styles */
.init-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--background-color);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    transition: opacity 1s ease, visibility 1s ease;
}

.init-loading-content {
    text-align: center;
    max-width: 500px;
    padding: 40px;
}

.init-loading-content h2 {
    color: var(--primary-color);
    margin-bottom: 30px;
    font-size: 2rem;
}

.init-loading-icon {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 30px;
    animation: pulse 2s infinite;
}

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

.init-progress-container {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    margin: 20px 0;
    overflow: hidden;
}

.init-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    width: 0%;
    transition: width 0.5s ease;
}

.init-loading-text {
    color: var(--text-light);
    font-size: 1rem;
    margin-top: 20px;
}

.init-loaded .init-loading-overlay {
    opacity: 0;
    visibility: hidden;
}
