/* Sokoban specific styles */
.game-container {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.controls-row {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.premium-btn.small {
    padding: 8px 15px;
    font-size: 0.9rem;
}

.board-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    background: rgba(20, 20, 30, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5), inset 0 0 20px rgba(0,0,0,0.8);
    backdrop-filter: blur(10px);
    overflow: hidden; 
}

.sokoban-board {
    display: grid;
    /* Columns/Rows are set via JS inline styles based on map size */
    gap: 2px;
    width: 100%;
    height: auto;
    aspect-ratio: auto;
}

.cell {
    width: 100%;
    padding-bottom: 100%; /* square cells */
    position: relative;
    border-radius: 4px;
}

/* Floor */
.cell.floor {
    background: rgba(255, 255, 255, 0.05);
}

/* Wall */
.cell.wall {
    background: linear-gradient(135deg, #4b5563, #374151);
    box-shadow: inset 2px 2px 5px rgba(255,255,255,0.2), inset -2px -2px 5px rgba(0,0,0,0.5);
    border: 1px solid #1f2937;
    border-radius: 4px;
}

/* Target */
.cell.target {
    background: rgba(255, 255, 255, 0.05);
}
.cell.target::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30%;
    height: 30%;
    border-radius: 50%;
    background: #ef4444; /* red target dot */
    box-shadow: 0 0 10px #ef4444;
}

/* Box (Crate) */
.cell.box {
    background: linear-gradient(135deg, #d97706, #b45309);
    box-shadow: inset 1px 1px 2px rgba(255,255,255,0.4), inset -2px -2px 4px rgba(0,0,0,0.6), 0 2px 4px rgba(0,0,0,0.3);
    border: 2px solid #78350f;
    border-radius: 4px;
    z-index: 2;
}

.cell.box::before {
    content: '';
    position: absolute;
    top: 10%; bottom: 10%; left: 10%; right: 10%;
    border: 1px solid rgba(0,0,0,0.3);
    box-shadow: inset 0 0 10px rgba(0,0,0,0.2);
}

/* Box on Target */
.cell.box.on-target {
    background: linear-gradient(135deg, #10b981, #059669); /* green crate when solved */
    border-color: #064e3b;
    box-shadow: 0 0 15px #10b981, inset 1px 1px 2px rgba(255,255,255,0.4), inset -2px -2px 4px rgba(0,0,0,0.6);
}

/* Player */
.cell.player {
    background: radial-gradient(circle at 30% 30%, #a5b4fc, #4f46e5);
    border-radius: 50%;
    box-shadow: 0 4px 8px rgba(0,0,0,0.5), inset -2px -2px 6px rgba(0,0,0,0.5);
    z-index: 3;
    transform: scale(0.9);
}

.level-msg {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(10, 10, 15, 0.85);
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.level-msg.hidden {
    display: none;
}

.level-msg h2 {
    font-size: 2.5rem;
    color: #4ade80;
    margin-bottom: 20px;
    text-shadow: 0 0 15px rgba(74, 222, 128, 0.5);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 10px 0 20px 0;
    font-size: 1.2rem;
    font-weight: 500;
    color: #a5b4fc;
}
