* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: #080101;
    font-family: 'Inter', sans-serif;
    color: #fff;
    height: 100vh;
    overflow: hidden;
}

.slot-fullscreen {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100%;
    background: radial-gradient(circle at top center, #2e0808 0%, #080101 100%);
}

/* Навигация */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: rgba(15, 3, 3, 0.95);
    border-bottom: 1px solid #4a0d0d;
    z-index: 10;
}

.top-nav-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.back-btn {
    background: #1a0505;
    border: 1px solid #4a0d0d;
    color: #d4af37;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    font-size: 12px;
    transition: 0.2s;
}

.back-btn:hover {
    background: #4a0d0d;
    color: #fff;
    border-color: #d4af37;
}

.btn-paytable {
    color: #ff3333;
    border-color: rgba(255, 51, 51, 0.3);
}

.btn-paytable:hover {
    background: rgba(255, 51, 51, 0.15);
    color: #ff3333;
    border-color: #ff3333;
}

.logo {
    font-size: 20px;
    font-weight: 900;
    color: #fff;
    letter-spacing: 2px;
}

.logo span {
    color: #d4af37;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.balance-box {
    background: #1a0505;
    padding: 8px 20px;
    border-radius: 8px;
    border: 1px solid #d4af37;
    font-weight: bold;
    font-size: 16px;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.2);
}

.balance-box span:first-child {
    color: #52be80;
}

/* Игровой автомат */
.slot-viewport {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    gap: 40px;
}

/* Колонны Мафии */
.decor-pillar.mafia-pillar {
    width: 60px;
    height: 80%;
    max-height: 500px;
    background: linear-gradient(180deg, #1f0505 0%, #3a0a0a 50%, #1f0505 100%);
    border: 2px solid #d4af37;
    border-radius: 4px;
    box-shadow:
        0 0 20px rgba(0, 0, 0, 0.8),
        inset 0 0 10px rgba(212, 175, 55, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0.95;
}

.decor-pillar.mafia-pillar::after {
    content: '888';
    color: #d4af37;
    font-size: 32px;
    font-weight: 900;
    writing-mode: vertical-rl;
    letter-spacing: 15px;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.8);
}

/* Рамка автомата */
.slot-machine-frame {
    background: linear-gradient(180deg, #140303 0%, #0a0101 100%);
    border: 3px solid #8b0000;
    border-radius: 12px;
    padding: 25px;
    box-shadow:
        0 0 50px rgba(139, 0, 0, 0.5),
        inset 0 0 30px rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    width: 100%;
    max-width: 820px;
    position: relative;
}

.slot-machine-frame::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border: 1px solid #d4af37;
    border-radius: 14px;
    pointer-events: none;
}

.slot-banner {
    width: 100%;
    background: #000;
    border: 1px solid #4a0d0d;
    border-radius: 6px;
    padding: 10px;
    text-align: center;
}

.slot-banner-text {
    font-size: 14px;
    font-weight: 800;
    color: #d4af37;
    letter-spacing: 1px;
}

/* 5 Барабанов */
.reels-container {
    position: relative;
    display: flex;
    gap: 10px;
    background: #030000;
    padding: 12px;
    border-radius: 6px;
    border: 2px solid #4a0d0d;
    box-shadow: inset 0 0 50px rgba(0, 0, 0, 1);
}

.reel-window {
    width: 110px;
    height: 330px;
    overflow: hidden;
    background: linear-gradient(180deg, #0a0202 0%, #050101 50%, #0a0202 100%);
    border-radius: 4px;
    border: 1px solid rgba(212, 175, 55, 0.1);
    position: relative;
}

.reel-strip {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    will-change: transform;
}

.symbol-cell {
    width: 110px;
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 55px;
    user-select: none;
    transition: 0.2s;
    filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.5));
}

.symbol-cell.winning {
    animation: mafiaWin 0.6s infinite alternate;
    z-index: 10;
}

