/* Container and Layout */
.game-container { display: flex; flex-direction: column; gap: 15px; padding: 10px; max-width: 1200px; margin: 0 auto; }

@media (min-width: 800px) {
    .game-container { flex-direction: row; height: calc(100vh - 120px); padding: 20px; }
    .table-area { flex: 7; }
    .coach-sidebar { flex: 3; }
}

/* Table Design */
.table-area { display: flex; flex-direction: column; gap: 10px; min-height: 400px; }
.table-status { display: flex; justify-content: space-between; background: rgba(255,255,255,0.03); padding: 10px 15px; border-radius: 10px; font-size: 13px; }

.poker-table { 
    background: #0f3d2e; 
    border-radius: 100px; 
    border: 8px solid #3d2b1f; 
    position: relative; 
    flex-grow: 1; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    box-shadow: inset 0 0 60px rgba(0,0,0,0.8);
    aspect-ratio: 16 / 10;
    width: 100%;
    margin-bottom: 20px;
}

.felt { width: 95%; height: 90%; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; }

/* Centered Community & Pot */
.community-cards {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
    min-height: 60px;
    width: 100%;
}

.pot-display {
    text-align: center;
    font-weight: bold;
    font-size: 18px;
    color: var(--accent);
    margin-top: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* Player Positions */
.player-spot { position: absolute; display: flex; flex-direction: column; align-items: center; transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
#player-1 { top: 25%; left: 5%; }
#player-2 { top: 5%; left: 50%; transform: translateX(-50%); }
#player-3 { top: 25%; right: 5%; }
#player-user { bottom: 5%; left: 50%; transform: translateX(-50%); }

.player-spot .label { background: #000; padding: 2px 12px; border-radius: 4px; font-size: 11px; border: 1px solid #444; color: white; position: relative; }

/* Blind Chips */
.blind-chip {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 10px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.5);
    z-index: 5;
}

.chip-sb { background: #e74c3c; color: white; }
.chip-bb { background: #f1c40f; color: black; }

/* Individual Bet Display */
.player-bet {
    margin-top: 4px;
    background: rgba(0, 0, 0, 0.6);
    color: var(--accent);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    border: 1px solid rgba(93, 214, 255, 0.3);
}

/* Card Visuals */
.cards { display: flex; gap: 4px; margin-top: 5px; min-height: 48px; }
.card-visual { width: 34px; height: 50px; background: #fff; color: #000; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 14px; box-shadow: 2px 2px 5px rgba(0,0,0,0.5); border: 1px solid #ccc; }
.card-visual.red { color: #d12e2e; }
.card-visual.back { background: #2c3e50; color: #fff; border: 1px solid #34495e; background-image: radial-gradient(#34495e 20%, transparent 20%); background-size: 4px 4px; }

/* Animations */
.animate-deal { animation: cardDeal 0.4s ease-out both; }
@keyframes cardDeal { from { opacity: 0; transform: translateY(-30px) rotate(-10deg); } to { opacity: 1; transform: translateY(0) rotate(0); } }

/* Controls & UI */
.controls { background: var(--card); padding: 15px; border-radius: 14px; border: 1px solid var(--border); }
.action-row { 
    display: flex; 
    gap: 8px; 
    margin-bottom: 10px; 
    flex-wrap: wrap; 
}
.action-row button { 
    flex: 1 1 30%; 
    padding: 12px 5px; 
    font-size: 13px; 
    font-weight: bold; 
    cursor: pointer; 
    transition: transform 0.1s; 
}
.action-row button:active { transform: scale(0.95); }

/* Betting Interface with Slider */
.bet-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap; 
}

.slider-container {
    flex-grow: 1; 
    display: flex;
    align-items: center;
    min-width: 120px;
}

#bet-slider {
    width: 100%;
    cursor: pointer;
}

.small-btn {
    padding: 6px 12px;
    font-size: 11px;
    cursor: pointer;
}

.coach-sidebar { display: flex; flex-direction: column; gap: 12px; }
.equity-bar-container { height: 26px; background: rgba(255,255,255,0.1); border-radius: 13px; position: relative; overflow: hidden; margin-top: 10px; }
.equity-fill { height: 100%; background: var(--accent); transition: width 0.6s cubic-bezier(0.23, 1, 0.32, 1); }
.equity-label { position: absolute; width: 100%; text-align: center; top: 0; font-size: 12px; line-height: 26px; font-weight: bold; color: #fff; text-shadow: 0 1px 3px #000; }

.advice-box { background: rgba(93, 214, 255, 0.05); border-left: 3px solid var(--accent); padding: 12px; font-size: 13px; min-height: 70px; line-height: 1.5; }

/* NEW: Explain Further Button & Enhanced Detail */
.explain-btn {
    display: block;
    margin-top: 10px;
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.explain-btn:hover { background: rgba(93, 214, 255, 0.1); }

.explanation-detail {
    font-size: 13px;
    line-height: 1.6;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.02); /* Theory section tint */
    padding: 12px;
    border-radius: 8px;
    margin-top: 12px;
    border: 1px solid rgba(93, 214, 255, 0.1);
    animation: explainFadeIn 0.4s ease-out;
}

.explanation-detail p { margin-bottom: 8px; }

/* Technical Glossary Highlights */
.poker-term {
    color: var(--accent);
    border-bottom: 1px dashed var(--accent);
    font-weight: 600;
}

@keyframes explainFadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.log-card { background: var(--card); border: 1px solid var(--border); padding: 15px; border-radius: 12px; display: flex; flex-direction: column; flex-grow: 1; max-height: 300px; }
#game-log { flex-grow: 1; overflow-y: auto; font-family: monospace; font-size: 11px; color: var(--muted); }

/* Mobile Aspect-Ratio Overrides */
@media (max-width: 600px) {
    .poker-table {
        aspect-ratio: 1 / 1.1; 
        border-radius: 40px;
    }
    .card-visual {
        width: 28px;
        height: 40px;
        font-size: 12px;
    }
    #player-1, #player-3 { top: 35%; }
    
    .bet-row {
        flex-wrap: nowrap;
        gap: 5px;
    }

    .slider-container {
        flex-basis: auto; 
        min-width: 80px; 
        margin-top: 0;
    }

    .small-btn {
        padding: 6px 8px;
        font-size: 10px;
    }
}