/* Краш игра */
/* Убираем padding у main-content для страницы краша */
#crash-game-page {
    margin: 0 -15px;
    padding: 0;
    width: calc(100% + 30px);
    overflow-x: hidden;
}

#crash-game-page .page-header {
    margin-bottom: 0px; /* Убираем отступ снизу */
    padding-top: 5px;
    padding-left: 15px;
    padding-right: 15px;
}

.crash-game-container {
    padding: 0;
    max-width: 100%;
    margin: 0;
    width: 100%;
}

/* Главное игровое поле */
.crash-main-field {
    position: relative;
    width: 100vw;
    margin: 0;
    left: 50%;
    transform: translateX(-50%);
    padding: 0;
    border: none;
    border-radius: 0;
    background: linear-gradient(135deg, #0F0F0F 0%, #1A1A2E 100%);
    overflow: hidden;
    box-shadow: none;
    transition: background 1s ease;
}

/* Dynamic background states */
.crash-main-field.risk-low {
    background: linear-gradient(135deg, #0F0F0F 0%, #1A1A2E 100%);
}

.crash-main-field.risk-medium {
    background: linear-gradient(135deg, #1A1A2E 0%, #2D1B3D 100%);
}

.crash-main-field.risk-high {
    background: linear-gradient(135deg, #2D1B3D 0%, #3D1B1B 100%);
}

.crash-main-field.risk-extreme {
    background: linear-gradient(135deg, #3D1B1B 0%, #4D0000 100%);
    animation: dangerPulse 0.5s infinite;
}

@keyframes dangerPulse {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.2); }
}

#crash-graph-canvas {
    display: block;
    width: 100%;
    height: 500px;
    max-height: 65vh;
    background: transparent;
    position: relative;
}

/* Parallax stars background */
.stars-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    animation: starTwinkle 3s infinite ease-in-out;
}

@keyframes starTwinkle {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* Trail particles */
.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #FFD700;
    border-radius: 50%;
    pointer-events: none;
    animation: particleFade 0.8s forwards;
    box-shadow: 0 0 8px #FFD700;
}

@keyframes particleFade {
    to {
        opacity: 0;
        transform: scale(0);
    }
}

.crash-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    flex-direction: column;
}

.crash-status {
    color: #fff;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 18px;
    font-weight: bold;
}

.crash-timer {
    color: #00ff41;
    font-size: 24px;
    font-weight: bold;
    margin-top: 10px;
}

.crash-multiplier {
    color: #4ECDC4;
    font-size: 84px;
    font-weight: 900;
    text-shadow: 0 0 40px currentColor;
    animation: multiplierPulse 0.8s ease-in-out infinite alternate;
    position: absolute;
    top: 55%; /* Было 50%, теперь 55% - ниже */
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 20;
    letter-spacing: 4px;
    font-family: 'Arial Black', sans-serif;
    filter: drop-shadow(0 0 20px currentColor);
}

/* Risk indicator - circular progress */
.risk-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 220px;
    height: 220px;
    z-index: 100; /* Очень высокий z-index чтобы быть поверх всех элементов */
    pointer-events: none;
    display: none; /* Скрыт по умолчанию, показывается только во время игры */
    opacity: 1; /* Убеждаемся что не прозрачен */
    overflow: visible; /* Разрешаем отрисовку за границами */
    filter: none; /* Убираем фильтры с контейнера */
}

.risk-circle {
    /* Transform убран отсюда, теперь применяется напрямую к circle в HTML */
}

.risk-circle-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.15); /* Тонкий полупрозрачный фон */
    stroke-width: 10;
}

.risk-circle-progress {
    fill: none;
    stroke: #4ECDC4;
    stroke-width: 10;
    stroke-linecap: round;
    stroke-dasharray: 628;
    transition: stroke-dashoffset 0.3s ease, stroke 0.5s ease;
    /* filter убран из CSS - управляется JS для динамического свечения по цвету */
    opacity: 1;
    visibility: visible;
}

