/* MAXW1N — Mines premium game UI */

.mw-mines-page {
    color: #fff;
    padding-bottom: 48px;
}

.mw-mines-page .mw-container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 32px 20px 60px;
}

.mw-mines-shell {
    border-radius: 28px;
    padding: 26px;
    background:
        radial-gradient(circle at 70% 15%, rgba(34, 211, 238, 0.14), transparent 34%),
        radial-gradient(circle at 20% 90%, rgba(139, 92, 246, 0.14), transparent 36%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.95), rgba(6, 9, 16, 0.97));
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.mw-mines-shell.is-locked .mw-mines-field,
.mw-mines-shell.is-locked .mw-mines-stats {
    pointer-events: none;
    opacity: 0.7;
}

/* Header */
.mw-mines-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.mw-mines-header__title {
    margin: 0 0 6px;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.mw-mines-header__subtitle {
    margin: 0 0 10px;
    max-width: 480px;
    font-size: 13px;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.58);
}

.mw-mines-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.mw-mines-badge {
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    font-size: 10px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.65);
}

.mw-mines-balance-chip {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    padding: 8px 14px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.28);
}

.mw-mines-balance-chip__label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.45);
}

.mw-mines-balance-chip__value {
    font-size: 14px;
    font-weight: 800;
    color: #22d3ee;
}

.mw-mines-alert {
    margin-bottom: 12px;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid rgba(239, 68, 68, 0.4);
    background: rgba(127, 29, 29, 0.28);
    font-size: 13px;
    color: #fecaca;
}

.mw-mines-result {
    margin-bottom: 14px;
    padding: 10px 16px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    animation: mw-mines-fade-in 0.3s ease-out;
}

.mw-mines-result--win {
    border: 1px solid rgba(34, 211, 238, 0.45);
    background: rgba(6, 78, 59, 0.4);
    color: #6ee7b7;
    box-shadow: 0 0 24px rgba(34, 211, 238, 0.15);
}

.mw-mines-result--loss {
    border: 1px solid rgba(239, 68, 68, 0.35);
    background: rgba(127, 29, 29, 0.35);
    color: #fca5a5;
}

@keyframes mw-mines-fade-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Layout */
.mw-mines-layout {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

/* Controls */
.mw-mines-controls {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mw-mines-label {
    display: block;
    margin-bottom: 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.45);
}

.mw-mines-field-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.mw-mines-field-head .mw-mines-label {
    margin-bottom: 0;
}

.mw-mines-value-chip {
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.25);
    border: 1px solid rgba(99, 102, 241, 0.4);
    font-size: 12px;
    font-weight: 800;
    color: #c4b5fd;
}

.mw-mines-input-wrap {
    position: relative;
    margin-bottom: 8px;
}

.mw-mines-input {
    width: 100%;
    height: 48px;
    box-sizing: border-box;
    padding: 0 80px 0 14px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.mw-mines-input:focus {
    border-color: rgba(34, 211, 238, 0.5);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.08);
}

.mw-mines-input-suffix {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.4);
}

.mw-mines-slider {
    width: 100%;
    margin: 4px 0 10px;
    accent-color: #6366f1;
    height: 6px;
}

.mw-mines-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.mw-mines-pill {
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.75);
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s;
}

.mw-mines-pill:hover:not(:disabled) {
    background: rgba(99, 102, 241, 0.18);
    border-color: rgba(99, 102, 241, 0.35);
}

.mw-mines-pill:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.mw-mines-risk {
    margin: 8px 0 0;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.48);
}

.mw-mines-stats {
    padding: 14px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.25);
}

.mw-mines-stats__row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.55);
}

.mw-mines-stats__row strong {
    color: #22d3ee;
    font-weight: 800;
}

.mw-mines-action {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 54px;
    margin-top: 4px;
    border: none;
    border-radius: 16px;
    background: linear-gradient(135deg, #3b82f6 0%, #6366f1 50%, #8b5cf6 100%);
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 8px 28px rgba(59, 130, 246, 0.35);
    transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
}

.mw-mines-action:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 12px 32px rgba(99, 102, 241, 0.4);
}

.mw-mines-action:disabled {
    opacity: 0.65;
    cursor: wait;
}

.mw-mines-action.is-loading {
    animation: mw-mines-pulse 1s ease-in-out infinite;
}

@keyframes mw-mines-pulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

/* Board */
.mw-mines-board-wrap {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.mw-mines-board-info {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.55);
}

.mw-mines-info-label {
    color: rgba(255, 255, 255, 0.42);
}

.mw-mines-board-info strong {
    color: #fff;
    font-weight: 700;
}

.mw-mines-board-card {
    padding: 18px;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.35);
    transition: box-shadow 0.3s;
}

.mw-mines-board-card.is-win-glow {
    box-shadow: 0 0 40px rgba(34, 211, 238, 0.2);
}

.mw-mines-board-card.is-loss-glow {
    box-shadow: 0 0 30px rgba(239, 68, 68, 0.15);
}

