/* ===== MINES (Royale Violet) — screen-fit board, 3D tile art ===== */

.mines-stage {
    --acc: #22c55e;
    background:
        radial-gradient(120% 60% at 50% 0%, rgba(34, 197, 94, 0.14), transparent 60%),
        linear-gradient(165deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(245, 196, 81, 0.22);
    border-radius: 20px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    padding: 12px;
    width: 100%;
    max-width: 356px;
    margin: 0 auto;
}

.mines-stats {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}
.mstat {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(245, 196, 81, 0.16);
    border-radius: 12px;
    padding: 6px 4px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.mstat-label {
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #a79fc2;
}
.mstat-value {
    font-size: 0.98rem;
    font-weight: 800;
    color: #f5f0ff;
    font-variant-numeric: tabular-nums;
}
.mstat-gold {
    background: linear-gradient(180deg, #ffe9a8, #f5c451 55%, #c98f1f);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* the board must never scroll: it caps at 36% of viewport height */
.mines-grid {
    width: min(94vw, 320px, 36dvh);
    aspect-ratio: 1;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(5, 1fr);
    gap: 6px;
}

.mines-tile {
    position: relative;
    border: 0;
    padding: 0;
    background: none;
    border-radius: 12px;
    cursor: pointer;
    /* raised 3D slab press effect */
    filter: drop-shadow(0 4px 0 rgba(6, 10, 24, 0.9)) drop-shadow(0 8px 14px rgba(0, 0, 0, 0.45));
    transition: transform 0.07s ease, filter 0.12s ease;
    -webkit-tap-highlight-color: transparent;
}
.mines-tile:active { transform: translateY(3px); }
.mines-tile-img {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 12px;
    user-select: none;
    -webkit-user-drag: none;
}
.mines-tile.revealed {
    filter: drop-shadow(0 2px 0 rgba(6, 10, 24, 0.9)) drop-shadow(0 0 14px rgba(34, 197, 94, 0.55));
    animation: mines-pop 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.6);
}
@keyframes mines-pop {
    0% { transform: scale(0.85); }
    100% { transform: scale(1); }
}
/* the tile that exploded */
.mines-tile.mine {
    filter: drop-shadow(0 0 18px rgba(239, 68, 68, 0.85)) drop-shadow(0 4px 0 rgba(6, 10, 24, 0.9));
    animation: mines-shake 0.4s ease;
}
@keyframes mines-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px) rotate(-3deg); }
    50% { transform: translateX(4px) rotate(3deg); }
    75% { transform: translateX(-3px); }
}
/* other bombs shown at game over — present but dimmer */
.mines-tile.mine-shown { filter: drop-shadow(0 3px 0 rgba(6, 10, 24, 0.9)) saturate(0.75) brightness(0.8); }
/* safe tiles revealed as faded gems */
.mines-tile.ghost { filter: drop-shadow(0 2px 0 rgba(6, 10, 24, 0.9)) saturate(0.6) brightness(0.75); opacity: 0.85; }
.mines-tile.disabled { cursor: default; pointer-events: none; }
.mines-tile.disabled:active { transform: none; }

@media (max-height: 700px) {
    .mines-stage { padding: 10px; }
    .mines-stats { margin-bottom: 8px; }
    .mstat { padding: 5px 4px; }
}

@media (prefers-reduced-motion: reduce) {
    .mines-tile.revealed, .mines-tile.mine { animation: none !important; }
}
