.streak-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    border-radius: 0;
    font-weight: 700;
    font-size: 14px;
    position: relative;
    overflow: visible;
    background: transparent;
    border: none;
    transition: all 0.3s ease;
}

.streak-badge:hover {
    transform: translateY(-2px);
}

.streak-fire {
    position: relative;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.streak-fire img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(251, 191, 36, 0.9)) 
            drop-shadow(0 0 20px rgba(239, 68, 68, 0.7))
            drop-shadow(0 0 30px rgba(245, 158, 11, 0.5));
    animation: fireFlicker 2s ease-in-out infinite;
}

@keyframes fireFlicker {
    0%, 100% { 
        filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.8)) 
                drop-shadow(0 0 16px rgba(239, 68, 68, 0.6))
                drop-shadow(0 0 24px rgba(245, 158, 11, 0.4));
        transform: scale(1) rotate(-2deg);
    }
    25% { 
        filter: drop-shadow(0 0 12px rgba(251, 191, 36, 1)) 
                drop-shadow(0 0 24px rgba(239, 68, 68, 0.8))
                drop-shadow(0 0 36px rgba(245, 158, 11, 0.6));
        transform: scale(1.1) rotate(2deg);
    }
    50% { 
        filter: drop-shadow(0 0 10px rgba(251, 191, 36, 0.9)) 
                drop-shadow(0 0 20px rgba(239, 68, 68, 0.7))
                drop-shadow(0 0 30px rgba(245, 158, 11, 0.5));
        transform: scale(1.05) rotate(-1deg);
    }
    75% { 
        filter: drop-shadow(0 0 14px rgba(251, 191, 36, 1)) 
                drop-shadow(0 0 28px rgba(239, 68, 68, 0.9))
                drop-shadow(0 0 42px rgba(245, 158, 11, 0.7));
        transform: scale(1.12) rotate(3deg);
    }
}

.streak-fire-particles {
    position: absolute;
    inset: -8px;
    pointer-events: none;
}

.streak-fire-particles span {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fbbf24;
    box-shadow: 0 0 8px #fbbf24, 0 0 16px #f59e0b;
    animation: fireParticle 1.5s infinite;
}

.streak-fire-particles span:nth-child(1) { left: 15%; animation-delay: 0s; }
.streak-fire-particles span:nth-child(2) { left: 50%; animation-delay: 0.3s; }
.streak-fire-particles span:nth-child(3) { left: 85%; animation-delay: 0.6s; }

@keyframes fireParticle {
    0% { bottom: 0; opacity: 1; transform: scale(1) translateX(0); }
    50% { opacity: 1; transform: scale(1.2) translateX(5px); }
    100% { bottom: 120%; opacity: 0; transform: scale(0) translateX(-5px); }
}

.streak-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
}

.streak-number {
    font-size: 16px;
    font-weight: 900;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #ef4444 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.streak-label {
    font-size: 11px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.streak-badge.level-0 {
    background: transparent;
    border: none;
}

.streak-badge.level-0 .streak-fire img { 
    filter: grayscale(100%) brightness(0.5);
    opacity: 0.4;
    animation: none;
}
.streak-badge.level-0 .streak-number { 
    background: linear-gradient(135deg, #9ca3af, #6b7280); 
    -webkit-background-clip: text; 
    background-clip: text;
    filter: none;
}

.streak-badge.level-1 {
    background: transparent;
    border: none;
}

.streak-badge.level-1 .streak-fire img { 
    filter: drop-shadow(0 0 6px rgba(252, 211, 77, 0.5));
}

.streak-badge.level-2 {
    background: transparent;
    border: none;
}

.streak-badge.level-2 .streak-fire img { 
    filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.6)) drop-shadow(0 0 16px rgba(251, 191, 36, 0.3));
    animation-duration: 1.5s;
}

.streak-badge.level-3 {
    background: transparent;
    border: none;
}

.streak-badge.level-3 .streak-fire img { 
    filter: drop-shadow(0 0 10px rgba(249, 115, 22, 0.7)) drop-shadow(0 0 20px rgba(249, 115, 22, 0.4));
    animation-duration: 1.2s;
}
.streak-badge.level-3 .streak-number { 
    background: linear-gradient(135deg, #f97316 0%, #ef4444 100%); 
    -webkit-background-clip: text; 
    background-clip: text;
}

.streak-badge.level-4 {
    background: transparent;
    border: none;
}

.streak-badge.level-4 .streak-fire img { 
    filter: drop-shadow(0 0 12px rgba(239, 68, 68, 0.8)) drop-shadow(0 0 24px rgba(239, 68, 68, 0.5));
    animation-duration: 1s;
}
.streak-badge.level-4 .streak-number { 
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); 
    -webkit-background-clip: text; 
    background-clip: text;
}

