/* 404 Game */

/* Game wrapper */
.game-404 {
    width: 100%;
    max-width: 1200px;
    margin: 20px auto;
    line-height: 0;
    font-family: 'Courier New', 'Lucida Console', monospace;
    color: #000000;
    touch-action: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

/* Game container - キャラが上に飛び出せる */
.game-404 .game-404-canvas {
    position: relative;
    display: block;
    width: 100%;
    line-height: 0;
    overflow: visible;
}

/* Canvas */
.game-404 #gameCanvas {
    background-color: transparent;
    background-image: url('/assets/img/games/bg.gif');
    background-repeat: repeat-x;
    background-position: left bottom;
    background-size: auto 100%;
    border: none;
    display: block;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    cursor: pointer;
    width: 100%;
    height: auto;
}

/* Character image */
.game-404 .character-img {
    position: absolute;
    z-index: 10;
    pointer-events: none;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    background-color: transparent;
    backface-visibility: hidden;
    transform-origin: 0 0;
    transition: opacity 0.1s ease;
}

/* TAP : JUMP label */
.game-404 .jump-instruction {
    position: absolute;
    top: 15px;
    left: 15px;
    font-size: 16px;
    font-weight: bold;
    letter-spacing: 2px;
    color: #000000;
    border: 2px solid #000000;
    padding: 16px;
    background-color: transparent;
    z-index: 20;
    line-height: 1;
    border-radius: 4px;
}

/* Score */
.game-404 .score-container {
    position: absolute;
    top: 18px;
    right: 18px;
    font-size: 24px;
    font-weight: bold;
    letter-spacing: 3px;
    color: #000000;
    z-index: 20;
    line-height: 1;
    white-space: nowrap;
}

.game-404 .score-prefix {
    margin-right: 10px;
}

.game-404 .hi-score {
    margin-right: 15px;
}

/* Game Over */
.game-404 .game-over {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 100;
    color: #FFF;
    background-color: #000000;
    padding: 16px;
    /*border: 2px solid #f2f1f1;*/
    box-shadow: 1px 1px 0 #f2f1f1;
    cursor: pointer;
    line-height: 1.4;
    white-space: nowrap;
}

.game-404 .game-over-text {
    font-size: 24px;
    font-weight: bold;
    letter-spacing: 4px;
    /*margin-bottom: 12px;*/
}

.game-404 .restart-text {
    font-size: 18px;
    letter-spacing: 2px;
}

/* Instructions */
.game-404 .instructions {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 50;
    color: #FFF;
    background-color: #000000;
    padding: 15px 25px;
    border: 2px solid #000000;
    cursor: pointer;
    line-height: 1.4;
    white-space: nowrap;
}

.game-404 .instruction-text {
    font-size: 24px;
    font-weight: bold;
    letter-spacing: 3px;
    /*margin-bottom: 20px;*/
}

.game-404 .controls {
    font-size: 18px;
    letter-spacing: 2px;
    line-height: 1.6;
}

/* ===== Responsive ===== */
@media (max-width: 850px) {
    .game-404 {
        margin: 10px auto;
    }

    .game-404 .jump-instruction {
        top: 8px;
        left: 8px;
        font-size: 10px;
        padding: 5px 8px;
        border-width: 2px;
    }

    .game-404 .score-container {
        top: 10px;
        right: 8px;
        font-size: 12px;
        letter-spacing: 1px;
    }

    .game-404 .score-prefix {
        margin-right: 4px;
    }

    .game-404 .hi-score {
        margin-right: 6px;
    }

    .game-404 .game-over-text {
        font-size: 14px;
        letter-spacing: 1px;
        /*margin-bottom: 8px;*/
    }

    .game-404 .restart-text {
        font-size: 14px;
    }

    .game-404 .game-over {
        padding: 8px 14px;
    }

    .game-404 .instruction-text {
        font-size: 14px;
    }

    .game-404 .controls {
        font-size: 14px;
    }

    .game-404 .instructions {
        padding: 8px 14px;
    }
}
