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

:root {
    --bg: #0a0a0f;
    --bg-gradient: linear-gradient(180deg, #0a0a0f 0%, #0d0d1a 50%, #0a0a0f 100%);
    --surface: #141420;
    --surface2: #1e1e30;
    --surface3: #282840;
    --border: #2a2a40;
    --border-active: #3a3a55;
    --text: #e0e0e0;
    --text-dim: #888;
    --text-muted: #555;
    --accent: #e94560;
    --accent-glow: rgba(233, 69, 96, 0.4);
    --accent2: #0f3460;
    --gold: #f5c518;
    --gold-glow: rgba(245, 197, 24, 0.3);
    --green: #4caf50;
    --red: #f44336;
    --blue: #2196f3;
    --blue-glow: rgba(33, 150, 243, 0.3);
    --orange: #ff6b35;
    --radius: 16px;
    --radius-sm: 10px;
    --radius-xs: 8px;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
    background: var(--bg-gradient);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
}

body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(233, 69, 96, 0.06) 0%, transparent 60%),
                radial-gradient(ellipse at 20% 80%, rgba(33, 150, 243, 0.04) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

#app {
    max-width: 1040px;
    margin: 0 auto;
    padding: 0 20px 60px;
    position: relative;
    z-index: 1;
}

/* ==================== Header ==================== */
.header {
    text-align: center;
    padding: 32px 0 20px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 28px;
    position: relative;
}
.header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
}
.header h1 {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    background: linear-gradient(135deg, var(--accent) 0%, #ff6b6b 40%, var(--gold) 70%, var(--accent) 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    animation: gradientShift 4s ease infinite;
}
@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}
.tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}
.tab {
    padding: 9px 22px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-dim);
    border-radius: 24px;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 500;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}
.tab::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent);
    opacity: 0;
    transition: opacity var(--transition);
    border-radius: inherit;
}
.tab:hover { border-color: var(--accent); color: var(--text); }
.tab:hover::before { opacity: 0.08; }
.tab.active { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 4px 20px var(--accent-glow); }
.tab.active::before { opacity: 0; }

/* ==================== View Switching ==================== */
.view { display: none; animation: viewEnter 0.35s ease; }
.view.active { display: block; }
.hidden { display: none !important; }

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

/* ==================== Mode Cards ==================== */
.mode-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}
.mode-card {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 36px 28px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}
.mode-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, var(--accent-glow), transparent 70%);
    opacity: 0;
    transition: opacity var(--transition);
}
.mode-card:hover {
    border-color: var(--accent);
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(233, 69, 96, 0.18);
}
.mode-card:hover::after { opacity: 1; }
.mode-card:active { transform: scale(0.97); transition: transform 0.1s ease; }
.mode-icon { font-size: 3.2rem; margin-bottom: 14px; transition: transform var(--transition); }
.mode-card:hover .mode-icon { transform: scale(1.1); }
.mode-card h3 { font-size: 1.25rem; margin-bottom: 8px; font-weight: 700; }
.mode-card p { font-size: 0.85rem; color: var(--text-dim); line-height: 1.5; }

/* ==================== Config Panels ==================== */
.config-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px 32px;
    text-align: center;
    max-width: 620px;
    margin: 0 auto;
    animation: slideUp 0.35s ease;
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.config-panel h2 { margin-bottom: 24px; font-size: 1.35rem; font-weight: 700; }
.config-row {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 28px;
}
.config-col { min-width: 140px; text-align: left; flex: 1; max-width: 200px; }
.config-col label {
    display: block;
    font-size: 0.78rem;
    color: var(--text-dim);
    margin-bottom: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.config-col select {
    width: 100%;
    padding: 11px 14px;
    background: var(--surface2);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--transition);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L2 4h8z' fill='%23888'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}
.config-col select:hover { border-color: var(--border-active); }
.config-col select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(233,69,96,0.12); }

