* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #333;
}

.container {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 800px;
    width: 90%;
}

h1 {
    text-align: center;
    color: #764ba2;
    margin-bottom: 30px;
    font-size: 2.5em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.game-area {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
}

.dealer-section, .player-section {
    margin-bottom: 25px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

h2 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.cards {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    min-height: 120px;
    align-items: center;
    flex-wrap: wrap;
}

.card {
    width: 70px;
    height: 100px;
    background: white;
    border: 2px solid #333;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.card.red {
    color: #e74c3c;
}

.card.black {
    color: #2c3e50;
}

.card.back {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    font-size: 16px;
}

.score {
    font-size: 1.2em;
    font-weight: bold;
    color: #2c3e50;
    padding: 10px;
    background: #e8f4f8;
    border-radius: 5px;
    display: inline-block;
}

.controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 25px 0;
}

.btn {
    padding: 12px 25px;
    font-size: 16px;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#hit-btn {
    background: #3498db;
    color: white;
}

#hit-btn:hover:not(:disabled) {
    background: #2980b9;
    transform: scale(1.05);
}

#stand-btn {
    background: #e74c3c;
    color: white;
}

#stand-btn:hover:not(:disabled) {
    background: #c0392b;
    transform: scale(1.05);
}

#new-game-btn {
    background: #27ae60;
    color: white;
}

#new-game-btn:hover {
    background: #229954;
    transform: scale(1.05);
}

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

.result {
    text-align: center;
    font-size: 1.5em;
    font-weight: bold;
    padding: 20px;
    margin: 20px 0;
    border-radius: 10px;
    min-height: 60px;
}

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

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

.result.tie {
    background: #fff3cd;
    color: #856404;
    border: 2px solid #ffeaa7;
}

.bet-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 15px;
    background: white;
    border-radius: 10px;
    margin-top: 20px;
}

.bet-section label {
    font-weight: bold;
    color: #667eea;
}

#bet-amount {
    padding: 8px 15px;
    border: 2px solid #667eea;
    border-radius: 5px;
    font-size: 16px;
    width: 120px;
}

.chips {
    font-weight: bold;
    color: #27ae60;
    font-size: 1.1em;
}

.rules {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
}

.rules h3 {
    color: #764ba2;
    margin-bottom: 15px;
}

.rules ul {
    list-style-position: inside;
    color: #555;
    line-height: 1.8;
}

.rules li {
    margin-bottom: 8px;
}

@media (max-width: 600px) {
    .container {
        padding: 20px;
    }
    
    h1 {
        font-size: 2em;
    }
    
    .controls {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .bet-section {
        flex-direction: column;
    }
}