.mw-mines-board {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    max-width: 430px;
    margin: 0 auto;
}

.mw-mines-board.is-disabled {
    pointer-events: none;
}

.mw-mines-board.is-disabled .mw-mines-tile:not(.is-safe):not(.is-mine):not(.is-revealed-safe) {
    opacity: 0.55;
    cursor: default;
}

.mw-mines-tile {
    aspect-ratio: 1;
    border: none;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 8px 18px rgba(0, 0, 0, 0.26);
    cursor: pointer;
    position: relative;
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
    padding: 0;
    color: transparent;
    font-size: 0;
}

.mw-mines-tile:not(:disabled):hover {
    transform: translateY(-2px);
    border-color: rgba(34, 211, 238, 0.45);
    box-shadow: 0 0 16px rgba(34, 211, 238, 0.15);
}

.mw-mines-tile:active:not(:disabled) {
    transform: scale(0.96);
}

.mw-mines-tile.is-loading {
    animation: mw-mines-tile-pulse 0.6s ease-in-out infinite;
    pointer-events: none;
}

@keyframes mw-mines-tile-pulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

.mw-mines-tile.is-safe {
    background: linear-gradient(180deg, rgba(6, 78, 59, 0.85), rgba(4, 47, 46, 0.95));
    border-color: rgba(34, 211, 238, 0.45);
    animation: mw-mines-flip 0.35s ease-out;
    cursor: default;
    pointer-events: none;
}

.mw-mines-tile.is-safe::after {
    content: '◆';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #22d3ee;
    text-shadow: 0 0 12px rgba(34, 211, 238, 0.6);
}

.mw-mines-tile.is-mine {
    background: linear-gradient(180deg, rgba(127, 29, 29, 0.9), rgba(69, 10, 10, 0.95));
    border-color: rgba(239, 68, 68, 0.55);
    animation: mw-mines-explode 0.45s ease-out;
    cursor: default;
    pointer-events: none;
}

.mw-mines-tile.is-mine::after {
    content: '💣';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.mw-mines-tile.is-revealed-safe {
    opacity: 0.45;
    background: linear-gradient(180deg, rgba(6, 78, 59, 0.5), rgba(4, 47, 46, 0.6));
    cursor: default;
    pointer-events: none;
}

.mw-mines-tile.is-revealed-safe::after {
    content: '◆';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: rgba(34, 211, 238, 0.5);
}

.mw-mines-tile.is-hidden-end {
    opacity: 0.35;
    cursor: default;
    pointer-events: none;
}

@keyframes mw-mines-flip {
    0% { transform: rotateY(90deg) scale(0.9); opacity: 0.5; }
    100% { transform: rotateY(0) scale(1); opacity: 1; }
}

@keyframes mw-mines-explode {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-4px) scale(1.05); }
    40% { transform: translateX(4px); }
    60% { transform: translateX(-3px); }
}

/* Multiplier rail */
.mw-mines-multiplier-rail {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    max-width: 430px;
    margin: 0 auto;
    padding: 4px 0;
}

.mw-mines-mult {
    padding: 6px 10px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.25);
    font-size: 11px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.4);
    transition: all 0.2s;
}

.mw-mines-mult.is-passed {
    border-color: rgba(34, 211, 238, 0.35);
    background: rgba(6, 78, 59, 0.35);
    color: #6ee7b7;
}

.mw-mines-mult.is-current {
    border-color: rgba(99, 102, 241, 0.55);
    background: rgba(99, 102, 241, 0.25);
    color: #fff;
    box-shadow: 0 0 16px rgba(99, 102, 241, 0.25);
    transform: scale(1.05);
}

.mw-mines-mult-arrow {
    color: rgba(255, 255, 255, 0.2);
    font-size: 10px;
}

/* Footer */
.mw-mines-footer {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.mw-mines-about summary {
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.55);
    list-style: none;
}

.mw-mines-about summary::-webkit-details-marker {
    display: none;
}

.mw-mines-about ol {
    margin: 10px 0 0;
    padding-left: 20px;
    font-size: 12px;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.55);
}

.mw-mines-loading {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

.wrp-section.mw-page.game-bgs .container > .row > .col-md-12 > h1,
.wrp-section.mw-page.game-bgs .container > .row > .col-md-12 > p {
    display: none;
}

@media (max-width: 900px) {
    .mw-mines-layout {
        grid-template-columns: 1fr;
    }

    .mw-mines-board-wrap {
        order: -1;
    }
}

@media (max-width: 640px) {
    .mw-mines-page .mw-container {
        padding: 20px 14px 48px;
    }

    .mw-mines-shell {
        padding: 16px;
        border-radius: 22px;
    }

    .mw-mines-header {
        flex-direction: column;
    }

    .mw-mines-balance-chip {
        align-items: flex-start;
    }

    .mw-mines-board {
        gap: 7px;
        max-width: 100%;
    }

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

    .mw-mines-board-card {
        padding: 12px;
    }

    .mw-mines-multiplier-rail {
        max-width: 100%;
    }
}
