/**
 * Streak Milestone Popup Styles
 * Dark sci-fi theme
 */

/* Popup Overlay */
.streak-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.streak-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Popup Container */
.streak-popup-container {
    position: relative;
    background: linear-gradient(135deg, #0a0e1a 0%, #161d2a 100%);
    border: 2px solid rgba(59, 130, 246, 0.3);
    border-radius: 16px;
    padding: 40px 50px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
                0 0 100px rgba(59, 130, 246, 0.2);
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.streak-popup-overlay.active .streak-popup-container {
    transform: scale(1);
    animation: popupBounce 0.5s ease;
}

@keyframes popupBounce {
    0% {
        transform: scale(0.8);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.streak-popup-container.celebrating {
    animation: celebrationShake 0.5s ease;
}

@keyframes celebrationShake {
    0%, 100% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.02) rotate(1deg); }
    75% { transform: scale(1.02) rotate(-1deg); }
}

/* Close Button */
.streak-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    width: 35px;
    height: 35px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.streak-popup-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.3);
}

/* Popup Content */
.streak-popup-content {
    text-align: center;
}

/* Flame Icon */
.streak-popup-flame {
    font-size: 80px;
    margin-bottom: 20px;
    animation: flameFloat 2s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(255, 165, 0, 0.6));
}

@keyframes flameFloat {
    0%, 100% {
        transform: translateY(0px) scale(1);
    }
    50% {
        transform: translateY(-10px) scale(1.1);
    }
}

/* Title */
.streak-popup-title {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 20px 0;
    letter-spacing: -0.02em;
}

/* Streak Count */
.streak-popup-streak-count {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
}

.streak-number {
    font-size: 64px;
    font-weight: 900;
    color: #3b82f6;
    line-height: 1;
    text-shadow: 0 0 30px rgba(59, 130, 246, 0.5);
}

.streak-label {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 8px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}

/* Rewards Section */
.streak-popup-rewards {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
}

/* XP Reward */
.streak-popup-xp {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(59, 130, 246, 0.1);
    border: 2px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    padding: 20px 30px;
    min-width: 150px;
    animation: rewardPulse 2s ease-in-out infinite;
}

@keyframes rewardPulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(59, 130, 246, 0.5);
    }
}

.xp-icon {
    font-size: 40px;
    margin-bottom: 10px;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.6));
}

.xp-amount {
    font-size: 32px;
    font-weight: 900;
    color: #3b82f6;
    line-height: 1;
    margin-bottom: 5px;
}

.xp-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}

/* Badge Reward */
.streak-popup-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(168, 85, 247, 0.1);
    border: 2px solid rgba(168, 85, 247, 0.3);
    border-radius: 12px;
    padding: 20px 30px;
    min-width: 150px;
    animation: badgeGlow 2s ease-in-out infinite;
}

@keyframes badgeGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(168, 85, 247, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(168, 85, 247, 0.5);
    }
}

.badge-icon {
    font-size: 40px;
    margin-bottom: 10px;
    filter: drop-shadow(0 0 10px rgba(168, 85, 247, 0.6));
}

.badge-name {
    font-size: 14px;
    font-weight: 700;
    color: #a855f7;
    text-align: center;
    line-height: 1.3;
}

/* Message */
.streak-popup-message {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

/* Confetti Animation */
.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    top: -10px;
    opacity: 1;
    animation: confettiFall 2s ease-out forwards;
    pointer-events: none;
}

@keyframes confettiFall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(600px) rotate(720deg);
        opacity: 0;
    }
}

/* Responsive Design */
@media (max-width: 600px) {
    .streak-popup-container {
        padding: 30px 25px;
    }
    
    .streak-popup-flame {
        font-size: 60px;
    }
    
    .streak-popup-title {
        font-size: 22px;
    }
    
    .streak-number {
        font-size: 48px;
    }
    
    .streak-label {
        font-size: 14px;
    }
    
    .streak-popup-rewards {
        flex-direction: column;
        gap: 15px;
    }
    
    .streak-popup-xp,
    .streak-popup-badge {
        min-width: 100%;
    }
}
