:root {
    --bg-dark: #0f172a;
    --table-green: #14532d;
    --table-border: #1e293b;
    --accent-gold: #fbbf24;
    --text-light: #f8fafc;
    --card-bg: #ffffff;
    --danger: #ef4444;
    --success: #22c55e;
    --glass-bg: rgba(15, 23, 42, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-light);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.game-container {
    width: 100%;
    max-width: 1200px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    background: radial-gradient(circle at center, #1e293b 0%, #0f172a 100%);
}

.game-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 10;
}

.game-header h1 {
    font-weight: 700;
    letter-spacing: 2px;
    background: linear-gradient(to right, #fbbf24, #d97706);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.chip-count {
    background: rgba(0, 0, 0, 0.3);
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid var(--accent-gold);
    display: flex;
    gap: 10px;
    align-items: center;
}

.chip-count .label {
    font-size: 0.8rem;
    color: #94a3b8;
}

#player-chips {
    font-weight: 700;
    color: var(--accent-gold);
}

.poker-table {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
    padding: 20px;
}

.table-felt {
    width: 90%;
    height: 70%;
    background: radial-gradient(ellipse at center, #166534 0%, #14532d 100%);
    border-radius: 200px;
    border: 15px solid #3f2e18;
    box-shadow:
        inset 0 0 100px rgba(0, 0, 0, 0.5),
        0 20px 50px rgba(0, 0, 0, 0.5);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.community-cards {
    display: flex;
    gap: 10px;
    height: 140px;
    margin-bottom: 20px;
    justify-content: center;
    align-items: center;
}

.pot-display {
    background: rgba(0, 0, 0, 0.4);
    padding: 5px 15px;
    border-radius: 15px;
    margin-top: 10px;
    color: var(--accent-gold);
    font-weight: 600;
}

.dealer-area {
    position: absolute;
    top: -60px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.player-info {
    background: rgba(0, 0, 0, 0.6);
    padding: 5px 10px;
    border-radius: 8px;
    margin-top: 5px;
    font-size: 0.9rem;
    text-align: center;
}

.dealer-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    padding: 10px 20px;
    border-radius: 8px;
    display: none;
    pointer-events: none;
    z-index: 20;
}

.player-controls-area {
    height: 250px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding-bottom: 30px;
    position: relative;
}

.player-hand {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
    height: 140px;
}

.card {
    width: 90px;
    height: 130px;
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
    position: relative;
    transition: transform 0.3s ease;
    user-select: none;
}

.card.red {
    color: var(--danger);
}

.card.black {
    color: #0f172a;
}

.card.back {
    background: repeating-linear-gradient(45deg,
            #ef4444,
            #ef4444 10px,
            #dc2626 10px,
            #dc2626 20px);
    border: 4px solid white;
}

.card .suit-top {
    position: absolute;
    top: 5px;
    left: 5px;
    font-size: 1rem;
}

.card .suit-bottom {
    position: absolute;
    bottom: 5px;
    right: 5px;
    font-size: 1rem;
    transform: rotate(180deg);
}

.action-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    text-transform: uppercase;
    transition: all 0.2s;
    opacity: 0.9;
}

.btn:hover {
    opacity: 1;
    transform: translateY(-2px);
}

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

.btn-fold {
    background: var(--danger);
    color: white;
}

.btn-check {
    background: #64748b;
    color: white;
}

.btn-call {
    background: var(--success);
    color: white;
}

.btn-raise {
    background: var(--accent-gold);
    color: #0f172a;
}

.btn-primary {
    background: linear-gradient(to right, #3b82f6, #2563eb);
    color: white;
    font-size: 1.2rem;
    padding: 15px 40px;
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.5);
    z-index: 30;
}

.game-status {
    color: #94a3b8;
    margin-bottom: 10px;
    font-style: italic;
    height: 20px;
}

/* Animations */
@keyframes deal {
    from {
        transform: translateY(-500px) scale(0.5);
        opacity: 0;
    }

    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.card-animate {
    animation: deal 0.5s ease-out forwards;
}

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

.modal-content {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    padding: 40px;
    border-radius: 20px;
    border: 2px solid var(--accent-gold);
    text-align: center;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 0 50px rgba(251, 191, 36, 0.2);
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-content h2 {
    color: var(--accent-gold);
    font-size: 2rem;
    margin-bottom: 20px;
}

.modal-content p {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 30px;
    color: #e2e8f0;
}

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

.btn-secondary {
    background: transparent;
    border: 2px solid #64748b;
    color: #cbd5e1;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    text-transform: uppercase;
    transition: all 0.2s;
}

.btn-secondary:hover {
    border-color: #94a3b8;
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

@keyframes popIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}