/* Clean up styles that are now handled by GameUI or global styles */

:root {
    --primary: #f1c40f;
    --dark-bg: #1a1a1a;
    --panel-bg: rgba(0, 0, 0, 0.7);
    --text-color: #ffffff;
    --font-main: 'Outfit', sans-serif;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--dark-bg);
    color: var(--text-color);
    font-family: var(--font-main);
    overflow: hidden;
    width: 100vw;
    height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Canvas gets the background image so it's visible during play */

#game-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    height: 600px;
    display: block;
    border: 4px solid #f1c40f;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(241, 196, 15, 0.3);
    background: url('images/background.jpg') no-repeat center center;
    background-size: cover;
    overflow: hidden;
    margin: 0 auto;
    box-sizing: border-box;
}

#game-canvas {
    background: transparent;
    display: block;
    width: 100%;
    height: 100%;
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.8);
    position: relative;
    /* For z-index context */
    z-index: 5;
    /* Lower than controls */
}

/* Next Piece - Centered between Score and Time (handled by GameUI positioning in UI Layer) */
#next-piece-container {
    position: absolute;
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    background: rgba(0, 0, 0, 0.5);
    padding: 5px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1;
    /* Behind canvas (10) */
}

#next-piece-container .label {
    font-size: 10px;
    color: #f1c40f;
    letter-spacing: 1px;
    margin-bottom: 2px;
}

#next-piece-canvas {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    display: block;
}

/* Mobile Controls */
#mobile-controls {
    position: absolute;
    bottom: 0;
    /* Align to bottom of container padding */
    /* Raise controls higher */
    left: 0;
    width: 100%;
    height: 120px;
    pointer-events: none;
    z-index: 100;
    /* Ensure on top of canvas */
    display: none;
    justify-content: space-between;
    padding: 0 20px;
}

@media (max-width: 1024px) {
    #game-container {
        max-width: 100vw;
        height: calc(100dvh - 60px);
        max-height: none;
        border: none;
        border-radius: 0;
    }

    body.immersive-mode #game-container {
        height: 100dvh;
    }

    #mobile-controls {
        display: flex;
        pointer-events: auto;
    }
}

.control-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 24px;
    backdrop-filter: blur(5px);
    cursor: pointer;
    margin: 5px;
    transition: background 0.1s;
}

.control-btn:active {
    background: rgba(241, 196, 15, 0.4);
}

.big-btn {
    width: 70px;
    height: 70px;
    font-size: 30px;
    background: rgba(241, 196, 15, 0.2);
    border-color: rgba(241, 196, 15, 0.5);
    color: var(--primary);
}

.dpad {
    display: flex;
    align-items: flex-end;
}

.actions {
    display: flex;
    align-items: flex-end;
    gap: 10px;
}