:root {
    --ms-bg: #1e293b;
    --ms-cell: #334155;
    --ms-cell-hover: #475569;
    --ms-cell-revealed: #0f172a;
    --ms-border: #475569;
}

.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    min-height: calc(100vh - 80px);
}
.nav-home {
    position: absolute;
    right: 40px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
}
.nav-home:hover { color: var(--accent-color); }

.game-title {
    font-family: "Outfit", sans-serif;
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 400px;
    background: var(--ms-bg);
    padding: 15px 20px;
    border-radius: 8px 8px 0 0;
    border: 2px solid var(--ms-border);
    border-bottom: none;
}

.header-box {
    background: #000;
    color: #ff3333;
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.8rem;
    font-weight: bold;
    padding: 4px 10px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 90px;
    justify-content: center;
    border: inset 3px #333;
}
.header-box .icon {
    font-size: 1.2rem;
}

.face-btn {
    font-size: 2rem;
    background: var(--ms-cell);
    border: outset 3px var(--ms-border);
    border-radius: 5px;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    line-height: 1;
    padding-bottom: 3px;
}
.face-btn:active {
    border: inset 3px var(--ms-border);
    background: var(--ms-cell-hover);
}

.board-container {
    background: var(--ms-border);
    padding: 10px;
    border-radius: 0 0 8px 8px;
    border: 2px solid var(--ms-border);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.ms-board {
    display: grid;
    /* Columns set via JS */
    gap: 1px;
    background: #000;
    border: inset 3px var(--ms-border);
}

.ms-cell {
    width: 35px;
    height: 35px;
    background: var(--ms-cell);
    border: outset 3px #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    cursor: pointer;
    user-select: none;
}

.ms-cell:hover:not(.revealed) {
    background: var(--ms-cell-hover);
}

.ms-cell.revealed {
    background: var(--ms-cell-revealed);
    border: 1px solid #111;
    border-top: 1px solid #222;
    border-left: 1px solid #222;
}

.ms-cell.mine {
    background: #ff3333;
    border-color: #ff3333;
}

/* Numbers Colors */
.ms-cell[data-num="1"] { color: #3b82f6; }
.ms-cell[data-num="2"] { color: #10b981; }
.ms-cell[data-num="3"] { color: #ef4444; }
.ms-cell[data-num="4"] { color: #8b5cf6; }
.ms-cell[data-num="5"] { color: #f59e0b; }
.ms-cell[data-num="6"] { color: #06b6d4; }
.ms-cell[data-num="7"] { color: #ec4899; }
.ms-cell[data-num="8"] { color: #64748b; }

.controls-info {
    margin-top: 20px;
    color: var(--text-muted);
}

@media (max-width: 450px) {
    .ms-cell { width: 30px; height: 30px; font-size: 1rem; border-width: 2px; }
}
