/* --- Cyber Mines Styles (Premium) --- */

.mines-container {
    max-width: 950px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

@media (min-width: 768px) {
    .mines-container {
        flex-direction: row;
        align-items: flex-start;
    }
}

/* Sidebar Controls */
.mines-controls {
    width: 100%;
    max-width: 320px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
    border-radius: 1.5rem;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

/* Декоративная линия сверху */
.mines-controls::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 3px;
    background: linear-gradient(90deg, #ef4444, #3b82f6);
}

.control-group label {
    display: block;
    font-size: 0.75rem;
    color: #94a3b8;
    text-transform: uppercase;
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
}

.mines-input {
    width: 100%;
    background: #0b1120;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    padding: 0.85rem 1rem;
    color: white;
    font-family: 'Fira Code', monospace;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s;
}

.mines-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* Кнопки ставок */
.bet-presets {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.preset-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: #cbd5e1;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.4rem;
    border-radius: 0.5rem;
    transition: all 0.2s;
}

.preset-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Главная кнопка */
.start-btn {
    width: 100%;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    font-weight: 800;
    text-transform: uppercase;
    padding: 1.25rem;
    border-radius: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
    position: relative;
    overflow: hidden;
}

.start-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.6);
}

.start-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(1);
}

/* Кнопка Cashout */
.cashout-btn {
    width: 100%;
    background: linear-gradient(135deg, #22c55e, #15803d);
    color: white;
    font-weight: 800;
    padding: 1rem;
    border-radius: 1rem;
    transition: all 0.2s;
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.4);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.cashout-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 0 40px rgba(34, 197, 94, 0.6);
}

.cashout-shine {
    position: absolute;
    top: 0; left: -100%;
    width: 50%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shine 2s infinite;
}

@keyframes shine {
    0% { left: -100%; }
    100% { left: 200%; }
}

/* Game Board */
.mines-board-wrapper {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 450px;
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.5rem;
    padding: 2rem;
    position: relative;
    box-shadow: inset 0 0 50px rgba(0,0,0,0.5);
}

/* Декоративная сетка на фоне */
.mines-board-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.5;
    pointer-events: none;
}

.mines-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 10;
}

/* Info Stats (Multiplier) */
.game-stats {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 1rem;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
}

.stat-label { color: #94a3b8; }
.stat-val { color: #fff; font-family: 'Fira Code', monospace; font-weight: 600; }
.stat-val.win { color: #4ade80; }


/* Tiles Styles */
.mine-tile {
    aspect-ratio: 1;
    background: rgba(30, 41, 59, 0.6);
    border-radius: 0.75rem;
    border: 2px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    position: relative;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.mine-tile:hover:not(.revealed):not(.disabled) {
    background: rgba(59, 130, 246, 0.3);
    border-color: rgba(59, 130, 246, 0.6);
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.2);
    z-index: 20;
}

/* Revealed States */
.mine-tile.revealed {
    cursor: default;
    transform: scale(1);
    box-shadow: inset 0 0 15px rgba(0,0,0,0.5);
    border-width: 0;
}

.mine-tile.revealed.gem {
    background: radial-gradient(circle, rgba(16, 185, 129, 0.2) 0%, rgba(6, 78, 59, 0.8) 100%);
    border: 1px solid rgba(16, 185, 129, 0.5);
}

.mine-tile.revealed.bomb {
    background: radial-gradient(circle, rgba(239, 68, 68, 0.2) 0%, rgba(127, 29, 29, 0.8) 100%);
    border: 1px solid rgba(239, 68, 68, 0.5);
}

/* Exploded Bomb (Clicked Mine) */
.mine-tile.revealed.bomb.exploded {
    background: #ef4444;
    border-color: #fca5a5;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.8);
    animation: explode-pulse 0.5s ease-in-out;
    z-index: 50;
}

.mine-tile.revealed.bomb.exploded .tile-icon {
    color: white !important;
    filter: drop-shadow(0 0 5px black);
    transform: scale(1.3);
}

/* Icons */
.tile-icon {
    transform: scale(0);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.mine-tile.revealed .tile-icon { transform: scale(1); }

.gem-icon { 
    color: #4ade80; 
    filter: drop-shadow(0 0 10px #4ade80);
    animation: gem-pulse 2s infinite;
}

.bomb-icon { 
    color: #f87171; 
    filter: drop-shadow(0 0 10px #f87171);
}

/* Animations */
@keyframes gem-pulse {
    0% { filter: drop-shadow(0 0 5px #4ade80); }
    50% { filter: drop-shadow(0 0 15px #4ade80); }
    100% { filter: drop-shadow(0 0 5px #4ade80); }
}

@keyframes explode-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.mine-tile.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Dimmed state for revealed mines that weren't clicked */
.mine-tile.dimmed {
    opacity: 0.4;
    filter: grayscale(0.8);
}

/* Next Multiplier Preview */
.multiplier-bar {
    width: 100%;
    max-width: 420px;
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding: 0 0.5rem;
    color: #94a3b8;
    font-size: 0.8rem;
    font-weight: 600;
}

.next-profit {
    color: #4ade80;
    text-shadow: 0 0 10px rgba(74, 222, 128, 0.3);
}

/* Floating Multiplier Popup */
.float-multi {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: #facc15;
    color: #000;
    font-weight: 800;
    font-size: 0.8rem;
    padding: 0.1rem 0.4rem;
    border-radius: 0.3rem;
    opacity: 0;
    animation: floatUp 1s ease-out forwards;
    pointer-events: none;
    z-index: 100;
}

@keyframes floatUp {
    0% { opacity: 1; transform: translate(-50%, 0); }
    100% { opacity: 0; transform: translate(-50%, -20px); }
}