/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #f0f2f5;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    width: 100%;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 20px;
    text-align: center;
}

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

/* 游戏内容区域 */
.game-content {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 30px;
    flex-wrap: wrap;
}

/* 游戏主区域 */
.game-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

/* 游戏信息栏 */
.game-info {
    display: flex;
    justify-content: space-around;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 15px;
    border-radius: 10px;
    color: white;
    width: 100%;
    max-width: 320px;
    flex-wrap: wrap;
}

.info-item {
    display: flex;
    flex-direction: column;
    margin: 0 10px;
}

.info-label {
    font-size: 0.9em;
    opacity: 0.9;
    margin-bottom: 5px;
}

.info-value {
    font-size: 1.5em;
    font-weight: bold;
}

/* 游戏容器 */
.game-container {
    display: flex;
    justify-content: center;
    background: #eef2f7;
    border-radius: 10px;
    padding: 10px;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.1);
}

#gameCanvas {
    border: 2px solid #333;
    border-radius: 8px;
    background: #111;
    display: block;
}

/* 下一个方块预览 */
.next-piece {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 320px;
}

.next-piece h3 {
    color: #e91e63;
    margin-bottom: 10px;
    font-size: 1.2em;
}

#nextCanvas {
    border: 2px solid #ddd;
    border-radius: 8px;
    background: #111;
    display: block;
    margin: 0 auto;
}

/* 控制按钮 */
.control-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    font-size: 16px;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.btn-primary {
    background: linear-gradient(135deg, #4caf50, #45a049);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #ff9800, #f57c00);
    color: white;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 152, 0, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #f44336, #da190b);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(244, 67, 54, 0.4);
}

.btn:active {
    transform: translateY(0);
}

/* 说明区域 */
.instructions-section {
    min-width: 250px;
    max-width: 300px;
}

.game-instructions {
    text-align: left;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.game-instructions h3 {
    color: #e91e63;
    margin-bottom: 15px;
    font-size: 1.2em;
    text-align: center;
}

.game-instructions ul {
    list-style-type: none;
    padding-left: 0;
}

.game-instructions li {
    margin-bottom: 12px;
    padding-left: 25px;
    position: relative;
    line-height: 1.5;
    font-size: 0.95em;
}

.game-instructions li:before {
    content: "▸";
    color: #e91e63;
    font-weight: bold;
    position: absolute;
    left: 0;
    font-size: 1.2em;
    line-height: 1;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .game-title {
        font-size: 2em;
    }
    
    .game-content {
        flex-direction: column;
        align-items: center;
    }
    
    .instructions-section {
        max-width: 100%;
    }
    
    .game-info {
        max-width: 100%;
    }
    
    #gameCanvas {
        width: 100%;
        height: auto;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .game-title {
        font-size: 1.5em;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 14px;
        min-width: 100px;
    }
    
    .game-info {
        flex-direction: column;
        gap: 10px;
    }
    
    .info-item {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}