.board-wrapper-inner.game-over { pointer-events: none !important; }

.scoreboard-container { width: 100%; max-width: 740px; background: var(--bg-input); border: 1px solid var(--border-lighter); border-radius: 8px; display: flex; overflow: hidden; height: 55px; flex-shrink: 0; margin-bottom: 10px; }
.sb-names { display: flex; flex-direction: column; justify-content: space-around; padding: 0 15px; background: var(--bg-header-tabs); font-weight: bold; color: var(--text-main); border-right: 1px solid var(--border-lighter); min-width: 80px; max-width: 130px; }
.sb-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 0.85rem; }
.sb-games { display: flex; flex: 1; overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; }
.sb-games::-webkit-scrollbar { display: none; }
.sb-col { display: flex; flex-direction: column; border-right: 1px solid var(--border-lighter); min-width: 40px; flex: 1; }
.sb-score { flex: 1; display: flex; align-items: center; justify-content: center; font-family: monospace; font-size: 1rem; color: var(--text-pure); border-bottom: 1px solid var(--border-lighter); white-space: nowrap; }
.sb-col .sb-score:last-child { border-bottom: none; }
.sb-col.empty .sb-score { color: var(--text-muted); }
.sb-total { display: flex; flex-direction: column; min-width: 50px; background: rgba(var(--primary-rgb), 0.15); border-left: 1px solid rgba(var(--primary-rgb), 0.3); font-weight: 800; color: var(--primary); }
.sb-score.win { color: var(--success); }
.sb-score.loss { color: var(--danger); }
.sb-score.draw { color: var(--text-dim); }
.sb-col.active-match { background: rgba(var(--primary-rgb), 0.15); border-left: 1px solid rgba(var(--primary-rgb), 0.3); border-right: 1px solid rgba(var(--primary-rgb), 0.3); }

.active-game-container { padding: 20px; display: flex; flex-direction: column; justify-content: space-between; height: 100%; flex: 1; box-sizing: border-box; gap: 10px; }
.player-wrapper { display: flex; flex-direction: column; gap: 8px; }
.player-info-container { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 0 5px; }
.player-captures {
    display: flex;
    align-items: flex-end;
    min-height: 24px;
    flex-wrap: wrap;
}
.capture-item {
    width: 22px;
    height: 22px;
    margin-right: -4px;
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.capture-item img,
.capture-item svg {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: bottom center;
    display: block;
}
.capture-score {
    margin-left: 10px;
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--text-dim);
    line-height: 1;
    align-self: center;
}

.player-card { display: flex; justify-content: space-between; align-items: center; background: var(--bg-input); padding: 12px 15px; border-radius: 10px; border: 1px solid var(--border-lighter); }
.player-info { display: flex; align-items: center; gap: 12px; min-width: 0; }
.player-avatar { display: flex; justify-content: center; align-items: center; position: relative; flex-shrink: 0; }

.player-info .cp-layered-avatar { overflow: visible !important; }
.player-info .cp-layered-avatar > div { border-radius: 50%; overflow: hidden; }
.player-info.online .cp-layered-avatar::after { content: ''; position: absolute; bottom: 0; right: -2px; width: 12px; height: 12px; background: var(--success); border: 2px solid var(--bg-panel); border-radius: 50%; z-index: 5; }
.player-info.is-favorite .cp-layered-avatar::before { content: '★'; position: absolute; bottom: -2px; left: -2px; width: 18px; height: 18px; color: var(--warning); font-size: 12px; display: flex; justify-content: center; align-items: center; border-radius: 50%; text-shadow: 0 1px 3px rgba(0,0,0,0.8); z-index: 5; }

