/* =============================================== */
/*           SLOT MACHINE ROULETTE 🎰             */
/* =============================================== */

.roulette-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem 0;
}

/* Заголовок */
.roulette-title {
    color: #f5e6c8;
    font-size: 1.6rem;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    text-align: center;
    text-shadow: 2px 2px 0 #000;
    font-family: "Press Start 2P", monospace, Arial;
}

/* ═══════════════════════════════════════════════ */
/* Корпус автомата                                 */
/* ═══════════════════════════════════════════════ */

.slot-machine-body {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1.2rem;
    background: linear-gradient(180deg, #292828 0%, #3d0d0d 100%);
    border: 3px solid #848181;
    border-radius: 16px;
    box-shadow:
        0 0 20px rgba(255, 215, 0, 0.15),
        inset 0 2px 8px rgba(0, 0, 0, 0.6);
    position: relative;
}

.slot-machine-body::before {
    content: '🎰';
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 24px;
    background: #1a0e2e;
    padding: 0 10px;
    border: 2px solid #ffd700;
    border-radius: 8px;
}

/* ═══════════════════════════════════════════════ */
/* Окно с рилами                                   */
/* ═══════════════════════════════════════════════ */

.slot-window {
    display: flex;
    flex-direction: row;
    gap: 6px;
    padding: 8px;
    background: #0a0a15;
    border: 2px solid #333;
    border-radius: 10px;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
    position: relative;
}

/* Блики на стекле */
.slot-window::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.06) 0%,
        transparent 100%
    );
    border-radius: 10px 10px 0 0;
    pointer-events: none;
    z-index: 5;
}

/* Линия выигрыша — горизонтальная полоска по центру */
.slot-window::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 4px;
    right: 4px;
    height: 2px;
    background: rgba(255, 215, 0, 0.25);
    transform: translateY(-50%);
    z-index: 4;
    pointer-events: none;
    border-radius: 1px;
    box-shadow: 0 0 6px rgba(255, 215, 0, 0.15);
}

/* ═══════════════════════════════════════════════ */
/* Отдельный рил (барабан)                         */
/* ═══════════════════════════════════════════════ */

.slot-reel {
    width: 64px;
    height: 64px;
    overflow: hidden;
    position: relative;
    border: 2px solid #444;
    border-radius: 8px;
    background: linear-gradient(
        180deg,
        #0d0d1a 0%,
        #1a1a2e 40%,
        #1a1a2e 60%,
        #0d0d1a 100%
    );
    box-shadow:
        inset 0 0 12px rgba(0, 0, 0, 0.7),
        0 0 6px rgba(255, 215, 0, 0.1);

    /* Вертикальная прокрутка */
    display: flex;
    flex-direction: column;
}

/* Свечение при вращении */
.slot-reel.spinning {
    border-color: #ffd700;
    animation: reelGlow 0.25s ease-in-out infinite alternate;
}

@keyframes reelGlow {
    from {
        box-shadow:
            inset 0 0 12px rgba(0, 0, 0, 0.7),
            0 0 8px rgba(255, 215, 0, 0.3);
    }
    to {
        box-shadow:
            inset 0 0 12px rgba(0, 0, 0, 0.7),
            0 0 18px rgba(255, 215, 0, 0.6);
    }
}

/* Мигание при выигрыше */
.slot-reel.win-flash {
    animation: reelWinFlash 0.15s ease-in-out 6 alternate;
}

@keyframes reelWinFlash {
    0% {
        border-color: #ffd700;
        box-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
    }
    100% {
        border-color: #fff;
        box-shadow: 0 0 25px rgba(255, 255, 255, 0.8);
    }
}

/* Тряска при проигрыше */
.slot-reel.lose-shake {
    animation: reelLoseShake 0.08s ease-in-out 4;
}

@keyframes reelLoseShake {
    0%, 100% { transform: translateX(0); }
    25%      { transform: translateX(-3px); }
    75%      { transform: translateX(3px); }
}

/* ═══════════════════════════════════════════════ */
/* Элемент ролика (одна иконка)                    */
/* ═══════════════════════════════════════════════ */

