* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 防止页面滚动 */
html, body {
    overflow: hidden;
    height: 100%;
    touch-action: manipulation; /* 防止双击缩放 */
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #f0f0f0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: background 1s ease-in-out;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.game-container {
    text-align: center;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 900px;
    margin: 20px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

h1 {
    color: #333;
    margin-bottom: 20px;
    font-size: 2.5em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.game-area {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 30px;
    margin-top: 20px;
}

#tetris {
    border: 3px solid #333;
    border-radius: 8px;
    background-color: rgba(0, 0, 0, 0.85);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 10;
}

.game-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 200px;
    z-index: 10;
}

.next-piece {
    background-color: #f5f5f5;
    padding: 15px;
    border-radius: 10px;
    border: 2px solid #ddd;
}

.next-piece h3 {
    margin-bottom: 10px;
    color: #333;
}

#nextPiece {
    border: 2px solid #333;
    border-radius: 5px;
    background-color: #000;
    display: block;
    margin: 0 auto;
}

.stats {
    background-color: #f5f5f5;
    padding: 15px;
    border-radius: 10px;
    border: 2px solid #ddd;
}

.stats > div {
    margin: 10px 0;
    font-size: 1.2em;
    font-weight: bold;
    color: #333;
}

.stats span {
    color: #e74c3c;
}

.controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

button {
    padding: 12px 24px;
    font-size: 1em;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #3498db;
    color: white;
}

button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

button:active:not(:disabled) {
    transform: translateY(0) scale(0.98);
}

button:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
}

/* 重新开始按钮样式 */
#restartButton {
    background: rgba(231, 76, 60, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: bold;
    margin: 0 5px;
}

#restartButton:hover:not(:disabled) {
    background: rgba(231, 76, 60, 1);
    transform: translateY(-1px);
}

#restartButton:disabled {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    cursor: not-allowed;
    transform: none;
}

#pauseButton {
    background-color: #e74c3c;
}



/* 响应式设计 */


/* 游戏背景样式 */
body.scene-classic {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .game-container {
        flex-direction: column;
        align-items: center;
        padding: 10px;
    }
    
    .next-piece {
        width: 100%;
        max-width: 200px;
        margin-top: 10px;
    }
    
    .game-info {
        margin-top: 10px;
        width: 100%;
        max-width: 280px;
    }
    
    /* 调整按钮大小以适应移动设备 */
    #startButton, #restartButton, #pauseButton {
        padding: 12px 15px;
        font-size: 14px;
        margin: 5px 2px;
    }
    
    /* 调整控制按钮布局 */
    .controls {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px;
    }
}