@keyframes multiplierPulse {
    from { 
        transform: translate(-50%, -50%) scale(1);
        filter: drop-shadow(0 0 20px currentColor);
    }
    to { 
        transform: translate(-50%, -50%) scale(1.08);
        filter: drop-shadow(0 0 35px currentColor);
    }
}

@keyframes riskPulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

/* История игр */
.crash-history {
    margin: 15px 0;
}

.history-multipliers {
    display: flex;
    gap: 2%;
    justify-content: space-between;
    padding: 5px 0;
}

.multiplier-bubble {
    flex: 0 0 8%;
    width: 100%;
    aspect-ratio: 1;
    background: #2A2A2A;
    border: 2px solid #444;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 10px;
    font-weight: bold;
    text-align: center;
    transition: all 0.3s ease;
    animation: bubbleAppear 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.multiplier-bubble.low {
    background: linear-gradient(135deg, #555, #666);
    border-color: #666;
    box-shadow: 0 0 10px rgba(100, 100, 100, 0.3);
}

.multiplier-bubble.medium {
    background: linear-gradient(135deg, #4ECDC4, #5DD9CF);
    border-color: #4ECDC4;
    box-shadow: 0 0 15px rgba(78, 205, 196, 0.5);
    color: #000;
}

.multiplier-bubble.high {
    background: linear-gradient(135deg, #FFE66D, #FFD700);
    border-color: #FFD700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
    color: #000;
}

.multiplier-bubble.extreme {
    background: linear-gradient(135deg, #FF6B6B, #FF5252);
    border-color: #FF5252;
    box-shadow: 0 0 25px rgba(255, 107, 107, 0.7);
    animation: sparkle 1s infinite;
}

@keyframes bubbleAppear {
    from {
        opacity: 0;
        transform: scale(0) rotate(-180deg);
    }
    to {
        opacity: 1;
        transform: scale(1) rotate(0);
    }
}

@keyframes sparkle {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.4); }
}

/* Убираем старые стили high/medium/low - все круги теперь одинаковые зеленые */

/* Кнопка ставки */
.crash-bet-section {
    margin: 15px 0;
}

/* Быстрое поле ввода ставки */
.quick-bet-input-container {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
    padding: 12px 16px;
    border-radius: 16px;
    border: 2px solid #333;
    margin-bottom: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.quick-bet-input-container:focus-within {
    border-color: #4ECDC4;
    box-shadow: 0 4px 25px rgba(78, 205, 196, 0.4);
}

.quick-bet-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 20px;
    font-weight: bold;
    color: #FFCA5A;
    text-align: center;
    outline: none;
    transition: all 0.3s ease;
    -webkit-appearance: none;
    -moz-appearance: textfield;
}

.quick-bet-input::-webkit-outer-spin-button,
.quick-bet-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.quick-bet-input:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: #4ECDC4;
    box-shadow: 0 0 15px rgba(78, 205, 196, 0.3);
    color: #fff;
}

.quick-bet-currency {
    font-size: 24px;
    color: #FFCA5A;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(255, 202, 90, 0.3);
    flex-shrink: 0;
}

.quick-bet-place-btn {
    background: linear-gradient(135deg, var(--success-color), #218838);
    color: white;
    padding: 14px 32px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(40, 167, 69, 0.5);
    flex-shrink: 0;
}

.quick-bet-place-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(40, 167, 69, 0.8);
}

.quick-bet-place-btn:active {
    transform: translateY(0);
}

.quick-bet-place-btn:disabled {
    background: linear-gradient(135deg, #555, #444);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* Модификация основной кнопки */
.crash-bet-button.secondary {
    background: linear-gradient(to right, #28a745, #218838);
    border: none;
    font-size: 14px;
    padding: 12px 20px;
    margin-top: 8px;
    box-shadow: 0 0 15px rgba(40, 167, 69, 0.5);
}

.crash-bet-button.secondary:hover {
    box-shadow: 0 0 25px rgba(40, 167, 69, 0.8);
    transform: scale(1.03);
}

.crash-bet-button {
    width: 100%;
    background-image: linear-gradient(to right, var(--success-color), #218838);
    color: white;
    padding: 15px 25px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(40, 167, 69, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.crash-bet-button:hover {
    box-shadow: 0 0 25px rgba(40, 167, 69, 0.8);
    transform: scale(1.03);
}

/* Удален старый стиль active */

.crash-bet-button:active {
    transform: scale(0.98);
    box-shadow: 0 0 10px rgba(40, 167, 69, 0.4);
}

.crash-bet-button:disabled {
    background-image: none;
    background-color: #555;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
    color: #ccc;
}

.crash-bet-button .star-icon {
    display: inline-block;
    vertical-align: text-bottom;
    line-height: 1;
    margin-left: 3px;
    transform: translateY(-1px);
}

.crash-bet-button .star-icon svg {
    width: 18px !important;
    height: 18px !important;
    display: block;
}

/* Список игроков */
.crash-players-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 15px 0 0 0;
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
    /* Стилизация скроллбара */
    scrollbar-width: thin;
    scrollbar-color: #444 transparent;
}

.crash-players-list::-webkit-scrollbar {
    width: 6px;
}

.crash-players-list::-webkit-scrollbar-track {
    background: transparent;
}

.crash-players-list::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 3px;
}

.crash-players-list::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.no-players {
    color: #777;
    text-align: center;
    padding: 20px;
    font-size: 14px;
}

.crash-player-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #222;
    padding: 12px;
    border-radius: 10px;
    border: 2px solid #333;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    animation: playerSlideIn 0.5s ease;
}

@keyframes playerSlideIn {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.crash-player-item:hover {
    border-color: #4ECDC4;
    box-shadow: 0 0 15px rgba(78, 205, 196, 0.4);
    transform: translateX(5px);
}

.crash-player-item.cashed-out {
    border-color: #4ECDC4;
    box-shadow: 0 0 20px rgba(78, 205, 196, 0.6);
    animation: playerWin 0.6s ease;
}

@keyframes playerWin {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.crash-player-item.lost {
    border-color: #FF6B6B;
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.6);
    animation: playerLost 0.5s ease;
}

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

.player-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #444;
    object-fit: cover;
    transition: all 0.3s ease;
}

.crash-player-item.cashed-out .player-avatar {
    border-color: #4ECDC4;
    box-shadow: 0 0 15px rgba(78, 205, 196, 0.6);
    animation: avatarGlow 1s infinite;
}

.crash-player-item.lost .player-avatar {
    border-color: #FF6B6B;
    filter: grayscale(0.5);
}

@keyframes avatarGlow {
    0%, 100% { box-shadow: 0 0 15px rgba(78, 205, 196, 0.6); }
    50% { box-shadow: 0 0 25px rgba(78, 205, 196, 1); }
}

.player-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.player-name {
    color: #fff;
    font-size: 14px;
    font-weight: bold;
}

.player-bet {
    color: #FFCA5A;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.player-bet .bet-amount {
    line-height: 1;
}

.player-bet .star-icon {
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

.player-bet .star-icon svg {
    width: 12px;
    height: 12px;
    vertical-align: middle;
}

.player-cashout {
    color: var(--success-color);
    font-size: 14px;
    font-weight: bold;
    margin-left: auto;
}

/* NEW: Gift cashout display */
.player-cashout-gift {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 165, 0, 0.2));
    border-radius: 8px;
    border: 1px solid #FFD700;
    color: #FFD700;
}

.player-gift-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    animation: giftPulse 1s ease-in-out infinite;
}

@keyframes giftPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.player-cashout-container {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.player-current-gift {
    position: relative;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 215, 0, 0.1);
    border: 2px solid #FFD700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
    animation: giftGlow 2s ease-in-out infinite;
}

.player-cashout-container .player-current-gift {
    margin-left: 0;
}

@keyframes giftGlow {
    0%, 100% { box-shadow: 0 0 10px rgba(255, 215, 0, 0.3); }
    50% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.6); }
}

.player-gift-preview {
    width: 24px;
    height: 24px;
    object-fit: contain;
    animation: giftRotate 3s ease-in-out infinite;
}

@keyframes giftRotate {
    0%, 100% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(-5deg) scale(1.05); }
    75% { transform: rotate(5deg) scale(1.05); }
}

