:root {
    --primary-color: #4285F4;
    --success-color: #34A853;
    --error-color: #EA4335;
    --warning-color: #FBBC05;
    --dark-color: #202124;
    --light-color: #f8f9fa;
    --gray-color: #dadce0;
    --progress-bar-color: #6e8efb;
    --streak-color: #FF6D00;
    --timer-color: #28cecf;
    --timer-warning: #ff9966;
    --timer-critical: #ff2400;
    --control-blue: #1976D2;
    --control-red: #F44336;
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: white;
    border-bottom: 3px solid var(--gray-color);
    z-index: 1000;
    margin: 0;
    padding: 0;
}

/* 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;
}


.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.header-bottom, .streak-counter, .question-text, .instructions {
    background-color: white !important;
}

main {
  margin-top: 50px; 
  padding: 20px;
  padding-bottom: calc(var(--footer-height,72px) + var(--footer-gap,16px)); 
  min-height: calc(100vh - var(--header-height,50px) - var(--footer-height,72px));
  box-sizing: border-box;
}

.header-bottom {
    background-color: white !important;
}

.back-button {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.2s;
    margin-right: auto;
}

.back-button:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.back-button svg {
    width: 24px;
    height: 24px;
    fill: var(--dark-color);
}

.progress-container {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 250px;
    height: 22px;
    background-color: #cdcdcd;
    border-radius: 50px;
    box-sizing: border-box;
}

.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-fill {
    height: 100%;
    background: linear-gradient(to bottom, #60d3ff, #007acc);
    border-radius: 50px;
    width: 0%;
    transition: width 0.5s ease;
    position: relative;
    overflow: hidden;
}


.progress-bounce {
    animation: progressBounce 0.5s ease;
}

.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;
}

.container {
    max-width: none;
    margin: 0;
    padding: 0;
    background-color: white;
    box-shadow: none;
    border-radius: 0;
}

.question-header-with-animation {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 30px;
    margin: 0 auto 25px;
    max-width: 1000px;
    padding: 0 20px;
}

.question-animation {
    flex: 0 0 auto;
}

.question-animation {
    width: 180px !important;
    height: 180px !important;
}

.question-title-bubble {
    flex: 0 1 auto;
    min-width: 200px;
    max-width: 500px;
    background-color: var(--dark-color);
    color: white;
    padding: 15px 25px;
    border-radius: 18px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    align-self: center;
}

.question-title-bubble::after {
    content: "";
    position: absolute;
    left: -15px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 12px;
    border-style: solid;
    border-color: transparent var(--dark-color) transparent transparent;
}

.question-title {
    font-size: 1.6rem;
    margin: 0;
    color: white;
    font-weight: 700;
    text-align: left;
    line-height: 1.3;
}

.instructions, .question-text {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
}

@media (max-width: 900px) {
    .question-header-with-animation {
        gap: 20px;
    }
    
    .question-animation {
        width: 150px !important;
        height: 150px !important;
    }
    
    .question-title {
        font-size: 1.4rem;
    }
}

@media (max-width: 768px) {
    .question-header-with-animation {
        flex-direction: row;
        align-items: flex-start;
        text-align: left;
        gap: 20px;
    }

    .question-title {
        font-size: 1.2rem;
        text-align: left;
    }
    
    .question-title-bubble {
        max-width: 100%;
        text-align: left;
        padding: 15px 20px;
    }
    
    .question-title-bubble::after {
        left: -15px;
        top: 50%;
        transform: translateY(-50%);
        border-color: transparent var(--dark-color) transparent transparent;
    }
    
    .question-animation {
        width: 130px !important;
        height: 130px !important;
    }
}

@media (max-width: 480px) {
    .question-header-with-animation {
        padding: 0 15px;
        gap: 12px;
    }
    
    .question-title-bubble {
        padding: 12px 18px;
    }
    
    .question-title {
        font-size: 0.8rem;
    }
    
    .question-animation {
        width: 110px !important;
        height: 110px !important;
    }
}

.instructions {
    background: white;
    padding: 15px;
    border-radius: 10px;
    margin: 0 auto 15px;
    text-align: center;
    max-width: 800px;
}

.question-text {
    font-size: 1.2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 30px;
    text-align: center;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    padding: 15px;
    background: white;
    border-radius: 10px;
}

.question-transition {
    transform: translateX(-20px);
    opacity: 0;
}

.button-container {
    text-align: center;
    margin-top: 30px;
}

.verify-button {
    min-width: 250px;
    height: 45px;
    line-height: 45px;
    font-size: 18px;
    padding: 0 24px;
    background: #444;
    color: white;
    font-weight: 600;
    font-family: 'Nunito Sans', sans-serif;
    border: none;
    border-radius: 30px;
    display: inline-block;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 5px 0 #000, 0 6px 12px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
    transform: translateY(0);
    user-select: none;
}

.verify-button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 5px 0 #000, 0 7px 15px rgba(0,0,0,0.15) !important;
    background: #444 !important;
}

.verify-button:active {
    transform: translateY(4px) !important;
    box-shadow: 0 1px 0 #000 !important;
}

.verify-button:disabled {
    background: #cccccc !important;
    box-shadow: 0 4px 0 #999999 !important;
    cursor: not-allowed !important;
    transform: translateY(0) !important;
}

.btn {
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-size: 16px;
    min-width: 120px;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(to bottom, #4285F4, #3367D6);
    color: white;
    box-shadow: 0 4px 0 #2A56C6;
}

.btn-primary:hover {
    background: linear-gradient(to bottom, #3B78E7, #2A56C6);
    box-shadow: 0 5px 0 #2A56C6;
    transform: translateY(-1px);
}

.btn-primary:active {
    box-shadow: 0 1px 0 #2A56C6 !important;
    transform: translateY(3px) !important;
}

.btn-dark {
    background: linear-gradient(to bottom, #202124, #3C4043);
    color: white;
    box-shadow: 0 4px 0 #1A1C1E;
}

.btn-dark:hover {
    background: linear-gradient(to bottom, #3C4043, #202124);
    box-shadow: 0 5px 0 #1A1C1E;
    transform: translateY(-1px);
}

.btn-dark:active {
    box-shadow: 0 1px 0 #1A1C1E !important;
    transform: translateY(3px) !important;
}

.btn-outline {
    background: white;
    color: var(--dark-color);
    border: 1px solid var(--gray-color);
    box-shadow: none;
}

.btn-outline:hover {
    background: #f8f9fa;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 600px;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    overflow: hidden;
}

.modal-header {
    padding: 25px;
    border-bottom: 1px solid var(--gray-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
}

.modal-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    flex-shrink: 0;
}

.modal-icon.success {
    background-color: #28c840;
    border: none;
}

.modal-icon.error {
    background-color: #e74c3c;
    border: none;
}

.modal-icon svg {
    width: 30px;
    height: 30px;
}

.modal-icon.success svg {
    stroke: white;
    stroke-width: 3;
}

.modal-icon.error svg {
    fill: white;
}

.modal-title {
    font-size: 24px;
    font-weight: 900;
    font-family: 'Nunito', sans-serif;
    margin-bottom: 10px;
}

.modal-title.success {
    color: var(--success-color);
}

.modal-title.error {
    color: var(--error-color);
}

.modal-subtitle {
    font-size: 16px;
    color: #666;
    margin-bottom: 5px;
}

.modal-body {
    padding: 25px;
    text-align: center;
}

.modal-message {
    margin-bottom: 20px;
    line-height: 1.6;
    font-size: 16px;
}

.correct-answer {
    font-weight: 700;
    color: var(--success-color);
    font-size: 18px;
    margin: 15px 0;
}

.modal-footer {
    padding: 20px;
    display: flex;
    justify-content: center;
    border-top: 1px solid var(--gray-color);
}

.explanation-modal {
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.explanation-header {
    padding: 20px;
    border-bottom: 1px solid var(--gray-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.explanation-title {
    font-size: 20px;
    font-weight: 700;
}

.close-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.close-button:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.close-button svg {
    width: 24px;
    height: 24px;
    fill: var(--dark-color);
}

.explanation-body {
    padding: 20px;
}

.explanation-step {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.explanation-step:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.step-number {
    display: inline-block;
    width: 25px;
    height: 25px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 25px;
    margin-right: 10px;
    font-weight: 600;
}

.timeout-modal {
    text-align: center;
    padding: 30px;
}

.timeout-icon {
    width: 180px;
    height: 180px;
    margin: 0 auto 20px;
    background-color: transparent;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.timeout-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.timeout-title {
    font-size: 24px;
    font-weight: 900;
    font-family: 'Nunito', sans-serif;
    margin-bottom: 15px;
    color: var(--error-color);
}

.timeout-message {
    margin-bottom: 25px;
    line-height: 1.6;
    color: #666;
}

.timeout-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.confirmation-modal {
    text-align: center;
    padding: 30px;
}

.confirmation-image {
    width: 150px;
    height: 150px;
    margin: 0 auto 20px;
}

.confirmation-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.confirmation-title {
    font-size: 22px;
    font-weight: 900;
    font-family: 'Nunito', sans-serif;
    margin-bottom: 15px;
}

.confirmation-message {
    margin-bottom: 25px;
    line-height: 1.6;
}

.confirmation-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.bottom-feedback-modal {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: white;
    border-radius: 15px 15px 0 0;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.2);
    z-index: 2000;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    padding: 20px;
    max-height: 80vh;
    overflow-y: auto;
}

.bottom-feedback-modal.active {
    transform: translateY(0);
}

.bottom-feedback-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.5);
    z-index: 1999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.bottom-feedback-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.bottom-feedback-header {
    display: flex;
    align-items: center;
    padding: 15px;
    gap: 20px;
}

.bottom-feedback-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
}

.bottom-feedback-icon.success {
    background-color: #28c840;
    border: none;
}

.bottom-feedback-icon.error {
    background-color: #e74c3c;
    border: none;
}

.bottom-feedback-icon svg {
    width: 20px;
    height: 20px;
    fill: white;
}

.bottom-feedback-title {
    font-size: 18px;
    font-weight: 900;
    font-family: 'Nunito', sans-serif;
}

.bottom-feedback-title.success {
    color: var(--success-color);
}

.bottom-feedback-title.error {
    color: var(--error-color);
}

.bottom-feedback-content {
    margin-bottom: 20px;
}

.bottom-feedback-footer {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding-top: 15px;
    border-top: 1px solid var(--gray-color);
}

.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.loading-screen.active {
    opacity: 1;
    pointer-events: all;
}

.loading-content {
    text-align: center;
    color: white;
}

.loading-content h3 {
    font-size: 24px;
    margin-bottom: 20px;
    font-family: 'Nunito', sans-serif;
}

.loading-content {
    width: 200px;
    height: 200px;
}

.sound-toggle {
    position: fixed;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #2a5bd7;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 999;
    transition: all 0.3s ease;
    bottom: 20px;
    right: 20px;
    display: none;
}

.sound-toggle:hover {
    transform: scale(1.1);
}

.sound-toggle svg {
    width: 24px;
    height: 24px;
    fill: white;
}

#feedbackIconSvg path {
    stroke-width: 16;
}

#feedbackIconSvg line {
    stroke-width: 16;
}

#viewExplanation.btn-outline,
#cancelExit.btn-outline,
#tryAgainButton.btn-outline {
    color: #666 !important;
    border: 1px solid #ddd !important;
    background-color: white !important;
    transition: color 0.2s ease !important;
}

#viewExplanation.btn-outline:hover,
#cancelExit.btn-outline:hover,
#tryAgainButton.btn-outline:hover {
    color: #4285F4 !important;
    border-color: #ddd !important;
    background-color: white !important;
}

#viewExplanation.btn-outline:hover span,
#cancelExit.btn-outline:hover span,
#tryAgainButton.btn-outline:hover span {
    color: inherit !important;
}

.mobile-controls-panel {
    display: flex;
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 999;
    gap: 0;
}

.mobile-controls-toggle {
    width: 30px;
    height: 110px;
    background-color: #28cecf;
    border-radius: 0 15px 15px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.2);
    transition: all 0.4s cubic-bezier(0.68,-0.55,0.265,1.55);
    position: relative;
    z-index: 999;
}

.mobile-controls-toggle.active {
    transform: translateX(-100%);
    opacity: 0;
}

.mobile-controls-toggle svg {
    width: 24px;
    height: 24px;
}

.mobile-controls-container {
    position: fixed;
    left: -280px;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0,0,0,0.8);
    border-radius: 0 15px 15px 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    transition: all .3s ease;
    z-index: 998;
}

.mobile-controls-container.active {
    left: 0;
    animation: slideInControls 0.4s cubic-bezier(0.68,-0.55,0.265,1.55) forwards;
}

.mobile-controls-container:not(.active) {
    animation: slideOutControls 0.4s cubic-bezier(0.68,-0.55,0.265,1.55) forwards;
}

.mobile-control-button {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background-color: var(--control-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mobile-control-button svg {
    width: 28px;
    height: 28px;
    fill: #fff;
}

.mobile-control-button.active {
    background-color: var(--control-red);
}

.lottie-feedback-container {
    width: 140px;
    height: 140px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lottie-feedback-container {
    width: 100%;
    height: 100%;
}

.modal-icon-lottie {
    width: 140px;
    height: 140px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-icon-lottie {
    width: 100%;
    height: 100%;
}

.bottom-feedback-icon-lottie {
    width: 100%;   
    height: 100%;  
    margin-right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.bottom-feedback-icon-lottie {
    width: 100%;
    height: 100%;
}

@keyframes slideInControls {
    from { 
        left: -280px; 
        opacity: 0.6; 
    }
    to { 
        left: 0; 
        opacity: 1; 
    }
}

@keyframes slideOutControls {
    from { 
        left: 0; 
        opacity: 1; 
    }
    to { 
        left: -280px; 
        opacity: 0.6; 
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in {
    animation: slideIn 0.3s ease forwards;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes progressBounce {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes streakPop {
    0% { transform: scale(0.5); opacity: 0; }
    70% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes streakFire {
    0% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.1) rotate(5deg); }
    50% { transform: scale(1.15) rotate(-5deg); }
    75% { transform: scale(1.1) rotate(5deg); }
    100% { transform: scale(1) rotate(0deg); }
}

@keyframes timerCollapse {
    from { 
        width: 140px; 
        opacity: 1; 
        transform: translateX(0);
    }
    to { 
        width: 60px; 
        opacity: 0.8; 
        transform: translateX(10px);
    }
}

@keyframes timerExpand {
    from { 
        width: 60px; 
        opacity: 0.8; 
        transform: translateX(10px);
    }
    to { 
        width: 140px; 
        opacity: 1; 
        transform: translateX(0);
    }
}

.timer-right-wrapper.collapsed {
    animation: timerCollapse 0.5s cubic-bezier(0.68,-0.55,0.265,1.55) forwards;
}

.timer-right-wrapper.expanded {
    animation: timerExpand 0.5s cubic-bezier(0.68,-0.55,0.265,1.55) forwards;
}

@media (max-width: 768px) {
    .timer-right-container {
        top: 80px;
        bottom: auto;
        transform: none;
    }
    
    .modal {
        max-width: 90%;
    }
    
    .progress-container {
        width: 200px;
        height: 20px;
    }
    
    .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;
    }
    
    .bottom-feedback-footer {
        flex-direction: column;
    }
    
    .bottom-feedback-footer .btn {
        width: 100%;
    }
    
    .sound-toggle {
        bottom: 20px;
        top: auto;
    }
    
    .loading-content {
        width: 150px;
        height: 150px;
    }
    
    .timeout-modal {
        padding: 20px;
    }
    
    .timeout-icon {
        width: 150px;
        height: 150px;
        margin-bottom: 15px;
    }
    
    .timeout-title {
        font-size: 22px;
    }
    
    .timeout-message {
        font-size: 16px;
        margin-bottom: 20px;
    }
    
    .timeout-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .timeout-buttons .btn {
        width: 100%;
    }
    
    .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;
    }
    
    .mobile-controls-toggle {
        width: 20px;
        height: 90px;
    }
    
    .mobile-controls-container {
        padding: 15px;
        gap: 15px;
    }
    
    .mobile-control-button {
        width: 45px;
        height: 45px;
    }
    
    .mobile-control-button svg {
        width: 24px;
        height: 24px;
    }
    
    .lottie-feedback-container {
        width: 120px;
        height: 120px;
    }
    
    .modal-icon-lottie {
        width: 120px;
        height: 120px;
    }
}

@media (min-width: 769px) {
    .bottom-feedback-modal {
        max-width: 1000px;
        margin: 0 auto;
        padding: 30px 40px;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .feedback-column {
        padding: 0 15px;
    }
    
    .feedback-icon-column {
        flex: 1;
    }
    
    .feedback-content-column {
        flex: 2;
    }
    
    .feedback-buttons-column {
        flex: 1;
    }
    
    .bottom-feedback-header {
        margin-bottom: 0;
        flex: 1;
    }

    .bottom-feedback-content {
        margin-bottom: 0;
        flex: 2;
        text-align: left;
        padding: 0 20px;
    }

    .bottom-feedback-footer {
        justify-content: flex-end;
        padding-top: 0;
        border-top: none;
        flex: 1;
    }

    .bottom-feedback-icon {
        width: 130px;
        height: 130px;
        min-width: 100px;
        margin-right: 20px;
    }

    .bottom-feedback-icon svg {
        width: 70px;
        height: 70px;
    }
    
    .lottie-feedback-container {
        width: 160px;
        height: 160px;
    }
    
    .modal-icon-lottie {
        width: 160px;
        height: 160px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .bottom-feedback-icon {
        width: 130px !important;
        height: 130px !important;
        min-width: 130px;
    }

    .bottom-feedback-icon svg {
        width: 120px !important;
        height: 120px !important;
    }

    .bottom-feedback-title {
        font-size: 18px;
    }

    .bottom-feedback-message {
        font-size: 14px;
    }
    
    .mobile-controls-toggle {
        width: 22px;
        height: 100px;
    }
    
    .mobile-controls-container {
        padding: 18px;
        gap: 18px;
    }
    
    .mobile-control-button {
        width: 50px;
        height: 50px;
    }
    
    .mobile-control-button svg {
        width: 26px;
        height: 26px;
    }
    
    .lottie-feedback-container {
        width: 140px;
        height: 140px;
    }
    
    .modal-icon-lottie {
        width: 140px;
        height: 140px;
    }
}

@media (max-width: 1024px) {
    .bottom-feedback-header {
        flex-direction: row;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 12px;
        text-align: left;
    }

    .bottom-feedback-text {
        display: flex;
        flex-direction: column;
        justify-content: center;
        flex: 1;
    }

    .bottom-feedback-title {
        margin: 0;
        font-size: 18px;
    }

    .bottom-feedback-message {
        margin-top: 4px;
        font-size: 14px;
        color: #666;
    }

    .feedback-message-container {
        text-align: left;
        margin-top: 8px;
    }
}

@media (min-width: 1025px) {
    .mobile-controls-panel {
        left: 0;
        top: 50%;
        transform: translateY(-50%);
    }
    
    .mobile-controls-toggle {
        display: flex;
    }
    
    .mobile-controls-container {
        left: -280px;
        top: 50%;
        transform: translateY(-50%);
        flex-direction: column;
        background-color: rgba(0,0,0,0.8);
        border-radius: 0 15px 15px 0;
        padding: 20px;
        gap: 20px;
    }
    
    .mobile-controls-container.active {
        left: 0;
    }
}

@media (max-width: 480px) {
    .header-content {
        padding: 10px 15px;
    }
    
    .question-text {
        font-size: 1rem;
        padding: 10px;
    }
    
    .instructions {
        padding: 10px;
        font-size: 0.9rem;
    }
    
    .modal-header {
        padding: 15px;
    }
    
    .modal-body {
        padding: 15px;
    }
    
    .modal-footer {
        padding: 15px;
    }
    
    .modal-title {
        font-size: 20px;
    }
    
    .modal-subtitle {
        font-size: 14px;
    }
    
    .modal-message {
        font-size: 14px;
    }
    
    .correct-answer {
        font-size: 16px;
    }
    
    .btn {
        padding: 8px 16px;
        font-size: 14px;
        min-width: 100px;
    }
    
    .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;
    }
    
    .mobile-controls-toggle {
        width: 18px;
        height: 80px;
    }
    
    .mobile-controls-container {
        padding: 12px;
        gap: 12px;
    }
    
    .mobile-control-button {
        width: 40px;
        height: 40px;
    }
    
    .mobile-control-button svg {
        width: 20px;
        height: 20px;
    }
    
    .lottie-feedback-container {
        width: 100px;
        height: 100px;
    }
    
    .modal-icon-lottie {
        width: 100px;
        height: 100px;
    }
  
    .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: 480px) {
    .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; 
        }
    }
}


@media (max-width: 320px) {
    .progress-container {
        width: 180px;
        height: 18px;
    }
    
    .timer-right-wrapper.expanded {
        width: 85px;
    }
    
    .timer-right-display {
        padding: 5px 8px;
        font-size: 0.8rem;
        min-width: 50px;
    }
    
    .question-text {
        font-size: 0.9rem;
    }
    
    .mobile-controls-toggle {
        width: 15px;
        height: 70px;
    }
    
    .mobile-controls-container {
        padding: 10px;
        gap: 10px;
    }
    
    .mobile-control-button {
        width: 35px;
        height: 35px;
    }
    
    .mobile-control-button svg {
        width: 18px;
        height: 18px;
    }
    
    .lottie-feedback-container {
        width: 90px;
        height: 90px;
    }
    
    .modal-icon-lottie {
        width: 90px;
        height: 90px;
    }
}

@media (max-height: 600px) and (orientation: landscape) {
    .header {
        position: relative;
    }
    
    main {
        margin-top: 0;
        padding: 10px;
    }
    
    .timer-right-container {
        top: 15px;
        right: 10px;
    }
    
    .timer-right-wrapper {
        border-radius: 15px;
    }
    
    .mobile-controls-panel {
        top: 10px;
        transform: none;
    }
    
    .mobile-controls-toggle {
        height: 50px;
        border-radius: 0 15px 15px 0;
    }
    
    .mobile-controls-container {
        top: 10px;
        transform: none;
        flex-direction: row;
        border-radius: 0 15px 15px 0;
        padding: 10px;
        gap: 10px;
    }
    
    .mobile-control-button {
        width: 35px;
        height: 35px;
    }
    
    .mobile-control-button svg {
        width: 18px;
        height: 18px;
    }
    
    .question-text {
        font-size: 0.9rem;
        margin-bottom: 15px;
    }
    
    .instructions {
        padding: 8px;
        margin-bottom: 10px;
        font-size: 0.9rem;
    }
    
    .button-container {
        margin-top: 15px;
    }
    
    .lottie-feedback-container {
        width: 80px;
        height: 80px;
    }
    
    .modal-icon-lottie {
        width: 80px;
        height: 80px;
    }
}


#fixedFooter {
  transition: all 0.3s ease;
}

/* Añadir al final del archivo CSS Global */
.lesson-mode .progress-container {
    background-color: #aed7c5 !important;
    height: 22px !important; 
    border-radius: 50px; 
    overflow: hidden;
}

