/* Reading Progress Widget - Minimal & Clean */
.reading-progress-widget {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    background: var(--background-white);
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.reading-progress-widget.visible {
    opacity: 1;
    visibility: visible;
}

.reading-progress-widget.celebrating {
    transform: translateX(-50%) scale(1.2);
    background: linear-gradient(135deg, #10B981, #059669);
    box-shadow: 0 8px 30px rgba(16, 185, 129, 0.4);
}

.progress-circle {
    position: absolute;
    top: 0;
    left: 0;
}

.progress-circle circle:last-child {
    transition: stroke-dashoffset 0.3s ease;
}

.progress-text {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.reading-progress-widget.celebrating .progress-text {
    opacity: 0;
}

.progress-celebration {
    position: absolute;
    font-size: 24px;
    color: white;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s ease;
}

.reading-progress-widget.celebrating .progress-celebration {
    opacity: 1;
    transform: scale(1);
}

/* Dark theme support */
.dark-theme .reading-progress-widget {
    background: var(--background-white);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.dark-theme .progress-text {
    color: var(--text-primary);
}

/* Celebration burst animation */
.celebration-burst {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    animation: burstAnimation 3s ease-out forwards;
    letter-spacing: 2px;
}

@keyframes burstAnimation {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 0;
    }
    20% {
        transform: scale(1.5) rotate(180deg);
        opacity: 1;
    }
    40% {
        transform: scale(1.2) rotate(360deg);
        opacity: 1;
    }
    60% {
        transform: scale(1.4) rotate(540deg);
        opacity: 0.8;
    }
    80% {
        transform: scale(1.1) rotate(720deg);
        opacity: 0.6;
    }
    100% {
        transform: scale(0.8) rotate(900deg);
        opacity: 0;
    }
}

/* Enhanced celebration widget animation */
.reading-progress-widget.celebrating {
    transform: translateX(-50%) scale(1.2);
    background: linear-gradient(135deg, #10B981, #059669);
    box-shadow: 0 8px 30px rgba(16, 185, 129, 0.4);
    animation: celebrateWidget 3s ease-in-out;
}

@keyframes celebrateWidget {
    0%, 100% {
        transform: translateX(-50%) scale(1.2);
    }
    25% {
        transform: translateX(-50%) scale(1.3) rotate(5deg);
    }
    50% {
        transform: translateX(-50%) scale(1.4) rotate(-5deg);
    }
    75% {
        transform: translateX(-50%) scale(1.3) rotate(3deg);
    }
}

/* Mobile optimization */
@media (max-width: 768px) {
    .reading-progress-widget {
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%) scale(0.83);
        width: 60px;
        height: 60px;
    }
    
    .reading-progress-widget.visible {
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) scale(0.83);
    }
    
    .reading-progress-widget.celebrating {
        transform: translateX(-50%) scale(1.0);
        background: linear-gradient(135deg, #10B981, #059669);
        box-shadow: 0 8px 30px rgba(16, 185, 129, 0.4);
    }
    
    .progress-text {
        font-size: 11px;
    }
    
    .progress-celebration {
        font-size: 18px;
    }
    
    .celebration-burst {
        font-size: 16px;
        letter-spacing: 1px;
    }
}