/* Game-specific styles */

/* Slots Game */
.slots-container {
    text-align: center;
}

.slot-machine {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
}

.slot-reel {
    width: 120px;
    height: 120px;
    background: var(--color-white);
    border: 4px solid var(--color-primary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.slot-reel.spinning {
    animation: spin 0.1s linear infinite;
}

@keyframes spin {
    0% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0); }
}

.slot-symbol {
    font-size: 64px;
}

/* Dice Game */
.dice-container {
    text-align: center;
}

.dice-area {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 32px;
}

.dice {
    width: 100px;
    height: 100px;
    background: var(--color-white);
    border: 3px solid var(--color-primary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.dice.rolling {
    animation: diceRoll 0.1s linear infinite;
}

@keyframes diceRoll {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(90deg); }
    50% { transform: rotate(180deg); }
    75% { transform: rotate(270deg); }
    100% { transform: rotate(360deg); }
}

.dice-face {
    font-size: 64px;
}

.dice-total {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 32px;
    font-size: 24px;
}

.total-label {
    font-weight: 600;
    color: var(--color-text);
}

.total-value {
    font-size: 42px;
    font-weight: 700;
    color: var(--color-primary);
    font-family: var(--font-primary);
}

.prediction-section {
    margin-bottom: 32px;
}

.prediction-section h3 {
    text-align: center;
    margin-bottom: 20px;
    color: var(--color-secondary);
}

.prediction-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.prediction-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background: var(--color-bg);
    border: 3px solid var(--color-border);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-secondary);
}

.prediction-btn:hover {
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.prediction-btn.selected {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-white);
}

.prediction-label {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
}

.prediction-range {
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: 8px;
}

.prediction-payout {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-accent);
}

.prediction-btn.selected .prediction-payout {
    color: var(--color-white);
}

.selected-prediction {
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: var(--color-primary);
    min-height: 24px;
}

/* Blackjack Game */
.blackjack-table {
    min-height: 400px;
}

.hand-section {
    margin-bottom: 40px;
}

.hand-section h3 {
    text-align: center;
    margin-bottom: 20px;
    color: var(--color-secondary);
}

.hand-score {
    color: var(--color-primary);
    font-family: var(--font-primary);
}

.cards-container {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    min-height: 140px;
}

.card {
    width: 90px;
    height: 130px;
    background: var(--color-white);
    border: 2px solid var(--color-text);
    border-radius: 8px;
    padding: 8px;
    position: relative;
    box-shadow: var(--shadow-sm);
    animation: dealCard 0.3s ease;
}

@keyframes dealCard {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card.red {
    color: #dc143c;
}

.card.black {
    color: #000;
}

.card-hidden {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    border-color: var(--color-primary-dark);
}

.card-back {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 48px;
}

.card-corner {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
}

.card-corner.top-left {
    position: absolute;
    top: 8px;
    left: 8px;
}

.card-corner.bottom-right {
    position: absolute;
    bottom: 8px;
    right: 8px;
    transform: rotate(180deg);
}

.card-suit {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 48px;
}

/* Win Message */
.win-message {
    text-align: center;
    padding: 20px;
    border-radius: var(--border-radius);
    font-size: 20px;
    font-weight: 700;
    margin-top: 24px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.win-message.win {
    background: #d4edda;
    color: #155724;
    border: 2px solid #c3e6cb;
}

.win-message.lose {
    background: #f8d7da;
    color: #721c24;
    border: 2px solid #f5c6cb;
}

.win-message.error {
    background: #fff3cd;
    color: #856404;
    border: 2px solid #ffeaa7;
}

.win-message.push {
    background: #d1ecf1;
    color: #0c5460;
    border: 2px solid #bee5eb;
}

/* Bet Controls */
.bet-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 24px;
    padding: 20px;
    background: var(--color-bg);
    border-radius: var(--border-radius);
}

.bet-controls label {
    font-weight: 600;
    color: var(--color-secondary);
}

.bet-controls input[type="range"] {
    flex: 1;
    max-width: 300px;
    height: 8px;
    border-radius: 4px;
    background: var(--color-border);
    outline: none;
    -webkit-appearance: none;
}

.bet-controls input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--color-primary);
    cursor: pointer;
    transition: var(--transition);
}

.bet-controls input[type="range"]::-webkit-slider-thumb:hover {
    background: var(--color-primary-dark);
    transform: scale(1.1);
}

.bet-controls input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--color-primary);
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.bet-controls input[type="range"]::-moz-range-thumb:hover {
    background: var(--color-primary-dark);
    transform: scale(1.1);
}

/* Game Info */
.game-info {
    background: var(--color-bg);
    padding: 32px;
    border-radius: var(--border-radius);
    margin-top: 40px;
}

.game-info h2 {
    font-size: 28px;
    color: var(--color-secondary);
    margin-bottom: 16px;
}

.game-info p {
    color: var(--color-text-light);
    margin-bottom: 16px;
}

.game-info ul {
    list-style: none;
    padding-left: 0;
}

.game-info li {
    color: var(--color-text-light);
    margin-bottom: 12px;
    padding-left: 28px;
    position: relative;
}

.game-info li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--color-primary);
    font-weight: 700;
}

/* Responsive */
@media (max-width: 768px) {
    .slot-machine {
        gap: 12px;
    }

    .slot-reel {
        width: 90px;
        height: 90px;
    }

    .slot-symbol {
        font-size: 48px;
    }

    .dice-area {
        gap: 24px;
    }

    .dice {
        width: 80px;
        height: 80px;
    }

    .dice-face {
        font-size: 48px;
    }

    .prediction-buttons {
        grid-template-columns: 1fr;
    }

    .bet-controls {
        flex-direction: column;
    }

    .bet-controls input[type="range"] {
        width: 100%;
        max-width: none;
    }

    .card {
        width: 70px;
        height: 100px;
    }

    .card-suit {
        font-size: 36px;
    }

    .cards-container {
        gap: 8px;
    }
}
