/* Block Drop - Game Styles */

.game-area {
    max-width: 600px;
}

/* Info Bar */
.game-info-bar {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.info-item {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 8px 16px;
    text-align: center;
    min-width: 70px;
}

.info-label {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
    font-weight: 700;
}

.info-value {
    display: block;
    font-size: 22px;
    font-weight: 700;
    color: var(--text-heading);
    font-family: 'Oswald', sans-serif;
}

/* Controls */
.game-controls {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
}

/* Board Layout */
.board-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
}

.board-container {
    position: relative;
    background: #0a0c14;
    border: 2px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 4px;
    line-height: 0;
}

#game-board {
    display: grid;
    grid-template-columns: repeat(10, var(--cell-size, 28px));
    grid-template-rows: repeat(20, var(--cell-size, 28px));
    gap: 1px;
    background: rgba(255, 255, 255, 0.03);
}

.cell {
    width: var(--cell-size, 28px);
    height: var(--cell-size, 28px);
    background: rgba(255, 255, 255, 0.02);
    border-radius: 2px;
}

/* Piece colors */
.cell.I { background: linear-gradient(135deg, #00e5ff, #00b8d4); box-shadow: inset 0 0 6px rgba(0, 229, 255, 0.4); }
.cell.O { background: linear-gradient(135deg, #ffeb3b, #fdd835); box-shadow: inset 0 0 6px rgba(255, 235, 59, 0.4); }
.cell.T { background: linear-gradient(135deg, #ce93d8, #ab47bc); box-shadow: inset 0 0 6px rgba(206, 147, 216, 0.4); }
.cell.S { background: linear-gradient(135deg, #69f0ae, #00e676); box-shadow: inset 0 0 6px rgba(105, 240, 174, 0.4); }
.cell.Z { background: linear-gradient(135deg, #ef5350, #e53935); box-shadow: inset 0 0 6px rgba(239, 83, 80, 0.4); }
.cell.J { background: linear-gradient(135deg, #42a5f5, #1e88e5); box-shadow: inset 0 0 6px rgba(66, 165, 245, 0.4); }
.cell.L { background: linear-gradient(135deg, #ffa726, #fb8c00); box-shadow: inset 0 0 6px rgba(255, 167, 38, 0.4); }

/* Ghost piece */
.cell.ghost {
    background: none;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: none;
}

/* Line clear animation */
.cell.clearing {
    animation: lineClear 0.3s ease-out forwards;
}

@keyframes lineClear {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); background: #fff; opacity: 0.8; }
    100% { transform: scale(0); opacity: 0; }
}

/* Side Panel */
.side-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.next-piece-box {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 12px;
    text-align: center;
}

.next-piece-box .info-label {
    margin-bottom: 8px;
}

#next-piece {
    display: grid;
    grid-template-columns: repeat(4, 22px);
    grid-template-rows: repeat(4, 22px);
    gap: 1px;
    justify-content: center;
}

#next-piece .cell {
    width: 22px;
    height: 22px;
}

/* Game Over Overlay */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    border-radius: var(--radius-md);
}

.overlay.hidden {
    display: none !important;
}

.result-content {
    background-color: var(--bg-card);
    border: 1px solid var(--border-subtle);
    padding: 28px;
    border-radius: var(--radius-lg);
    text-align: center;
    width: 90%;
    max-width: 280px;
    box-shadow: var(--shadow-card);
}

.result-content h2 {
    color: var(--text-heading);
    margin-bottom: 12px;
    font-family: 'Oswald', sans-serif;
}

.result-content p {
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-size: 16px;
}

.result-content .btn-primary {
    margin-top: 16px;
}

/* Touch Controls */
.touch-controls {
    display: none;
    justify-content: center;
    gap: 10px;
    margin-top: 16px;
}

.touch-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--bg-surface);
    border: 2px solid var(--border-subtle);
    color: var(--text-primary);
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.touch-btn:active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    transform: scale(0.95);
}

/* Responsive */
@media (max-width: 768px) {
    .game-area {
        padding: 20px 16px 24px;
    }

    #game-board {
        --cell-size: 24px;
    }

    .touch-controls {
        display: flex;
    }
}

@media (max-width: 480px) {
    .game-area {
        width: 100%;
        padding: 16px 10px 20px;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    #game-board {
        --cell-size: calc((100vw - 60px) / 10);
    }

    #next-piece {
        grid-template-columns: repeat(4, 18px);
        grid-template-rows: repeat(4, 18px);
    }

    #next-piece .cell {
        width: 18px;
        height: 18px;
    }

    .info-item {
        padding: 6px 10px;
        min-width: 60px;
    }

    .info-value {
        font-size: 18px;
    }

    .bob-container {
        flex-direction: column;
    }

    .speech-bubble::before,
    .speech-bubble::after {
        display: none;
    }

    .touch-btn {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}