.lesson-mode .progress-fill {
    background: linear-gradient(to bottom, #00c170, #00b565) !important; 
    border-radius: 50px; 
    position: relative;
}

.lesson-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;
}

/* Mantener el resto del CSS igual */
.lesson-mode .streak-counter {
    display: none !important;
}

.lesson-mode .progress-bounce {
    animation: none;
}

/* Botón Saltar para lecciones */
.lesson-mode .skip-button {
    background: white !important;
    color: #666 !important;
    border: 1px solid #ddd !important;
    font-weight: 600 !important;
    border-radius: 30px !important;
    padding: 12px 24px !important;
    cursor: pointer;
    transition: all 0.2s ease !important;
    margin-right: 10px;
    min-width: 120px;
}

.lesson-mode .skip-button:hover {
    background: #f8f9fa !important;
    border-color: #ddd !important;
    transform: translateY(-1px);
}

.lesson-mode .skip-button:active {
    transform: translateY(1px);
}


.lesson-mode #fixedFooter {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 15px 40px !important; 
}

@media (min-width: 1025px) {
    .lesson-mode #fixedFooter {
        padding: 15px 60px !important; 
    }
}

.test-mode #fixedFooter {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 15px 20px !important;
}

/* ===== ESTILOS PARA PANTALLA DE REPASO ===== */

