/* ========================================
   BLACKJACK GAME STYLES
   Neon Casino Theme
   ======================================== */

/* Base Page Styles */
.blackjack-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
    padding: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Header */
.blackjack-header {
    text-align: center;
    margin-bottom: 30px;
}

.blackjack-title {
    font-size: 2.5rem;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.neon-text {
    color: #fff;
    text-shadow:
        0 0 5px #fff,
        0 0 10px #fff,
        0 0 20px #ff00de,
        0 0 30px #ff00de,
        0 0 40px #ff00de;
    letter-spacing: 3px;
}

.card-icon {
    font-size: 2.5rem;
    animation: cardFloat 2s ease-in-out infinite;
}

@keyframes cardFloat {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-10px) rotate(5deg);
    }
}

/* Container Layout */
.blackjack-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
}

@media (max-width: 900px) {
    .blackjack-container {
        grid-template-columns: 1fr;
    }
}

/* Game Section */
.blackjack-game-section {
    background: rgba(15, 23, 42, 0.8);
    border-radius: 20px;
    padding: 25px;
    border: 2px solid rgba(56, 189, 248, 0.3);
    box-shadow: 0 0 30px rgba(56, 189, 248, 0.2);
}

/* Controls */
.blackjack-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
}

.balance-display {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(16, 185, 129, 0.2));
    border-radius: 10px;
    border: 1px solid rgba(34, 197, 94, 0.5);
}

.balance-label {
    color: #94a3b8;
    font-size: 0.9rem;
}

.balance-amount {
    color: #22c55e;
    font-size: 1.3rem;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(34, 197, 94, 0.5);
}

.bet-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bet-label {
    color: #94a3b8;
    font-size: 0.9rem;
}

.neon-select {
    padding: 12px 20px;
    background: rgba(30, 41, 59, 0.8);
    border: 2px solid rgba(56, 189, 248, 0.4);
    border-radius: 10px;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.neon-select:hover {
    border-color: rgba(56, 189, 248, 0.8);
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.3);
}

.neon-select:focus {
    outline: none;
    border-color: #38bdf8;
}

.neon-btn {
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: bold;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.deal-btn {
    background: linear-gradient(135deg, #8b5cf6, #a855f7);
    color: #fff;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
}

.deal-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.6);
}

.deal-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Blackjack Table */
.blackjack-table {
    background: linear-gradient(180deg, #065f46 0%, #047857 50%, #065f46 100%);
    border-radius: 20px;
    padding: 30px;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 8px solid #7c3aed;
    box-shadow:
        inset 0 0 50px rgba(0, 0, 0, 0.3),
        0 0 30px rgba(124, 58, 237, 0.4);
    position: relative;
}

.blackjack-table::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    background: radial-gradient(ellipse, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

/* Hand Areas */
.hand-area {
    text-align: center;
}

.hand-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hand-value {
    display: inline-block;
    padding: 5px 15px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 20px;
    font-size: 1.2rem;
    font-weight: bold;
    color: #fbbf24;
    min-width: 40px;
}

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

/* Playing Cards */
.playing-card {
    width: 80px;
    height: 112px;
    border-radius: 8px;
    background: #fff;
    box-shadow:
        0 4px 8px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(0, 0, 0, 0.1);
    margin: 0 -10px;
    transition: transform 0.3s ease;
    animation: dealCard 0.4s ease-out forwards;
    transform: translateY(-50px) rotateY(90deg);
    opacity: 0;
}

@keyframes dealCard {
    to {
        transform: translateY(0) rotateY(0);
        opacity: 1;
    }
}

.playing-card:hover {
    transform: translateY(-10px);
    z-index: 10;
}

.card-face {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 5px;
    position: relative;
    border-radius: 8px;
}

.card-face.red {
    color: #dc2626;
}

.card-face.black {
    color: #1e293b;
}

.card-corner {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.9rem;
    line-height: 1;
}

.card-corner.top-left {
    align-self: flex-start;
}

.card-corner.bottom-right {
    align-self: flex-end;
    transform: rotate(180deg);
}

.card-value {
    font-weight: bold;
    font-size: 1rem;
}

.card-suit {
    font-size: 0.8rem;
}

.card-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5rem;
}

.card-back {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    border-radius: 8px;
    color: #fff;
}

.card-hidden {
    background: linear-gradient(135deg, #1e40af, #3b82f6);
}

/* Game Status Area */
.game-status-area {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60px;
}

.game-result {
    padding: 15px 30px;
    border-radius: 15px;
    font-size: 1.3rem;
    font-weight: bold;
    text-align: center;
    animation: resultPop 0.5s ease-out;
}

@keyframes resultPop {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.result-win {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.3), rgba(16, 185, 129, 0.3));
    border: 2px solid #22c55e;
    color: #22c55e;
    text-shadow: 0 0 10px rgba(34, 197, 94, 0.5);
}

.result-loss {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.3), rgba(220, 38, 38, 0.3));
    border: 2px solid #ef4444;
    color: #ef4444;
}

