/* mindgame.css */

/* ── Paywall blur ────────────────────────────────────── */
.blur-paywall {
    filter: blur(8px);
    pointer-events: none;
    user-select: none;
    transition: filter 0.3s ease;
}

#paywall-overlay {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(2px);
    border-radius: 12px;
}

#paywall-overlay.hidden {
    display: none;
}

.paywall-inner {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    max-width: 360px;
}

/* ── Game Board ──────────────────────────────────────── */
.game-board {
    position: relative;
    min-height: 400px;
    border-radius: 16px;
    overflow: hidden;
    background: #1a1a2e;
}

.game-board-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.25;
}

.game-board-content {
    position: relative;
    z-index: 1;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    min-height: 400px;
}

/* ── Dealer Zone ─────────────────────────────────────── */
.dealer-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.dealer-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    border: 3px solid #f59e0b;
    background: rgba(245, 158, 11, 0.3);
}

.dealer-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: #f59e0b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ── Speech Bubble ───────────────────────────────────── */
.speech-bubble {
    position: relative;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    max-width: 400px;
    font-size: 0.85rem;
    color: #1f2937;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.speech-bubble::after {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid rgba(255, 255, 255, 0.95);
}

/* ── Pot Display ─────────────────────────────────────── */
.pot-display {
    display: flex;
    gap: 2rem;
    justify-content: center;
}

.pot-item {
    text-align: center;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    min-width: 120px;
}

.pot-odd {
    background: rgba(99, 102, 241, 0.2);
    border: 1px solid rgba(99, 102, 241, 0.4);
}

.pot-even {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.pot-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pot-odd .pot-label { color: #818cf8; }
.pot-even .pot-label { color: #f87171; }

.pot-amount {
    font-size: 1.25rem;
    font-weight: bold;
    color: white;
    margin-top: 0.25rem;
}

/* ── Player Seats ────────────────────────────────────── */
.player-seats {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    width: 100%;
}

.player-seat {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    min-width: 90px;
    padding: 0.75rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    transition: transform 0.2s ease;
}

.player-seat:hover {
    transform: translateY(-2px);
}

.player-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    width: 240px;
    max-width: 80vw;
    padding: 0.6rem 0.8rem;
    background: rgba(17, 24, 39, 0.95);
    color: #f9fafb;
    font-size: 0.75rem;
    line-height: 1.4;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease;
    z-index: 30;
    white-space: normal;
    text-align: left;
}

.player-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid rgba(17, 24, 39, 0.95);
}

.player-tooltip-label {
    display: block;
    font-size: 0.65rem;
    font-weight: 600;
    color: #fde68a;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.player-seat:hover .player-tooltip {
    opacity: 1;
    visibility: visible;
}

.player-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1rem;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.player-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.player-credits {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
}

.player-bet-badge {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
}

.badge-odd {
    background: rgba(99, 102, 241, 0.3);
    color: #a5b4fc;
}

.badge-even {
    background: rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.badge-skip {
    background: rgba(156, 163, 175, 0.3);
    color: #d1d5db;
}

.badge-win {
    background: rgba(34, 197, 94, 0.3);
    color: #86efac;
}

.badge-lose {
    background: rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

/* ── Phase Indicator ─────────────────────────────────── */
.phase-indicator {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

.phase-step {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-size: 0.65rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.4);
    transition: all 0.3s ease;
}

.phase-step.active {
    animation: phasePulse 2s ease-in-out infinite;
}

.phase-step.phase-1.active {
    background: rgba(99, 102, 241, 0.4);
    color: #c7d2fe;
}

.phase-step.phase-dealer.active {
    background: rgba(245, 158, 11, 0.4);
    color: #fde68a;
}

.phase-step.phase-2.active {
    background: rgba(16, 185, 129, 0.4);
    color: #a7f3d0;
}

.phase-step.phase-resolution.active {
    background: rgba(239, 68, 68, 0.4);
    color: #fecaca;
}

.phase-step.completed {
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.6);
}

.phase-arrow {
    color: rgba(255, 255, 255, 0.2);
    font-size: 0.5rem;
}

@keyframes phasePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* ── Comment Feed ────────────────────────────────────── */
.comment-feed {
    max-height: 400px;
    overflow-y: auto;
    scrollbar-width: thin;
}

.comment-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem;
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.2s;
}

.comment-item:hover {
    background: #f9fafb;
}

.comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.75rem;
    color: white;
    flex-shrink: 0;
}

.comment-body {
    flex: 1;
    min-width: 0;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.comment-name {
    font-weight: 600;
    font-size: 0.8rem;
    color: #374151;
}

.comment-phase {
    font-size: 0.65rem;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-weight: 600;
}

.comment-text {
    font-size: 0.8rem;
    color: #6b7280;
    line-height: 1.4;
}

/* ── Leaderboard ─────────────────────────────────────── */
.leaderboard-row {
    transition: background 0.2s;
}

.leaderboard-row:hover {
    background: #f9fafb;
}

.model-hidden {
    color: #9ca3af;
    font-style: italic;
}

/* ── Win/Lose colors ─────────────────────────────────── */
.text-win { color: #22c55e; }
.text-lose { color: #ef4444; }

/* ── Player card colors (matching trading pattern) ───── */
.player-color-0 { background: #6366f1; }
.player-color-1 { background: #ec4899; }
.player-color-2 { background: #f59e0b; }
.player-color-3 { background: #10b981; }
.player-color-4 { background: #8b5cf6; }
.player-color-5 { background: #ef4444; }
.player-color-6 { background: #06b6d4; }
.player-color-7 { background: #f97316; }

/* ── Status badges ───────────────────────────────────── */
.status-ongoing { background: #dcfce7; color: #166534; }
.status-complete { background: #f3f4f6; color: #374151; }
.status-planning { background: #dbeafe; color: #1e40af; }
.status-halt { background: #fee2e2; color: #991b1b; }
.status-holding { background: #fef3c7; color: #92400e; }

/* ── Archive cards ───────────────────────────────────── */
.archive-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.archive-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}