@media (min-width: 1025px) {
  .edooly-page-review-speech-bubble {
    max-width: 450px !important; 
    font-size: 20px !important;
    padding: 20px 25px !important;
    left: 55% !important; 
    transform: translateX(-50%) !important;
    top: 20% !important;
  }

  .edooly-page-review-lottie-container {
    width: 450px !important; 
    right: 5% !important; 
  }

  .edooly-page-review-lottie-container {
    width: 450px !important;
    height: 450px !important;
  }
}

@media (min-width: 1600px) {
  .edooly-page-review-speech-bubble {
    max-width: 550px !important;
    font-size: 22px !important;
    left: 60% !important;
  }

  .edooly-page-review-lottie-container {
    width: 500px !important;
    right: 10% !important;
  }

  .edooly-page-review-lottie-container {
    width: 500px !important;
    height: 500px !important;
  }
}

.edooly-page-review-container {
    margin: 0;
    padding: 0;
    min-height: calc(100vh - var(--header-height, 0px));
    background: linear-gradient(to bottom, #ffe0b2, #ffffff);
    font-family: 'Nunito Sans', sans-serif;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 900; 
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* SVG Container */
.edooly-page-review-lottie-container {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 300px;
    display: flex;
    justify-content: center;
    z-index: 1;
}

.edooly-page-review-lottie-container {
    width: 300px;
    height: 300px;
}

/* Globo de texto */
.edooly-page-review-speech-bubble {
    position: absolute;
    top: 15%;
    left: 50%;
    transform: translateX(-50%);
    max-width: 300px;
    background: #222222;
    border: 2px solid #000000;
    border-radius: 10px;
    padding: 14px 18px;
    color: #ffffff;
    font-size: 15px;
    text-align: left;
    z-index: 10;
    animation: edooly-page-review-float 3s ease-in-out infinite;
    font-family: 'Nunito', sans-serif;
}

.edooly-page-review-speech-bubble::after {
    content: "";
    position: absolute;
    top: 100%;
    right: 20px;
    border-width: 10px;
    border-style: solid;
    border-color: #222222 transparent transparent transparent;
}

@keyframes edooly-page-review-float {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* Footer real (parte inferior) */
.edooly-page-review-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #ffffff;
    border-top: 1px solid #ccc;
    padding: 20px 0;
    text-align: center;
    z-index: 5;
}

.edooly-page-review-button {
    background-color: #000000;
    color: #ffffff;
    border: none;
    padding: 12px 28px;
    font-size: 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
}

.edooly-page-review-button:hover {
    background-color: #333;
}


/* Nuevo indicador de modo repaso */
.review-mode-indicator {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: #f5be47;
    border-radius: 50%;
    z-index: 1001;
    margin-left: auto;
    margin-right: 15px;
    animation: reviewIndicatorPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.review-mode-indicator svg {
    width: 24px;
    height: 24px;
}

@keyframes reviewIndicatorPop {
    0% { 
        transform: scale(0);
        opacity: 0;
    }
    70% {
        transform: scale(1.1);
    }
    100% { 
        transform: scale(1);
        opacity: 1;
    }
}

.review-mode-indicator {
    display: none;
}

.lesson-mode.review-active .review-mode-indicator {
    display: flex !important;
}


.lesson-mode #fixedFooter #skipButton {
  margin-right: 180px !important; /* espacio hacia Verificar */
}

.lesson-mode #fixedFooter #verifyButton,
.lesson-mode #fixedFooter .verify-button {
  margin-left: 180px !important;  /* espacio hacia Saltar */
}

@media (max-width: 800px) {
  .lesson-mode #fixedFooter #skipButton {
    margin-right: 60px !important; 
  }

  .lesson-mode #fixedFooter #verifyButton,
  .lesson-mode #fixedFooter .verify-button {
    margin-left: 60px !important;
  }
}