/* ==================== Buttons ==================== */
.btn {
    padding: 12px 28px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    margin: 4px;
    position: relative;
    overflow: hidden;
}
.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.1);
    opacity: 0;
    transition: opacity 0.15s;
}
.btn:hover { transform: translateY(-2px); }
.btn:hover::after { opacity: 1; }
.btn:active { transform: scale(0.97) translateY(0); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none !important; }
.btn:disabled::after { display: none; }

/* 按钮涟漪 */
.ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    transform: scale(0);
    animation: ripple 0.6s ease-out forwards;
    pointer-events: none;
}
@keyframes ripple {
    to { transform: scale(4); opacity: 0; }
}

.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 4px 16px var(--blue-glow); }
.btn-accent { background: var(--accent); color: #fff; box-shadow: 0 4px 16px var(--accent-glow); }
.btn-secondary { background: var(--surface2); color: var(--text); border: 1px solid var(--border); }
.btn-danger { background: var(--red); color: #fff; box-shadow: 0 4px 16px rgba(244,67,54,0.25); }
.btn-attack { background: var(--orange); color: #fff; box-shadow: 0 4px 16px rgba(255,107,53,0.25); }
.btn-gold { background: linear-gradient(135deg, #e6a800, var(--gold)); color: #1a1a1a; font-weight: 700; }

/* ==================== Game Arena ==================== */
.game-arena {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 24px 0;
    flex-wrap: wrap;
}

.player-card {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 24px;
    width: 240px;
    text-align: center;
    transition: all 0.35s ease;
    position: relative;
}
.player-card.active-turn {
    border-color: var(--accent);
    box-shadow: 0 0 32px var(--accent-glow), inset 0 0 32px rgba(233,69,96,0.04);
    animation: cardPulse 1.8s ease-in-out infinite;
}
@keyframes cardPulse {
    0%, 100% { box-shadow: 0 0 16px var(--accent-glow), inset 0 0 16px rgba(233,69,96,0.02); }
    35% { box-shadow: 0 0 36px var(--accent-glow), inset 0 0 32px rgba(233,69,96,0.06); }
    70% { box-shadow: 0 0 20px var(--accent-glow), inset 0 0 20px rgba(233,69,96,0.04); }
}
.player-card.dead {
    opacity: 0.4;
    border-color: #222;
    filter: grayscale(0.6);
}
.player-card.winner-card {
    border-color: var(--gold);
    box-shadow: 0 0 32px var(--gold-glow);
    animation: winnerGlow 1.5s ease-in-out infinite;
}
@keyframes winnerGlow {
    0%, 100% { box-shadow: 0 0 24px var(--gold-glow); }
    50% { box-shadow: 0 0 48px var(--gold-glow), 0 0 80px rgba(245,197,24,0.15); }
}
.player-avatar {
    font-size: 3.2rem;
    margin-bottom: 12px;
    transition: transform 0.3s;
}
.player-card:not(.dead):hover .player-avatar { transform: scale(1.08); }
.player-info h2 {
    font-size: 1.2rem;
    margin-bottom: 6px;
    font-weight: 700;
}
.badge {
    display: inline-block;
    padding: 4px 14px;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 14px;
    font-size: 0.78rem;
    color: var(--text-dim);
    margin-bottom: 12px;
    font-weight: 500;
}
.stat-row {
    font-size: 0.78rem;
    color: var(--text-dim);
    margin: 5px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
.stat-value { color: var(--text); font-weight: 600; margin-left: 2px; }
.mindset-positive { color: var(--green); }
.mindset-negative { color: var(--red); }

.player-indicator {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: #fff;
    padding: 5px 16px;
    border-radius: 14px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    animation: indicatorPulse 1.2s ease-in-out infinite;
    white-space: nowrap;
}
@keyframes indicatorPulse {
    0%, 100% { opacity: 1; transform: translateX(-50%) translateY(0); }
    50% { opacity: 0.75; transform: translateX(-50%) translateY(-3px); }
}

/* ==================== VS Divider ==================== */
.vs-divider {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    min-width: 180px;
}
.vs-text {
    font-size: 2.2rem;
    font-weight: 900;
    background: linear-gradient(180deg, var(--accent), #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 10px var(--accent-glow));
    animation: vsPulse 2s ease-in-out infinite;
}
@keyframes vsPulse {
    0%, 100% { filter: drop-shadow(0 0 8px var(--accent-glow)); }
    50% { filter: drop-shadow(0 0 20px var(--accent-glow)); }
}

/* Gun Display */
.gun-display {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
    text-align: center;
    min-width: 170px;
    transition: all var(--transition);
}
.gun-icon { font-size: 2.6rem; margin-bottom: 10px; transition: transform 0.3s; }
.gun-display:hover .gun-icon { transform: rotate(-10deg); }

/* 枪支后坐动画 */
.gun-recoil { animation: gunRecoil 0.25s cubic-bezier(0.36, 0, 0.66, -0.56); }
@keyframes gunRecoil {
    0% { transform: translateY(0) rotate(0deg); }
    30% { transform: translateY(-12px) rotate(-15deg); }
    60% { transform: translateY(6px) rotate(5deg); }
    100% { transform: translateY(0) rotate(0deg); }
}

/* 弹巢射击闪烁 */
.chamber-slot.fire-live {
    animation: chamberFireLive 0.5s ease-out forwards;
}
@keyframes chamberFireLive {
    0% { background: #fff; border-color: #fff; box-shadow: 0 0 20px #fff; transform: scale(1.4); }
    40% { background: var(--red); border-color: var(--red); box-shadow: 0 0 14px var(--red); }
    100% { background: #1a1a25; border-color: #1a1a25; box-shadow: none; transform: scale(1); }
}
.chamber-slot.fire-empty {
    animation: chamberFireEmpty 0.4s ease-out forwards;
}
@keyframes chamberFireEmpty {
    0% { background: rgba(255,255,255,0.3); border-color: #888; transform: scale(1.3); }
    100% { background: #1a1a25; border-color: #1a1a25; transform: scale(1); }
}
.gun-info {
    font-size: 0.8rem;
    color: var(--text-dim);
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 10px;
}
.gun-info .live-count { color: var(--red); font-weight: 700; font-size: 0.85rem; }
.chamber-visual {
    display: flex;
    gap: 5px;
    justify-content: center;
    flex-wrap: wrap;
}

.chamber-slot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: transparent;
    transition: all 0.3s ease;
    position: relative;
}
.chamber-slot.fired {
    background: #1a1a25;
    border-color: #1a1a25;
}
.chamber-slot.current {
    border-color: var(--accent);
    box-shadow: 0 0 10px var(--accent);
    animation: chamberCurrent 0.8s ease-in-out infinite;
}
@keyframes chamberCurrent {
    0%, 100% { box-shadow: 0 0 6px var(--accent); }
    50% { box-shadow: 0 0 16px var(--accent); }
}
.chamber-slot.live-known {
    background: var(--red) !important;
    border-color: var(--red) !important;
    box-shadow: 0 0 8px rgba(244,67,54,0.5);
}
.chamber-slot.empty-known {
    background: #2a2a35 !important;
    border-color: #3a3a45 !important;
}

/* Turn Indicator */
.turn-indicator {
    font-size: 0.88rem;
    color: var(--accent);
    font-weight: 700;
    animation: indicatorPulse 1.5s ease-in-out infinite;
    text-align: center;
}

/* ==================== Event Log ==================== */
.event-log {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin: 20px auto;
    overflow: hidden;
    max-width: 720px;
}
.event-log-header {
    padding: 12px 18px;
    background: var(--surface2);
    font-weight: 700;
    font-size: 0.88rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
}
.event-log-content {
    padding: 10px 18px;
    max-height: 260px;
    overflow-y: auto;
    font-size: 0.88rem;
}
.event-entry {
    padding: 8px 0;
    border-bottom: 1px solid rgba(42, 42, 64, 0.4);
    animation: eventSlideIn 0.35s ease;
    line-height: 1.5;
    opacity: 0;
    animation-fill-mode: forwards;
}
@keyframes eventSlideIn {
    from { opacity: 0; transform: translateX(-12px); }
    to { opacity: 1; transform: translateX(0); }
}
.event-entry:nth-child(1) { animation-delay: 0s; }
.event-entry:nth-child(2) { animation-delay: 0.04s; }
.event-entry:nth-child(3) { animation-delay: 0.08s; }
.event-entry:nth-child(4) { animation-delay: 0.12s; }
.event-entry:nth-child(5) { animation-delay: 0.16s; }
.event-entry:nth-child(6) { animation-delay: 0.20s; }
.event-entry:nth-child(7) { animation-delay: 0.24s; }
.event-entry:nth-child(8) { animation-delay: 0.28s; }
.event-entry:nth-child(9) { animation-delay: 0.32s; }
.event-entry:nth-child(10) { animation-delay: 0.36s; }
.event-entry:last-child { border-bottom: none; }
.event-entry.fire { color: var(--red); font-weight: 600; }
.event-entry.decision { color: var(--blue); }
.event-entry.result { color: var(--gold); font-weight: 500; }
.event-entry.game_over {
    color: var(--accent);
    font-size: 1.1rem;
    text-align: center;
    padding: 14px 0;
    font-weight: 700;
    border-bottom: none;
}

/* Breakdown */
.breakdown-toggle {
    display: inline-block;
    margin-left: 8px;
    font-size: 0.7rem;
    color: var(--text-dim);
    cursor: pointer;
    padding: 2px 8px;
    border: 1px solid var(--border);
    border-radius: 10px;
    transition: all var(--transition);
    user-select: none;
}
.breakdown-toggle:hover { border-color: var(--blue); color: var(--blue); }
.breakdown-detail {
    font-size: 0.75rem;
    color: var(--text-dim);
    margin: 8px 0 0 12px;
    padding: 10px 14px;
    background: var(--surface2);
    border-radius: var(--radius-xs);
    border-left: 2px solid var(--blue);
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 3px 10px;
    animation: breakdownIn 0.25s ease;
}
@keyframes breakdownIn {
    from { opacity: 0; max-height: 0; }
    to { opacity: 1; max-height: 300px; }
}
.breakdown-detail .bd-label { color: var(--text-muted); text-align: right; white-space: nowrap; }
.breakdown-detail .bd-value { color: var(--text); font-weight: 500; font-variant-numeric: tabular-nums; }
.breakdown-detail .bd-highlight { color: var(--accent); font-weight: 700; }

/* ==================== Action Bar ==================== */
.action-bar {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 20px 0;
    flex-wrap: wrap;
}

/* ==================== Modal ==================== */
.modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(6px);
    animation: modalFadeIn 0.3s ease;
}
@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.modal-content {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 20px;
    padding: 44px 40px;
    text-align: center;
    max-width: 500px;
    width: 92%;
    animation: modalScaleIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes modalScaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}
.modal-content h2 { margin-bottom: 16px; font-size: 1.6rem; }
.modal-content p { margin-bottom: 24px; font-size: 1.1rem; color: var(--text-dim); }
.modal-content .ranking-list { text-align: left; margin-bottom: 24px; }
.modal-content .ranking-list p { font-size: 0.95rem; margin-bottom: 8px; color: var(--text); }

/* ==================== Tournament ==================== */
.tournament-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 20px;
    align-items: start;
}
@media (max-width: 740px) {
    .tournament-layout { grid-template-columns: 1fr; }
    .game-arena { gap: 12px; }
    .player-card { width: 200px; padding: 20px 16px; }
    .vs-divider { min-width: auto; }
    .header h1 { font-size: 1.5rem; }
    .modal-content { padding: 28px 20px; }
}

.tournament-schedule {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    max-height: 68vh;
    overflow-y: auto;
    position: sticky;
    top: 12px;
}
.tournament-schedule h2 { font-size: 1.05rem; margin-bottom: 14px; font-weight: 700; }
.schedule-item {
    padding: 10px 10px;
    border-radius: var(--radius-xs);
    font-size: 0.83rem;
    margin-bottom: 5px;
    cursor: default;
    transition: all var(--transition);
    line-height: 1.5;
}
.schedule-item.played { color: var(--text-dim); }
.schedule-item.current {
    background: var(--surface2);
    border: 1px solid var(--accent);
    color: var(--text);
}
.schedule-item.pending { color: var(--text-muted); }
.schedule-item .winner-tag { color: var(--gold); font-weight: 700; }
.schedule-item .score-tag { color: var(--text-dim); font-size: 0.75rem; margin-left: 4px; }

.tournament-main {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}
.tournament-main h2 { font-size: 1.05rem; margin-bottom: 18px; font-weight: 700; }

.scoreboard-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}
.scoreboard-table th {
    text-align: left;
    padding: 10px 8px;
    border-bottom: 2px solid var(--border);
    color: var(--text-dim);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.scoreboard-table td {
    padding: 10px 8px;
    border-bottom: 1px solid var(--border);
    transition: background var(--transition);
}
.scoreboard-table tbody tr {
    transition: background 0.3s ease, transform 0.3s ease;
}
.scoreboard-table tbody tr:hover td { background: rgba(255,255,255,0.02); }
.scoreboard-table tbody tr.score-updated {
    animation: scoreHighlight 0.8s ease-out;
}
@keyframes scoreHighlight {
    0% { background: rgba(233, 69, 96, 0.15); transform: scale(1.02); }
    100% { background: transparent; transform: scale(1); }
}
.scoreboard-table .rank-1 { color: var(--gold); font-weight: 700; }
.scoreboard-table .rank-2 { color: #c0c0c0; font-weight: 700; }
.scoreboard-table .rank-3 { color: #cd7f32; font-weight: 700; }

.tournament-current {
    margin: 18px 0;
    padding: 14px 16px;
    background: var(--surface2);
    border-radius: var(--radius-xs);
    font-size: 0.88rem;
    text-align: center;
    border: 1px solid var(--border);
    line-height: 1.6;
}

/* ==================== Loading & Toast ==================== */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.btn-loading { pointer-events: none; opacity: 0.7; }
.btn-loading::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.toast {
    padding: 12px 20px;
    border-radius: var(--radius-xs);
    font-size: 0.85rem;
    font-weight: 500;
    color: #fff;
    animation: toastIn 0.35s ease, toastOut 0.3s ease 3s forwards;
    max-width: 360px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.toast.error { background: var(--red); }
.toast.success { background: var(--green); }
.toast.info { background: var(--blue); }

@keyframes toastIn {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
    from { opacity: 1; }
    to { opacity: 0; transform: translateY(-10px); }
}

/* ==================== Scrollbar ==================== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-active); }

/* ==================== Auto-play Progress ==================== */
.auto-play-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--surface2);
    border: 1px solid var(--accent);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--accent);
    animation: pulse 1s ease-in-out infinite;
}

/* ==================== Kill Flash & Turn Swap ==================== */
.arena-kill-flash {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 500;
    animation: killFlash 0.6s ease-out forwards;
}
@keyframes killFlash {
    0% { background: rgba(244, 67, 54, 0.25); }
    50% { background: rgba(244, 67, 54, 0.08); }
    100% { background: transparent; }
}

.player-card.turn-swap-out {
    animation: turnSwapOut 0.3s ease;
}
@keyframes turnSwapOut {
    to { opacity: 0.5; transform: scale(0.95); }
}

.player-card.turn-swap-in {
    animation: turnSwapIn 0.35s ease;
}
@keyframes turnSwapIn {
    from { opacity: 0.5; transform: scale(0.95); border-color: var(--accent); box-shadow: 0 0 24px var(--accent-glow); }
    to { opacity: 1; transform: scale(1); }
}

/* ==================== Event highlight pulse ==================== */
.event-entry.fire.live-fire {
    animation: firePulse 0.5s ease-out forwards;
}
@keyframes firePulse {
    0% { transform: scale(1.05); text-shadow: 0 0 12px rgba(244,67,54,0.6); }
    100% { transform: scale(1); text-shadow: none; }
}