/* Адаптивность */
@media (max-width: 480px) {
    .crash-game-container {
        padding: 15px 10px;
    }
    
    .crash-main-field {
        margin: 15px 0;
    }
    
    #crash-graph-canvas {
        height: 280px;
    }
    
    .crash-status {
        font-size: 16px;
        padding: 8px 16px;
    }
    
    .multiplier-bubble {
        font-size: 9px;
    }
    
    .history-multipliers {
        gap: 1.5%;
    }
    
    .crash-bet-button {
        padding: 12px;
        font-size: 16px;
    }
}

/* Новые стили для модального окна краш ставок */
.crash-bet-modal-content {
    max-width: 400px;
    width: 90%;
    padding: 0;
    border-radius: 16px;
    background: #1a1a1a;
    border: 2px solid #333;
}

/* Переключатель типа ставки в самом верху */
.crash-bet-type-switcher {
    display: flex;
    border-radius: 16px 16px 0 0;
    overflow: hidden;
}

.crash-bet-type-btn {
    flex: 1;
    padding: 16px 20px;
    background: #333;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.crash-bet-type-btn.active {
    background-image: linear-gradient(to right, var(--success-color), #218838);
    color: white;
}

.crash-bet-type-btn:not(.active):hover {
    background: #444;
}

/* Основное содержимое */
.crash-modal-body {
    padding: 30px 20px;
    min-height: 200px;
}

.crash-bet-section {
    width: 100%;
}

/* Идеальное выравнивание звезд - как сеньор разработчик */
.crash-stars-display {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px 20px 20px 20px;
}

.crash-stars-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: inherit;
    font-size: 48px;
    font-weight: bold;
    line-height: 1;
    color: #FFCA5A;
    text-shadow: 0 0 10px rgba(255, 202, 90, 0.3);
}