@media (max-width: 510px) {
  .lesson-mode #fixedFooter #skipButton {
    margin-right: 30px !important;
  }

  .lesson-mode #fixedFooter #verifyButton,
  .lesson-mode #fixedFooter .verify-button {
    margin-left: 30px !important;
  }
}

@media (max-width: 460px) {
    .lesson-mode .skip-button {
        padding: 10px 18px !important;
        font-size: 14px !important;
        min-width: 100px !important;
        height: 38px !important;
        display: block;
        text-align: center;
        line-height: 18px; 
    }
    
    body.lesson-mode #verifyButton {
        min-width: clamp(140px, 45%, 180px);
        height: 42px;
        font-size: 16px;
        border-radius: 25px;
        padding: 12px 20px; 
        display: inline-block;
        text-align: center;
        line-height: 18px;
    }
}

@keyframes fadeSlideRight {
  0% {
    opacity: 0;
    transform: translateX(-40px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

.edooly-page-review-container {
  animation: fadeSlideRight 0.6s ease-out;
}


@keyframes fadeSlideUp {
  0% {
    opacity: 0;
    transform: translateY(40px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.edooly-page-review-container {
  animation: fadeSlideUp 0.6s ease-out;
}

.edooly-continue-button {
    min-width: 250px;
    height: 45px;
    line-height: 45px;
    font-size: 18px;
    padding: 0 24px;
    background: #444;
    color: white;
    font-weight: 600;
    font-family: 'Nunito Sans', sans-serif;
    border: none;
    border-radius: 30px;
    display: inline-block;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 5px 0 #000, 0 6px 12px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
    transform: translateY(0);
    user-select: none;
}

.edooly-continue-button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 5px 0 #000, 0 7px 15px rgba(0,0,0,0.15) !important;
    background: #444 !important;
}

.edooly-continue-button:active {
    transform: translateY(4px) !important;
    box-shadow: 0 1px 0 #000 !important;
}

.edooly-continue-button:disabled {
    background: #cccccc !important;
    box-shadow: 0 4px 0 #999999 !important;
    cursor: not-allowed !important;
    transform: translateY(0) !important;
}