.result-push {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.3), rgba(217, 119, 6, 0.3));
    border: 2px solid #f59e0b;
    color: #f59e0b;
}

.win-amount {
    font-size: 1.5rem;
    display: block;
    margin-top: 5px;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.action-btn {
    padding: 15px 35px;
    font-size: 1.1rem;
    font-weight: bold;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hit-btn {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.4);
}

.hit-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 0 25px rgba(34, 197, 94, 0.6);
}

.stand-btn {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
}

.stand-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 0 25px rgba(239, 68, 68, 0.6);
}

.double-btn {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.4);
}

.double-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 0 25px rgba(245, 158, 11, 0.6);
}

.action-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
}

/* Game Status Panel */
.game-status-panel {
    margin-top: 20px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    text-align: center;
}

.status-message {
    color: #38bdf8;
    font-size: 1.1rem;
    font-weight: 500;
}

/* Stats Sidebar */
.blackjack-stats-sidebar {
    background: rgba(15, 23, 42, 0.8);
    border-radius: 20px;
    padding: 25px;
    border: 2px solid rgba(139, 92, 246, 0.3);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.2);
    height: fit-content;
}

.stats-title {
    color: #fff;
    font-size: 1.3rem;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(139, 92, 246, 0.3);
    text-align: center;
}

.stats-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 15px;
    background: rgba(30, 41, 59, 0.5);
    border-radius: 8px;
}

.stat-label {
    color: #94a3b8;
    font-size: 0.9rem;
}

.stat-value {
    color: #fff;
    font-weight: 600;
}

.stats-actions {
    margin-bottom: 25px;
}

.stats-link {
    display: block;
    text-align: center;
    padding: 12px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(168, 85, 247, 0.2));
    border-radius: 10px;
    color: #a855f7;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.stats-link:hover {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), rgba(168, 85, 247, 0.3));
    transform: translateY(-2px);
}

/* Rules and Payouts */
.game-rules,
.payout-guide {
    margin-top: 20px;
    padding: 15px;
    background: rgba(30, 41, 59, 0.5);
    border-radius: 12px;
}

.game-rules h4,
.payout-guide h4 {
    color: #fff;
    margin: 0 0 15px 0;
    font-size: 1rem;
    text-align: center;
}

.rules-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.rules-list li {
    color: #94a3b8;
    font-size: 0.85rem;
    padding: 6px 0;
    padding-left: 20px;
    position: relative;
}

.rules-list li::before {
    content: '♠';
    position: absolute;
    left: 0;
    color: #a855f7;
}

.payout-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.payout-info {
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    text-align: center;
}

.blackjack-payout {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.4);
}

.win-payout {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.4);
}

.push-payout {
    background: rgba(56, 189, 248, 0.2);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.4);
}

/* Responsive Design */
@media (max-width: 768px) {
    .blackjack-title {
        font-size: 1.8rem;
    }

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

    .blackjack-table {
        padding: 20px;
        min-height: 350px;
    }

    .playing-card {
        width: 60px;
        height: 84px;
        margin: 0 -8px;
    }

    .card-center {
        font-size: 1.8rem;
    }

    .action-buttons {
        gap: 10px;
    }

    .action-btn {
        padding: 12px 25px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .blackjack-page {
        padding: 10px;
    }

    .blackjack-title {
        font-size: 1.4rem;
    }

    .playing-card {
        width: 50px;
        height: 70px;
        margin: 0 -6px;
    }

    .card-center {
        font-size: 1.4rem;
    }

    .card-value {
        font-size: 0.8rem;
    }

    .card-suit {
        font-size: 0.6rem;
    }
}