.kocka-container {
    display: flex;
    justify-content: center;
    margin: 10px 0;
}

#kocka-board {
    border: 2px solid #00ffcc;
    background-color: rgba(0, 0, 0, 0.6);
    box-shadow: 0 0 30px rgba(0, 255, 204, 0.2);
    border-radius: 8px;
    height: 48vh;
    max-height: 480px;
    width: auto;
    aspect-ratio: 10 / 20;
    touch-action: none;
}

.side-panel {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 255, 204, 0.3);
    border-radius: 12px;
    padding: 15px 10px;
    min-width: 80px;
    box-shadow: inset 0 0 15px rgba(0, 255, 204, 0.05);
}

.stats {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

#next-piece {
    background-color: transparent;
    display: block;
}

/* Mobile Controls Grid */
.mobile-controls {
    display: grid;
    grid-template-columns: 70px 70px 70px;
    grid-template-rows: 55px 55px;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.ctrl-btn {
    background: linear-gradient(145deg, rgba(0, 255, 204, 0.1), rgba(0, 255, 204, 0.2));
    border: 1px solid rgba(0, 255, 204, 0.5);
    border-radius: 50%;
    color: #00ffcc;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    transition: all 0.1s ease-in-out;
    box-shadow: 0 5px 15px rgba(0, 255, 204, 0.1);
}

.ctrl-btn:active {
    background: rgba(0, 255, 204, 0.4);
    transform: scale(0.95);
    box-shadow: 0 2px 5px rgba(0, 255, 204, 0.2);
}

.ctrl-btn i {
    pointer-events: none;
}

.ctrl-btn-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: center;
}

.ctrl-btn-group .ctrl-btn {
    height: 45px;
    border-radius: 12px;
    font-size: 1.4rem;
}

.mobile-controls > .ctrl-btn:nth-child(1) { grid-column: 1; grid-row: 1 / span 2; align-self: center; height: 60px; }
.mobile-controls > .ctrl-btn-group { grid-column: 2; grid-row: 1 / span 2; }
.mobile-controls > .ctrl-btn:nth-child(3) { grid-column: 3; grid-row: 1 / span 2; align-self: center; height: 60px; }
.mobile-controls > .ctrl-btn.bottom { grid-column: 2; grid-row: 2; display: none; }

@media (max-width: 400px) {
    .mobile-controls {
        grid-template-columns: 60px 60px 60px;
        grid-template-rows: 50px 50px;
        gap: 10px;
    }
    .mobile-controls > .ctrl-btn:nth-child(1), .mobile-controls > .ctrl-btn:nth-child(3) { height: 50px; }
    
    .side-panel {
        padding: 10px 5px;
        min-width: 65px;
    }
}

@media (min-width: 768px) {
    .mobile-controls {
        display: none;
    }
}
