:root {
    --primary: #FF6B6B;
    --secondary: #4ECDC4;
    --accent: #FFE66D;
    --bg: #F7FFF7;
    --text: #2F2F2F;
}

#game-container {
    background: white;
    padding: 2rem;
    margin: 1rem;
    border-radius: 1rem;
    box-shadow: 0 20px 0px rgba(0, 0, 0, 0.05);
    text-align: center;
    position: relative;
}

.header-ui {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-direction: column;
}

#score-label {
    font-weight: 700;
    font-size: 1.2rem;
}

#scoreValue {
    color: var(--primary);
    font-size: 1.5rem;
}

.lives-container {
    font-size: 1rem;
    letter-spacing: 5px;
}

#timer-bar-container {
    width: 100%;
    height: 10px;
    background: #eee;
    border-radius: 10px;
    margin-bottom: 20px;
    overflow: hidden;
}

#timerBar {
    width: 100%;
    height: 100%;
    background: var(--secondary);
}

.screen {
    display: none;
}

.active {
    display: block;
}

#sum-card {
    background: var(--accent);
    padding: 20px;
    border-radius: 20px;
    font-size: 3rem;
    font-family: 'Fredoka One', cursive;
    margin: 20px 0;
}

#countdownOverlay {
    position: absolute;
    top: 65%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 10rem;
    font-family: 'Fredoka One';
    color: var(--primary);
    pointer-events: none;
    opacity: 0;
    z-index: 10;
}

.fade-out {
    animation: fadeOut 1s forwards;
}

@keyframes fadeOut {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.5);
    }

    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }
}

/* Input y Botones */
input {
    font-family: 'Fredoka One';
    font-size: 2rem;
    width: 120px;
    text-align: center;
    border: 4px solid var(--secondary);
    border-radius: 15px;
    padding: 10px;
    outline: none;
}

button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.5rem;
    border-radius: 50px;
    cursor: pointer;
    font-family: 'Fredoka One';
    box-shadow: 0 6px 0 #d44;
    transition: 0.2s;
    margin-top: 20px;
}

button:active {
    transform: translateY(4px);
    box-shadow: 0 2px 0 #d44;
}

.hidden {
    display: none;
}

#modalOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

#modal-content {
    background: white;
    padding: 40px;
    border-radius: 30px;
    text-align: center;
    max-width: 400px;
    width: 80%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transform: translateY(-20px);
    animation: modalIn 0.3s forwards;
}

@keyframes modalIn {
    to {
        transform: translateY(0);
    }
}

#modalTitle {
    font-family: 'Fredoka One';
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: var(--primary);
}

#modalMsg {
    font-size: 1.5rem;
    margin-bottom: 20px;
    font-weight: 700;
}