/* Agregar en CSS Global (mejor práctica) */
#fixedFooter {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-top: 3px solid var(--gray-color);
  box-shadow: none !important;
  z-index: 900;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
}

.test-mode #fixedFooter {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 15px 20px !important;
}

.test-mode .progress-fill {
    background: linear-gradient(to bottom, #60d3ff, #007acc) !important;
    border-radius: 50px;
    position: relative;
}

.test-mode .progress-fill::after {
    content: "";
    position: absolute;
    left: 5px;
    right: 5px;
    top: 2px;
    height: 40%;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.3);
    opacity: 0.9;
    pointer-events: none;
}

.progress-bounce {
    animation: progressBounce 0.5s ease;
}

@keyframes progressBounce {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.timer-right-container {
    position: fixed;
    right: 0;
    top: 70px;
    z-index: 900;
    display: flex;
    align-items: center;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.timer-right-wrapper {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--timer-color), #2bb9e0);
    border-radius: 15px 0 0 15px;
    box-shadow: -2px 0 10px rgba(0,0,0,0.2);
    overflow: hidden;
    transition: all 0.5s ease;
    padding: 5px;
}

.timer-right-animation {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.timer-right-animation {
    width: 40px;
    height: 40px;
}

.timer-right-display {
    padding: 10px 15px;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
    min-width: 80px;
    text-align: center;
    transition: all 0.3s ease;
}

.timer-right-wrapper.collapsed {
    width: 60px;
    opacity: 0.8;
    transform: translateX(10px);
}

.timer-right-wrapper.expanded {
    width: 140px;
    opacity: 1;
    transform: translateX(0);
}

.timer-right-wrapper.warning {
    background: linear-gradient(135deg, var(--timer-warning), #ff5e62);
    animation: pulse 1s infinite;
}

.timer-right-wrapper.critical {
    background: linear-gradient(135deg, var(--timer-critical), #c21500);
    animation: pulse 0.5s infinite;
}

.time-bar-container {
    display: none !important;
}

.timer-container {
    display: none !important;
}

.streak-counter {
    display: none;
    align-items: center;
    background-color: white !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
    color: #333;
    padding: 3px 12px;
    border-radius: 50px;
    font-weight: 600;
    gap: 8px;
    margin-left: auto;
}

.streak-value {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 1.2rem;
    color: #333;
    animation: streakPop 0.5s ease-out;
    line-height: 1;
}

#streakLottieContainer {
    width: 35px !important;  
    height: 35px !important; 
}

.lottie-player-container {
    width: 35px;
    height: 35px;
    margin-right: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.streak-pop {
    animation: streakPop 0.5s ease-out;
}

.streak-bounce {
    animation: streakBounce 0.5s ease infinite;
}

.streak-fire {
    animation: streakFire 0.5s ease;
}

@media (max-width: 768px) {
    .timer-right-container {
        top: 80px;
        bottom: auto;
        transform: none;
    }
    
    .streak-counter {
        flex-direction: row;
        padding: 2px 8px;
    }
    
    .streak-value {
        font-size: 1.0rem;
        order: 1;
    }

    #streakLottieContainer {
        order: 2;
        width: 30px !important;
        height: 30px !important;
    }
    
    .lottie-player-container {
        width: 25px;
        height: 25px;
    }
    
    .timer-right-wrapper {
        border-radius: 15px 0 0 15px;
    }
    
    .timer-right-animation {
        width: 40px;
        height: 40px;
    }
    
    .timer-right-animation {
        width: 30px;
        height: 30px;
    }
    
    .timer-right-display {
        padding: 8px 12px;
        font-size: 1rem;
        min-width: 70px;
    }
    
    .timer-right-wrapper.expanded {
        width: 110px;
    }
}

@media (max-width: 480px) {
    .timer-right-container {
        top: 70px;
    }
    
    .timer-right-wrapper {
        padding: 3px;
    }
    
    .timer-right-animation {
        width: 35px;
        height: 35px;
    }
    
    .timer-right-animation {
        width: 25px;
        height: 25px;
    }
    
    .timer-right-display {
        padding: 6px 10px;
        font-size: 0.9rem;
        min-width: 60px;
    }
    
    .timer-right-wrapper.expanded {
        width: 95px;
    }
    
    .streak-counter {
        background: transparent !important;
        box-shadow: none !important;
        padding: 0;
        border-radius: 0;
        flex-direction: column;
        position: relative;
    }
    
    .streak-value {
        font-size: 1.3rem;
        color: #ffffff !important; 
        text-shadow: 
            1px 1px 3px rgba(0, 0, 0, 0.7), 
            0 0 10px rgba(255, 255, 255, 0.5); 
        position: absolute;
        top: 70%;
        left: 50%;
        transform: translate(-50%, -50%);
        z-index: 2;
        margin: 0;
        font-weight: 900; 
        -webkit-text-stroke: 0.3px rgba(0, 0, 0, 0.3); 
    }
    
    #streakLottieContainer {
        width: 40px !important;
        height: 40px !important;
        position: relative;
        z-index: 1;
    }

    @keyframes streakPop {
        0% { 
            transform: translate(-50%, -50%) scale(0.5); /* Mantener centrado durante animación */
            opacity: 0; 
        }
        70% { 
            transform: translate(-50%, -50%) scale(1.2); /* Mantener centrado */
        }
        100% { 
            transform: translate(-50%, -50%) scale(1); /* Mantener centrado */
            opacity: 1; 
        }
    }

    .timer-right-wrapper.expanded {
        width: 95px; 
    }
    
    .timer-right-wrapper.collapsed .timer-right-display {
        opacity: 0 !important;
        visibility: hidden !important;
        display: none !important;
    }
}

@media (max-width: 320px) {
    
    .timer-right-wrapper.expanded {
        width: 85px;
    }
    
    .timer-right-display {
        padding: 5px 8px;
        font-size: 0.8rem;
        min-width: 50px;
    }
}

@media (max-height: 600px) and (orientation: landscape) {
    .timer-right-container {
        top: 15px;
        right: 10px;
    }
    
    .timer-right-wrapper {
        border-radius: 15px;
    }
}