* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--bg-body, #0d0a08);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: monospace;
    overflow: hidden;
}

.back-btn {
    position: fixed;
    top: 15px;
    left: 15px;
    color: var(--text-secondary, #998877);
    text-decoration: none;
    font-size: 14px;
    padding: 8px 16px;
    background: var(--bg-modalLight, rgba(0,0,0,0.5));
    border-radius: 4px;
    transition: all 0.2s;
    z-index: 100;
}

.back-btn:hover {
    color: var(--text-white, #ffffff);
    background: var(--bg-modal, rgba(0,0,0,0.85));
}

#game-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#gameCanvas {
    border: 3px solid var(--game-grid, #333333);
    border-radius: 4px;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

@media (min-aspect-ratio: 1/1) {
    /* Desktop: quadratisch zentriert */
    #gameCanvas {
        width: min(95vw, 95vh);
        height: min(95vw, 95vh);
    }
}

@media (max-aspect-ratio: 1/1) {
    /* Mobile Portrait: JS steuert Größe */
    #gameCanvas {
        border: none;
        border-radius: 0;
    }

    .back-btn {
        top: 10px;
        left: 10px;
        font-size: 12px;
        padding: 6px 12px;
    }
}

#ui {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: var(--text-white, #ffffff);
    background: rgba(0,0,0,0.7);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
}

#score {
    color: var(--text-secondary, #998877);
}

#swarmCount {
    color: var(--game-player, #7eb8da);
    font-weight: bold;
}

#points {
    color: var(--status-gold, #f1c40f);
    font-weight: bold;
}
