/* Orbet.io - Games CSS */

/* Game Container */
.game-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--spacing-xl);
}

.game-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-xl);
    padding: var(--spacing-lg);
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(157, 123, 255, 0.2);
}

.game-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.game-back-btn {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

/* Game Layout */
.game-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: var(--spacing-xl);
}

.game-main {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    border: 1px solid rgba(157, 123, 255, 0.2);
    min-height: 600px;
}

.game-sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.game-panel {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    border: 1px solid rgba(157, 123, 255, 0.2);
}

.panel-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    color: var(--primary);
}

/* Bet Controls */
.bet-controls {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.input-group label {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

.input-wrapper {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.bet-input {
    flex: 1;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border: 1px solid rgba(157, 123, 255, 0.2);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
}

.bet-input:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(157, 123, 255, 0.1);
}

.bet-btn-group {
    display: flex;
    gap: var(--spacing-sm);
}

.bet-btn-small {
    padding: 8px;
    min-width: 40px;
    background: var(--bg-tertiary);
    border: 1px solid rgba(157, 123, 255, 0.2);
    color: var(--text-primary);
    font-size: 12px;
}

.bet-btn-small:hover {
    background: rgba(157, 123, 255, 0.2);
}

.bet-action {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
}

/* Blackjack Specific */
.blackjack-table {
    background: 
        radial-gradient(ellipse 800px 400px at 50% 50%, rgba(157, 123, 255, 0.15), transparent),
        radial-gradient(circle at 20% 30%, rgba(255, 107, 157, 0.1), transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(91, 76, 138, 0.1), transparent 50%),
        linear-gradient(135deg, #0a0e1a 0%, #13182b 100%);
    border-radius: var(--radius-xl);
    padding: 40px;
    min-height: 500px;
    position: relative;
    border: 3px solid var(--primary);
    box-shadow: 
        0 0 50px rgba(157, 123, 255, 0.3),
        inset 0 0 100px rgba(157, 123, 255, 0.05);
    overflow: hidden;
}

.blackjack-table::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(2px 2px at 20% 30%, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(2px 2px at 60% 70%, rgba(255, 255, 255, 0.2), transparent),
        radial-gradient(1px 1px at 50% 50%, rgba(255, 255, 255, 0.2), transparent),
        radial-gradient(1px 1px at 80% 10%, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(2px 2px at 90% 60%, rgba(255, 255, 255, 0.2), transparent);
    background-size: 300px 300px;
    background-repeat: repeat;
    animation: twinkle 8s linear infinite;
    pointer-events: none;
    opacity: 0.4;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

.card-area {
    margin-bottom: 30px;
}

.card-area-title {
    font-size: 16px;
    margin-bottom: 10px;
    color: var(--text-secondary);
    text-align: center;
}

.cards-row {
    display: flex;
    gap: 10px;
    justify-content: center;
    min-height: 140px;
    align-items: center;
}

.card {
    width: 90px;
    height: 130px;
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    border-radius: 10px;
    box-shadow: 
        0 4px 8px rgba(0,0,0,0.3),
        0 0 20px rgba(157, 123, 255, 0.2),
        inset 0 1px 0 rgba(255,255,255,0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    animation: cardDeal 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: center;
    border: 2px solid rgba(157, 123, 255, 0.3);
}

.card.red {
    color: #dc143c;
}

.card.black {
    color: #000000;
}

@keyframes cardDeal {
    0% {
        transform: translateY(-200px) translateX(-100px) rotateZ(-180deg) scale(0.3);
        opacity: 0;
    }
    50% {
        transform: translateY(-50px) translateX(-20px) rotateZ(-45deg) scale(0.8);
    }
    100% {
        transform: translateY(0) translateX(0) rotateZ(0deg) scale(1);
        opacity: 1;
    }
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 8px 16px rgba(0,0,0,0.4),
        0 0 30px rgba(157, 123, 255, 0.4);
}

.card.red {
    color: #d00;
}

.card.black {
    color: #000;
}

.card-back {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    font-size: 48px;
    box-shadow: 
        0 4px 12px rgba(0,0,0,0.4),
        0 0 20px rgba(157, 123, 255, 0.5),
        inset 0 0 50px rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.card-back::before {
    content: '★';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 64px;
    opacity: 0.3;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.3;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.5;
    }
}

.blackjack-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

/* Plinko Specific */
.plinko-container {
    position: relative;
    width: 100%;
    height: 600px;
    background: linear-gradient(180deg, #0a0e1a 0%, #13182b 100%);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

#plinko-canvas {
    width: 100%;
    height: 100%;
}

.plinko-multipliers {
    display: flex;
    justify-content: space-around;
    padding: 10px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    margin-top: 10px;
}

.multiplier {
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
}

.multiplier.high {
    background: var(--success);
    color: white;
}

.multiplier.medium {
    background: var(--warning);
    color: white;
}

.multiplier.low {
    background: var(--danger);
    color: white;
}

/* Mines Specific */
.mines-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    max-width: 500px;
    margin: 20px auto;
}

.mine-tile {
    aspect-ratio: 1;
    background: var(--bg-tertiary);
    border: 2px solid rgba(157, 123, 255, 0.3);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    position: relative;
}

.mine-tile:hover:not(.revealed) {
    background: rgba(157, 123, 255, 0.2);
    transform: scale(1.05);
    border-color: var(--primary);
}

.mine-tile.revealed {
    cursor: default;
}

.mine-tile.revealed.gem {
    background: linear-gradient(135deg, var(--success), #00dd77);
    border-color: var(--success);
    animation: revealGem 0.3s ease;
}

.mine-tile.revealed.mine {
    background: linear-gradient(135deg, var(--danger), #dd0000);
    border-color: var(--danger);
    animation: revealMine 0.3s ease;
}

@keyframes revealGem {
    0% { transform: scale(0.5) rotate(0deg); }
    50% { transform: scale(1.2) rotate(180deg); }
    100% { transform: scale(1) rotate(360deg); }
}

@keyframes revealMine {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Crash Specific */
.crash-container {
    position: relative;
    width: 100%;
    height: 500px;
    background: linear-gradient(180deg, #0a0e1a 0%, #13182b 100%);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

#crash-canvas {
    width: 100%;
    height: 100%;
}

.crash-multiplier {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 72px;
    font-weight: 900;
    color: var(--primary);
    text-shadow: 0 0 30px rgba(157, 123, 255, 0.5);
    animation: pulse 0.5s ease infinite;
}

.crash-multiplier.crashed {
    color: var(--danger);
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translate(-50%, -50%) rotate(0deg); }
    25% { transform: translate(-50%, -50%) rotate(-5deg); }
    75% { transform: translate(-50%, -50%) rotate(5deg); }
}

/* Roulette Specific */
.roulette-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.roulette-wheel {
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        #d00 0deg 30deg,
        #000 30deg 60deg,
        #d00 60deg 90deg,
        #000 90deg 120deg,
        #d00 120deg 150deg,
        #000 150deg 180deg,
        #d00 180deg 210deg,
        #000 210deg 240deg,
        #d00 240deg 270deg,
        #000 270deg 300deg,
        #d00 300deg 330deg,
        #000 330deg 360deg
    );
    border: 10px solid var(--primary);
    box-shadow: 0 0 30px rgba(157, 123, 255, 0.5);
    position: relative;
    transition: transform 3s cubic-bezier(0.17, 0.67, 0.12, 0.99);
}

.roulette-wheel::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(157, 123, 255, 0.8);
}

.roulette-wheel.spinning {
    animation: spin 3s ease-out;
}

.roulette-bets {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    width: 100%;
}

.roulette-bet {
    padding: 20px;
    background: var(--bg-tertiary);
    border: 2px solid rgba(157, 123, 255, 0.2);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-weight: 600;
}

.roulette-bet:hover {
    border-color: var(--primary);
    background: rgba(157, 123, 255, 0.1);
}

.roulette-bet.red {
    border-color: var(--danger);
}

.roulette-bet.black {
    border-color: #000;
}

.roulette-bet.green {
    border-color: var(--success);
}

/* Dice Specific */
.dice-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    padding: 40px;
}

.dice-slider-container {
    width: 100%;
    max-width: 600px;
}

.dice-slider {
    width: 100%;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    position: relative;
    margin: 20px 0;
}

.dice-slider-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--danger), var(--success));
    border-radius: 4px;
    transition: width 0.3s ease;
}

.dice-display {
    font-size: 120px;
    font-weight: 900;
    color: var(--primary);
    text-shadow: 0 0 30px rgba(157, 123, 255, 0.5);
    animation: diceRoll 0.5s ease;
}

@keyframes diceRoll {
    0%, 100% { transform: rotateY(0deg); }
    50% { transform: rotateY(180deg); }
}

/* Responsive Game Layout */
@media (max-width: 1024px) {
    .game-layout {
        grid-template-columns: 1fr;
    }
    
    .game-sidebar {
        order: -1;
    }
}

@media (max-width: 768px) {
    .blackjack-table {
        padding: 20px;
    }
    
    .card {
        width: 60px;
        height: 90px;
        font-size: 18px;
    }
    
    .mines-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .roulette-wheel {
        width: 300px;
        height: 300px;
    }
    
    .crash-multiplier {
        font-size: 48px;
    }
}