.crash-stars-input {
    /* Сброс стилей браузера */
    -webkit-appearance: none;
    -moz-appearance: textfield;
    appearance: none;
    border: none;
    outline: none;
    
    /* Применяем те же стили что и у label */
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
    color: inherit;
    text-shadow: inherit;
    
    /* Специфичные стили для input */
    text-align: center;
    min-width: 80px;
    max-width: 200px;
    width: auto;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 2px solid rgba(255, 202, 90, 0.3);
    cursor: text;
    transition: all 0.3s ease;
}

.crash-stars-input::-webkit-outer-spin-button,
.crash-stars-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.crash-stars-input:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 202, 90, 0.5);
    box-shadow: 0 0 15px rgba(255, 202, 90, 0.2);
}

.crash-stars-input:focus {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border-color: #FFCA5A;
    box-shadow: 0 0 25px rgba(255, 202, 90, 0.4);
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

.crash-stars-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-left: 10px;
}

.crash-stars-icon svg {
    width: 20px !important;
    height: 20px !important;
}

.input-hint {
    font-size: 12px;
    color: #888;
    text-align: center;
    margin-top: 10px;
    font-weight: 500;
    text-shadow: none;
}

/* Слайдер для ставки */
.crash-bet-slider-container {
    padding: 15px 20px 10px 20px;
    margin-top: 0px;
}

.crash-bet-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 10px;
    background: linear-gradient(to right, 
        #28a745 0%, 
        #4ECDC4 50%, 
        #FFD700 100%
    );
    outline: none;
    opacity: 0.9;
    transition: opacity 0.2s;
    box-shadow: 0 0 10px rgba(78, 205, 196, 0.3);
}

.crash-bet-slider:hover {
    opacity: 1;
}

.crash-bet-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fff, #e0e0e0);
    cursor: pointer;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.6), 0 0 25px rgba(78, 205, 196, 0.4);
    border: 3px solid #4ECDC4;
    transition: all 0.3s ease;
}

.crash-bet-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.8), 0 0 35px rgba(78, 205, 196, 0.6);
}

.crash-bet-slider::-webkit-slider-thumb:active {
    transform: scale(1.1);
    box-shadow: 0 0 25px rgba(255, 255, 255, 1), 0 0 40px rgba(78, 205, 196, 0.8);
}

