/* Copyright (c) 2025. Jericho Crosby (Chalwk) */

:root{
    --bg: #f3f4f6;
    --card: #ffffff;
    --muted: #6b7280;
    --accent: #111827;
    --cell: #d1d5db;
    --cell-revealed: #e9eef6;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
    margin:0;
    font-family:Inter, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
    background:var(--bg);
    color:var(--accent);
    display:flex;
    flex-direction:column;
    align-items:stretch;
    gap:12px;
    padding:12px;
}

.topbar{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
}
.title{font-weight:700;font-size:1.1rem}
.controls{display:flex;align-items:center;gap:8px}
.btn{background:var(--card);border:1px solid #c7cbd1;padding:8px 10px;border-radius:8px;cursor:pointer}
.btn.small{padding:6px 8px;font-size:0.9rem}
.select{padding:8px;border-radius:8px;border:1px solid #c7cbd1}
.custom input{width:64px;padding:6px;border-radius:6px;border:1px solid #c7cbd1}
.hidden{display:none}
.status{display:flex;gap:12px;align-items:center;margin-left:12px}
#boardWrap{display:flex;justify-content:center;align-items:center;padding:12px}
#board{
    display:grid;
    gap:4px;
    touch-action: manipulation;
    user-select:none;
}
.cell{
    width:34px;height:34px;display:flex;align-items:center;justify-content:center;font-weight:700;border-radius:6px;
    background:var(--cell);border:1px solid rgba(0,0,0,0.08);cursor:pointer;box-shadow:inset 0 -2px 0 rgba(0,0,0,0.06)
}
.cell.revealed{background:var(--cell-revealed);cursor:default;box-shadow:none;border:1px solid rgba(0,0,0,0.04)}
.cell.mine{background:linear-gradient(180deg,#ffe2e2,#ff9b9b)}
.cell.flag{color:#d00}
.cell.question{color:#b88}
.cell.small{width:28px;height:28px;border-radius:5px}

.menu{position:fixed;right:16px;top:80px;width:220px;background:var(--card);border-radius:12px;padding:12px;box-shadow:0 6px 18px rgba(0,0,0,0.08)}
.menu h3{margin:0 0 8px 0}
.note{font-size:0.85rem;color:var(--muted);margin-top:8px}

.meta{margin-top:auto;text-align:center;color:var(--muted);padding:10px 0}

body.dark{--bg:#0b1220;--card:#0f1724;--muted:#93a2bd;--accent:#e6eef8;--cell:#1f2937;--cell-revealed:#111827}
body.dark .btn{border-color:#173047}

@media (max-width:720px){
    .menu{position:static;width:100%;order:3}
    .topbar{flex-direction:column;align-items:flex-start}
    .cell{width:30px;height:30px}
}