@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

body {
    background-color: #222;
    color: #FFDE00;
    /* Pikachu Yellow */
    font-family: 'Press Start 2P', monospace;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    overflow: hidden;
}

#game-container {
    text-align: center;
    position: relative;
    border: 4px solid #FFDE00;
    padding: 20px;
    background-color: #111;
    box-shadow: 0 0 20px rgba(255, 222, 0, 0.5);
}

#home-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    transition: transform 0.2s;
    z-index: 20;
}

#home-btn:hover {
    transform: scale(1.2);
    background: none;
}

h1 {
    margin: 0 0 20px 0;
    text-shadow: 2px 2px #CC0000;
    /* Red like cheeks */
    font-size: 2rem;
}

#score-board {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

canvas {
    background: #000;
    border: 2px solid #555;
    display: block;
    margin: 0 auto;
}

#game-over {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.85);
    padding: 40px;
    border: 4px solid #FFDE00;
    text-align: center;
    z-index: 10;
    display: none;
    /* Controlled by JS via class */
}

#game-over.visible {
    display: block;
}

#game-over h2 {
    color: #FFDE00;
    margin-bottom: 20px;
    text-transform: uppercase;
}

button {
    background-color: #CC0000;
    color: white;
    border: none;
    padding: 15px 30px;
    font-family: 'Press Start 2P', monospace;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #FF0000;
}

#menu-btn {
    background-color: #333;
    display: block;
    margin: 20px auto 0;
    font-size: 0.8rem;
    padding: 10px 20px;
    border: 2px solid #FFDE00;
}

#menu-btn:hover {
    background-color: #555;
    color: #FFDE00;
}

#mobile-controls {
    display: none;
    justify-content: space-between;
    width: 100%;
    margin-top: 20px;
    padding: 0 10%;
    box-sizing: border-box;
}

#mobile-controls button {
    background-color: #FFDE00;
    color: #111;
    font-size: 2rem;
    padding: 20px 40px;
    border: 4px solid #111;
    border-radius: 10px;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
}

#mobile-controls button:active {
    background-color: #CCB000;
    transform: scale(0.95);
}

/* Support for iPads and Tablets in Landscape up to 1366px */
@media (max-width: 1366px) {
    canvas {
        width: 100%;
        height: auto;
    }

    #mobile-controls {
        display: flex;
    }
}

.hidden {
    display: none !important;
}