@keyframes infernoGlow {
    0%, 100% { 
        box-shadow: 0 0 40px rgba(239, 68, 68, 0.5), 0 0 80px rgba(239, 68, 68, 0.25), inset 0 0 30px rgba(239, 68, 68, 0.15);
    }
    50% { 
        box-shadow: 0 0 60px rgba(239, 68, 68, 0.7), 0 0 120px rgba(239, 68, 68, 0.35), inset 0 0 40px rgba(239, 68, 68, 0.2);
    }
}

.streak-badge.level-5 {
    background: transparent;
    border: none;
}

.streak-badge.level-5 .streak-fire img { 
    filter: drop-shadow(0 0 14px rgba(245, 158, 11, 0.9)) drop-shadow(0 0 28px rgba(245, 158, 11, 0.6));
    animation-duration: 0.8s;
}
.streak-badge.level-5 .streak-number { 
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #fbbf24 100%); 
    -webkit-background-clip: text; 
    background-clip: text;
}

.streak-badge.level-6 {
    background: transparent;
    border: none;
}

.streak-badge.level-6 .streak-fire img { 
    filter: drop-shadow(0 0 16px rgba(168, 85, 247, 0.9)) drop-shadow(0 0 32px rgba(236, 72, 153, 0.6));
    animation: eternalFireGlow 0.6s ease-in-out infinite alternate;
}

.streak-badge.level-6 .streak-number { 
    background: linear-gradient(135deg, #a855f7 0%, #ec4899 50%, #8b5cf6 100%); 
    background-size: 200% auto;
    -webkit-background-clip: text; 
    background-clip: text;
    animation: textShimmer 2s linear infinite;
}

@keyframes eternalFlame {
    0%, 100% { 
        transform: scale(1); 
        filter: brightness(1);
        box-shadow: 
            0 0 60px rgba(168, 85, 247, 0.7), 
            0 0 120px rgba(168, 85, 247, 0.4), 
            0 0 180px rgba(168, 85, 247, 0.2),
            inset 0 0 40px rgba(168, 85, 247, 0.3);
    }
    50% { 
        transform: scale(1.05); 
        filter: brightness(1.15);
        box-shadow: 
            0 0 80px rgba(168, 85, 247, 0.9), 
            0 0 160px rgba(168, 85, 247, 0.5), 
            0 0 240px rgba(168, 85, 247, 0.3),
            inset 0 0 60px rgba(168, 85, 247, 0.4);
    }
}

@keyframes eternalBorder {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes eternalFireGlow {
    0% { 
        filter: drop-shadow(0 0 12px rgba(168, 85, 247, 0.8)) drop-shadow(0 0 24px rgba(236, 72, 153, 0.5));
        transform: scale(1) rotate(-5deg);
    }
    100% { 
        filter: drop-shadow(0 0 20px rgba(168, 85, 247, 1)) drop-shadow(0 0 40px rgba(236, 72, 153, 0.8));
        transform: scale(1.2) rotate(5deg);
    }
}

@keyframes textShimmer {
    0% { background-position: -100% 0; }
    100% { background-position: 200% 0; }
}

.profile-streak {
    margin-top: 12px;
}

.streak-tooltip {
    position: absolute;
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    padding: 10px 14px;
    background: #1e2024;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.9);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.streak-badge:hover .streak-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.streak-mini {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(239, 68, 68, 0.2));
    border: 1px solid rgba(251, 191, 36, 0.4);
}

.streak-mini img {
    width: 24px;
    height: 24px;
    filter: drop-shadow(0 0 4px rgba(251, 191, 36, 0.6));
}

.streak-mini span {
    background: linear-gradient(135deg, #fbbf24, #ef4444);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.streak-celebration {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 99999;
    pointer-events: none;
}

.streak-celebration-fire {
    width: 200px;
    height: 200px;
    animation: celebrationBurst 1s ease-out forwards;
}

.streak-celebration-fire img {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 30px rgba(251, 191, 36, 0.8)) drop-shadow(0 0 60px rgba(239, 68, 68, 0.6));
}

@keyframes celebrationBurst {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.5) rotate(180deg);
        opacity: 1;
    }
    100% {
        transform: scale(1) rotate(360deg);
        opacity: 0;
    }
}