.slot-item {
    width: 64px;
    height: 64px;
    min-height: 64px;
    max-height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    flex-shrink: 0;
    box-sizing: border-box;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.15);
    transition: none;
    user-select: none;
}

/* Подсветка выигрышного символа */
.slot-item.highlight {
    background: radial-gradient(
        ellipse at center,
        rgba(255, 215, 0, 0.25) 0%,
        transparent 70%
    );
    text-shadow: 0 0 14px rgba(255, 215, 0, 0.9);
    transform: scale(1.15);
    transition: transform 0.3s ease, text-shadow 0.3s ease;
}

/* ═══════════════════════════════════════════════ */
/* Рычаг                                           */
/* ═══════════════════════════════════════════════ */

.slot-lever {
    width: 20px;
    height: 80px;
    background: linear-gradient(180deg, #cc3333 0%, #991111 100%);
    border: 2px solid #000;
    border-radius: 0 0 10px 10px;
    position: relative;
    cursor: pointer;
    transition: transform 0.2s ease;
    box-shadow: 2px 2px 0 #000;
}

.slot-lever::before {
    content: '';
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 24px;
    background: radial-gradient(circle at 40% 40%, #ff6666, #cc0000);
    border: 2px solid #000;
    border-radius: 50%;
    box-shadow: 1px 1px 0 #000;
}

.slot-lever:hover {
    transform: translateY(-2px);
}

.slot-lever:active {
    transform: translateY(12px);
    transition: transform 0.1s ease;
}

/* ═══════════════════════════════════════════════ */
/* Панель управления                               */
/* ═══════════════════════════════════════════════ */

.control-panel {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
    align-items: center;
}

.control-panel button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-family: "Press Start 2P", monospace, Arial;
    font-weight: bold;
    font-size: 0.7rem;
    text-transform: uppercase;
    color: #fff;
    padding: 0.7rem 1.2rem;
    border-radius: 10px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.control-panel button .btn-icon {
    font-size: 1.1rem;
}

.control-panel button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 0 rgba(0, 0, 0, 0.3);
}

.control-panel button:active {
    transform: translateY(2px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.3);
}

/* Основная кнопка "Крутить" */
.roulette-spin-btn {
    background: linear-gradient(180deg, #646700 0%, #cfbf33 100%);
    border-color: #4933d5;
}

.roulette-spin-btn:hover {
    background: linear-gradient(180deg, #66BB6A 0%, #43A047 100%);
}

/* Кнопка "Авто" */
.auto-spin-btn {
    background: linear-gradient(180deg, #FF9800 0%, #F57C00 100%);
    border-color: #E65100;
}

.auto-spin-btn:hover {
    background: linear-gradient(180deg, #FFB74D 0%, #FF9800 100%);
}

/* Отключенное состояние */
.control-panel button:disabled {
    background: #444 !important;
    border-color: #333 !important;
    color: #666;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* ═══════════════════════════════════════════════ */
/* Результат                                       */
/* ═══════════════════════════════════════════════ */

.roulette-result {
    font-family: "Press Start 2P", monospace, Arial;
    font-size: 0.75rem;
    font-weight: bold;
    text-align: center;
    color: #f5e6c8;
    text-shadow: 1px 1px 0 #000;
    min-height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border: 1px solid rgba(255, 215, 0, 0.15);
    max-width: 280px;
    line-height: 1.4;
}

/* ═══════════════════════════════════════════════ */
/* Панель статистики                               */
/* ═══════════════════════════════════════════════ */

.stats-panel {
    display: flex;
    gap: 1.2rem;
    justify-content: center;
    flex-wrap: wrap;
    padding: 0.6rem 1rem;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.stat-label {
    font-family: "Press Start 2P", monospace, Arial;
    font-size: 0.5rem;
    color: #888;
    text-transform: uppercase;
}

.stat-value {
    font-family: "Press Start 2P", monospace, Arial;
    font-size: 0.7rem;
    color: #ffd700;
    text-shadow: 1px 1px 0 #000;
}
