body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #23272a;
    color: #fff;
    text-align: center;
    margin: 0;
    padding: 0;
}

#gameContainer {
    display: inline-block;
    background: #333;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 0 16px #0007;
    max-width: 99vw;
}

#canvasWrapper {
    width: 100%;
    max-width: 350px;
    margin: 0 auto 15px auto;
}

#gameCanvas {
    background: #222;
    border: 2px solid #555;
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    cursor: pointer;
    max-width: 350px;
    touch-action: none;
}

#scoreBoard {
    font-size: 1.2em;
    margin-bottom: 10px;
}

#blocksArea {
    margin-bottom: 10px;
    width: 100%;
}

#blockHotbar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
    flex-wrap: nowrap;
    width: 100%;
}

.selectBlock {
    background: #222;
    border: 2px solid #555;
    border-radius: 8px;
    cursor: grab;
    width: 70px;
    height: 70px;
    max-width: 24vw;
    max-height: 24vw;
    min-width: 50px;
    min-height: 50px;
    transition: border 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
    touch-action: none;
    opacity: 1;
}

.selectBlock.selected {
    border: 3px solid #ffd700;
    box-shadow: 0 0 8px #ffd700;
}

.selectBlock:active, .selectBlock:focus {
    border: 3px solid #ffd700;
    box-shadow: 0 0 8px #ffd700;
}

.selectBlock.used {
    opacity: 0.4;
    cursor: default;
    pointer-events: none;
}

#restartBtn {
    background: #4caf50;
    color: #fff;
    border: none;
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    margin-bottom: 10px;
    margin-top: 8px;
}

#restartBtn:hover, #restartBtn:active {
    background: #388e3c;
}

#gameOver {
    font-size: 1.5em;
    color: #ff5252;
    margin-top: 10px;
}

.hidden {
    display: none;
}

/* Mobile und Tablet Optimierung */
@media (max-width: 600px) {
    h1 {
        font-size: 1.2em;
    }
    #gameContainer {
        padding: 8px;
        border-radius: 8px;
    }
    #canvasWrapper {
        max-width: 99vw;
        min-width: 220px;
    }
    #gameCanvas {
        max-width: 99vw;
        min-width: 220px;
    }
    #blockHotbar {
        gap: 6vw;
    }
    .selectBlock {
        max-width: 28vw;
        max-height: 28vw;
        min-width: 48px;
        min-height: 48px;
    }
}
