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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #1a472a 0%, #2d5a3f 50%, #1a472a 100%);
    min-height: 100vh;
    color: #fff;
    overflow-x: hidden;
}

.game-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 10px;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    margin-bottom: 15px;
}

.header h1 {
    font-size: 1.5rem;
    color: #ffd700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.chip-display {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #f39c12, #d68910);
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 1.1rem;
}

.chip-icon {
    font-size: 1.3rem;
}

/* Game Table */
.game-table {
    background: linear-gradient(180deg, #0d3b1f 0%, #1a472a 100%);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 15px;
    border: 3px solid #8b4513;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.5), 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Dealer Area */
.dealer-area {
    text-align: center;
    padding-bottom: 15px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.2);
    margin-bottom: 15px;
}

.dealer-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
}

.dealer-avatar, .player-avatar {
    font-size: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 5px 10px;
    border-radius: 50%;
}

.dealer-name, .player-name {
    font-weight: bold;
    color: #ccc;
}

.dealer-cards, .player-cards {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
    min-height: 90px;
}

/* Card Styles */
.card {
    width: 60px;
    height: 85px;
    border-radius: 8px;
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 5px;
    font-weight: bold;
    font-size: 1.1rem;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
    animation: dealCard 0.3s ease-out;
    position: relative;
}

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

.card.hearts, .card.diamonds {
    color: #e74c3c;
}

.card.clubs, .card.spades {
    color: #2c3e50;
}

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

.card-corner.bottom {
    transform: rotate(180deg);
}

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

.card-back {
    width: 60px;
    height: 85px;
    border-radius: 8px;
    background: linear-gradient(135deg, #8b0000 0%, #b22222 50%, #8b0000 100%);
    border: 2px solid #fff;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.card-back::after {
    content: '🂠';
    opacity: 0.3;
}

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

.dealer-bet, .player-bet {
    font-size: 0.9rem;
    color: #ffd700;
}

/* Center Area */
.center-area {
    text-align: center;
    padding: 15px 0;
}

.pot-display {
    background: linear-gradient(135deg, #f39c12, #d68910);
    padding: 10px 25px;
    border-radius: 25px;
    display: inline-block;
    margin-bottom: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}

.pot-display span:first-child {
    margin-right: 10px;
    font-weight: bold;
}

.pot-amount {
    font-size: 1.3rem;
    font-weight: bold;
    color: #fff;
}

.game-status {
    font-size: 1.1rem;
    color: #ffd700;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    min-height: 25px;
}

/* Player Area */
.player-area {
    text-align: center;
    padding-top: 15px;
    border-top: 1px dashed rgba(255, 255, 255, 0.2);
    margin-top: 15px;
}

.player-hand-type {
    margin-top: 10px;
    padding: 8px 15px;
    background: rgba(255, 215, 0, 0.2);
    border-radius: 15px;
    display: inline-block;
    font-weight: bold;
    color: #ffd700;
    min-height: 35px;
}

/* Control Panel */
.control-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    margin-bottom: 15px;
}

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

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

.btn-deal {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: #fff;
}

.btn-deal:not(:disabled):hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.4);
}

.btn-fold {
    background: linear-gradient(135deg, #c0392b, #e74c3c);
    color: #fff;
}

.btn-call {
    background: linear-gradient(135deg, #2980b9, #3498db);
    color: #fff;
}

.btn-raise {
    background: linear-gradient(135deg, #f39c12, #f1c40f);
    color: #fff;
}

.btn-compare {
    background: linear-gradient(135deg, #8e44ad, #9b59b6);
    color: #fff;
}

.btn-primary {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: #fff;
    padding: 15px 40px;
    font-size: 1.1rem;
}

/* Bet Slider */
.bet-slider {
    background: rgba(0, 0, 0, 0.3);
    padding: 15px 20px;
    border-radius: 15px;
    margin-bottom: 15px;
    text-align: center;
}

.bet-slider label {
    display: block;
    margin-bottom: 10px;
    font-size: 1rem;
}

#raise-slider {
    width: 100%;
    height: 8px;
    -webkit-appearance: none;
    background: linear-gradient(90deg, #27ae60, #f1c40f, #e74c3c);
    border-radius: 4px;
    outline: none;
}

#raise-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 25px;
    height: 25px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: linear-gradient(135deg, #1a472a, #2d5a3f);
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    max-width: 90%;
    width: 350px;
    border: 3px solid #ffd700;
    animation: modalPop 0.3s ease-out;
}

@keyframes modalPop {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-content h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: #ffd700;
}

.result-detail {
    margin-bottom: 20px;
    font-size: 1rem;
    color: #ccc;
    line-height: 1.6;
}

/* Hand Reference */
.hand-reference {
    background: rgba(0, 0, 0, 0.3);
    padding: 15px 20px;
    border-radius: 15px;
    margin-top: 10px;
}

.hand-reference h3 {
    color: #ffd700;
    margin-bottom: 10px;
    font-size: 1rem;
}

.hand-reference ul {
    list-style: none;
    font-size: 0.85rem;
    color: #ccc;
}

.hand-reference li {
    padding: 5px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.hand-reference li:last-child {
    border-bottom: none;
}

.hand-type-name {
    color: #ffd700;
    font-weight: bold;
    margin-right: 5px;
}

/* Responsive */
@media (max-width: 400px) {
    .card {
        width: 50px;
        height: 70px;
        font-size: 0.9rem;
    }
    
    .card-center {
        font-size: 1.5rem;
    }
    
    .card-back, .card-placeholder {
        width: 50px;
        height: 70px;
    }
    
    .btn {
        padding: 10px 18px;
        font-size: 0.9rem;
    }
    
    .header h1 {
        font-size: 1.2rem;
    }
}
