/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 15px;
    position: relative;
    z-index: 10;
}

.header-left {
    display: flex;
    gap: 10px;
    align-items: center;
    z-index: 2;
}

.menu-btn {
    background: #FFFFFF;
    border: 4px solid #4A4A8C;
    border-radius: 20px;
    height: 64px;
    width: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.settings-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.fullscreen-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.menu-btn:hover {
    transform: translateY(-3px);
}

.menu-btn:active {
    transform: translateY(2px);
}

.new-game-btn {
    background: linear-gradient(135deg, #FF6B6B 0%, #E83E8C 100%);
    border: 4px solid #B01E55;
    border-radius: 20px;
    height: 64px;
    padding: 0 25px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    color: #FFFFFF;
    text-shadow: 2px 2px 0 #B01E55;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.new-game-btn:hover {
    background: linear-gradient(135deg, #FF8585 0%, #F06292 100%);
}

.new-game-btn:active {
    transform: scale(0.98);
}

.timer {
    background: #FFFFFF;
    border: 4px solid #4A4A8C;
    border-radius: 20px;
    height: 64px;
    padding: 0 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    color: #4A4A8C;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

#timerValue {
    transition: all 0.3s ease;
    display: inline-block;
}

.timer-bonus-effect {
    color: #32CD32 !important;
    transform: scale(1.3);
    text-shadow: 0 0 10px rgba(50, 205, 50, 0.5);
}

.time-bonus-label {
    position: absolute;
    right: -50px;
    top: 60px;
    font-size: 32px;
    font-weight: 900;
    color: #32CD32;
    pointer-events: none;
    animation: timeBonusFly 2s ease-out forwards;
    white-space: nowrap;
    text-shadow: 2px 2px 0 #FFF, -1px -1px 0 #FFF, 1px -1px 0 #FFF, -1px 1px 0 #FFF;
    z-index: 100;
}

@keyframes timeBonusFly {
    0% {
        transform: translateY(10px) scale(0.5);
        opacity: 0;
    }

    20% {
        transform: translateY(0px) scale(1.3);
        opacity: 1;
    }

    80% {
        opacity: 1;
    }

    100% {
        transform: translateY(-100px) scale(1);
        opacity: 0;
    }
}

.timer-prefix {
    display: inline;
}

.score {
    background: #FFFFFF;
    border: 4px solid #4A4A8C;
    border-radius: 20px;
    height: 64px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    font-size: 24px;
    font-weight: bold;
    color: #4A4A8C;
    z-index: 2;
}

#headerCorrect {
    color: #228B22;
}

#headerIncorrect {
    color: #DC143C;
}

/* Lives System */
.lives-container {
    display: flex;
    gap: 5px;
    margin-right: 15px;
    align-items: center;
}

.heart-icon {
    width: 30px;
    height: 30px;
    object-fit: contain;
    transition: all 0.3s ease;
}

.heart-icon.lost {
    filter: grayscale(1) opacity(0.3);
    transform: scale(0.8);
}

.heart-icon.shake {
    animation: heartShake 0.5s ease;
}

@keyframes heartShake {

    0%,
    100% {
        transform: rotate(0);
    }

    25% {
        transform: rotate(-20deg) scale(1.2);
    }

    75% {
        transform: rotate(20deg) scale(1.2);
    }
}


#timerValue.low-time {
    color: #DC143C;
    animation: pulse 1s infinite alternate;
}

@media (max-width: 768px) {
    .header {
        padding: 8px 15px;
        gap: 15px;
        justify-content: space-between;
    }

    .header-left {
        display: flex;
        gap: 10px;
        align-items: center;
    }

    #headerMobileNewGameBtn {
        display: flex !important;
        padding: 5px;
        height: 40px;
        width: 40px;
    }

    .new-game-btn {
        display: none;
    }

    .timer {
        background: none !important;
        border: none !important;
        box-shadow: none !important;
        position: absolute;
        top: 55px;
        right: 15px;
        padding: 0;
        height: auto;
        min-height: auto;
        font-size: 18px;
        z-index: 100;
    }

    .timer-prefix {
        display: inline;
    }

    .score {
        font-size: 16px;
        padding: 6px 12px;
        height: auto;
        min-height: 40px;
    }

    .menu-btn {
        padding: 5px;
        font-size: 20px;
        height: 40px;
        width: 40px;
    }

    .settings-icon {
        width: 25px;
        height: 25px;
    }

    .heart-icon {
        width: 20px;
        height: 20px;
    }

    .lives-count {
        font-size: 18px;
        font-weight: bold;
        color: #4A4A8C;
        margin-right: 2px;
    }
}