.streak-restore-toast {
    position: fixed;
    top: 80px;
    right: 20px;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.95), rgba(245, 158, 11, 0.95));
    color: #1e2024;
    padding: 16px 20px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 14px;
    box-shadow: 0 8px 24px rgba(251, 191, 36, 0.4), 0 0 40px rgba(251, 191, 36, 0.2);
    z-index: 99998;
    animation: slideInRight 0.4s ease-out, pulse 2s ease-in-out infinite 0.4s;
    display: flex;
    align-items: center;
    gap: 12px;
}

.streak-restore-toast img {
    width: 36px;
    height: 36px;
    filter: drop-shadow(0 0 8px rgba(239, 68, 68, 0.6));
    animation: fireFlicker 1s ease-in-out infinite;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 8px 24px rgba(251, 191, 36, 0.4), 0 0 40px rgba(251, 191, 36, 0.2);
    }
    50% {
        box-shadow: 0 8px 32px rgba(251, 191, 36, 0.6), 0 0 60px rgba(251, 191, 36, 0.3);
    }
}

/* Streak Started Popup */
.streak-started-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

.streak-started-overlay.fade-out {
    animation: fadeOut 0.5s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

.streak-started-popup {
    background: linear-gradient(135deg, #1e2024 0%, #252830 100%);
    border: 3px solid rgba(251, 191, 36, 0.5);
    border-radius: 24px;
    padding: 48px 64px;
    text-align: center;
    position: relative;
    z-index: 100000;
    box-shadow: 
        0 0 80px rgba(251, 191, 36, 0.6),
        0 0 160px rgba(251, 191, 36, 0.3),
        0 20px 60px rgba(0, 0, 0, 0.8);
    animation: popupEnter 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: visible;
    max-width: 90vw;
}

@keyframes popupEnter {
    0% {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    60% {
        transform: scale(1.15) rotate(10deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.streak-started-fire {
    width: 120px;
    height: 120px;
    margin: 0 auto 24px;
    position: relative;
    animation: fireEntrance 0.6s ease-out 0.3s backwards;
}

@keyframes fireEntrance {
    0% {
        transform: scale(0) translateY(-100px);
        opacity: 0;
    }
    50% {
        transform: scale(1.3) translateY(10px);
    }
    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.streak-started-fire img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 20px rgba(251, 191, 36, 1)) 
            drop-shadow(0 0 40px rgba(239, 68, 68, 0.8))
            drop-shadow(0 0 60px rgba(245, 158, 11, 0.6));
    animation: fireGlowPulse 2s ease-in-out infinite;
}

@keyframes fireGlowPulse {
    0%, 100% {
        filter: drop-shadow(0 0 15px rgba(251, 191, 36, 0.9)) 
                drop-shadow(0 0 30px rgba(239, 68, 68, 0.7))
                drop-shadow(0 0 45px rgba(245, 158, 11, 0.5));
        transform: scale(1) rotate(-3deg);
    }
    50% {
        filter: drop-shadow(0 0 25px rgba(251, 191, 36, 1)) 
                drop-shadow(0 0 50px rgba(239, 68, 68, 0.9))
                drop-shadow(0 0 75px rgba(245, 158, 11, 0.7));
        transform: scale(1.1) rotate(3deg);
    }
}

.streak-started-title {
    font-size: 48px;
    font-weight: 900;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #ef4444 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
    animation: titleSlide 0.6s ease-out 0.5s backwards;
}

@keyframes titleSlide {
    0% {
        transform: translateY(30px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.streak-started-text {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 24px;
    font-weight: 500;
    animation: textFade 0.6s ease-out 0.7s backwards;
}

@keyframes textFade {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

.streak-started-number {
    font-size: 72px;
    font-weight: 900;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #ef4444 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    animation: numberBounce 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.8s backwards;
    text-shadow: 0 0 40px rgba(251, 191, 36, 0.5);
}

@keyframes numberBounce {
    0% {
        transform: scale(0) translateY(50px);
        opacity: 0;
    }
    60% {
        transform: scale(1.2) translateY(-10px);
    }
    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

@media (max-width: 600px) {
    .streak-started-popup {
        padding: 36px 48px;
        margin: 20px;
    }
    
    .streak-started-fire {
        width: 100px;
        height: 100px;
    }
    
    .streak-started-title {
        font-size: 36px;
    }
    
    .streak-started-text {
        font-size: 16px;
    }
    
    .streak-started-number {
        font-size: 56px;
    }
}
