/* =============================================
   CRASH GAME - Professional Redesign v2.0
   ============================================= */

/* === CSS Variables === */
:root {
    /* Основные цвета */
    --bg-primary: #0a0e17;
    --bg-secondary: #111827;
    --bg-card: rgba(17, 24, 39, 0.8);
    --bg-card-hover: rgba(31, 41, 55, 0.9);
    
    /* Акцентные цвета */
    --accent-green: #10b981;
    --accent-green-glow: rgba(16, 185, 129, 0.5);
    --accent-green-light: #34d399;
    --accent-yellow: #f59e0b;
    --accent-yellow-glow: rgba(245, 158, 11, 0.5);
    --accent-red: #ef4444;
    --accent-red-glow: rgba(239, 68, 68, 0.5);
    --accent-blue: #3b82f6;
    --accent-purple: #8b5cf6;
    --accent-gold: #fbbf24;
    --accent-gold-light: #fcd34d;
    --accent-gold-glow: rgba(251, 191, 36, 0.6);
    
    /* Текст */
    --text-primary: #ffffff;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    
    /* Границы и эффекты */
    --border-color: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(255, 255, 255, 0.15);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
    
    /* Градиенты */
    --gradient-green: linear-gradient(135deg, #10b981, #059669);
    --gradient-red: linear-gradient(135deg, #ef4444, #dc2626);
    --gradient-blue: linear-gradient(135deg, #3b82f6, #2563eb);
    --gradient-gold: linear-gradient(135deg, #f59e0b, #d97706);
    
    /* Размеры */
    --header-height: 70px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    /* Тени */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-glow-green: 0 0 30px rgba(16, 185, 129, 0.3);
    --shadow-glow-red: 0 0 30px rgba(239, 68, 68, 0.3);
    
    /* Анимации */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* === Reset & Base === */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    height: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* === Background Effects === */
.bg-effects {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bg-gradient {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(16, 185, 129, 0.15), transparent),
        radial-gradient(ellipse 60% 40% at 100% 50%, rgba(59, 130, 246, 0.1), transparent),
        radial-gradient(ellipse 60% 40% at 0% 100%, rgba(139, 92, 246, 0.1), transparent);
}

.bg-grid {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    mask-image: radial-gradient(ellipse 100% 100% at 50% 0%, black, transparent 70%);
}

.bg-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-green-glow) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 1s ease;
    filter: blur(60px);
}

.bg-glow.active {
    opacity: 0.3;
}

.bg-glow.crashed {
    background: radial-gradient(circle, var(--accent-red-glow) 0%, transparent 70%);
}

/* === App Container === */
#app {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    /* Отступ сверху для fullscreen режима */
    padding-top: 60px;
}

/* === Header === */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-height);
    padding: 0 16px;
    /* Safe area для fullscreen режима (notch на iPhone, и т.д.) */
    padding-top: env(safe-area-inset-top, 0);
    background: rgba(10, 14, 23, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

.header-content {
    height: 100%;
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.game-icon {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.logo-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.game-title {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #fff, #9ca3af);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.game-subtitle {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.balance-card {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(10px);
}

.balance-amount-wrapper {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    opacity: 0.6;
}

.balance-amount-wrapper:hover {
    opacity: 0.8;
    background: rgba(255, 255, 255, 0.05);
}

.balance-amount-wrapper.active {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
}

.balance-amount-wrapper.balance-iris.active {
    box-shadow: 0 0 10px rgba(255, 100, 150, 0.3);
}

.balance-amount-wrapper.balance-gold.active {
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.3);
}

.balance-divider {
    color: var(--text-muted);
    opacity: 0.3;
    font-size: 14px;
}

.balance-amount {
    font-family: 'JetBrains Mono', monospace;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.currency-icon {
    font-size: 18px;
    line-height: 1;
}

.currency-icon-sm {
    font-size: 14px;
    line-height: 1;
}

.currency-emoji-sm {
    font-size: 14px;
    line-height: 1;
}

/* === Main Container === */
.game-container {
    flex: 1;
    padding: 16px;
    /* Safe area снизу для home indicator на iPhone X+ */
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0));
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
}

/* === Multiplier Section === */
.multiplier-section {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

#crash-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.particles-container {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    pointer-events: none;
}

/* === Multiplier Display === */
.multiplier-display {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.multiplier-glow {
    position: absolute;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, var(--accent-green-glow) 0%, transparent 70%);
    filter: blur(40px);
    opacity: 0.5;
    transition: all var(--transition-slow);
}

.multiplier-display.crashed .multiplier-glow {
    background: radial-gradient(circle, var(--accent-red-glow) 0%, transparent 70%);
}

.multiplier-display.cashing-out .multiplier-glow {
    background: radial-gradient(circle, var(--accent-yellow-glow) 0%, transparent 70%);
    transform: scale(1.5);
}

.multiplier-content {
    position: relative;
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.multiplier-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 64px;
    font-weight: 700;
    color: var(--accent-green);
    text-shadow: 0 0 40px var(--accent-green-glow);
    transition: color var(--transition-normal), text-shadow var(--transition-normal);
}

.multiplier-display.crashed .multiplier-value {
    color: var(--accent-red);
    text-shadow: 0 0 40px var(--accent-red-glow);
    animation: crashPulse 0.6s ease;
}

.multiplier-display.cashing-out .multiplier-value {
    color: var(--accent-yellow);
    text-shadow: 0 0 40px var(--accent-yellow-glow);
    animation: cashoutPulse 0.5s ease;
}

.multiplier-x {
    font-family: 'JetBrains Mono', monospace;
    font-size: 40px;
    font-weight: 500;
    opacity: 0.6;
    color: inherit;
}

.multiplier-display.crashed .multiplier-x,
.multiplier-display.cashing-out .multiplier-x {
    color: inherit;
}

/* === Game Status Bar === */
.game-status-bar {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 20;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top-color: rgba(255, 255, 255, 0.15);
    border-left-color: rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    backdrop-filter: blur(20px);
    box-shadow:
        0 2px 12px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-green);
    flex-shrink: 0;
}

.status-indicator.betting .status-dot {
    background: var(--accent-blue);
}

.status-indicator.playing .status-dot {
    background: var(--accent-green);
}

.status-indicator.crashed .status-dot {
    background: var(--accent-red);
}

.status-text {
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
}

.round-info {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(10px);
}

.round-label {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-muted);
}

