/* ============================================================
   MINES — глубокий чёрный + синие акценты
   ============================================================ */

.screen#mines-screen {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    padding-bottom: 10px;
}

#mines-screen #mines-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 2px 0 6px;
    width: 100%;
    box-sizing: border-box;
}

#mines-screen #mines-header h1 {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 850;
    letter-spacing: -0.5px;
    font-style: normal;
    text-transform: uppercase;
    background: linear-gradient(135deg, #ffffff 40%, #00f0ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== GRID ===== */

#mines-screen #mines-grid-wrap {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    background: rgba(3, 4, 8, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 1px solid rgba(255, 255, 255, 0.20);
    border-radius: 20px;
    padding: 8px;
    box-shadow: 0 14px 40px rgba(0,0,0,0.85), inset 0 1px 1.5px rgba(255,255,255,0.15);
}

#mines-screen #mines-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-template-rows: repeat(6, minmax(0, 1fr));
    gap: 5px;
    width: 100%;
    aspect-ratio: 1 / 1;
    box-sizing: border-box;
}
#mines-screen .tile {
    background: linear-gradient(155deg, #0e111a 0%, #030408 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #fff;
    transition: background 0.15s, box-shadow 0.15s, border-color 0.15s;
    box-shadow:
        inset 0 1px 1px rgba(255,255,255,0.12),
        0 4px 10px rgba(0,0,0,0.7);
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    min-width: 0;
    min-height: 0;
    box-sizing: border-box;
    overflow: hidden;
    line-height: 1;
}


#mines-screen .tile:active:not(.revealed):not(.disabled) {
    border-color: #667eea;
    box-shadow:
        0 0 12px rgba(102,126,234,0.45),
        inset 1px 1px 1px rgba(102,126,234,0.15);
}

#mines-screen .tile.revealed {
    background: linear-gradient(145deg, #0d2a1a 0%, #061810 100%);
    border-color: rgba(77,205,94,0.55);
    cursor: default;
    animation: minesPopIn 0.18s ease-out;
    box-shadow: 0 0 12px rgba(77,205,94,0.3);
}

#mines-screen .tile.revealed.bomb {
    background: linear-gradient(145deg, #3a0a0a 0%, #1a0505 100%);
    border-color: #e74c3c;
    box-shadow: 0 0 16px rgba(231,76,60,0.7);
}

#mines-screen .tile.revealed.bomb-shown {
    background: linear-gradient(145deg, #1a0a0a 0%, #0a0505 100%);
    border-color: rgba(231,76,60,0.3);
    opacity: 0.55;
}

#mines-screen .tile.disabled {
    cursor: default;
    opacity: 0.5;
}

@keyframes minesPopIn {
    0%   { opacity: 0; }
    100% { opacity: 1; }
}

/* ===== PANEL ===== */

#mines-screen #mines-panel {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
}

#mines-screen #bet-display {
    text-align: center;
    padding: 6px 0;
    background: #08080f;
    border-radius: 14px;
    border: 1px solid rgba(102,126,234,0.12);
    width: 100%;
    box-sizing: border-box;
}

#mines-screen #bet-main {
    font-family: var(--font-heading);
    font-size: 36px;
    font-weight: 850;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    padding: 6px 0 4px;
    background: linear-gradient(135deg, #ffffff 0%, #a5f3fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#mines-screen #bet-main.win {
    background: linear-gradient(135deg, #ffffff 0%, #34d399 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#mines-screen #bet-sub {
    font-size: 12px;
    color: #e74c3c;
    font-weight: 600;
    padding-bottom: 8px;
    min-height: 16px;
}

#mines-screen #bet-sub.ok {
    color: #7d8b99;
}

/* ===== CHIPS ===== */

#mines-screen .chips-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
    width: 100%;
    box-sizing: border-box;
}

#mines-screen .chips-row.small {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

#mines-screen .chip {
    background: #08080f;
    border: 1px solid rgba(102,126,234,0.16);
    border-radius: 11px;
    color: #e8e8ec;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 13.5px;
    padding: 11px 4px;
    cursor: pointer;
    transition: all 0.15s;
    font-variant-numeric: tabular-nums;
    -webkit-tap-highlight-color: transparent;
    min-width: 0;
    box-sizing: border-box;
}

#mines-screen .chip:active {
    border-color: #667eea;
}

#mines-screen .chip.active {
    background: linear-gradient(135deg, #667eea, #5b4fdb);
    border-color: #667eea;
    color: #fff;
    box-shadow: 0 5px 16px rgba(102,126,234,0.5);
}

#mines-screen .chip.small {
    font-size: 13px;
    padding: 9px 4px;
}

/* ===== BOMBS ===== */

#mines-screen .bombs-section {
    background: #08080f;
    border: 1px solid rgba(102,126,234,0.12);
    border-radius: 14px;
    padding: 10px 11px 11px;
    width: 100%;
    box-sizing: border-box;
}

#mines-screen .bombs-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 9px;
}

#mines-screen .bombs-label {
    font-size: 11px;
    font-weight: 800;
    color: #7d8b99;
    letter-spacing: 2px;
}

#mines-screen .bombs-selected {
    font-size: 12px;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, #667eea, #5b4fdb);
    padding: 3px 10px;
    border-radius: 10px;
    font-variant-numeric: tabular-nums;
    box-shadow: 0 4px 12px rgba(102,126,234,0.4);
}

#mines-screen .bombs-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 5px;
    width: 100%;
    box-sizing: border-box;
}

#mines-screen .bomb-btn {
    background: #08080f;
    border: 1px solid rgba(102,126,234,0.14);
    border-radius: 9px;
    color: #cfcfcf;
    font-weight: 800;
    font-size: 13px;
    padding: 9px 4px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
    -webkit-tap-highlight-color: transparent;
    min-width: 0;
    box-sizing: border-box;
}

#mines-screen .bomb-btn:active {
    border-color: #667eea;
}

#mines-screen .bomb-btn.active {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    border-color: #e74c3c;
    color: #fff;
    box-shadow: 0 4px 14px rgba(231,76,60,0.45);
}

#mines-screen .bomb-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* ===== START / CASHOUT ===== */

#mines-screen .btn-primary {
    width: 100%;
    box-sizing: border-box;
    padding: 15px;
    background: linear-gradient(135deg, #667eea, #5b4fdb);
    color: #fff;
    border: none;
    border-radius: 13px;
    font-size: 15px;
    font-weight: 900;
    cursor: pointer;
    font-family: var(--font-heading);
    letter-spacing: 0.8px;
    box-shadow: 0 6px 20px rgba(102,126,234,0.4);
    transition: all 0.2s;
    margin-top: 2px;
    text-transform: uppercase;
    -webkit-tap-highlight-color: transparent;
}

#mines-screen .btn-primary:active:not(:disabled) {
    transform: scale(0.98);
}

#mines-screen .btn-primary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    box-shadow: none;
}

#mines-screen .btn-primary.cashout {
    background: linear-gradient(135deg, #4dcd5e, #3ba84a);
    box-shadow: 0 6px 20px rgba(77,205,94,0.5);
    animation: minesPulse 1.2s ease-in-out infinite;
}

#mines-screen .btn-primary.lost {
    background: linear-gradient(135deg, #4a5568, #2d3748);
    box-shadow: none;
}

@keyframes minesPulse {
    0%,100% { transform: scale(1); }
    50%     { transform: scale(1.02); }
}