body {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #001d3d, #003566);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding: 40px 15px;
}

.game-container {
    background: #0f1f38;
    padding: 30px;
    border-radius: 18px;
    box-shadow: 0 0 40px rgba(0,150,255,0.3);
    text-align: center;
    color: white;
}

h1 {
    color: #4cc9ff;
}

.difficulty-bar {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
}

.difficulty-btn {
    padding: 8px 20px;
    border-radius: 10px;
    border: none;
    background: #1c2b4a;
    color: #7fbfff;
    cursor: pointer;
}

.difficulty-btn.active {
    background: #00b4d8;
    color: #001d3d;
}

.stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

#board {
    display: grid;
    gap: 5px;
    justify-content: center;
    margin: auto;
    max-width: 100%;
}

.cell {
    width: clamp(24px, 7vw, 32px);
    height: clamp(24px, 7vw, 32px);
    background: #1e2f52;
    border-radius: 6px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}

.cell:hover {
    background: #2b3f6d;
}

.revealed {
    background: #0b1628;
}

.mine {
    background: #ff4d4d;
}

.restart-btn {
    margin-top: 20px;
    padding: 10px 28px;
    border-radius: 10px;
    border: none;
    background: #00b4d8;
    color: #001d3d;
    cursor: pointer;
}

.revealed {
    animation: pop 0.15s ease;
}

@keyframes pop {
    from { transform: scale(0.8); opacity: 0.6; }
    to { transform: scale(1); opacity: 1; }
}

.cell {
    font-size: 18px;
}

.controls-info {
    font-size: 13px;
    color: #9fd8ff;
    margin-top: 8px;
    margin-bottom: 10px;
    line-height: 1.6;
    text-align: center;
}

.controls-info strong {
    color: #4cc9ff;
}