/* ==========================================================================
   ICE TREASURE – ĐẬP BĂNG TÌM KHO BÁU (HIGH-END LUXURY / FROZEN FANTASY)
   Design System: Awwwards-Tier Glacial Obsidian, Prismatic 3D Crystal Ice, 
   Aurora Cyan Neon, Sun Gold & Royal Frost Telemetry HUD.
   Zero-Emoji Policy: 100% Inline High-Precision Vector SVG & Typography
   ========================================================================== */

:root {
    --ice-bg-deep: #050912;
    --ice-cavern-gradient: radial-gradient(circle at 50% 12%, #142338 0%, #0a1322 45%, #050912 100%);
    --ice-panel-bg: rgba(11, 20, 34, 0.85);
    --ice-border-subtle: rgba(186, 230, 253, 0.15);
    --ice-border-frost: rgba(56, 189, 248, 0.4);
    --ice-border-glow: rgba(56, 189, 248, 0.25);
    --ice-cyan: #38bdf8;
    --ice-cyan-bright: #38bdf8;
    --ice-frost-white: #f8fafc;
    --ice-treasure-gold: #fbbf24;
    --ice-treasure-amber: #f59e0b;
    --ice-aurora-green: #10b981;
    --ice-trap-crimson: #f43f5e;
    --ice-trap-flame: #fb7185;
    --ice-font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
}

/* Page Outer Wrapper */
.mines-wrapper {
    min-height: calc(100vh - 140px);
    background: var(--ice-cavern-gradient);
    padding: 28px 16px 64px;
    color: var(--ice-frost-white);
    position: relative;
    overflow: hidden;
}

/* Ambient Sweep Background (Static, Zero GPU Overhead) */
.mines-wrapper::before {
    content: '';
    position: absolute;
    top: -160px;
    left: 15%;
    width: 70%;
    height: 480px;
    background: radial-gradient(ellipse at 50% 50%, rgba(56, 189, 248, 0.12) 0%, rgba(45, 212, 191, 0.06) 45%, transparent 75%);
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
}

/* Background Snowfall Disabled for Maximum Game Smoothness */
.ice-snow-layer {
    display: none !important;
}

/* Container */
.mines-container {
    max-width: 1160px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Header Section */
.mines-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 18px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--ice-border-subtle);
    margin-bottom: 28px;
}

.mines-title-group h1 {
    font-size: 1.85rem;
    font-weight: 900;
    letter-spacing: -0.015em;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.title-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #ffffff 30%, #38bdf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 24px rgba(56, 189, 248, 0.4);
}

.title-sep {
    color: rgba(56, 189, 248, 0.5);
    font-weight: 400;
}

.title-sub {
    background: linear-gradient(135deg, #ffffff 40%, #bae6fd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.mines-title-group p {
    margin: 6px 0 0;
    color: #94a3b8;
    font-size: 0.86rem;
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mines-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mines-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px;
    border-radius: 9999px;
    background: rgba(186, 230, 253, 0.08);
    border: 1px solid var(--ice-border-subtle);
    font-size: 0.88rem;
    font-weight: 700;
    color: #e0f2fe;
    backdrop-filter: blur(8px);
}

.mines-badge-pill.balance-pill {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.16) 0%, rgba(245, 158, 11, 0.08) 100%);
    border-color: rgba(251, 191, 36, 0.45);
    color: var(--ice-treasure-gold);
    box-shadow: 0 0 16px rgba(251, 191, 36, 0.2);
}

.mines-btn-tool {
    background: rgba(186, 230, 253, 0.06);
    border: 1px solid var(--ice-border-subtle);
    color: #bae6fd;
    padding: 7px 14px;
    border-radius: 12px;
    font-size: 0.82rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(8px);
}

.mines-btn-tool:hover {
    background: rgba(56, 189, 248, 0.15);
    border-color: var(--ice-cyan);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(56, 189, 248, 0.25);
}

/* Main Console Layout (Two Columns) */
.mines-console-grid {
    display: grid;
    grid-template-columns: 370px 1fr;
    gap: 28px;
    align-items: stretch;
}