@keyframes mafiaWin {
    from {
        transform: scale(0.95);
        filter: drop-shadow(0 0 10px #d4af37);
    }

    to {
        transform: scale(1.15);
        filter: drop-shadow(0 0 30px #d4af37) brightness(1.2);
    }
}

/* Статистика */
.slot-stats-bar {
    width: 100%;
    display: flex;
    justify-content: space-between;
    background: #000;
    padding: 12px 18px;
    border-radius: 6px;
    border: 1px solid #4a0d0d;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 11px;
    color: #a38181;
    font-weight: 700;
}

.stat-item strong {
    font-size: 16px;
    color: #fff;
    margin-top: 2px;
}

.stat-item.highlight strong {
    color: #d4af37;
    font-size: 18px;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.4);
}

/* Управление */
.slot-controls {
    background: #0f0303;
    border-top: 1px solid #4a0d0d;
    padding: 20px;
    z-index: 10;
    height: 95px;
}

.controls-container {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.bet-selector-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.control-label {
    font-size: 11px;
    font-weight: 800;
    color: #a38181;
    letter-spacing: 1px;
}

.chips-row {
    display: flex;
    gap: 8px;
}

.custom-bet-input {
    background: #1a0505;
    border: 1px solid #4a0d0d;
    border-radius: 8px;
    color: #fff;
    height: 48px;
    padding: 0 15px;
    width: 110px;
    font-weight: 700;
    outline: none;
    transition: 0.2s;
}

.custom-bet-input:focus {
    border-color: #d4af37;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.custom-bet-input::-webkit-inner-spin-button {
    display: none;
}

.chip-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #1a0505;
    border: 2px dashed #8b0000;
    color: #fff;
    font-weight: 800;
    font-size: 12px;
    cursor: pointer;
    transition: 0.2s;
}

.chip-btn:hover,
.chip-btn.active {
    background: #8b0000;
    border-style: solid;
    border-color: #d4af37;
    box-shadow: 0 0 15px rgba(139, 0, 0, 0.6);
    transform: scale(1.08);
}

.action-btns-group {
    display: flex;
    gap: 12px;
}

.auto-btn {
    background: #1a0505;
    border: 1px solid #4a0d0d;
    color: #a38181;
    border-radius: 8px;
    padding: 0 20px;
    height: 54px;
    font-weight: 800;
    cursor: pointer;
    transition: 0.2s;
}

.auto-btn:hover,
.auto-btn.active {
    background: #2e0808;
    color: #fff;
    border-color: #d4af37;
}

.spin-btn {
    background: linear-gradient(135deg, #8b0000, #5c0000);
    border: 1px solid #d4af37;
    border-radius: 8px;
    color: #d4af37;
    font-size: 20px;
    font-weight: 900;
    padding: 0 45px;
    height: 54px;
    cursor: pointer;
    transition: 0.2s;
    box-shadow: 0 4px 15px rgba(139, 0, 0, 0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.spin-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
    background: linear-gradient(135deg, #a80000, #730000);
    color: #fff;
}

.spin-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    filter: grayscale(1);
    border-color: #4a0d0d;
    color: #a38181;
}

/* Кнопки выигрыша (Риск/Забрать) */
.win-actions {
    justify-content: center;
}

.win-message {
    margin-right: 20px;
}

.collect-btn {
    background: #1a0505;
    border: 1px solid #52be80;
    color: #52be80;
    border-radius: 8px;
    padding: 0 30px;
    height: 54px;
    font-weight: 900;
    font-size: 16px;
    cursor: pointer;
    transition: 0.2s;
}

.collect-btn:hover {
    background: #52be80;
    color: #000;
    box-shadow: 0 0 15px rgba(82, 190, 128, 0.4);
}

.risk-btn {
    background: linear-gradient(135deg, #d4af37, #b8962e);
    border: none;
    border-radius: 8px;
    color: #000;
    font-size: 18px;
    font-weight: 900;
    padding: 0 40px;
    height: 54px;
    cursor: pointer;
    transition: 0.2s;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
    animation: pulseRisk 1s infinite alternate;
}

@keyframes pulseRisk {
    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.05);
    }
}

.risk-btn:hover {
    filter: brightness(1.1);
    animation: none;
    transform: translateY(-2px);
}

/* Модалка Риск-Игры и Выплат */
.paytable-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(8, 1, 1, 0.9);
    backdrop-filter: blur(8px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.paytable-card,
.gamble-card {
    background: #140303;
    border: 1px solid #d4af37;
    border-radius: 12px;
    padding: 30px;
    width: 90%;
    max-width: 600px;
    position: relative;
    box-shadow: 0 10px 40px rgba(212, 175, 55, 0.15);
}

.close-paytable-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: #a38181;
    font-size: 20px;
    cursor: pointer;
}

.close-paytable-btn:hover {
    color: #d4af37;
}

.paytable-title {
    color: #d4af37;
    font-size: 22px;
    font-weight: 900;
    text-align: center;
}

.paytable-subtitle {
    color: #a38181;
    font-size: 13px;
    text-align: center;
    margin-bottom: 25px;
}

/* Риск-игра стили */
.gamble-amount-box {
    text-align: center;
    font-size: 20px;
    color: #fff;
    margin-bottom: 30px;
    font-weight: bold;
}

.gamble-amount-box span {
    color: #d4af37;
    font-size: 28px;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.gamble-choices {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
}

.case-btn {
    width: 140px;
    height: 140px;
    border-radius: 12px;
    border: 3px solid #333;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: 0.3s;
    background: #0a0101;
}

.case-btn i {
    font-size: 40px;
}

.case-btn span {
    font-weight: 900;
    font-size: 14px;
}

.red-case {
    color: #ff3333;
    border-color: rgba(255, 51, 51, 0.3);
}

.red-case:hover {
    background: rgba(255, 51, 51, 0.1);
    border-color: #ff3333;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(255, 51, 51, 0.2);
}

.black-case {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}

.black-case:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(255, 255, 255, 0.2);
}

.gamble-result {
    text-align: center;
    font-size: 18px;
    font-weight: 900;
    min-height: 25px;
}

/* Таблица выплат */
.symbols-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.symbol-card {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #0a0101;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #4a0d0d;
}

.symbol-card.hot {
    border-color: #d4af37;
    background: rgba(212, 175, 55, 0.05);
}

.symbol-card.wild-card {
    border-color: #8b0000;
    background: rgba(139, 0, 0, 0.1);
}

.symbol-ico {
    font-size: 32px;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.8));
}

.symbol-info {
    display: flex;
    flex-direction: column;
}

.symbol-info strong {
    font-size: 13px;
    color: #fff;
}

.symbol-info .mult {
    color: #d4af37;
    font-weight: 800;
    font-size: 12px;
}