.crash-bet-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fff, #e0e0e0);
    cursor: pointer;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.6), 0 0 25px rgba(78, 205, 196, 0.4);
    border: 3px solid #4ECDC4;
    transition: all 0.3s ease;
}

.crash-bet-slider::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.8), 0 0 35px rgba(78, 205, 196, 0.6);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    padding: 0 5px;
    font-size: 12px;
    color: #888;
    font-weight: 600;
}

.slider-labels .star-icon {
    display: inline-flex;
    align-items: center;
    margin-left: 3px;
}

.slider-labels .star-icon svg {
    width: 12px !important;
    height: 12px !important;
}

/* Быстрые кнопки ставки */
.quick-bet-buttons {
    display: flex;
    gap: 8px;
    padding: 15px 20px 5px 20px;
    justify-content: center;
}

.quick-bet-btn {
    flex: 1;
    padding: 10px 8px;
    background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
    color: #fff;
    border: 2px solid #444;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.quick-bet-btn:hover {
    border-color: #4ECDC4;
    background: linear-gradient(135deg, #3a3a3a, #2a2a2a);
    box-shadow: 0 0 15px rgba(78, 205, 196, 0.4);
    transform: translateY(-2px);
}

.quick-bet-btn:active {
    transform: translateY(0);
    box-shadow: 0 0 10px rgba(78, 205, 196, 0.3);
}

.quick-bet-btn[data-amount="max"] {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #000;
    border-color: #FFD700;
    font-weight: 900;
}

.quick-bet-btn[data-amount="max"]:hover {
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
    border-color: #FFD700;
}

/* Инвентарь подарков */
.crash-inventory-grid {
    max-height: 250px;
    overflow-y: auto;
    border: 2px solid #444;
    border-radius: 8px;
    padding: 10px;
    background: #111;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}

/* NEW: Красивый переключатель слева */
.gift-mode-container {
    margin-top: 8px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.gift-mode-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.gift-mode-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.gift-mode-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: 0.3s;
    border-radius: 24px;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.gift-mode-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.gift-mode-switch input:checked + .gift-mode-slider {
    background: linear-gradient(135deg, var(--success-color), #218838);
    border-color: var(--success-color);
}

.gift-mode-switch input:checked + .gift-mode-slider:before {
    transform: translateX(20px);
}

.gift-mode-label {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    user-select: none;
}

/* Уменьшаем отступ между кнопкой и игроками */
.crash-bet-section + .crash-players-list {
    margin-top: 10px;
}

/* Кнопки внизу */
.crash-modal-footer {
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.crash-modal-btn {
    width: 100%;
    padding: 16px 20px;
    font-size: 16px;
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.crash-place-btn {
    background-image: linear-gradient(to right, var(--success-color), #218838);
    color: white;
    border-radius: 0;
}

.crash-place-btn:hover {
    box-shadow: 0 0 25px rgba(40, 167, 69, 0.8);
}

.crash-cancel-btn {
    background: #555;
    color: white;
    border-radius: 0 0 16px 16px;
}

.crash-cancel-btn:hover {
    background: #666;
}

/* Адаптивность для модального окна */
@media (max-width: 480px) {
    .crash-bet-modal-content {
        width: 95%;
        margin: 20px auto;
    }
    
    .crash-stars-wrapper {
        font-size: 36px;
        gap: 6px;
    }
    
    .crash-stars-input {
        min-width: 40px;
        max-width: 130px;
    }
    
    .crash-bet-type-btn {
        padding: 14px 15px;
        font-size: 14px;
    }
    
    .crash-modal-btn {
        padding: 14px 15px;
        font-size: 14px;
    }
    
    .crash-modal-body {
        padding: 20px 15px;
    }
    
    .crash-inventory-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 8px;
    }
    
    .crash-bet-slider-container {
        padding: 15px 15px 10px 15px;
    }
    
    .quick-bet-buttons {
        padding: 10px 15px 5px 15px;
        gap: 6px;
    }
    
    .quick-bet-btn {
        padding: 8px 6px;
        font-size: 12px;
    }
}