@media (max-width: 960px) {
    .mines-console-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   LEFT: CONTROL PANEL (OBSIDIAN CYBER-GLASS)
   ========================================================================== */

.mines-panel-card {
    background: rgba(15, 10, 28, 0.94);
    border: 1px solid var(--ice-border-subtle);
    border-radius: 24px;
    padding: 26px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.75), inset 0 1px 2px rgba(255, 255, 255, 0.1);
    position: relative;
}

/* ==========================================================================
   REDESIGNED SLIDER CONTROLS (TIỀN CƯỢC & BẪY BĂNG)
   ========================================================================== */

.mines-slider-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.slider-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.slider-group-label {
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.slider-group-label.label-trap {
    color: #fda4af;
}

/* Interactive Value Display Badge */
.slider-val-badge {
    background: rgba(4, 9, 18, 0.9);
    border: 1.5px solid rgba(56, 189, 248, 0.35);
    border-radius: 12px;
    padding: 5px 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.6), 0 4px 12px rgba(0, 0, 0, 0.4);
    user-select: none;
}

.slider-val-badge:hover {
    border-color: rgba(56, 189, 248, 0.6);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4), inset 0 1px 2px rgba(0, 0, 0, 0.6);
    transform: translateY(-1px);
}

.slider-val-badge.bomb-val-badge {
    border-color: rgba(244, 63, 94, 0.35);
}

.slider-val-badge.bomb-val-badge:hover {
    border-color: rgba(244, 63, 94, 0.6);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4), inset 0 1px 2px rgba(0, 0, 0, 0.6);
}

.slider-val-num {
    font-size: 1.25rem;
    font-weight: 900;
    font-family: var(--ice-font-mono);
    color: #ffffff;
    line-height: 1;
}

.bet-val-badge .slider-val-num {
    color: var(--ice-treasure-gold);
    text-shadow: none;
}

.bomb-val-badge .slider-val-num {
    color: #fecdd3;
    text-shadow: none;
}

.slider-val-unit {
    font-size: 0.8rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
}

.slider-inline-input {
    background: transparent;
    border: none;
    outline: none;
    font-size: 1.15rem;
    font-weight: 800;
    font-family: var(--ice-font-mono);
    color: #ffffff;
    width: 90px;
    padding: 0;
}

/* Slider Track Wrapper */
.mines-slider-track-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Native Range Slider Base */
.mines-range-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 9999px;
    background: rgba(186, 230, 253, 0.12);
    outline: none;
    cursor: pointer;
    margin: 6px 0 2px;
    transition: background 0.2s ease, opacity 0.25s ease;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.8);
}

.mines-range-slider:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Bet Slider Track Fill & Thumb */
.mines-range-slider.slider-bet {
    background: linear-gradient(to right, #0369a1 0%, #0ea5e9 var(--pct, 10%), rgba(255, 255, 255, 0.08) var(--pct, 10%), rgba(255, 255, 255, 0.08) 100%);
}

.mines-range-slider.slider-bet::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ffffff;
    border: 2.5px solid #38bdf8;
    cursor: grab;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.15);
    transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.18s ease;
}

.mines-range-slider.slider-bet::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.6), 0 0 0 2px rgba(56, 189, 248, 0.35);
}

.mines-range-slider.slider-bet::-webkit-slider-thumb:active {
    cursor: grabbing;
    transform: scale(0.95);
}

.mines-range-slider.slider-bet::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ffffff;
    border: 2.5px solid #38bdf8;
    cursor: grab;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.15);
    transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.18s ease;
}

/* Bomb Slider Track Fill & Thumb */
.mines-range-slider.slider-bomb {
    background: linear-gradient(to right, #881337 0%, #be123c var(--pct, 0%), rgba(255, 255, 255, 0.08) var(--pct, 0%), rgba(255, 255, 255, 0.08) 100%);
}

.mines-range-slider.slider-bomb::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ffffff;
    border: 2.5px solid #e11d48;
    cursor: grab;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.15);
    transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.18s ease;
}

