/*
* BetKing Casino - Aviator Game Styles
* Airplane Crash Game UI
*/

.aviator-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Game Canvas Area */
.aviator-game {
    position: relative;
    background: linear-gradient(180deg, #0f0a1a 0%, #1a1025 50%, #251530 100%);
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

.game-canvas-wrapper {
    position: relative;
    height: 400px;
    overflow: hidden;
}

#aviator-canvas {
    width: 100%;
    height: 100%;
}

/* Multiplier Display */
.multiplier-display {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
}

.multiplier-value {
    font-size: 80px;
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(135deg, #ffffff 0%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 60px rgba(99, 102, 241, 0.5);
    transition: all 0.1s ease;
}

.multiplier-value.crashed {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: crashShake 0.5s ease;
}

.multiplier-value.cashed-out {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

@keyframes crashShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.multiplier-label {
    font-size: 16px;
    color: var(--text-muted);
    margin-top: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Game Status */
.game-status {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-xl);
    border: 1px solid var(--glass-border);
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

.status-dot.betting { background: #f59e0b; }
.status-dot.flying { background: #10b981; }
.status-dot.crashed { background: #ef4444; }

.status-text {
    font-weight: 600;
    font-size: 14px;
}

/* Round Info */
.round-info {
    position: absolute;
    top: 20px;
    right: 20px;
    text-align: right;
}

.round-number {
    font-size: 12px;
    color: var(--text-muted);
}

.round-hash {
    font-size: 11px;
    font-family: monospace;
    color: var(--text-muted);
    opacity: 0.7;
}

/* Previous Rounds */
.previous-rounds {
    display: flex;
    gap: 8px;
    padding: 15px 20px;
    background: var(--glass-bg);
    border-top: 1px solid var(--glass-border);
    overflow-x: auto;
}

.round-result {
    padding: 6px 14px;
    border-radius: var(--radius-xl);
    font-weight: 700;
    font-size: 13px;
    white-space: nowrap;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.round-result:hover {
    transform: scale(1.05);
}

.round-result.high {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.round-result.medium {
    background: rgba(99, 102, 241, 0.2);
    color: #818cf8;
}

.round-result.low {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

/* Betting Panel */
.betting-panel {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 20px;
    background: var(--glass-bg-dark);
    border-top: 1px solid var(--glass-border);
}

.bet-section {
    background: var(--glass-bg);
    border-radius: var(--radius-lg);
    padding: 20px;
    border: 1px solid var(--glass-border);
}

.bet-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.bet-section-title {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.bet-section-toggle {
    position: relative;
    width: 50px;
    height: 26px;
    background: var(--glass-bg);
    border-radius: 13px;
    border: 1px solid var(--glass-border);
    cursor: pointer;
    transition: all 0.3s ease;
}

.bet-section-toggle.active {
    background: var(--primary);
    border-color: var(--primary);
}

.bet-section-toggle::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.bet-section-toggle.active::after {
    transform: translateX(24px);
}

/* Bet Amount Input */
.bet-amount-wrapper {
    margin-bottom: 15px;
}

.bet-amount-input {
    display: flex;
    align-items: center;
    background: var(--bg-dark);
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    overflow: hidden;
}

.bet-amount-input button {
    width: 44px;
    height: 44px;
    background: var(--glass-bg);
    border: none;
    color: var(--text-primary);
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bet-amount-input button:hover {
    background: var(--primary);
}

.bet-amount-input input {
    flex: 1;
    height: 44px;
    background: transparent;
    border: none;
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.bet-amount-input input:focus {
    outline: none;
}

/* Quick Amount Buttons */
.quick-amounts {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
}

.quick-amount {
    flex: 1;
    padding: 8px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-amount:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Auto Cashout */
.auto-cashout {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding: 10px;
    background: var(--glass-bg);
    border-radius: var(--radius-md);
}

.auto-cashout label {
    font-size: 12px;
    color: var(--text-secondary);
}

.auto-cashout input {
    flex: 1;
    padding: 8px 12px;
    background: var(--bg-dark);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-weight: 600;
    text-align: center;
}

.auto-cashout input:focus {
    outline: none;
    border-color: var(--primary);
}

/* Bet Button */
.bet-button {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 700;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.bet-button.bet {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.bet-button.bet:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}

.bet-button.cancel {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.bet-button.cashout {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    animation: pulseCashout 0.5s infinite;
}

@keyframes pulseCashout {
    0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4); }
    50% { box-shadow: 0 0 0 10px rgba(245, 158, 11, 0); }
}

.bet-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    animation: none !important;
}

/* Live Bets Table */
.live-bets {
    background: var(--glass-bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
    margin-top: 20px;
}

.live-bets-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    border-bottom: 1px solid var(--glass-border);
}

.live-bets-title {
    font-weight: 600;
}

.live-bets-count {
    background: var(--primary);
    padding: 4px 10px;
    border-radius: var(--radius-xl);
    font-size: 12px;
    font-weight: 600;
}

.live-bets-tabs {
    display: flex;
    gap: 5px;
}

.live-bets-tab {
    padding: 8px 16px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.live-bets-tab.active {
    background: var(--glass-bg);
    color: var(--text-primary);
}

.live-bets-table {
    max-height: 300px;
    overflow-y: auto;
}

.live-bets-table table {
    width: 100%;
}

.live-bets-table th {
    padding: 12px 16px;
    background: var(--glass-bg);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.live-bets-table td {
    padding: 10px 16px;
    font-size: 13px;
}

.live-bets-table tr {
    border-bottom: 1px solid var(--glass-border);
}

.bet-user {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bet-user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--glass-bg);
}

.bet-cashout {
    color: var(--accent-green);
    font-weight: 600;
}

.bet-crashed {
    color: var(--accent-red);
}

/* Airplane Animation */
.airplane {
    position: absolute;
    width: 80px;
    height: 80px;
    transition: all 0.1s linear;
    filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.5));
}

.airplane svg {
    width: 100%;
    height: 100%;
}

/* Trail Effect */
.trail {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100%;
    pointer-events: none;
}

/* Stars Background */
.stars {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    animation: twinkle 2s infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* Explosion Effect */
.explosion {
    position: absolute;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(239, 68, 68, 0.8) 0%, transparent 70%);
    border-radius: 50%;
    animation: explode 0.5s ease-out forwards;
    pointer-events: none;
}

@keyframes explode {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .betting-panel {
        grid-template-columns: 1fr;
    }
    
    .multiplier-value {
        font-size: 50px;
    }
    
    .game-canvas-wrapper {
        height: 300px;
    }
}

/* My Bets History */
.my-bets-history {
    background: var(--glass-bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
    margin-top: 20px;
    padding: 20px;
}

.history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--glass-border);
}

.history-item:last-child {
    border-bottom: none;
}

.history-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.history-multiplier {
    font-weight: 700;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
}

.history-multiplier.win {
    background: rgba(16, 185, 129, 0.2);
    color: var(--accent-green);
}

.history-multiplier.lose {
    background: rgba(239, 68, 68, 0.2);
    color: var(--accent-red);
}

.history-bet {
    font-size: 13px;
    color: var(--text-muted);
}

.history-profit {
    font-weight: 600;
}

.history-profit.positive {
    color: var(--accent-green);
}

.history-profit.negative {
    color: var(--accent-red);
}