.round-number {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

/* === Status Indicator Countdown === */
.status-indicator.countdown .status-dot {
    background: var(--accent-blue);
}

.status-indicator.countdown .status-text {
    color: rgba(255, 255, 255, 0.9);
}

/* === Round Stats (Compact) === */
.round-stats {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    backdrop-filter: blur(10px);
}

.stat-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 5px;
}

.stat-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-label {
    font-size: 10px;
    text-transform: lowercase;
    color: var(--text-muted);
}

.stat-divider {
    width: 1px;
    height: 16px;
    background: var(--border-color);
}

/* === History Bar (Compact Glassmorphism) === */
.history-bar {
    display: flex;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top-color: rgba(255, 255, 255, 0.12);
    border-left-color: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow:
        0 2px 12px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.history-bar::-webkit-scrollbar {
    display: none;
}

.crash-item {
    flex-shrink: 0;
    padding: 5px 10px;
    border-radius: var(--radius-sm);
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    font-size: 12px;
    transition: all var(--transition-fast);
    animation: slideIn 0.3s ease;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid transparent;
}

.crash-item:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.06);
}

.crash-item.low {
    color: var(--accent-red);
    border-color: rgba(239, 68, 68, 0.2);
    background: rgba(239, 68, 68, 0.08);
}

.crash-item.medium {
    color: var(--accent-yellow);
    border-color: rgba(245, 158, 11, 0.2);
    background: rgba(245, 158, 11, 0.08);
}

.crash-item.high {
    color: var(--accent-green);
    border-color: rgba(16, 185, 129, 0.2);
    background: rgba(16, 185, 129, 0.08);
}

.crash-item.epic {
    color: var(--accent-gold);
    border-color: rgba(251, 191, 36, 0.3);
    background: rgba(251, 191, 36, 0.1);
    text-shadow: 0 0 6px rgba(251, 191, 36, 0.4);
}

