/* 
    Created on : 04/03/2020, 3:08:18 PM
    Author     : george
*/

canvas {
    width: 100%;
    height: 100%;
    display: block;
}

body {
    font-family: Monospace;
    margin: 0px;
    overflow: hidden;
    background: #000;
}

#info {
    position: fixed;
    top: 14px;
    left: 16px;
    z-index: 2;
}

#pageTitle {
    margin: 0;
    color: #eef3ff;
    font-size: 34px;
    font-weight: bold;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}

#pageLevel {
    display: inline-block;
    margin-left: 0.4em;
    color: #ffd84d;
}

#marioOverlay {
    position: fixed;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    pointer-events: none;
    z-index: 3;
    image-rendering: pixelated;
    display: block;
}

#quickControls {
    position: fixed;
    right: 12px;
    bottom: 12px;
    z-index: 4;
    display: inline-flex;
    gap: 8px;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 248, 220, 0.5);
    background: rgba(8, 18, 26, 0.82);
    color: cornsilk;
    font-family: Monospace;
    font-size: 12px;
    line-height: 1;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

#quickControls strong {
    color: #ffe7a0;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#gameStatus {
    position: fixed;
    left: 50%;
    top: 50%;
    z-index: 6;
    display: none;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255, 203, 203, 0.85);
    background: rgba(43, 16, 16, 0.92);
    color: #ffd7d7;
    font-family: Monospace;
    font-size: 20px;
    font-weight: bold;
    letter-spacing: 0.8px;
    transform: translate(-50%, -50%);
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.7);
    pointer-events: none;
}

#gameStatus.game-over {
    border-color: rgba(255, 120, 120, 0.95);
    background: rgba(140, 22, 22, 0.95);
    color: #fff0f0;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
}

#gameStatus.win {
    border-color: rgba(120, 255, 146, 0.98);
    background: rgba(10, 66, 20, 0.92);
    color: #7dff87;
    font-size: 46px;
    letter-spacing: 2.4px;
    line-height: 1;
    padding: 16px 76px 14px 24px;
    box-shadow: 0 0 18px rgba(80, 255, 120, 0.5), 0 0 36px rgba(42, 255, 104, 0.3);
    text-shadow: 0 0 8px rgba(140, 255, 164, 0.9);
    animation: winPulse 1.1s ease-in-out infinite alternate;
}

#gameStatus.win::after {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 42px;
}

#gameStatus.win::after {
    content: '🏆';
    right: 18px;
}

@keyframes winPulse {
    from {
        transform: translate(-50%, 0) scale(1);
    }

    to {
        transform: translate(-50%, 0) scale(1.06);
    }
}

#hud {
    position: fixed;
    left: 16px;
    bottom: 16px;
    z-index: 4;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid rgba(200, 170, 255, 0.25);
    background: rgba(8, 4, 20, 0.78);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    pointer-events: none;
}

.hud-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
    font-family: Monospace;
    font-size: 13px;
    line-height: 1;
}

.hud-label {
    color: rgba(200, 170, 255, 0.7);
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 0.5px;
    align-self: center;
}

#hud-score, #hud-health, #hud-speed, #hud-time {
    color: #eeddff;
    font-weight: bold;
    letter-spacing: 0.5px;
}

#hud-health {
    color: #ff7eb6;
    letter-spacing: 3px;
}

@media (max-width: 760px) {
    #info {
        top: 10px;
        left: 10px;
    }

    #pageTitle {
        font-size: 24px;
        letter-spacing: 0.06em;
    }

    #pageLevel {
        display: block;
        margin-left: 0;
        margin-top: 4px;
    }

    #quickControls {
        right: 8px;
        left: 8px;
        bottom: 8px;
        justify-content: center;
        flex-wrap: wrap;
        border-radius: 12px;
        font-size: 11px;
        padding: 6px 8px;
    }

    #quickControls strong {
        width: 100%;
        text-align: center;
        margin-bottom: 2px;
    }

    #gameStatus {
        font-size: 17px;
        max-width: calc(100vw - 32px);
        text-align: center;
    }

    #hud {
        left: 8px;
        right: 8px;
        bottom: 52px;
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 8px 10px;
    }
}