/* ==================== MINES GAME ==================== */

#screenMines {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 80px 12px 80px 12px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    background: #08090d;
    min-height: 100vh;
    min-height: 100dvh;
}

#screenMines.active { display: flex !important; }

.mines-container {
    width: 100%;
    max-width: 426px;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    justify-content: center;
}


.mines-scene {
    width: 100%;
    max-width: 380px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    flex: 1;
    justify-content: center;
    position: relative;
}

.mines-multiplier {
    color: #ffd700;
    font-size: 28px;
    font-weight: 800;
    text-shadow: 0 0 15px rgba(255,215,0,0.5);
    text-align: center;
    height: 36px;
}

/* ==================== СЛАЙДЕР РЕЖИМОВ ==================== */

.mines-mode-selector {
    width: 100%;
    background: rgba(255,255,255,0.03);
    border-radius: 14px;
    padding: 12px;
    border: 1px solid rgba(255,255,255,0.06);
}

.mines-mode-slider {
    position: relative;
    background: rgba(0,0,0,0.3);
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 8px;
}

.mines-mode-track {
    display: flex;
    position: relative;
    z-index: 1;
}

.mines-mode-option {
    flex: 1;
    text-align: center;
    padding: 10px 0;
    font-size: 13px;
    font-weight: 700;
    color: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.3s;
    -webkit-tap-highlight-color: transparent;
    position: relative;
    z-index: 2;
    border: 2px solid transparent;
    border-radius: 8px;
    background: transparent;
}

.mines-mode-option.active {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    border-color: #f5c842;
    box-shadow: 0 0 8px rgba(245,200,66,0.3);
}

.mines-mode-indicator {
    display: none;
}

.mines-mode-info {
    display: flex;
    justify-content: space-between;
    color: rgba(255,255,255,0.5);
    font-size: 11px;
    font-weight: 600;
    padding: 0 4px;
}

/* ==================== ПОЛЕ С МИНАМИ ==================== */

.mines-grid-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
}

.mines-grid {
    display: grid;
    justify-content: center;
}

.mines-cell {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    position: relative;
    cursor: default;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.03);
    overflow: hidden;
}

.mines-cell.clickable {
    cursor: pointer;
    border-color: rgba(255,255,255,0.15);
}

.mines-cell.clickable:active {
    transform: scale(0.95);
}

.mines-cell.safe {
    background: rgba(95,245,122,0.2) !important;
    border-color: rgba(95,245,122,0.5);
    box-shadow: 0 0 12px rgba(95,245,122,0.25);
    animation: cell-flip 0.3s ease;
}

.mines-cell.mine {
    background: rgba(255,50,50,0.25) !important;
    border-color: rgba(255,50,50,0.6);
    box-shadow: 0 0 16px rgba(255,50,50,0.35);
    animation: cell-explode 0.4s ease;
}

@keyframes cell-flip {
    0% { transform: rotateY(90deg); }
    100% { transform: rotateY(0); }
}

@keyframes cell-explode {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); background: rgba(255,50,50,0.4); }
    100% { transform: scale(1); }
}

.mines-cell-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

.mines-cell-star {
    font-size: 16px;
    font-weight: 800;
    color: #5ff57a;
    text-shadow: 0 0 8px rgba(95,245,122,0.5);
    animation: star-pop 0.3s ease;
    text-align: center;
    line-height: 1.2;
}

.mines-cell-amount {
    font-size: 10px;
    font-weight: 700;
    color: #ffd700;
    text-shadow: 0 0 6px rgba(255,215,0,0.4);
    display: block;
    text-align: center;
    animation: star-pop 0.3s ease;
}

.mines-cell-bomb {
    font-size: 24px;
    animation: bomb-pop 0.3s ease;
}

@keyframes star-pop {
    0% { transform: scale(0); }
    60% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

@keyframes bomb-pop {
    0% { transform: scale(0) rotate(-30deg); }
    60% { transform: scale(1.3) rotate(10deg); }
    100% { transform: scale(1) rotate(0); }
}

/* ==================== БЛОК СТАВОК ==================== */

.mines-bet-section {
    width: 100%;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-shrink: 0;
    margin-top: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.mines-play-btn {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 15px;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #f0883e, #f5c842, #ffd700);
    color: #0a0f1a;
    border: 1px solid #f5c84260;
    box-shadow: 0 0 25px rgba(240,136,62,0.4);
    transition: all 0.25s;
    -webkit-tap-highlight-color: transparent;
}

.mines-play-btn:active { transform: scale(0.98); }
.mines-play-btn:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }

.mines-playing-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mines-found {
    flex: 1;
    color: #5ff57a;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
}

.mines-cashout-btn {
    flex: 1;
    padding: 14px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 14px;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: #5ff57a;
    color: #0a0f1a;
    border: 1px solid #5ff57a60;
    box-shadow: 0 0 25px rgba(95,245,122,0.4);
    transition: all 0.25s;
    -webkit-tap-highlight-color: transparent;
}

.mines-cashout-btn:active { transform: scale(0.98); }

/* Оверлей результата */
.mines-result-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: 16px;
    padding: 24px 32px;
    z-index: 10;
    border: 2px solid rgba(255,215,0,0.3);
    animation: result-fade-in 0.3s ease;
    white-space: nowrap;
}

.mines-result-text {
    color: #FFD700;
    font-size: 22px;
    font-weight: 800;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 20px rgba(255,215,0,0.6), 0 0 40px rgba(255,215,0,0.3);
    animation: result-pop 0.4s ease-out;
}

@keyframes result-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes result-pop {
    0% { transform: scale(0.5); opacity: 0; }
    60% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

.mines-star-icon {
    width: 10px;
    height: 10px;
    object-fit: contain;
    vertical-align: middle;
    filter: drop-shadow(0 0 3px rgba(255, 215, 0, 0.5));
}