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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #87CEEB 0%, #98FB98 100%);
    min-height: 100vh;
    padding: 20px;
}

.game-container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

.reset-stats-container {
    margin-top: 15px;
    text-align: center;
}

.reset-stats-btn {
    font-size: 0.8rem;
    padding: 8px 16px;
}

.money-display {
    position: absolute;
    top: 10px;
    right: 20px;
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.3);
    font-weight: bold;
    font-size: 1.2rem;
}

.money-icon {
    margin-right: 8px;
    font-size: 1.4rem;
}

.money-amount {
    font-family: 'Courier New', monospace;
}

.music-btn {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(155, 89, 182, 0.3);
}

.music-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(155, 89, 182, 0.4);
}

.music-btn.playing {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    animation: pulse 2s ease-in-out infinite;
}

.music-btn.muted {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
    opacity: 0.7;
}

.music-hint {
    position: absolute;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.music-control:hover .music-hint {
    opacity: 1;
}

.music-control {
    position: absolute;
    top: 10px;
    left: 20px;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 10px;
    margin-top: 5px;
}

.volume-slider {
    width: 80px;
    height: 20px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    outline: none;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: #FFD700;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.volume-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #FFD700;
    border-radius: 50%;
    border: 2px solid #fff;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.volume-icon {
    font-size: 14px;
    color: #FFD700;
}

/* Track styling for better visibility */
.volume-slider::-webkit-slider-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    height: 8px;
}

.volume-slider::-moz-range-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    height: 8px;
    border: none;
}

header h1 {
    color: #228B22;
    font-size: 3rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

header p {
    color: #666;
    font-size: 1.2rem;
}

.game-area {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 30px;
}

.player-section {
    text-align: center;
    padding: 20px;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.8);
    border: 3px solid transparent;
    transition: all 0.3s ease;
}

.player-section h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.dealer {
    border-color: #32CD32;
    background: linear-gradient(135deg, rgba(144, 238, 144, 0.2), rgba(255, 255, 255, 0.8));
}

.player {
    border-color: #4169E1;
    background: linear-gradient(135deg, rgba(135, 206, 250, 0.2), rgba(255, 255, 255, 0.8));
}

.hand {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.card {
    width: 80px;
    height: 120px;
    background: white;
    border: 2px solid #333;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease, transform 0.4s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    position: relative;
    transform: rotateY(0deg);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.card.selected {
    border-color: #FF6B6B;
    background: #FFE6E6;
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(255, 107, 107, 0.4);
}

.card.highlighted {
    border-color: #FFD700;
    background: #FFF8DC;
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(255, 215, 0, 0.6);
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: translateY(-8px) scale(1); }
    50% { transform: translateY(-8px) scale(1.05); }
}

.card.discarding {
    animation: discard 0.6s ease-out forwards;
}

@keyframes discard {
    0% { 
        transform: translateY(-5px) scale(1);
        opacity: 1;
    }
    50% { 
        transform: translateY(-20px) scale(0.8);
        opacity: 0.5;
    }
    100% { 
        transform: translateY(-40px) scale(0.6);
        opacity: 0;
    }
}

.card.drawing {
    animation: draw 0.6s ease-in forwards;
}

@keyframes draw {
    0% { 
        transform: translateY(40px) scale(0.6);
        opacity: 0;
    }
    50% { 
        transform: translateY(20px) scale(0.8);
        opacity: 0.5;
    }
    100% { 
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.card.hidden {
    background: linear-gradient(45deg, #32CD32, #228B22);
    color: white;
    font-size: 0.8rem;
    transform: rotateY(180deg);
    transition: transform 0.4s ease;
}

.card.hidden::before {
    content: "?";
    font-size: 2rem;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.card.hidden .card-value,
.card.hidden .card-suit {
    display: none;
}



.card-value {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

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

.card.red .card-value,
.card.red .card-suit {
    color: #DC143C;
}

.card.black .card-value,
.card.black .card-suit {
    color: #000;
}

.hand-info {
    font-size: 0.9rem;
    color: #666;
    font-weight: bold;
    line-height: 1.3;
    max-width: 300px;
    margin: 0 auto;
}

.controls {
    text-align: center;
    margin-bottom: 30px;
}

.game-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.betting-controls {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    border: 2px solid #f39c12;
    text-align: center;
}

.bet-amount {
    margin-bottom: 15px;
}

.bet-amount label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

.bet-amount input {
    width: 120px;
    padding: 8px 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    text-align: center;
}

.bet-amount input:focus {
    outline: none;
    border-color: #f39c12;
    box-shadow: 0 0 8px rgba(243, 156, 18, 0.3);
}

.bet-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

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

.btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

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

.btn.primary {
    background: linear-gradient(45deg, #32CD32, #228B22);
    color: white;
}

.btn.secondary {
    background: linear-gradient(45deg, #FF6B6B, #DC143C);
    color: white;
}

.btn.success {
    background: linear-gradient(45deg, #FFD700, #FFA500);
    color: #333;
}

.btn.warning {
    background: linear-gradient(45deg, #87CEEB, #4169E1);
    color: white;
}

.btn.danger {
    background: linear-gradient(45deg, #FF6B6B, #DC143C);
    color: white;
}

.discard-instructions {
    background: rgba(255, 193, 7, 0.2);
    padding: 15px;
    border-radius: 10px;
    border: 2px solid #FFC107;
}

.discard-instructions p {
    color: #856404;
    font-weight: bold;
    margin: 0;
}

.result {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    text-align: center;
    border: 3px solid #FFD700;
}

.result-content h3 {
    color: #333;
    font-size: 2rem;
    margin-bottom: 15px;
}

.result-content p {
    color: #666;
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.hand-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.hand-comparison > div {
    padding: 15px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.8);
}

.hand-comparison .winner {
    background: rgba(144, 238, 144, 0.3);
    border: 2px solid #32CD32;
}

.score-board {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    background: rgba(255, 255, 255, 0.8);
    padding: 20px;
    border-radius: 15px;
    border: 2px solid #FFD700;
}

.score-row {
    display: flex;
    justify-content: center;
    gap: 40px;
}

.score-item {
    text-align: center;
}

.score-item .label {
    display: block;
    font-weight: bold;
    color: #666;
    margin-bottom: 5px;
}

.score-item .value {
    font-size: 2rem;
    font-weight: bold;
    color: #333;
}

/* Responsive design */
@media (max-width: 768px) {
    .game-area {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .game-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 200px;
    }
    
    .hand {
        gap: 5px;
    }
    

    
    .card-value {
        font-size: 1.2rem;
    }
    
    .card-suit {
        font-size: 1rem;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .score-board {
        flex-direction: column;
        gap: 20px;
    }
}