/* === Betting Section === */
.betting-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.betting-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px;
    backdrop-filter: blur(10px);
}

.bet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.bet-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
}

/* === Currency Switch === */
.currency-switch {
    display: flex;
    gap: 6px;
    padding: 4px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.currency-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.currency-btn:hover {
    background: var(--glass-bg);
    color: var(--text-secondary);
}

.currency-btn.active {
    background: var(--glass-bg);
    border-color: var(--accent-green);
    color: var(--text-primary);
}

.currency-btn.active .currency-emoji {
    transform: scale(1.1);
}

.currency-emoji {
    font-size: 16px;
    transition: transform var(--transition-fast);
}

.currency-name {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Стиль для голды */
.currency-btn#btn-gold.active {
    border-color: var(--accent-gold);
}

.currency-btn#btn-gold.active .currency-name {
    color: var(--accent-gold-light);
}

.bet-input-group {
    margin-bottom: 14px;
}

.bet-input-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
}

.bet-adjust-btn {
    width: 50px;
    height: 50px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--glass-bg);
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.bet-adjust-btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-blue);
}

.bet-adjust-btn:active {
    transform: scale(0.95);
}

.input-container {
    flex: 1;
    position: relative;
}

.bet-input {
    width: 100%;
    height: 50px;
    padding: 0 45px 0 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: 'JetBrains Mono', monospace;
    font-size: 20px;
    font-weight: 600;
    text-align: center;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.bet-input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
}

.input-currency {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    pointer-events: none;
    line-height: 1;
}

.quick-bets {
    display: flex;
    gap: 8px;
}

.quick-bet-btn {
    flex: 1;
    padding: 12px 8px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--glass-bg);
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.quick-bet-btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-blue);
}

.quick-bet-btn:active {
    transform: scale(0.95);
}

.quick-bet-btn.max-btn {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
    color: var(--accent-yellow);
}

.quick-bet-btn.max-btn:hover {
    background: rgba(245, 158, 11, 0.2);
    border-color: var(--accent-yellow);
}

/* === Action Buttons === */
.action-btn {
    position: relative;
    width: 100%;
    padding: 18px 24px;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    overflow: hidden;
    transition: all var(--transition-fast);
}

.btn-icon {
    font-size: 22px;
}

.btn-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: left 0.5s ease;
}

.action-btn:hover .btn-shine {
    left: 100%;
}

.bet-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 50%, #10b981 100%);
    background-size: 200% 200%;
    color: white;
    font-family: 'Inter', 'SF Pro Display', -apple-system, sans-serif;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow:
        0 4px 15px rgba(16, 185, 129, 0.4),
        0 0 30px rgba(16, 185, 129, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.bet-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    background-position: 100% 100%;
    box-shadow:
        0 8px 25px rgba(16, 185, 129, 0.5),
        0 0 50px rgba(16, 185, 129, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.bet-btn:active:not(:disabled) {
    transform: translateY(-1px);
    box-shadow:
        0 4px 15px rgba(16, 185, 129, 0.4),
        0 0 30px rgba(16, 185, 129, 0.2);
}

.bet-btn:disabled {
    background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
    color: var(--text-muted);
    box-shadow: none;
    cursor: not-allowed;
    border-color: transparent;
}

.bet-btn:disabled .btn-shine {
    display: none;
}

.cashout-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 50%, #047857 100%) !important;
    background-size: 200% 200% !important;
    color: white;
    box-shadow:
        0 4px 20px rgba(16, 185, 129, 0.5),
        0 0 40px rgba(16, 185, 129, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
    animation: mainCashoutPulse 1.5s ease-in-out infinite;
}

.cashout-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow:
        0 8px 30px rgba(16, 185, 129, 0.6),
        0 0 60px rgba(16, 185, 129, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
}

.cashout-btn:active:not(:disabled) {
    transform: translateY(-1px);
}

.cashout-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    animation: none;
}

.cashout-btn .cashout-amount {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-sm);
    margin: 0 4px;
}

