/* 扫雷游戏样式 */
.game-container {
    max-width: 600px;
    margin: 20px auto;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    font-family: Arial, sans-serif;
}

.game-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 5px;
}

.game-board {
    display: grid;
    grid-template-columns: repeat(9, 30px);
    grid-gap: 2px;
    margin: 0 auto;
    background: #bdbdbd;
    padding: 5px;
    border-radius: 3px;
    justify-content: center;
}

.cell {
    width: 30px;
    height: 30px;
    background: #d3d3d3;
    border: 2px outset #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
}

.cell.revealed {
    border: 1px solid #d3d3d3;
    background: #f0f0f0;
}

.cell.flagged::before {
    content: '🚩';
}

.cell.mine {
    background: #ff6b6b;
}

.cell.mine.revealed {
    background: #ff0000;
}

.cell.mine.revealed::before {
    content: '💣';
}

.controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    background: #1e3c72;
    color: white;
    transition: all 0.3s ease;
}

.btn:hover {
    background: #2a5298;
    transform: translateY(-2px);
}

.difficulty {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 10px 0;
}

.difficulty-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background: #6c757d;
    color: white;
}

.difficulty-btn.active {
    background: #1e3c72;
}

.game-message {
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    margin: 20px 0;
    padding: 10px;
    border-radius: 5px;
    display: none;
}

.message-win {
    background: #d4edda;
    color: #155724;
}

.message-lose {
    background: #f8d7da;
    color: #721c24;
}

.rankings {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 5px;
}

.rankings h3 {
    margin-top: 0;
    color: #1e3c72;
}

.rankings-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.rankings-item {
    padding: 5px 0;
    border-bottom: 1px solid #dee2e6;
}

/* 隐藏按钮和工作模式 */
.hidden-btn {
    position: fixed;
    top: 10px;
    right: 10px;
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 18px;
    cursor: pointer;
    z-index: 9999;
    display: none;
}

.work-mode {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 10000;
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.work-screen {
    background: #f0f0f0;
    width: 90%;
    height: 80%;
    border: 1px solid #ccc;
    padding: 20px;
    font-family: 'Courier New', monospace;
    overflow: auto;
}

.work-title {
    font-size: 24px;
    margin-bottom: 20px;
    color: #333;
}

.work-content {
    line-height: 1.6;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .game-board {
        grid-template-columns: repeat(9, 25px);
    }
    
    .cell {
        width: 25px;
        height: 25px;
        font-size: 12px;
    }
    
    .game-container {
        margin: 10px;
        padding: 15px;
    }
    
    .controls {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 200px;
    }
}