/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

.game-container {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    max-width: 100%;
}

/* 游戏头部 */
.game-header {
    margin-bottom: 20px;
}

.controls {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.game-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
}

/* 表情按钮 */
.face-button {
    font-size: 24px;
    cursor: pointer;
    user-select: none;
    transition: transform 0.1s;
}

.face-button:hover {
    transform: scale(1.1);
}

.face-button:active {
    transform: scale(0.9);
}

/* 按钮和选择器样式 */
button, select {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    transition: all 0.2s;
}

button:hover {
    background-color: #e9ecef;
}

button:active {
    transform: scale(0.95);
}

/* 雷区样式 */
.minefield {
    display: grid;
    gap: 1px;
    background-color: #ddd;
    padding: 1px;
    border: 1px solid #999;
    margin-bottom: 20px;
}

.block {
    width: 30px;
    height: 30px;
    background-color: #e0e0e0;
    border: 1px solid #999;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s;
}

.block.revealed {
    background-color: #fff;
}

.block.mine {
    background-color: #ff0000;
}

.block.flagged {
    background-color: #ffeb3b;
}

.block:hover:not(.revealed) {
    background-color: #d0d0d0;
}

/* 操作说明 */
.controls-help {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    margin-top: 20px;
}

.controls-help p {
    font-weight: bold;
    margin-bottom: 10px;
}

.controls-help ul {
    list-style-position: inside;
    color: #666;
}

.controls-help li {
    margin: 5px 0;
}

/* 对话框样式 */
.dialog {
    border: none;
    border-radius: 8px;
    padding: 20px;
    max-width: 500px;
    width: 90%;
    background-color: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.dialog::backdrop {
    background-color: rgba(0, 0, 0, 0.5);
}

.dialog h2 {
    margin-bottom: 20px;
    color: #333;
    text-align: center;
}

/* 统计对话框 */
.stats-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.stats-item {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
}

.stats-item h3 {
    margin-bottom: 10px;
    color: #666;
}

.stats-item p {
    margin: 5px 0;
    color: #333;
}

/* 排行榜对话框 */
.difficulty-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab-button {
    flex: 1;
    padding: 8px;
    border: none;
    background-color: #f8f9fa;
    cursor: pointer;
}

.tab-button.active {
    background-color: #007bff;
    color: white;
}

.leaderboard-content {
    margin-bottom: 20px;
    max-height: 300px;
    overflow-y: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: #f8f9fa;
    font-weight: bold;
}

/* 游戏状态 */
.game-status {
    margin-top: 15px;
    text-align: center;
    font-weight: bold;
    min-height: 24px;
}

/* 数字颜色 */
.number-1 { color: #2196F3; }
.number-2 { color: #4CAF50; }
.number-3 { color: #f44336; }
.number-4 { color: #9C27B0; }
.number-5 { color: #795548; }
.number-6 { color: #009688; }
.number-7 { color: #000000; }
.number-8 { color: #607D8B; }

/* 响应式设计 */
@media (max-width: 600px) {
    .game-container {
        padding: 10px;
    }

    .block {
        width: 25px;
        height: 25px;
        font-size: 12px;
    }

    .controls {
        flex-direction: column;
    }

    .stats-content {
        grid-template-columns: 1fr;
    }
} 