@keyframes mainCashoutPulse {
    0%, 100% {
        box-shadow:
            0 4px 20px rgba(16, 185, 129, 0.5),
            0 0 40px rgba(16, 185, 129, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }
    50% {
        box-shadow:
            0 4px 30px rgba(16, 185, 129, 0.6),
            0 0 60px rgba(16, 185, 129, 0.4),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }
}

.cashout-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cashout-text {
    margin-right: 4px;
}

.cashout-amount {
    font-family: 'JetBrains Mono', monospace;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-sm);
}

.hidden {
    display: none !important;
}


/* === Notifications (Glassmorphism) === */
.notifications {
    position: fixed;
    top: calc(var(--header-height) + 12px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: calc(100% - 32px);
    max-width: 320px;
    pointer-events: none;
}

.notification {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top-color: rgba(255, 255, 255, 0.15);
    border-left-color: rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    pointer-events: auto;
    animation: notificationSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* Цветной индикатор (точка) */
.notification-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.notification-text {
    flex: 1;
    line-height: 1.4;
}

/* Цветовые схемы */
.notification.success {
    border-bottom-color: rgba(16, 185, 129, 0.4);
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.15),
        0 2px 8px rgba(16, 185, 129, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.notification.success .notification-dot {
    background: var(--accent-green);
    box-shadow: 0 0 8px var(--accent-green-glow);
}

.notification.error {
    border-bottom-color: rgba(239, 68, 68, 0.4);
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.15),
        0 2px 8px rgba(239, 68, 68, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.notification.error .notification-dot {
    background: var(--accent-red);
    box-shadow: 0 0 8px var(--accent-red-glow);
}

.notification.info {
    border-bottom-color: rgba(59, 130, 246, 0.4);
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.15),
        0 2px 8px rgba(59, 130, 246, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.notification.info .notification-dot {
    background: var(--accent-blue);
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.5);
}

.notification .currency-icon {
    width: 14px;
    height: 14px;
    vertical-align: middle;
    margin: 0 1px;
}

/* Анимация исчезновения */
.notification.fade-out {
    animation: notificationSlideOut 0.25s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes notificationSlideIn {
    from {
        opacity: 0;
        transform: translateY(-12px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes notificationSlideOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(-8px) scale(0.95);
    }
}

/* === Animations === */
@keyframes crashPulse {
    0% { transform: scale(1); }
    25% { transform: scale(1.15); }
    50% { transform: scale(0.95); }
    75% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes cashoutPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes cashoutGlow {
    0%, 100% { box-shadow: var(--shadow-md), 0 0 30px rgba(16, 185, 129, 0.3); }
    50% { box-shadow: var(--shadow-md), 0 0 50px rgba(16, 185, 129, 0.5); }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes notificationIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes particleFloat {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx), var(--ty)) scale(0);
        opacity: 0;
    }
}

/* === My Bets Section === */
.my-bets-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 14px;
    backdrop-filter: blur(10px);
    margin-bottom: 12px;
}

.my-bets-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.my-bets-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
}

.my-bets-count {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
}

.my-bets-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.my-bet-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.my-bet-item.active {
    border-color: rgba(59, 130, 246, 0.4);
    background: rgba(59, 130, 246, 0.1);
}

.my-bet-item.won {
    border-color: rgba(16, 185, 129, 0.4);
    background: rgba(16, 185, 129, 0.1);
}

.my-bet-item.lost {
    border-color: rgba(239, 68, 68, 0.4);
    background: rgba(239, 68, 68, 0.1);
}

.my-bet-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.my-bet-amount {
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.my-bet-target {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--text-muted);
}

.my-bet-target.has-auto {
    color: var(--accent-yellow);
}

.my-bet-target-icon {
    font-size: 10px;
}

.my-bet-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.my-bet-cashout-btn {
    padding: 12px 20px;
    border: none;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #10b981 0%, #059669 50%, #047857 100%);
    background-size: 200% 200%;
    color: white;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow:
        0 4px 15px rgba(16, 185, 129, 0.4),
        0 0 20px rgba(16, 185, 129, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.3);
    animation: cashoutButtonPulse 2s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.my-bet-cashout-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transition: left 0.5s ease;
}

.my-bet-cashout-btn:hover::before {
    left: 100%;
}

.my-bet-cashout-btn:hover:not(:disabled) {
    transform: translateY(-3px) scale(1.02);
    background-position: 100% 100%;
    box-shadow:
        0 8px 25px rgba(16, 185, 129, 0.5),
        0 0 40px rgba(16, 185, 129, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.my-bet-cashout-btn:active:not(:disabled) {
    transform: translateY(-1px) scale(1);
    box-shadow:
        0 4px 15px rgba(16, 185, 129, 0.4),
        0 0 20px rgba(16, 185, 129, 0.2);
}

.my-bet-cashout-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    animation: none;
}

.my-bet-cashout-btn.auto-active {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #b45309 100%);
    background-size: 200% 200%;
    box-shadow:
        0 4px 15px rgba(245, 158, 11, 0.4),
        0 0 20px rgba(245, 158, 11, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border-color: rgba(245, 158, 11, 0.3);
    animation: autoCashoutButtonPulse 1.5s ease-in-out infinite;
}

.my-bet-cashout-btn.auto-active:hover:not(:disabled) {
    box-shadow:
        0 8px 25px rgba(245, 158, 11, 0.5),
        0 0 40px rgba(245, 158, 11, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* Элементы внутри кнопки */
.cashout-btn-text {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.9;
}

.cashout-btn-amount {
    font-family: 'JetBrains Mono', monospace;
    font-size: 16px;
    font-weight: 700;
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-sm);
    min-width: 50px;
    text-align: center;
}

.currency-icon-xs {
    font-size: 12px;
    line-height: 1;
    height: 12px;
}

@keyframes cashoutButtonPulse {
    0%, 100% {
        box-shadow:
            0 4px 15px rgba(16, 185, 129, 0.4),
            0 0 20px rgba(16, 185, 129, 0.2),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }
    50% {
        box-shadow:
            0 4px 20px rgba(16, 185, 129, 0.5),
            0 0 35px rgba(16, 185, 129, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }
}

@keyframes autoCashoutButtonPulse {
    0%, 100% {
        box-shadow:
            0 4px 15px rgba(245, 158, 11, 0.4),
            0 0 20px rgba(245, 158, 11, 0.2),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }
    50% {
        box-shadow:
            0 4px 25px rgba(245, 158, 11, 0.6),
            0 0 40px rgba(245, 158, 11, 0.4),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }
}

.my-bet-status {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 4px;
}

.my-bet-status.processing {
    background: rgba(59, 130, 246, 0.2);
    color: var(--accent-blue);
    animation: processingPulse 1s ease-in-out infinite;
}

.my-bet-status.won {
    background: rgba(16, 185, 129, 0.2);
    color: var(--accent-green);
}

.my-bet-status.lost {
    background: rgba(239, 68, 68, 0.2);
    color: var(--accent-red);
}

@keyframes processingPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.no-my-bets {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-size: 13px;
}

/* === Auto Cashout Section === */
.auto-cashout-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 14px;
}

.auto-cashout-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
}

.auto-cashout-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 26px;
    transition: all var(--transition-fast);
}

.toggle-slider::before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
    background: var(--text-secondary);
    border-radius: 50%;
    transition: all var(--transition-fast);
}

.toggle-switch input:checked + .toggle-slider {
    background: rgba(16, 185, 129, 0.2);
    border-color: var(--accent-green);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(22px);
    background: var(--accent-green);
}

.auto-cashout-input-wrapper {
    display: flex;
    align-items: center;
    gap: 4px;
    opacity: 0.4;
    transition: opacity var(--transition-fast);
}

.auto-cashout-input-wrapper.active {
    opacity: 1;
}

.auto-cashout-input {
    width: 80px;
    height: 36px;
    padding: 0 8px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: 'JetBrains Mono', monospace;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    background: var(--bg-card);
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.auto-cashout-input:focus {
    outline: none;
    border-color: var(--accent-yellow);
}

.auto-cashout-input-wrapper.active .auto-cashout-input {
    border-color: var(--accent-yellow);
}

.auto-cashout-x {
    font-family: 'JetBrains Mono', monospace;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-muted);
}

.auto-cashout-input-wrapper.active .auto-cashout-x {
    color: var(--accent-yellow);
}

/* Quick Multipliers */
.quick-multipliers {
    display: none;
    gap: 6px;
    margin-top: 10px;
}

.quick-multipliers.active {
    display: flex;
}

.quick-mult-btn {
    flex: 1;
    padding: 8px 6px;
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: var(--radius-sm);
    background: rgba(245, 158, 11, 0.1);
    color: var(--accent-yellow);
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.quick-mult-btn:hover {
    background: rgba(245, 158, 11, 0.2);
    border-color: var(--accent-yellow);
}

.quick-mult-btn:active {
    transform: scale(0.95);
}

@keyframes autoCashoutPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.4); }
    50% { box-shadow: 0 0 20px 4px rgba(251, 191, 36, 0.3); }
}

/* === Responsive === */
@media (max-width: 480px) {
    .multiplier-value {
        font-size: 52px;
    }
    
    .multiplier-x {
        font-size: 32px;
    }
    
    .game-container {
        padding: 12px;
        gap: 12px;
    }
    
    .multiplier-section {
        min-height: 240px;
    }
    
    .quick-bets {
        flex-wrap: wrap;
    }
    
    .quick-bet-btn {
        min-width: calc(33.33% - 6px);
    }
    
    .action-btn {
        padding: 16px 20px;
        font-size: 16px;
    }
    
    .bet-input {
        font-size: 18px;
        height: 46px;
    }
    
    .bet-adjust-btn {
        width: 46px;
        height: 46px;
    }
}

/* === Number Input Arrows Remove === */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

/* === Currency Rain Animation === */
.currency-rain-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.falling-currency {
    position: absolute;
    top: -60px;
    pointer-events: none;
    filter: drop-shadow(0 0 10px rgba(251, 191, 36, 0.6));
    animation: currencyFall var(--fall-duration, 2s) ease-in forwards;
    animation-delay: var(--delay, 0s);
    opacity: 0;
    transform: rotate(var(--initial-rotation, 0deg));
}

/* Анимация падения для ирисок (конфет) */
.currency-rain-container:not(.gold-win) .falling-currency {
    filter: drop-shadow(0 0 10px rgba(255, 100, 150, 0.7));
}

/* Анимация падения для голды */
.currency-rain-container.gold-win .falling-currency {
    filter: drop-shadow(0 0 12px rgba(251, 191, 36, 0.8));
}

@keyframes currencyFall {
    0% {
        opacity: 0;
        transform: translateY(0) translateX(0) rotate(var(--initial-rotation, 0deg)) scale(0.5);
    }
    10% {
        opacity: 1;
        transform: translateY(10vh) translateX(calc(var(--drift, 0px) * 0.1)) rotate(calc(var(--initial-rotation, 0deg) + 30deg)) scale(1);
    }
    50% {
        opacity: 1;
        transform: translateY(50vh) translateX(calc(var(--drift, 0px) * 0.5)) rotate(calc(var(--initial-rotation, 0deg) + 180deg)) scale(1.1);
    }
    85% {
        opacity: 0.8;
    }
    100% {
        opacity: 0;
        transform: translateY(calc(100vh + 100px)) translateX(var(--drift, 0px)) rotate(calc(var(--initial-rotation, 0deg) + 360deg)) scale(0.8);
    }
}

/* Эффект свечения при большом выигрыше - ириски */
.currency-rain-container.epic-win::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center top, rgba(255, 100, 150, 0.2) 0%, transparent 60%);
    animation: epicGlow 0.5s ease-out;
}

/* Эффект свечения при большом выигрыше - голда */
.currency-rain-container.epic-win.gold-win::before {
    background: radial-gradient(ellipse at center top, rgba(251, 191, 36, 0.25) 0%, transparent 60%);
}

@keyframes epicGlow {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: scale(1.2);
    }
}

/* Дополнительная анимация вращения для падающих элементов */
@keyframes currencySpin {
    0% {
        transform: rotate(0deg) scale(1);
    }
    25% {
        transform: rotate(90deg) scale(1.15);
    }
    50% {
        transform: rotate(180deg) scale(1);
    }
    75% {
        transform: rotate(270deg) scale(1.15);
    }
    100% {
        transform: rotate(360deg) scale(1);
    }
}