body { 
    margin: 0; 
    background: #1e272e; 
    font-family: 'Fredoka', sans-serif; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    height: 100vh; 
    overflow: hidden; 
}

#game-container { 
    position: relative; 
    width: 800px; 
    height: 600px; 
    background: #87ceeb; 
    border-radius: 15px; 
    box-shadow: 0 20px 50px rgba(0,0,0,0.5); 
    overflow: hidden; 
}

.overlay { 
    position: absolute; 
    width: 100%; 
    height: 100%; 
    background: rgba(0,0,0,0.85); 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    align-items: center; 
    z-index: 10; 
    color: white; 
}

.hidden { display: none !important; }

.game-title {
    font-size: 70px;
    color: #2ed573;
    -webkit-text-stroke: 2px white;
    margin-bottom: 20px;
}


.level-grid { 
    display: grid; 
    grid-template-columns: repeat(5, 1fr); 
    gap: 15px; 
    margin: 20px 0; 
    padding: 10px; 
}

.lvl-btn { 
    width: 65px; 
    height: 65px; 
    background: #2ed573; 
    border: none; 
    color: white; 
    font-weight: bold; 
    font-size: 22px; 
    border-radius: 12px; 
    cursor: pointer; 
    box-shadow: 0 4px 0 #218c74; 
    transition: 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
}

.lvl-btn:disabled {
    background: #2ecc71;
    opacity: 0.8;
    cursor: default;
}

.lvl-btn:active:not(:disabled) { 
    transform: translateY(3px); 
    box-shadow: 0 1px 0 #218c74; 
}

button { 
    background: #2ed573; 
    border: none; 
    padding: 15px 40px; 
    color: white; 
    font-weight: bold; 
    font-size: 20px; 
    border-radius: 15px; 
    cursor: pointer; 
    box-shadow: 0 5px 0 #218c74; 
    margin: 10px; 
    transition: 0.1s; 
}

button:active { transform: translateY(4px); box-shadow: 0 1px 0 #218c74; }

#hud { 
    position: absolute; 
    top: 15px; 
    left: 15px; 
    background: rgba(255,255,255,0.9); 
    padding: 10px 20px; 
    border-radius: 12px; 
    color: #2f3542; 
    font-weight: bold; 
    z-index: 5; 
}

.hud-box {
    display: flex;
    align-items: center;
}
.cube-placement {
    position: relative;
    display: inline-block;
    width: 55px;
    vertical-align: bottom;
    margin-right: -2px; 
    margin-left: -2px;
}

.menu-cube {
    position: absolute;
    width: 50px;
    height: 48px;
    background-color: #2ecc71;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 10px;
    box-shadow: 0 6px 0 rgba(0,0,0,0.3);
    border: 3px solid white;
}


.menu-cube::before, .menu-cube::after {
    content: '';
    position: absolute;
    width: 9px;
    height: 14px;
    background: white;
    border-radius: 50%;
    top: 10px;
}

.menu-cube::before { left: 10px; }
.menu-cube::after { right: 10px; }

canvas {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    max-height: 100vh;
    aspect-ratio: 800 / 600; 
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    background-color: #70daee;
    border: 4px solid #2f3542;
    border-radius: 8px;
}