.mines-range-slider.slider-bomb::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.6), 0 0 0 2px rgba(225, 29, 72, 0.35);
}

.mines-range-slider.slider-bomb::-webkit-slider-thumb:active {
    cursor: grabbing;
    transform: scale(0.95);
}

.mines-range-slider.slider-bomb::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ffffff;
    border: 2.5px solid #e11d48;
    cursor: grab;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.15);
    transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.18s ease;
}

/* Slider Endpoints (Min / Max) */
.slider-endpoints {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.74rem;
    color: #64748b;
}

.slider-endpoints .endpoint-label strong {
    color: #94a3b8;
    font-family: var(--ice-font-mono);
}

/* Slider Ticks Row (Quick Jumps for Bombs) */
.slider-ticks-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2px;
}

.slider-tick-btn {
    background: transparent;
    border: none;
    color: #64748b;
    font-family: var(--ice-font-mono);
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
    padding: 3px 6px;
    border-radius: 6px;
    transition: all 0.15s ease;
}

.slider-tick-btn:hover:not(:disabled) {
    color: #f43f5e;
    background: rgba(244, 63, 94, 0.15);
    transform: translateY(-1px);
}

.slider-tick-btn.active {
    color: #ffffff;
    background: rgba(225, 29, 72, 0.35);
    border: 1px solid rgba(225, 29, 72, 0.45);
    box-shadow: none;
}

.slider-tick-btn:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

/* ==========================================================================
   BUTTON-IN-BUTTON CTA ARCHITECTURE
   ========================================================================== */

.mines-btn-cta {
    width: 100%;
    padding: 12px 18px 12px 24px;
    border-radius: 16px;
    font-size: 1rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    cursor: pointer;
    border: none;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.55);
    position: relative;
    overflow: hidden;
}

.mines-btn-cta .btn-text {
    flex: 1;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mines-btn-cta .btn-icon-capsule {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), background 0.25s ease;
}

/* "BẮT ĐẦU" Button - Crystalline Sapphire Gradient */
.mines-btn-cta.btn-start {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 45%, #075985 100%);
    color: #ffffff;
    border: 1.5px solid rgba(186, 230, 253, 0.45);
    border-top: 2px solid rgba(255, 255, 255, 0.85);
    box-shadow: 0 10px 28px rgba(2, 132, 199, 0.4), inset 0 2px 4px rgba(255, 255, 255, 0.35);
}

.mines-btn-cta.btn-start .btn-icon-capsule {
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.4);
}

