/* 移动端样式 */
@media (max-width: 768px) {
    body {
        padding: 0;
        height: 100vh;
        overflow: hidden;
    }
    
    .game-container {
        max-width: 100%;
        padding: 10px;
        height: 100vh;
        display: flex;
        flex-direction: column;
        border-radius: 0;
    }
    
    .game-header {
        margin-bottom: 8px;
        flex: 0 0 auto;
    }
    
    .logo-text {
        font-size: 1.3em;
    }
    
    .logo-subtitle {
        font-size: 0.7em;
    }
    
    /* 隐藏PC端面板 */
    .left-panel,
    .right-panel {
        display: none !important;
    }
    
    .game-main {
        flex-direction: column;
        gap: 8px;
        flex: 1;
        overflow: hidden;
        display: flex;
        min-height: 0;
    }
    
    .game-info-bar {
        display: flex !important;
        flex-direction: row !important;
        gap: 8px;
        flex: 0 0 auto;
    }
    
    .stats-card {
        flex: 1;
        display: flex;
        flex-direction: row;
        justify-content: space-around;
        padding: 6px;
        min-height: 55px;
    }
    
    .stat-item {
        padding: 0;
        border-bottom: none !important;
        border-right: 2px solid #7a7a5a;
    }
    
    .stat-item:last-child {
        border-right: none;
    }
    
    .stat-label {
        font-size: 0.6em;
    }
    
    .stat-value {
        font-size: 1em;
    }
    
    .next-piece-card {
        flex: 0 0 auto;
        padding: 6px;
        min-width: 65px;
    }
    
    .next-piece-card h3 {
        font-size: 0.6em;
        margin-bottom: 4px;
    }
    
    #nextCanvas {
        width: 55px;
        height: 55px;
    }
    
    .game-board {
        flex: 1;
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 8px;
        overflow: hidden;
        min-height: 0;
    }
    
    #gameCanvas {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
    }
    
    .mobile-controls {
        display: flex !important;
        flex-direction: row;
        gap: 15px;
        padding: 10px 0 8px 0;
        flex: 0 0 auto;
        justify-content: space-between;
        align-items: flex-end;
        min-height: 240px;
    }
    
    .control-buttons-left {
        display: flex;
        flex-direction: column;
        gap: 10px;
        justify-content: flex-end;
        align-items: flex-start;
    }
    
    .game-btn {
        width: 70px;
        height: 70px;
        font-size: 0.62em;
        padding: 4px;
        flex-shrink: 0;
    }
    
    .control-pad {
        grid-template-columns: repeat(3, 70px);
        grid-template-rows: repeat(3, 70px);
        gap: 12px;
        flex-shrink: 0;
    }
    
    .control-btn {
        font-size: 0.68em;
        width: 70px;
        height: 70px;
    }
    
    .control-btn svg {
        width: 26px;
        height: 26px;
        margin-bottom: 2px;
    }
    
    .btn-rotate {
        grid-column: 2;
        grid-row: 1;
    }
    
    .btn-left {
        grid-column: 1;
        grid-row: 2;
    }
    
    .btn-down {
        grid-column: 2;
        grid-row: 2;
    }
    
    .btn-right {
        grid-column: 3;
        grid-row: 2;
    }
    
    .btn-drop {
        width: 100px;
        height: 100px;
        grid-column: 2;
        grid-row: 3;
    }
    
    .btn-drop svg {
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 480px) {
    .game-container {
        padding: 8px;
    }
    
    .logo-text {
        font-size: 1.1em;
    }
    
    .logo-subtitle {
        font-size: 0.65em;
    }
    
    .game-header {
        margin-bottom: 6px;
    }
    
    .control-buttons-left {
        gap: 8px;
    }
    
    .game-btn {
        width: 62px;
        height: 62px;
        font-size: 0.56em;
    }
    
    .control-pad {
        grid-template-columns: repeat(3, 60px);
        grid-template-rows: repeat(3, 60px);
        gap: 10px;
    }
    
    .control-btn {
        font-size: 0.62em;
        width: 60px;
        height: 60px;
    }
    
    .control-btn svg {
        width: 22px;
        height: 22px;
    }
    
    .btn-rotate {
        grid-column: 2;
        grid-row: 1;
    }
    
    .btn-left {
        grid-column: 1;
        grid-row: 2;
    }
    
    .btn-down {
        grid-column: 2;
        grid-row: 2;
    }
    
    .btn-right {
        grid-column: 3;
        grid-row: 2;
    }
    
    .btn-drop {
        width: 82px;
        height: 82px;
        grid-column: 2;
        grid-row: 3;
    }
    
    .btn-drop svg {
        width: 30px;
        height: 30px;
    }
    
    .stats-card {
        padding: 5px;
        min-height: 50px;
    }
    
    .stat-label {
        font-size: 0.55em;
    }
    
    .stat-value {
        font-size: 0.95em;
    }
    
    #nextCanvas {
        width: 50px;
        height: 50px;
    }
    
    .next-piece-card {
        min-width: 60px;
        padding: 5px;
    }
    
    .mobile-controls {
        gap: 12px;
        padding: 8px 0 5px 0;
        min-height: 230px;
    }
}