.player-text-container { display: flex; flex-direction: column; justify-content: center; gap: 2px; min-width: 0; }
.player-name-inside { font-weight: 700; color: var(--text-main); font-size: 0.95rem; line-height: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-elo { font-size: 0.75rem; color: var(--text-dim); font-weight: 600; }

.player-clock { background: var(--bg-header-tabs); color: var(--text-dim); font-family: monospace; font-size: clamp(1.2rem, 4vw, 1.6rem); font-weight: bold; padding: 6px 12px; border-radius: 6px; letter-spacing: 1px; border: 1px solid transparent; transition: all 0.2s ease; font-variant-numeric: tabular-nums; flex-shrink: 0; margin-left: 10px; }
.player-clock.active { background: var(--text-pure); color: var(--bg-base); border-color: var(--text-pure); box-shadow: 0 0 10px rgba(255,255,255,0.2); }
.player-clock.danger { background: rgba(var(--danger-rgb), 0.2); color: var(--danger); border-color: rgba(var(--danger-rgb), 0.5); }
.player-clock.danger.active { background: var(--danger); color: var(--text-pure); border-color: var(--danger); box-shadow: 0 0 15px rgba(var(--danger-rgb), 0.5); }

.game-actions-bar { display: flex; justify-content: center; align-items: center; gap: 15px; flex-wrap: wrap; }
.action-btn { background: var(--border-lighter); border: 1px solid var(--border-light); color: var(--text-main); width: 55px; height: 55px; border-radius: 10px; display: flex; justify-content: center; align-items: center; cursor: pointer; transition: all 0.2s; flex-shrink: 0; }
@media (hover: hover) { .action-btn:hover { background: var(--border-light); color: var(--text-pure); } }
.action-icon.text-icon { font-size: 1.5rem; font-weight: 800; line-height: 1; white-space: nowrap;}
.action-btn.confirm-draw { background: rgba(var(--warning-rgb), 0.2) !important; color: var(--warning) !important; border-color: var(--warning) !important; }
.action-btn.confirm-resign { background: rgba(var(--danger-rgb), 0.2) !important; color: var(--danger) !important; border-color: var(--danger) !important; }
.action-btn.disabled, .action-btn:disabled { background: var(--border-lighter) !important; border-color: var(--border-light) !important; color: var(--text-muted) !important; cursor: not-allowed !important; }

.player-result-badge { font-family: monospace; font-weight: 800; font-size: 1.25rem; display: none; margin-right: 5px; }
.player-result-badge.win { color: var(--success); }
.player-result-badge.loss { color: var(--danger); }
.player-result-badge.draw { color: var(--text-dim); }

@keyframes pulseDraw { 0% { background: rgba(var(--warning-rgb, 245, 166, 35), 0.4); border-color: var(--warning); color: var(--warning); } 50% { background: rgba(var(--warning-rgb, 245, 166, 35), 0.1); border-color: var(--border-light); color: var(--text-main); } 100% { background: rgba(var(--warning-rgb, 245, 166, 35), 0.4); border-color: var(--warning); color: var(--warning); } }
@keyframes pulseUndo { 0% { background: rgba(var(--primary-rgb, 59, 130, 246), 0.4); border-color: var(--primary); color: var(--primary); } 50% { background: rgba(var(--primary-rgb, 59, 130, 246), 0.1); border-color: var(--border-light); color: var(--text-main); } 100% { background: rgba(var(--primary-rgb, 59, 130, 246), 0.4); border-color: var(--primary); color: var(--primary); } }
@keyframes pulseRematch { 0% { background: rgba(var(--success-rgb, 34, 197, 94), 0.4); border-color: var(--success); color: var(--success); } 50% { background: rgba(var(--success-rgb, 34, 197, 94), 0.1); border-color: var(--border-light); color: var(--text-main); } 100% { background: rgba(var(--success-rgb, 34, 197, 94), 0.4); border-color: var(--success); color: var(--success); } }

.offer-received-draw { animation: pulseDraw 1.5s infinite; border-color: var(--warning) !important; color: var(--warning) !important; }
.offer-received-undo { animation: pulseUndo 1.5s infinite; border-color: var(--primary) !important; color: var(--primary) !important; }
.offer-received-rematch { animation: pulseRematch 1.5s infinite; border-color: var(--success) !important; color: var(--success) !important; }

.action-btn.confirm-undo { background: var(--primary) !important; color: var(--text-pure) !important; border-color: var(--primary) !important; animation: none !important; }
.action-btn.confirm-draw { background: var(--warning) !important; color: var(--text-pure) !important; border-color: var(--warning) !important; animation: none !important; }
.action-btn.confirm-resign { background: var(--danger) !important; color: var(--text-pure) !important; border-color: var(--danger) !important; animation: none !important; }

.abort-timer-container { text-align: center; padding: 10px; margin: 0 15px; background: rgba(239, 68, 68, 0.1); border: 1px dashed var(--danger); border-radius: 8px; color: var(--danger); font-size: 0.9rem; }

@media (max-width: 1100px) {
    .active-game-container { padding: 10px; }
    .player-card { padding: 8px 10px; }
    .action-btn { width: 45px; height: 45px; }
}