.mines-btn-cta.btn-start:hover:not(:disabled) {
    background: linear-gradient(135deg, #38bdf8 0%, #0284c7 60%, #0369a1 100%);
    transform: translateY(-3px);
    box-shadow: 0 16px 36px rgba(56, 189, 248, 0.5), inset 0 2px 6px rgba(255, 255, 255, 0.6);
}

.mines-btn-cta.btn-start:hover:not(:disabled) .btn-icon-capsule {
    transform: translateX(4px);
    background: rgba(255, 255, 255, 0.3);
}

/* "THU HOẠCH" (Cashout) Button - Radiant Emerald / Sun-Gold */
.mines-btn-cta.btn-cashout {
    background: linear-gradient(135deg, #059669 0%, #047857 50%, #065f46 100%);
    color: #ffffff;
    border: 1.5px solid rgba(110, 231, 183, 0.45);
    border-top: 2px solid rgba(255, 255, 255, 0.85);
    box-shadow: 0 10px 28px rgba(16, 185, 129, 0.4), inset 0 2px 4px rgba(255, 255, 255, 0.35);
}

.mines-btn-cta.btn-cashout .btn-icon-capsule {
    background: rgba(255, 255, 255, 0.2);
}

.mines-btn-cta.btn-cashout:hover:not(:disabled) {
    background: linear-gradient(135deg, #10b981 0%, #059669 60%, #047857 100%);
    transform: translateY(-3px);
    box-shadow: 0 16px 36px rgba(16, 185, 129, 0.55), inset 0 2px 6px rgba(255, 255, 255, 0.6);
}

.mines-btn-cta.btn-cashout:hover:not(:disabled) .btn-icon-capsule {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.35);
}

/* "HỦY CƯỢC" Button */
.mines-btn-cta.btn-cancel {
    background: rgba(186, 230, 253, 0.08);
    border: 1px solid var(--ice-border-subtle);
    color: #bae6fd;
}

.mines-btn-cta.btn-cancel:hover:not(:disabled) {
    background: rgba(186, 230, 253, 0.18);
    color: #ffffff;
}

.mines-btn-cta:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* ==========================================================================
   HIGH-TECH FANTASY CRYSTAL HUD TELEMETRY
   ========================================================================== */

.mines-stats-card {
    background: rgba(4, 9, 18, 0.92);
    border: 1.5px solid rgba(56, 189, 248, 0.25);
    border-radius: 18px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.8), 0 10px 24px rgba(0, 0, 0, 0.6);
}

/* Dual Metric Readout Hero */
.mines-telemetry-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.telemetry-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.telemetry-caption {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 6px;
}

.telemetry-number {
    font-size: 1.65rem;
    font-weight: 900;
    font-family: var(--ice-font-mono);
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.telemetry-number.glow-cyan {
    color: #38bdf8;
    text-shadow: none;
}

.telemetry-number.glow-gold {
    color: var(--ice-treasure-gold);
    text-shadow: none;
}

.telemetry-divider {
    width: 1px;
    height: 44px;
    background: linear-gradient(180deg, transparent, rgba(56, 189, 248, 0.35), transparent);
}

/* Sleek Progress Track */
.mines-progress-wrapper {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mines-progress-labels {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.78rem;
}

.progress-title {
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.progress-val {
    font-weight: 800;
    font-family: var(--ice-font-mono);
    color: #6ee7b7;
    text-shadow: 0 0 8px rgba(110, 231, 183, 0.4);
}

.mines-progress-track {
    width: 100%;
    height: 7px;
    background: rgba(186, 230, 253, 0.08);
    border-radius: 9999px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.8);
}

.mines-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #0284c7 0%, #38bdf8 60%, #10b981 100%);
    border-radius: 9999px;
    transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.8);
}

/* ==========================================================================
   HERO FORECAST CARD (PHẦN THƯỞNG DỰ KIẾN KHỐI TIẾP THEO)
   ========================================================================== */

.mines-forecast-hero-card {
    background: linear-gradient(145deg, rgba(14, 27, 46, 0.95) 0%, rgba(7, 14, 26, 0.98) 100%);
    border: 1.5px solid rgba(56, 189, 248, 0.35);
    border-top: 2.5px solid #38bdf8;
    border-radius: 20px;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.75), 0 0 28px rgba(56, 189, 248, 0.15), inset 0 1px 2px rgba(255, 255, 255, 0.15);
    position: relative;
    overflow: hidden;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    contain: layout paint;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

html[data-feast-mode="dawn"] .mines-forecast-hero-card,
body.theme-mode-light .mines-forecast-hero-card {
    background: linear-gradient(145deg, #F8FAFC 0%, #EFF6FF 100%) !important;
    border: 1.5px solid var(--season-border-color, #93C5FD) !important;
    border-top: 2.5px solid var(--c-primary, #0284C7) !important;
    color: #0F172A !important;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08) !important;
}

html[data-feast-mode="dawn"] .mines-forecast-hero-card .forecast-hero-badge,
body.theme-mode-light .mines-forecast-hero-card .forecast-hero-badge {
    color: #0F172A !important;
}

html[data-feast-mode="dawn"] .mines-forecast-hero-card .forecast-condition-pill,
body.theme-mode-light .mines-forecast-hero-card .forecast-condition-pill {
    background: rgba(2, 132, 199, 0.1) !important;
    border-color: rgba(2, 132, 199, 0.35) !important;
    color: #0369A1 !important;
}

html[data-feast-mode="dawn"] .mines-forecast-hero-card .metric-caption,
body.theme-mode-light .mines-forecast-hero-card .metric-caption,
html[data-feast-mode="dawn"] .mines-forecast-hero-card .forecast-hero-hint,
body.theme-mode-light .mines-forecast-hero-card .forecast-hero-hint {
    color: #334155 !important;
}

html[data-feast-mode="dawn"] .mines-forecast-hero-card #forecastMultiplierValue,
body.theme-mode-light .mines-forecast-hero-card #forecastMultiplierValue {
    color: #0369A1 !important;
}

html[data-feast-mode="dawn"] .mines-forecast-hero-card #forecastPayoutValue,
body.theme-mode-light .mines-forecast-hero-card #forecastPayoutValue {
    color: #B45309 !important;
}

/* Subtle Shimmer Ray across Forecast Card */
.mines-forecast-hero-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #38bdf8, transparent);
    opacity: 0.8;
}

.forecast-hero-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.forecast-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #bae6fd;
}

