:root {
    --bg-dark: #0f172a;
    --panel-bg: rgba(30, 41, 59, 0.7);
    --primary: #3b82f6;
    --glass-border: rgba(255, 255, 255, 0.1);
    
    --table-green: #064e3b;
    --table-border: #022c22;
    --card-width: 70px;
    --card-height: 105px;
}

body {
    background-color: var(--bg-dark);
    color: white;
    font-family: 'Outfit', sans-serif;
    margin: 0;
    overflow-x: hidden;
}

.game-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem;
    position: relative;
    z-index: 10;
}

.game-header { text-align: center; }
.game-header h1 { font-size: 2.5rem; margin: 1rem 0 0 0; }

.panel {
    background: var(--panel-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    max-width: 400px;
    margin: 2rem auto;
    text-align: center;
}

.btn-group { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 1.5rem; }

/** Table Area */
.table-area {
    background: var(--table-green);
    border: 10px solid var(--table-border);
    border-radius: 100px; /* oval shaped table */
    padding: 2rem 1rem;
    position: relative;
    box-shadow: inset 0 0 50px rgba(0,0,0,0.5), 0 10px 30px rgba(0,0,0,0.5);
    margin-top: 1rem;
}

@media (max-width: 600px) {
    .table-area {
        border-radius: 30px;
        padding: 1rem 0.5rem;
    }
}

.players-row {
    display: flex;
    justify-content: space-around;
    gap: 1rem;
    margin-top: 2rem;
}

.player-spot {
    text-align: center;
    position: relative;
    flex: 1;
}

.player-spot h3 {
    margin: 0 0 0.5rem 0;
    color: #cbd5e1;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.score-badge {
    background: rgba(0,0,0,0.5);
    padding: 2px 8px;
    border-radius: 12px;
    color: #fbbf24;
    font-weight: 900;
}

.hand {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: -40px;
    min-height: var(--card-height);
    margin-bottom: 1rem;
}

.hand .card {
    margin-left: -40px;
    transition: transform 0.3s ease;
}
.hand .card:first-child {
    margin-left: 0;
}

.result-badge {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 1.5rem;
    font-weight: 900;
    z-index: 20;
    border: 2px solid white;
    text-transform: uppercase;
    animation: popIn 0.3s ease-out forwards;
}
@keyframes popIn {
    0% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
    80% { transform: translate(-50%, -50%) scale(1.1); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.action-bar {
    display: flex; gap: 0.5rem; justify-content: center;
}
.action-btn {
    padding: 0.5rem 1rem;
    border: none; border-radius: 8px;
    font-size: 1rem; font-weight: 700; cursor: pointer;
    font-family: inherit;
    transition: transform 0.1s;
}
.action-btn:active { transform: scale(0.95); }
.hit-btn { background: #3b82f6; color: white; }
.stand-btn { background: #ef4444; color: white; }
.action-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/** Generic Cards CSS (Standard Playing Cards) */
.card {
    width: var(--card-width);
    height: var(--card-height);
    background: white;
    border-radius: 6px;
    box-shadow: 2px 2px 6px rgba(0,0,0,0.4);
    display: inline-flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 4px;
    box-sizing: border-box;
    position: relative;
    user-select: none;
    border: 1px solid #ccc;
    font-family: Arial, sans-serif;
}

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

.card-top {
    font-size: 1rem; font-weight: bold; line-height: 1;
    display: flex; flex-direction: column; align-items: center; align-self: flex-start;
}
.card-bottom {
    font-size: 1rem; font-weight: bold; line-height: 1;
    display: flex; flex-direction: column; align-items: center; align-self: flex-end;
    transform: rotate(180deg);
}

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

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

.card.back {
    background: #1e3a8a;
    background-image: repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(255,255,255,0.1) 10px, rgba(255,255,255,0.1) 20px);
    border: 2px solid white;
}
.card.back * { display: none; }

.hidden { display: none !important; }
.dimmed { opacity: 0.5; filter: grayscale(1); }

@media (max-width: 600px) {
    :root {
        --card-width: 50px;
        --card-height: 75px;
    }
    .card-center { font-size: 1.8rem; }
    .hand .card { margin-left: -30px; }
    .action-btn { padding: 0.4rem 0.6rem; font-size: 0.8rem; }
}
