﻿

/* =========================
   BASE
========================= */

html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
    touch-action: none;
    background: #000;
}

#game {
    height: 100%;
    width: 100%;
    position: relative;

    border: 1px solid #ccc;

    overflow: hidden;

    max-width: 100vw;
    max-height: 100vh;
}

/* =========================
   CAMERA WRAPPER
========================= */

#gameView {
    position: absolute;

    left: 0;
    bottom: 0;

    width: 100vw;
    height: 100vh;

    overflow: hidden;

    z-index: 0;

    transform-origin: bottom left;
}

#world {
    margin: 0;
    padding: 0;

    width: 100%;
    height: 100%;

    position: absolute;

    left: 0;
    bottom: 0;

    z-index: 0;

    transform: none;
}

/* =========================
   HUD
========================= */

.gauge {
    margin: 0;
    padding: 0;

    height: 50px;
    width: 70px;

    text-align: right;

    font-size: 2em;
    font-weight: bold;

    position: absolute;

    top: 17px;
    right: 52px;

    z-index: 1000;

font-family: 'Rye', serif;
}

.gaugeSprite {
    margin: 0;
    padding: 0;

    z-index: 1000;

    position: absolute;
}

#coinNumber {
    left: 0;
}

#liveNumber {
    right: 52px;
}

#coin {
    height: 32px;
    width: 32px;

    background-image: url(mario-objects.png);
    background-position: 0 0;

    top: 15px;
    left: 70px;
}

#live {
    height: 40px;
    width: 40px;

    background-image: url(mario-sprites.png);
    background-position: 0 -430px;

    top: 12px;
    right: 8px;
}

/* =========================
   GAME OBJECTS
========================= */

.figure {
    margin: 0;
    padding: 0;

    z-index: 99;

    position: absolute;
}

.matter {
    margin: 0;
    padding: 0;

    z-index: 95;

    position: absolute;

    width: 32px;
    height: 32px;
}

/* =========================
   LOGO
========================= */

#inkmanLogo {
    position: absolute;

    top: 110px;
    left: 50px;

    z-index: 9999;

    width: 250px;
}

/* =========================
   HOME BUTTON
========================= */

#homeButton {
    position: absolute;

    top: 110px;
    right: 50px;

    z-index: 9999;
}

#homeButtonImage {
    width: 150px;

    display: block;

    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.45));
}

/* =========================
   MOBILE CONTROLS
========================= */

#mobileControls {
    display: none;
}

/* =========================
   LEVEL COMPLETE
========================= */

#levelComplete {
    position: absolute;

    top: 40%;
    left: 50%;

    transform: translate(-50%, -50%);

    z-index: 999999;

font-family: 'Rye', serif;
    font-size: 64px;

    color: #ffd800;

    text-shadow:
        4px 4px 0 #000,
        8px 8px 12px rgba(0,0,0,0.5);

    animation: levelPulse 1s infinite;
}

@keyframes levelPulse {

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

    50% {
        transform: translate(-50%, -50%) scale(1.08);
    }

    100% {
        transform: translate(-50%, -50%) scale(1);
    }
}

/* =========================
   GAME OVER
========================= */

#gameOver {
    position: absolute;

    top: 42%;
    left: 50%;

    transform: translate(-50%, -50%);

    z-index: 999999;

font-family: 'Rye', serif;
    font-size: 72px;

    color: #ff2a2a;

    text-shadow:
        4px 4px 0 #000,
        0 0 20px rgba(255, 0, 0, 0.5);

    pointer-events: none;

    white-space: nowrap;

    animation: gameOverPulse 0.8s infinite;
}

@keyframes gameOverPulse {

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

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

    100% {
        transform: translate(-50%, -50%) scale(1);
    }
}

/* =========================
   FOOTER
========================= */

.inkman-footer {

    position: fixed;

    bottom: 10px;
    left: 50%;

    transform: translateX(-50%);

    padding: 8px 18px;

    background: rgba(0,0,0,0.45);

    border-radius: 10px;

    color: rgba(255,255,255,0.78);

    font-family: 'Roboto', sans-serif;
    font-size: 8px;
    font-weight: 400;

    text-align: center;

    letter-spacing: 0.5px;

    text-shadow: 0 2px 4px rgba(0,0,0,0.7);

    backdrop-filter: blur(1px);

    white-space: nowrap;

    z-index: 9999;
}

/* =========================
   TABLET + MOBILE
========================= */

@media (max-width: 768px) {

    #gameView {

        width: calc(100vw / 0.76);
        height: calc(100vh / 0.76);

        transform: scale(0.76);

        transform-origin: bottom left;

        left: 0;
        bottom: 0;
    }

    #world {
        width: 100%;
        height: 100%;
        transform: none;
    }

    #inkmanLogo {

        width: 120px;

        top: 58px;
        left: 15px;
    }

    #homeButton {

        top: 58px;
        right: 15px;
    }

    #homeButtonImage {

        width: 48px;
    }

    #mobileControls {

        display: block;

        position: fixed;

        left: 0;
        bottom: 12px;

        width: 100%;

        z-index: 99999;

        pointer-events: none;
    }

    #mobileControls button {

        pointer-events: auto;

        position: absolute;

        width: 52px;
        height: 52px;

        border-radius: 50%;

        border: 2px solid rgba(255,255,255,0.75);

        background: rgba(0,0,0,0.55);

        color: #ffffff;

        font-size: 18px;
        font-weight: bold;

        backdrop-filter: blur(4px);

        box-shadow:
            0 4px 10px rgba(0,0,0,0.35);
    }

    #btnLeft {
        left: 18px;
        bottom: 0;
    }

    #btnRight {
        left: 82px;
        bottom: 0;
    }

#btnJump {

    position: absolute;

    right: 8px;
    bottom: 10px;

    width: 150px;
    height: 150px;

    border-radius: 50%;

    font-size: 8px;

    background: rgba(0,0,0,0.02);
}
}
/* =========================
   SMALL MOBILE
========================= */

@media (max-width: 480px) {

    #gameView {

        width: calc(100vw / 0.70);
        height: calc(100vh / 0.70);

        transform: scale(0.70);

        transform-origin: bottom left;

        left: 0;
        bottom: 0;
    }

    #world {
        width: 100%;
        height: 100%;
        transform: none;
    }

    #inkmanLogo {
    top: 55px;
        width: 95px;
    }

    #homeButtonImage {
    top: 55px;
        width: 38px;
    }

    #mobileControls button {

        width: 44px;
        height: 44px;

        font-size: 15px;
    }

    #btnRight {

        left: 70px;
    }

#btnJump {

    position: absolute;

    right: 6px;
    bottom: 8px;

    width: 135px;
    height: 135px;

    border-radius: 50%;

    font-size: 6px;

    background: rgba(0,0,0,0.02);
}

    .inkman-footer {

        font-size: 6px;

        padding: 6px 12px;

        bottom: 6px;
    }
}