.forecast-condition-pill {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.28);
    color: #38bdf8;
    padding: 3px 8px;
    border-radius: 9999px;
}

.forecast-hero-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.forecast-hero-metric {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.forecast-hero-metric.mult-metric {
    flex: 0 0 auto;
}

.forecast-hero-metric.payout-metric {
    flex: 1;
    text-align: right;
}

.forecast-hero-metric .metric-caption {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #94a3b8;
}

.forecast-hero-metric .metric-number {
    font-family: var(--ice-font-mono);
    font-weight: 900;
    line-height: 1.1;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.forecast-hero-metric .metric-number.glow-cyan {
    font-size: 1.65rem;
    color: #38bdf8;
    text-shadow: none;
}

.forecast-hero-metric .metric-number.glow-gold {
    font-size: 2.15rem;
    color: var(--ice-treasure-gold);
    text-shadow: none;
    letter-spacing: -0.02em;
}

.forecast-hero-divider {
    width: 1px;
    height: 48px;
    background: linear-gradient(180deg, transparent, rgba(56, 189, 248, 0.35), transparent);
}

.forecast-hero-footer {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    color: #7dd3fc;
    opacity: 0.85;
    padding-top: 4px;
    border-top: 1px solid rgba(186, 230, 253, 0.08);
}

/* ==========================================================================
   RIGHT: STAGE ARENA & 5x5 GLACIAL ALTAR
   ========================================================================== */

.mines-stage-card {
    background: rgba(15, 10, 28, 0.94);
    border: 1.5px solid var(--ice-border-subtle);
    border-radius: 28px;
    padding: 32px 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85), inset 0 1px 3px rgba(255, 255, 255, 0.12);
    position: relative;
    overflow: hidden;
}

/* Atmospheric Celestial Aurora Orb behind Grid (Static, Zero Lag) */
.mines-stage-aurora-glow {
    position: absolute;
    width: 440px;
    height: 440px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.15) 0%, rgba(45, 212, 191, 0.08) 45%, transparent 75%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 0;
    filter: blur(40px);
}

/* 4 Corner Crystal Brackets */
.stage-corner {
    position: absolute;
    width: 16px;
    height: 16px;
    pointer-events: none;
    z-index: 2;
    border-color: rgba(56, 189, 248, 0.65);
    filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.5));
}

.stage-corner-tl { top: 18px; left: 18px; border-top: 2px solid; border-left: 2px solid; border-radius: 4px 0 0 0; }
.stage-corner-tr { top: 18px; right: 18px; border-top: 2px solid; border-right: 2px solid; border-radius: 0 4px 0 0; }
.stage-corner-bl { bottom: 18px; left: 18px; border-bottom: 2px solid; border-left: 2px solid; border-radius: 0 0 0 4px; }
.stage-corner-br { bottom: 18px; right: 18px; border-bottom: 2px solid; border-right: 2px solid; border-radius: 0 0 4px 0; }

/* 5x5 Mine Grid Layout */
.mines-grid-5x5 {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
    width: 100%;
    max-width: 530px;
    aspect-ratio: 1 / 1;
    position: relative;
    z-index: 1;
}

