#game-wrapper {
    max-width: 800px;
    margin: 80px auto 40px;
    padding: 20px;
    text-align: center;
}

#game-wrapper h1 {
    color: #2c3e50;
    margin-bottom: 20px;
}

.dark-mode #game-wrapper h1 {
    color: #ecf0f1;
}

#game-info {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: bold;
}

#timer, #mine-count {
    font-family: monospace;
    font-size: 24px;
    background: #2c3e50;
    color: #e74c3c;
    padding: 5px 10px;
    border-radius: 5px;
    min-width: 60px;
}

.dark-mode #timer, 
.dark-mode #mine-count {
    background: #1a252f;
}

#difficulty {
    padding: 8px 12px;
    font-size: 14px;
    border: 2px solid #3498db;
    border-radius: 5px;
    background: #fff;
    cursor: pointer;
}

.dark-mode #difficulty {
    background: #2c3e50;
    color: #ecf0f1;
}

#new-game-btn {
    padding: 10px 20px;
    font-size: 16px;
    background: #2ecc71;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

#new-game-btn:hover {
    background: #27ae60;
    transform: scale(1.05);
}

#game-container {
    display: flex;
    justify-content: center;
    overflow-x: auto;
    padding: 10px;
}

#grid {
    display: grid;
    gap: 2px;
    background: #bdc3c7;
    padding: 5px;
    border-radius: 5px;
}

.cell {
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    background: #ecf0f1;
    border: none;
    border-radius: 3px;
    transition: all 0.1s;
}

.cell:hover:not(.revealed):not(.flagged) {
    background: #d5dbdb;
}

.cell.revealed {
    background: #bdc3c7;
    cursor: default;
}

.cell.mine {
    background: #e74c3c;
}

.cell.flagged {
    background: #f39c12;
}

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

.cell.mine::after {
    content: '💣';
}

.cell[data-num="1"] { color: #3498db; }
.cell[data-num="2"] { color: #2ecc71; }
.cell[data-num="3"] { color: #e74c3c; }
.cell[data-num="4"] { color: #9b59b6; }
.cell[data-num="5"] { color: #e67e22; }
.cell[data-num="6"] { color: #1abc9c; }
.cell[data-num="7"] { color: #34495e; }
.cell[data-num="8"] { color: #7f8c8d; }

#status-message {
    margin-top: 20px;
    font-size: 20px;
    font-weight: bold;
    min-height: 30px;
}

#status-message.win {
    color: #2ecc71;
}

#status-message.lose {
    color: #e74c3c;
}

@media (max-width: 768px) {
    .cell {
        width: 25px;
        height: 25px;
        font-size: 14px;
    }
    
    #game-info {
        gap: 10px;
    }
    
    .info-item {
        font-size: 14px;
    }
    
    #timer, #mine-count {
        font-size: 18px;
        min-width: 50px;
    }
}

@media (max-width: 480px) {
    .cell {
        width: 20px;
        height: 20px;
        font-size: 12px;
    }
}
