body {
    margin: 0;
    background: #0b1220;
    color: white;
    font-family: Arial, sans-serif;

    display: flex;
    justify-content: center;
    padding: 20px;
}

/* =========================
   LAYOUT
========================= */
.game-wrapper {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    width: 100%;
    max-width: 1100px;
}

.game {
    flex: 1;
    min-width: 0;
    text-align: center;
}

h1 {
    margin: 0 0 10px;
}

/* TOP BAR */
.bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

/* BUTTON */
button {
    padding: 12px 20px;
    background: #3b82f6;
    border: none;
    color: white;
    font-weight: bold;
    border-radius: 12px;
    cursor: pointer;
}

/* =========================
   BOARD
========================= */
#board {
    display: grid;
    grid-template-columns: repeat(10, minmax(0, 1fr));
    gap: 5px;

    width: min(95vw, 520px);
    margin: 0 auto;
}

.cell {
    aspect-ratio: 1 / 1;
    background: #2b3445;
    border-radius: 8px;

    display: flex;
    justify-content: center;
    align-items: center;

    font-weight: bold;
    user-select: none;
    font-size: 1.1rem;
}

.cell.revealed {
    background: #d6dde8;
    color: black;
}

.cell.mine {
    background: #ef4444;
}

.cell.flagged {
    background: #f59e0b;
}

/* =========================
   SIDEBAR
========================= */
.disclaimer {
    width: 320px;
    flex-shrink: 0;

    background: #111827;
    border-radius: 16px;
    padding: 18px;
}

.how-title {
    font-size: 1.4rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 12px;
}

/* =========================
   WIN POPUP
========================= */
.win-popup {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);

    display: flex;
    justify-content: center;
    align-items: center;

    z-index: 9999;
}

.win-box {
    position: relative;
    background: #1f2937;

    padding: 40px 60px;
    border-radius: 16px;
    text-align: center;

    box-shadow: 0 0 30px rgba(59,130,246,0.4);
}

.win-box h1 {
    font-size: 3rem;
    margin: 0;
}

/* CLOSE BUTTON */
.close-btn {
    position: absolute;
    top: 10px;
    right: 12px;

    background: transparent;
    border: none;
    color: white;

    font-size: 22px;
    cursor: pointer;

    z-index: 10000;
}

.hidden {
    display: none;
}

/* =========================
   MOBILE
========================= */
@media (max-width: 930px) {

    .game-wrapper {
        flex-direction: column;
        align-items: center;
    }

    #board {
        width: 95vw;
        max-width: 650px;
    }

    .disclaimer {
        width: 100%;
    }
}