@media (max-width: 560px) {
    .mines-grid-5x5 {
        gap: 9px;
    }
}

/* ==========================================================================
   2. CARTOON PLAYING CARDS (THẺ BÀI LINH VẬT XIE - SOFT TWILIGHT FROST PALETTE)
   ========================================================================== */

.mines-tile {
    /* Soft, gentle twilight frost card */
    background: linear-gradient(155deg, #131b2e 0%, #0d1527 50%, #090e1a 100%);
    border: 1.5px solid rgba(147, 197, 253, 0.28);
    border-radius: 14px;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4), inset 0 1px 2px rgba(255, 255, 255, 0.06);
    overflow: hidden;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
    aspect-ratio: 1 / 1;
    padding: 0;
}

/* Card Hover State - Gentle moonlit soft glow, no harsh neon */
@media (hover: hover) and (pointer: fine) {
    .mines-tile:hover:not(.disabled) {
        transform: translateY(-3px);
        border-color: rgba(186, 230, 253, 0.55);
        background: linear-gradient(155deg, #18233c 0%, #101a30 50%, #0b1222 100%);
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.55), 0 0 12px rgba(186, 230, 253, 0.2);
    }
    .mines-tile:hover:not(.disabled) .card-mascot-circle {
        border-color: rgba(186, 230, 253, 0.5);
        background: radial-gradient(circle, rgba(147, 197, 253, 0.22) 0%, rgba(15, 23, 42, 0.8) 100%);
    }
    .mines-tile:hover:not(.disabled) .card-mascot-label {
        color: #e2e8f0;
    }
    .mines-tile:hover:not(.disabled) .card-corner-star {
        color: rgba(226, 232, 240, 0.7);
    }
}

/* Card Active (Click) State */
.mines-tile:active:not(.disabled) {
    transform: translateY(1px) scale(0.97);
}

.mines-tile.disabled {
    cursor: not-allowed;
}

/* Inner Card Container */
.mines-card-inner {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

/* Card Faces */
.card-face {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    border-radius: 12px;
}

/* --------------------------------------------------------------------------
   MẶT LƯNG THẺ BÀI (CARD BACK - SOFT MOONLIT FROST XIE)
   -------------------------------------------------------------------------- */
.card-back {
    background: transparent;
    padding: 6px;
    box-sizing: border-box;
}

.card-back-frame {
    width: 100%;
    height: 100%;
    border: 1px solid rgba(226, 232, 240, 0.12);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    background: radial-gradient(circle at 50% 45%, rgba(147, 197, 253, 0.08) 0%, transparent 75%);
}

/* 4 Corner Stars - Muted Silver Pearl */
.card-corner-star {
    position: absolute;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(226, 232, 240, 0.35);
    transition: color 0.12s ease;
}
.card-corner-star.c-tl { top: 3px; left: 3px; }
.card-corner-star.c-tr { top: 3px; right: 3px; }
.card-corner-star.c-bl { bottom: 3px; left: 3px; }
.card-corner-star.c-br { bottom: 3px; right: 3px; }

/* Mascot Circle Frame in Center - Soft Moonlit Frost, Not Harsh Yellow */
.card-mascot-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(147, 197, 253, 0.15) 0%, rgba(15, 23, 42, 0.75) 100%);
    border: 1.5px solid rgba(186, 230, 253, 0.32);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4), inset 0 1px 2px rgba(255, 255, 255, 0.1);
    transition: all 0.12s ease;
}

.card-mascot-img {
    width: 86%;
    height: 86%;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
    pointer-events: none;
}

.card-mascot-label {
    font-size: 0.56rem;
    font-weight: 800;
    font-family: var(--ice-font-mono);
    color: #94a3b8;
    letter-spacing: 0.12em;
    margin-top: 3px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    transition: color 0.12s ease;
}

@media (max-width: 560px) {
    .card-mascot-circle {
        width: 34px;
        height: 34px;
    }
    .card-mascot-label {
        font-size: 0.5rem;
        letter-spacing: 0.06em;
        margin-top: 2px;
    }
    .card-corner-star svg {
        width: 6px;
        height: 6px;
    }
}

