/* Docked controls styles */
.game-controls-dock {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-top: 1px solid #e2e8f0;
    padding: 0.75rem 1rem;
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom));
    z-index: 1000;
    box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.3s ease-in-out;
    /* Force GPU layer to prevent painting glitches */
}

/* Adjust inner containers to fit nicely */
.game-controls-dock .word-input-area {
    margin-bottom: 0;
    max-width: 800px;
    width: 100%;
}

/* Default: Hide keyboard on larger screens (Desktop) */
.game-controls-dock .keyboard {
    padding: 0;
    max-width: 800px;
    width: 100%;
    display: none;
}

/* Default body padding for desktop (shorter dock) */
body {
    padding-bottom: 120px;
    transition: padding-bottom 0.3s ease-in-out;
}

/* Hide dock when game is solved */
body.game-solved {
    padding-bottom: 2rem !important;
}

body.game-solved .game-controls-dock {
    transform: translateY(100%);
}

/* Mobile/Tablet: Show keyboard */
@media (max-width: 991px) {
    .game-controls-dock .keyboard {
        display: flex;
    }

    body {
        padding-bottom: calc(300px + env(safe-area-inset-bottom));
        /* Increase padding to accommodate keyboard */
    }

    .game-controls-dock {
        padding: 0.5rem;
        padding-bottom: calc(0.5rem + env(safe-area-inset-bottom));
    }

    :root {
        --keyboard-height: 300px;
    }
}

:root {
    --keyboard-height: 120px;
}