/*
 * minigame.css — "Drill Strike", the first of two daily per-node minigames
 * (js/minigame.js). 2026-09-06: converted from a small centered modal to a
 * FULLSCREEN takeover ("kasih visual gamenya biar bagus, keduanya
 * fullscreen") with richer visuals — a vertical geological cross-section
 * for the depth map, a bigger hero icon per screen, more generous spacing
 * throughout. Palette is a bright, warm rock-strata theme (ambers/oranges/
 * tans darkening with depth) — deliberately different from tunnel.css's
 * dim cave-at-night mood, so the two minigames read as different places to
 * be, not two skins of one screen.
 */

.mg-fullscreen {
    position: fixed; inset: 0; z-index: 1100;
    display: flex; align-items: center; justify-content: center;
    padding: 28px 18px;
    background:
        radial-gradient(ellipse 80% 60% at 50% 0%, rgba(255,180,80,.18), transparent 60%),
        linear-gradient(180deg, #6b4a26 0%, #4a3420 35%, #2e1f10 70%, #1a1108 100%);
    overflow-y: auto;
}

.mg-fs-close {
    position: fixed; top: 18px; right: 18px; z-index: 2;
    width: 42px; height: 42px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: rgba(20,12,5,.55); border: 1.5px solid rgba(255,216,138,.35);
    color: #ffd88a; font-size: 16px; cursor: pointer;
    transition: background .15s, transform .15s;
}
.mg-fs-close:hover { background: rgba(20,12,5,.8); transform: scale(1.08); }

.mg-fs-frame {
    position: relative; z-index: 1;
    width: 100%; max-width: 560px; max-height: 100%;
    margin: 0 auto;
}
.mg-fs-body {
    background: rgba(255,248,232,.97);
    border: 1px solid rgba(58,36,16,.2);
    border-radius: 18px;
    padding: 30px 26px 26px;
    box-shadow: 0 24px 60px rgba(0,0,0,.45), 0 0 0 1px rgba(255,216,138,.1);
}

.mg-hero { font-size: 46px; text-align: center; margin-bottom: 6px; filter: drop-shadow(0 4px 10px rgba(58,36,16,.3)); }
.mg-hero-spin { animation: mg-spin 1.4s linear infinite; }
@keyframes mg-spin { to { transform: rotate(360deg); } }
.mg-hero-glow { animation: mg-glow-pulse 1.6s ease-in-out infinite; }
@keyframes mg-glow-pulse {
    0%, 100% { filter: drop-shadow(0 4px 10px rgba(58,36,16,.3)) drop-shadow(0 0 6px rgba(255,215,0,.3)); }
    50%      { filter: drop-shadow(0 4px 10px rgba(58,36,16,.3)) drop-shadow(0 0 26px rgba(255,215,0,.8)); }
}

.mg-title {
    font-family: var(--font-title); font-size: 22px; font-weight: 900;
    color: #3a2410; letter-spacing: 2px; text-align: center; margin-bottom: 6px;
}
.mg-sub { font-size: 12px; color: rgba(58,36,16,.65); text-align: center; margin-bottom: 18px; letter-spacing: .3px; }
.mg-hint { font-size: 12.5px; color: rgba(58,36,16,.55); text-align: center; line-height: 1.6; margin: 12px 0; }

.mg-plays-row {
    display: flex; justify-content: space-between; align-items: center;
    background: rgba(58,36,16,.06); border: 1px solid rgba(58,36,16,.15); border-radius: 10px;
    padding: 10px 16px; font-size: 12px; color: #4a2f12; margin-bottom: 14px;
}
.mg-plays-row strong { font-size: 15px; color: #c8641a; }

.mg-pool-row { margin-bottom: 6px; }
.mg-pool-lbl { font-size: 12.5px; color: rgba(58,36,16,.6); letter-spacing: .3px; }
.mg-pool-list { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.mg-pool-item {
    width: 38px; height: 38px; border-radius: 9px;
    background: rgba(58,36,16,.08); border: 1px solid rgba(58,36,16,.18);
    display: flex; align-items: center; justify-content: center; font-size: 19px;
}

/* ── Vertical geological cross-section (pre-run depth map) — one band per
   rock layer, top-to-bottom = shallow-to-deep, each band's own tint set
   inline from JS (darkens with depth) so the stack reads as a strata
   cutaway at a glance, before any label is even read. ────────────────── */
.mg-curve-row { margin: 14px 0 8px; }
.mg-strata {
    margin-top: 10px; border-radius: 12px; overflow: hidden;
    border: 1px solid rgba(58,36,16,.25); box-shadow: inset 0 2px 10px rgba(0,0,0,.25);
}
.mg-band {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px; border-bottom: 1px solid rgba(0,0,0,.15);
    color: #fff3d6;
}
.mg-band:last-child { border-bottom: none; }
.mg-band-icon { font-size: 18px; flex-shrink: 0; }
.mg-band-name { flex: 1; font-size: 13px; font-weight: 700; text-shadow: 0 1px 2px rgba(0,0,0,.4); }
.mg-band-depth { font-size: 11.5px; font-family: var(--font-mono); opacity: .85; }
.mg-band-qty { font-size: 12px; font-weight: 800; color: #ffe088; min-width: 30px; text-align: right; }
.mg-band-core {
    background: linear-gradient(90deg, rgba(255,215,0,.35), rgba(255,180,0,.2));
    padding: 13px 14px;
}
.mg-band-core .mg-band-name, .mg-band-core .mg-band-qty { color: #4a2f12; text-shadow: none; }
.mg-band-core .mg-band-icon { font-size: 22px; }

.mg-start-btn, .mg-stop-btn, .mg-again-btn {
    width: 100%; margin-top: 12px; padding: 16px 12px; font-size: 13px; letter-spacing: .5px;
}

/* ── In-run depth header ──────────────────────────────────────────────── */
.mg-combo-row {
    display: flex; align-items: center; justify-content: space-between;
    background: rgba(58,36,16,.75); border: 1px solid rgba(58,36,16,.4); border-radius: 10px;
    padding: 12px 16px; margin-bottom: 6px;
}
.mg-combo-badge { font-family: var(--font-title); font-size: 18px; font-weight: 800; color: #ffd88a; transition: transform .15s; }
.mg-combo-badge.mg-combo-pop { transform: scale(1.25); }
.mg-combo-next { font-size: 12.5px; color: rgba(255,232,160,.7); text-align: right; }
.mg-combo-next strong { color: #ffd700; font-size: 12.5px; }

/* ── The sweep track — a cross-section shaft through rock, bigger now that
   there's a whole screen to work with. ─────────────────────────────────── */
.mg-track {
    position: relative;
    height: 52px; margin: 14px 0 14px;
    background: linear-gradient(180deg, #4a3420 0%, #3a2712 50%, #2a1a0c 100%);
    border: 2px solid rgba(20,10,4,.5);
    border-radius: 12px;
    box-shadow: inset 0 3px 10px rgba(0,0,0,.45);
    overflow: hidden;
}
.mg-flash {
    position: absolute; inset: 0; z-index: 4;
    display: flex; align-items: center; justify-content: center;
    background: rgba(20,12,5,.94);
    font-family: var(--font-title); font-weight: 800; font-size: 13px; color: #ffd88a;
    text-align: center; padding: 0 10px;
    opacity: 0; transition: opacity .12s;
}
.mg-flash-show { opacity: 1; }
.mg-flash-precision { color: #ffd700; background: rgba(80,60,10,.94); }
.mg-zone-good {
    position: absolute; top: 0; bottom: 0;
    background: rgba(230,140,40,.4);
    border-left: 1px solid rgba(255,170,60,.8);
    border-right: 1px solid rgba(255,170,60,.8);
}
.mg-zone-perfect {
    position: absolute; top: 0; bottom: 0;
    background: rgba(255,215,0,.6);
    border-left: 1px solid #ffd700;
    border-right: 1px solid #ffd700;
}
.mg-marker {
    position: absolute; top: -3px; bottom: -3px;
    width: 6px; margin-left: -3px;
    background: linear-gradient(180deg, #fff3d6, #ffb347);
    box-shadow: 0 0 10px rgba(255,180,60,.9), 0 0 3px rgba(0,0,0,.6);
    border-radius: 3px;
    transition: none;
}

/* ── Result states ────────────────────────────────────────────────────── */
.mg-result { text-align: center; font-family: var(--font-title); font-weight: 800; font-size: 18px; margin: 4px 0 6px; letter-spacing: .3px; line-height: 1.35; }
.mg-result-perfect { color: #b8930a; text-shadow: 0 0 16px rgba(255,215,0,.4); }
.mg-result-good     { color: #c8641a; }
.mg-result-miss      { color: #8a6a48; }

.mg-reward-box {
    display: flex; align-items: center; gap: 14px; justify-content: center;
    background: rgba(200,100,26,.1); border: 1px solid rgba(200,100,26,.3); border-radius: 12px;
    padding: 18px; margin: 12px 0;
}
.mg-reward-icon { font-size: 36px; }
.mg-reward-name { font-size: 13px; color: #4a2f12; font-weight: 700; }
.mg-reward-qty { font-size: 18px; color: #c8641a; font-weight: 800; }

/* ── Per-node profile (lifetime stats + recent history) ─────────────────── */
.mg-profile { margin-top: 20px; padding-top: 16px; border-top: 1px dashed rgba(58,36,16,.25); }
.mg-profile-title { font-size: 12.5px; font-weight: 700; letter-spacing: 1px; color: rgba(58,36,16,.65); margin-bottom: 10px; }
.mg-profile-stats { display: flex; gap: 7px; margin-bottom: 12px; flex-wrap: wrap; }
.mg-profile-stat {
    flex: 1; min-width: 62px; text-align: center; background: rgba(58,36,16,.06); border: 1px solid rgba(58,36,16,.15);
    border-radius: 8px; padding: 8px 3px;
}
.mg-profile-stat strong { display: block; font-size: 14px; color: #4a2f12; }
.mg-profile-stat span { font-size: 10px; color: rgba(58,36,16,.55); letter-spacing: .3px; }
.mg-profile-perfect strong { color: #b8930a; }
.mg-profile-good strong { color: #c8641a; }
.mg-profile-miss strong { color: #8a6a48; }

.mg-hist-list { max-height: 170px; overflow-y: auto; }
.mg-hist-row {
    display: flex; align-items: center; gap: 8px; padding: 6px 2px;
    border-bottom: 1px solid rgba(58,36,16,.08); font-size: 11.5px;
}
.mg-hist-badge { flex: 0 0 auto; padding: 2px 7px; border-radius: 5px; font-weight: 800; font-size: 10px; letter-spacing: .5px; }
.mg-hist-perfect { background: rgba(255,215,0,.25); color: #8a6a00; }
.mg-hist-good     { background: rgba(200,100,26,.2); color: #8a4308; }
.mg-hist-miss      { background: rgba(58,36,16,.1); color: rgba(58,36,16,.55); }
.mg-hist-reward { flex: 1; color: #4a2f12; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mg-hist-time { flex: 0 0 auto; color: rgba(58,36,16,.45); font-size: 10px; }

@container (max-width: 480px) {
    .mg-fullscreen { padding: 14px 10px; }
    .mg-fs-body { padding: 22px 16px 18px; border-radius: 14px; }
    .mg-hero { font-size: 38px; }
    .mg-title { font-size: 18px; }
}