/* --------------------------------------------------------------------------
   MẶT TRƯỚC THẺ BÀI: KHO BÁU AN TOÀN (REVEALED SAFE TREASURE - DỊU MẮT)
   -------------------------------------------------------------------------- */
.mines-tile.revealed-diamond {
    background: linear-gradient(145deg, #063d33 0%, #064e42 55%, #032b24 100%);
    border: 1.5px solid rgba(52, 211, 153, 0.65);
    border-top: 2px solid #6ee7b7;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.28), inset 0 0 10px rgba(52, 211, 153, 0.18);
    cursor: default;
    animation: none;
}

.card-front-safe {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 50% 50%, rgba(52, 211, 153, 0.16) 0%, transparent 75%);
}

/* --------------------------------------------------------------------------
   MẶT TRƯỚC THẺ BÀI: BẪY BOM BĂNG (REVEALED FROST BOMB TRAP - DỊU MẮT)
   -------------------------------------------------------------------------- */
.mines-tile.revealed-mine {
    background: linear-gradient(145deg, #4c0d16 0%, #5c111c 55%, #2a050a 100%);
    border: 1.5px solid rgba(244, 63, 94, 0.65);
    border-top: 2px solid #fb7185;
    box-shadow: 0 4px 16px rgba(244, 63, 94, 0.35), inset 0 0 12px rgba(244, 63, 94, 0.22);
    cursor: default;
    animation: none;
}

.card-front-trap {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 50% 50%, rgba(244, 63, 94, 0.18) 0%, transparent 75%);
}

/* Ghost State - Post-game unrevealed cards */
.mines-tile.revealed-ghost {
    opacity: 0.45;
    border-style: dashed;
    box-shadow: none;
    cursor: default;
}

/* Responsive Cartoon Card Icons */
.card-icon {
    width: 48px;
    height: 48px;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.5));
}

@media (max-width: 560px) {
    .card-icon {
        width: 36px;
        height: 36px;
    }
}

/* ==========================================================================
   TOAST BANNER & MODALS
   ========================================================================== */

.mines-banner-toast {
    margin-top: 22px;
    padding: 14px 28px;
    border-radius: 16px;
    font-size: 0.92rem;
    font-weight: 700;
    text-align: center;
    max-width: 530px;
    width: 100%;
    display: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(14px);
}

.mines-banner-toast.show {
    display: block;
    animation: slideUpToast 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.mines-banner-toast.toast-info {
    background: rgba(56, 189, 248, 0.16);
    border: 1px solid rgba(56, 189, 248, 0.4);
    color: #bae6fd;
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.2);
}

.mines-banner-toast.toast-win {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.22) 0%, rgba(5, 150, 105, 0.15) 100%);
    border: 1.5px solid rgba(16, 185, 129, 0.55);
    color: #a7f3d0;
    box-shadow: 0 0 28px rgba(16, 185, 129, 0.35);
}

.mines-banner-toast.toast-lose {
    background: linear-gradient(135deg, rgba(244, 63, 94, 0.22) 0%, rgba(190, 18, 60, 0.15) 100%);
    border: 1.5px solid rgba(244, 63, 94, 0.55);
    color: #fecdd3;
    box-shadow: 0 0 28px rgba(244, 63, 94, 0.35);
}

/* Modals */
.mines-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(3, 7, 18, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
}

.mines-modal-backdrop.open {
    opacity: 1;
    visibility: visible;
}

.mines-modal-dialog {
    background: #0d192a;
    border: 1.5px solid var(--ice-border-frost);
    border-radius: 24px;
    width: 100%;
    max-width: 580px;
    padding: 28px;
    color: var(--ice-frost-white);
    box-shadow: 0 28px 64px rgba(0, 0, 0, 0.8), 0 0 36px rgba(56, 189, 248, 0.2);
    transform: scale(0.94);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 90vh;
    overflow-y: auto;
}

