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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

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

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

.game-info {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.info-item {
    background-color: #f0f0f0;
    padding: 10px 15px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

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

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

.game-container {
    background-color: #f9f9f9;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1);
}

.game-board {
    display: grid;
    gap: 2px;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    background-color: #ccc;
    border: 3px solid #ccc;
    border-radius: 5px;
}

.cell {
    background-color: #ddd;
    border: 1px solid #ccc;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    aspect-ratio: 1/1;
}

.cell:hover {
    background-color: #e0e0e0;
}

.cell.revealed {
    background-color: #f0f0f0;
    cursor: default;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1);
}

.cell.flagged::before {
    content: '🚩';
    font-size: 1em;
}

.cell.mine.revealed::before {
    content: '💣';
    font-size: 1em;
}

.cell.exploded::before {
    content: '💥';
    font-size: 1em;
}

.cell.1 {
    color: #0000ff;
}

.cell.2 {
    color: #008200;
}

.cell.3 {
    color: #ff0000;
}

.cell.4 {
    color: #000084;
}

.cell.5 {
    color: #840000;
}

.cell.6 {
    color: #008284;
}

.cell.7 {
    color: #840084;
}

.cell.8 {
    color: #848484;
}

.control-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
}

.btn-primary {
    background-color: #f093fb;
    color: white;
}

.btn-primary:hover {
    background-color: #e066fa;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(240, 147, 251, 0.4);
}

.btn-secondary {
    background-color: #f0f0f0;
    color: #333;
}

.btn-secondary:hover {
    background-color: #e0e0e0;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.game-instructions {
    background-color: #f5f5f5;
    border-radius: 10px;
    padding: 15px;
    text-align: left;
}

.game-instructions h3 {
    color: #333;
    margin-bottom: 10px;
    text-align: center;
}

.game-instructions ul {
    list-style-type: disc;
    padding-left: 20px;
    color: #666;
    line-height: 1.6;
}

.game-instructions li {
    margin-bottom: 5px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .game-title {
        font-size: 2em;
    }
    
    .cell {
        font-size: 1em;
    }
    
    .game-info {
        gap: 10px;
    }
    
    .info-item {
        padding: 8px 12px;
    }
    
    .info-value {
        font-size: 1.2em;
    }
}

@media (max-width: 480px) {
    .game-title {
        font-size: 1.5em;
    }
    
    .cell {
        font-size: 0.8em;
    }
    
    .btn {
        padding: 8px 15px;
        font-size: 0.9em;
        min-width: 80px;
    }
}