/* CSS样式 - 游戏界面美化 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: white;
}

.game-container {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    background: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.game-board {
    position: relative;
}

#tetris-canvas {
    border: 3px solid #fff;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.8);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.game-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 200px;
}

.info-panel {
    background: rgba(255, 255, 255, 0.15);
    padding: 20px;
    border-radius: 15px;
    backdrop-filter: blur(5px);
}

.info-panel h3 {
    margin-bottom: 15px;
    color: #fff;
    font-size: 1.2em;
    text-align: center;
}

.score-display {
    font-size: 2em;
    font-weight: bold;
    text-align: center;
    color: #ffd700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.level-display {
    font-size: 1.5em;
    text-align: center;
    color: #87ceeb;
}

.lines-display {
    font-size: 1.2em;
    text-align: center;
    color: #98fb98;
}

.next-piece-canvas {
    border: 2px solid #fff;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.6);
    display: block;
    margin: 0 auto;
}

.controls {
    background: rgba(255, 255, 255, 0.15);
    padding: 20px;
    border-radius: 15px;
    backdrop-filter: blur(5px);
}

.controls h3 {
    margin-bottom: 15px;
    text-align: center;
}

.control-item {
    display: flex;
    justify-content: space-between;
    margin: 8px 0;
    font-size: 0.9em;
}

.control-key {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: bold;
}

.game-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.game-btn {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.game-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.game-btn:active {
    transform: translateY(0);
}

.pause-btn {
    background: linear-gradient(45deg, #ffa502, #ff6348);
}

.restart-btn {
    background: linear-gradient(45deg, #3742fa, #2f3542);
}

.game-over {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    display: none;
    z-index: 1000;
}

.game-over h2 {
    color: #ff6b6b;
    margin-bottom: 15px;
    font-size: 2em;
}

@media (max-width: 1024px) {
    .game-container {
        flex-direction: column;
        padding: 15px;
        gap: 20px;
    }
    
    .game-info {
        min-width: auto;
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
    }
    
    .info-panel {
        flex: 1;
        min-width: 200px;
        margin: 5px;
    }
    
    .controls {
        flex: 1;
        min-width: 200px;
        margin: 5px;
    }
    
    #tetris-canvas {
        width: 280px;
        height: 560px;
    }
}

@media (min-width: 1025px) {
    .game-container {
        flex-direction: row;
    }
    
    .game-info {
        flex-direction: column;
    }
}