.mines-modal-backdrop.open .mines-modal-dialog {
    transform: scale(1);
}

.mines-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--ice-border-subtle);
    padding-bottom: 16px;
    margin-bottom: 20px;
}

.mines-modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
}

.mines-btn-close {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 6px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
}

.mines-btn-close:hover {
    color: #ffffff;
    background: rgba(186, 230, 253, 0.12);
}

@keyframes slideUpToast {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   MOBILE & PERFORMANCE OPTIMIZATION (HIGH FRAME RATE & NO LAG)
   ========================================================================== */

@media (max-width: 960px) {
    .mines-console-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }
    .mines-panel-card {
        padding: 22px 18px;
        border-radius: 20px;
    }
    .mines-stage-card {
        padding: 24px 18px;
        border-radius: 22px;
    }
}

@media (max-width: 640px) {
    .mines-wrapper {
        padding: 12px 10px 84px;
    }

    .mines-header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        margin-bottom: 14px;
        padding-bottom: 12px;
    }

    .mines-title-group h1 {
        flex-direction: column;
        align-items: center;
        gap: 2px;
        text-align: center;
        margin: 0 auto;
    }

    .title-brand {
        font-size: 1.22rem;
        gap: 8px;
        justify-content: center;
    }

    .title-brand svg {
        width: 20px;
        height: 20px;
    }

    .title-sep {
        display: none;
    }

    .title-sub {
        font-size: 0.96rem;
        letter-spacing: 0.05em;
        font-weight: 800;
        text-align: center;
    }

    .mines-header-actions {
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        width: 100%;
        gap: 8px;
    }

    .mines-modal-dialog {
        padding: 18px 16px;
        border-radius: 18px;
    }

    .mines-badge-pill {
        padding: 6px 12px;
        font-size: 0.82rem;
    }

    .mines-btn-tool {
        padding: 6px 10px;
        font-size: 0.78rem;
    }

    .mines-console-grid {
        gap: 14px;
    }

    .mines-panel-card {
        padding: 14px 12px;
        border-radius: 18px;
        gap: 12px;
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }

    .slider-header-row {
        margin-bottom: 4px;
    }

    .slider-group-label {
        font-size: 0.78rem;
    }

    .slider-val-badge {
        padding: 3px 8px;
        font-size: 0.82rem;
    }

    .slider-endpoints {
        font-size: 0.7rem;
        margin-top: 3px;
    }

    .slider-ticks-row {
        margin-top: 3px;
    }

    .slider-tick-btn {
        font-size: 0.7rem;
        padding: 2px 4px;
    }

    .mines-forecast-hero-card {
        padding: 12px 12px;
        gap: 8px;
        border-radius: 16px;
    }

    .forecast-hero-metric .metric-caption {
        font-size: 0.62rem;
        letter-spacing: 0.04em;
    }

    .forecast-hero-metric .metric-number.glow-gold {
        font-size: 1.55rem;
        white-space: nowrap;
    }

    .forecast-hero-metric .metric-number.glow-cyan {
        font-size: 1.25rem;
        white-space: nowrap;
    }

    .forecast-hero-divider {
        height: 38px;
    }

    .forecast-hero-footer {
        font-size: 0.68rem;
        line-height: 1.35;
    }

    .mines-btn-cta {
        padding: 12px 14px;
        font-size: 0.95rem;
        border-radius: 14px;
    }

    .mines-stage-card {
        padding: 14px 10px;
        border-radius: 18px;
        margin-bottom: 24px;
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }

    .mines-grid-5x5 {
        gap: 6px;
        max-width: 100%;
    }

    .mines-tile {
        border-radius: 12px;
    }

    .mines-tile-sigil svg {
        width: 18px;
        height: 18px;
    }

    /* Reduce heavy blur filters on mobile to eliminate GPU rasterization lag */
    .mines-wrapper::before {
        height: 220px;
        filter: blur(30px);
    }

    .mines-stage-aurora-glow {
        width: 220px;
        height: 220px;
        filter: blur(20px);
    }
}
