/* Professional Blackjack Game Styles - Compact & Elegant */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: #ffffff;
    min-height: 100vh;
    overflow-x: auto;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

/* Header Styles */
.header {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
}

.back-btn {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.title {
    font-size: 2.5rem;
    font-weight: 900;
    color: #ffd700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.2rem;
    color: #b8c5d6;
    font-weight: 300;
}

/* Table Header */
.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 15px;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.shoe-info, .game-info {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.shoe-label, .round-label {
    color: #b8c5d6;
    font-weight: 500;
}

.cards-remaining, .decks-remaining, .round-number {
    color: #4caf50;
    font-weight: 700;
    background: rgba(76, 175, 80, 0.2);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
}

/* Blackjack Table Layout */
.blackjack-table {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.dealer-area {
    text-align: center;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dealer-label {
    font-size: 1.3rem;
    font-weight: 700;
    color: #ff6b6b;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.dealer-cards {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    min-height: 80px;
    align-items: center;
}

.dealer-total {
    font-size: 1.5rem;
    font-weight: 900;
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 107, 107, 0.3);
}

/* Middle Section */
.middle-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.betting-area {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.bet-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.bet-amount {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.bet-amount label {
    color: #b8c5d6;
    font-weight: 500;
    min-width: 100px;
}

#bet-input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 0.5rem;
    border-radius: 6px;
    width: 120px;
    text-align: center;
}

.bet-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.bet-btn {
    background: rgba(76, 175, 80, 0.3);
    color: #ffffff;
    border: 1px solid rgba(76, 175, 80, 0.5);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.bet-btn:hover {
    background: rgba(76, 175, 80, 0.5);
    border-color: rgba(76, 175, 80, 0.7);
}

/* Game Controls */
.game-controls {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.control-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    min-width: 100px;
}

.control-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.control-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

#deal-btn {
    background: rgba(76, 175, 80, 0.4);
    border-color: rgba(76, 175, 80, 0.6);
}

#deal-btn:hover:not(:disabled) {
    background: rgba(76, 175, 80, 0.6);
    border-color: rgba(76, 175, 80, 0.8);
}

#hit-btn {
    background: rgba(33, 150, 243, 0.4);
    border-color: rgba(33, 150, 243, 0.6);
}

#stand-btn {
    background: rgba(255, 152, 0, 0.4);
    border-color: rgba(255, 152, 0, 0.6);
}

#double-btn {
    background: rgba(156, 39, 176, 0.4);
    border-color: rgba(156, 39, 176, 0.6);
}

#split-btn {
    background: rgba(255, 193, 7, 0.4);
    border-color: rgba(255, 193, 7, 0.6);
}

/* Player Hands */
.player-hands {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.player-hand {
    text-align: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.player-hand.active {
    border-color: #4caf50;
    background: rgba(76, 175, 80, 0.1);
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.3);
}

.hand-label {
    font-size: 1rem;
    font-weight: 600;
    color: #4caf50;
    margin-bottom: 0.5rem;
}

.player-cards {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    min-height: 60px;
    align-items: center;
}

.hand-total {
    font-size: 1.2rem;
    font-weight: 700;
    color: #4caf50;
    margin-bottom: 0.5rem;
}

.hand-bet {
    font-size: 0.9rem;
    color: #ffd700;
    font-weight: 500;
}

/* Game Status */
.game-status {
    text-align: center;
    margin-bottom: 1.5rem;
}

.status-message {
    font-size: 1.1rem;
    color: #b8c5d6;
    margin-bottom: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.win-display {
    font-size: 1.5rem;
    font-weight: 700;
    color: #4caf50;
    padding: 1rem;
    background: rgba(76, 175, 80, 0.2);
    border-radius: 10px;
    border: 1px solid rgba(76, 175, 80, 0.3);
    display: none;
}

.win-display.win {
    display: block;
    animation: winPulse 2s ease-in-out;
}

@keyframes winPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Balance Section */
.balance-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1.5rem;
}

.balance-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.balance-label {
    color: #b8c5d6;
    font-weight: 500;
}

.balance-amount {
    color: #4caf50;
    font-weight: 700;
    font-size: 1.2rem;
}

.currency {
    font-size: 1.2rem;
}

.reset-balance-btn {
    background: rgba(255, 152, 0, 0.3);
    color: #ffffff;
    border: 1px solid rgba(255, 152, 0, 0.5);
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.reset-balance-btn:hover:not(:disabled) {
    background: rgba(255, 152, 0, 0.5);
    border-color: rgba(255, 152, 0, 0.7);
}

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

.current-bet {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.bet-label {
    color: #b8c5d6;
    font-weight: 500;
}

.bet-amount {
    color: #ffd700;
    font-weight: 700;
    font-size: 1.1rem;
}

/* Cards */
.card {
    width: 60px;
    height: 80px;
    background: #ffffff;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    font-weight: 700;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    position: relative;
}

.card.red {
    color: #d32f2f;
}

.card.black {
    color: #212121;
}

.card-value {
    font-size: 1.4rem;
    line-height: 1;
}

.card-suit {
    font-size: 1rem;
    line-height: 1;
}

.card.hidden {
    background: linear-gradient(45deg, #1a1a2e, #16213e);
    color: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.card-back {
    background: linear-gradient(45deg, #1a1a2e, #16213e);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: transparent;
}

.card-placeholder {
    width: 60px;
    height: 80px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.5);
}

.card.dealt {
    animation: dealCard 0.5s ease-out;
}

@keyframes dealCard {
    0% {
        transform: translateY(-100px) rotateY(90deg);
        opacity: 0;
    }
    100% {
        transform: translateY(0) rotateY(0deg);
        opacity: 1;
    }
}

/* Game Rules */
.game-rules {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1.5rem;
}

.game-rules h3 {
    color: #ffd700;
    margin-bottom: 1rem;
    text-align: center;
}

.rules-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.rule-section h4 {
    color: #4caf50;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.rule-section p {
    color: #b8c5d6;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Footer */
.footer {
    text-align: center;
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.disclaimer {
    color: #b8c5d6;
    font-size: 0.8rem;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0.5rem;
    }
    
    .title {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .back-btn {
        position: static;
        transform: none;
        margin-bottom: 1rem;
        display: inline-block;
    }
    
    .table-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .balance-section {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .game-controls {
        justify-content: center;
    }
    
    .control-btn {
        min-width: 80px;
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .bet-buttons {
        justify-content: center;
    }
    
    .rules-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 1.8rem;
    }
    
    .card {
        width: 50px;
        height: 70px;
        font-size: 1rem;
    }
    
    .card-value {
        font-size: 1.2rem;
    }
    
    .card-suit {
        font-size: 0.9rem;
    }
    
    .card-placeholder {
        width: 50px;
        height: 70px;
        font-size: 1.5rem;
    }
    
    .control-btn {
        min-width: 70px;
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
}
