@import url('https://fonts.googleapis.com/css2?family=VT323&display=swap');

body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    background-color: #5c4033;  /* Minecraft dirt color */
    background-image: linear-gradient(45deg, #4a3328 25%, transparent 25%),
                     linear-gradient(-45deg, #4a3328 25%, transparent 25%),
                     linear-gradient(45deg, transparent 75%, #4a3328 75%),
                     linear-gradient(-45deg, transparent 75%, #4a3328 75%);
    background-size: 20px 20px;
    font-family: 'VT323', monospace;
}

.game-container {
    background-color: rgba(0, 0, 0, 0.8);
    padding: 20px;
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.minecraft-title {
    color: #FFFF55;
    font-size: 48px;
    text-shadow: 2px 2px #3F3F00;
    margin-bottom: 20px;
    text-align: center;
}

.game-wrapper {
    display: flex;
    gap: 20px;
    align-items: start;
}

#gameCanvas {
    border: 4px solid #545454;
    background-color: #7DAA55;  /* Minecraft grass color */
    border-radius: 0;
    image-rendering: pixelated;
}

.controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.minecraft-btn {
    background-color: #727272;
    border: 3px outset #8b8b8b;
    padding: 8px 16px;
    font-family: 'VT323', monospace;
    font-size: 20px;
    color: white;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.1s;
    min-width: 160px;
}

.minecraft-btn:hover {
    background-color: #8b8b8b;
    border-style: inset;
}

.score-block {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: #373737;
    padding: 10px;
    border: 2px solid #545454;
}

.score-icon {
    width: 24px;
    height: 24px;
    background-color: #50C878;  /* Emerald color */
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}

.minecraft-text {
    color: #fff;
    font-size: 24px;
    text-shadow: 2px 2px #000;
}

.instructions {
    margin-top: 20px;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.6);
    border: 2px solid #545454;
}

.sound-control {
    margin-top: 10px;
}

.sound-icon {
    width: 24px;
    height: 24px;
}

.score {
    color: #fff;
    font-size: 24px;
    margin-top: 20px;
    font-family: Arial, sans-serif;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    body {
        padding: 10px;
        overflow: hidden;
        position: fixed;
        width: 100%;
        height: 100%;
        display: flex;
        align-items: flex-start;  /* Changed from center to allow space for controls */
        padding-top: 20px;
    }

    .game-container {
        width: 100%;
        max-width: 320px;  /* Slightly larger than canvas */
        margin: 0 auto;
        padding: 15px;
        margin-bottom: 240px;  /* Increased space for controls */
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .game-wrapper {
        width: 100%;
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    #gameCanvas {
        width: 300px;
        height: 300px;
        margin: 0 auto;
    }

    .controls {
        width: 100%;
        margin-top: 15px;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .minecraft-btn {
        width: 200px;
        margin: 0 auto;
    }

    .score-block {
        width: 200px;
        justify-content: center;
    }

    .minecraft-title {
        font-size: 32px;
        margin-bottom: 15px;
    }

    .instructions {
        width: 100%;
        text-align: center;
        font-size: 16px;
        margin: 10px 0;
    }

    /* Touch controls improvements */
    .touch-controls {
        position: fixed;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        width: 280px;
        background-color: rgba(0, 0, 0, 0.6);
        padding: 15px;
        border-radius: 15px;
        gap: 20px;
        z-index: 1000;
    }

    .horizontal-controls {
        width: 100%;
        display: flex;
        justify-content: space-between;
        padding: 0 10px;
        gap: 20px;
    }

    .direction-btn {
        width: 65px;
        height: 65px;
        font-size: 28px;
        margin: 0;
        background-color: rgba(114, 114, 114, 0.95);
    }

    .up-btn, .down-btn {
        margin: 0 auto;
    }
}

/* Small phones */
@media (max-width: 360px) {
    .game-container {
        padding: 10px;
    }

    #gameCanvas {
        width: 280px;
        height: 280px;
    }

    .touch-controls {
        width: 260px;
        padding: 10px;
    }

    .direction-btn {
        width: 60px;
        height: 60px;
    }

    .minecraft-title {
        font-size: 28px;
    }
}

/* Handle landscape mode */
@media (max-height: 600px) and (orientation: landscape) {
    body {
        align-items: flex-start;
        padding-top: 10px;
    }

    .game-container {
        margin-bottom: 180px;
    }

    .minecraft-title {
        font-size: 24px;
        margin-bottom: 10px;
    }

    .touch-controls {
        bottom: 10px;
        gap: 10px;
    }

    .direction-btn {
        width: 55px;
        height: 55px;
        font-size: 24px;
    }
} 