.toolbar {
    max-width: none;
    margin: var(--space-8) auto var(--space-6);
    padding: 16px;
}

.toolbar-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 12px;
    align-items: end;
}

.toolbar-field--grow {
    min-width: 0;
}

.toolbar-field {
    display: grid;
    gap: 6px;
}

.toolbar-field label {
    font-size: 12px;
    opacity: 0.85;
}

.toolbar-input,
.toolbar-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 13px;
    font-family: inherit;
    background: var(--card-bg);
    color: var(--text-primary);
    transition: var(--transition-all);
}

.toolbar-input:focus,
.toolbar-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--accent-primary-glow);
}

.toolbar-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.toolbar-meta {
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.6px;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.32);
    color: #10b981;
}

.live-indicator.paused {
    background: rgba(148, 163, 184, 0.14);
    border: 1px solid rgba(148, 163, 184, 0.28);
    color: var(--text-primary);
}

.meta-text {
    font-size: 12px;
    opacity: 0.85;
}

.round-warning {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    background: rgba(245, 158, 11, 0.14);
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: #f59e0b;
}

.round-warning.hidden {
    display: none;
}

.round-start-countdown {
    max-width: none;
    margin: 0 auto var(--space-6);
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(59, 130, 246, 0.08));
    border: 2px solid rgba(99, 102, 241, 0.35);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.12);
}

.round-start-countdown.hidden {
    display: none;
}

.round-start-countdown__icon {
    font-size: 2rem;
    line-height: 1;
}

.round-start-countdown__content {
    display: grid;
    gap: 4px;
}

.round-start-countdown__label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    opacity: 0.85;
    color: var(--text-secondary);
}

.round-start-countdown__value {
    font-family: var(--font-mono);
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--primary-color, #6366f1);
    font-variant-numeric: tabular-nums;
}

.round-start-countdown__meta {
    font-size: 12px;
    opacity: 0.8;
    color: var(--text-secondary);
}

.round-end-banner {
    max-width: none;
    margin: 0 auto var(--space-6);
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.14), rgba(234, 88, 12, 0.08));
    border: 2px solid rgba(245, 158, 11, 0.45);
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.14);
}

.round-end-banner.hidden {
    display: none;
}

.round-end-banner__icon {
    font-size: 2rem;
    line-height: 1;
}

.round-end-banner__content {
    display: grid;
    gap: 4px;
}

.round-end-banner__label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    opacity: 0.85;
    color: var(--text-secondary);
}

.round-end-banner__value {
    font-family: var(--font-mono);
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.2;
    color: #f59e0b;
}

.round-end-banner__meta {
    font-size: 12px;
    opacity: 0.85;
    color: var(--text-secondary);
}

.kpi-grid {
    max-width: none;
    margin: 0 auto var(--space-6);
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.kpi-card {
    background: var(--card-bg, rgba(255, 255, 255, 0.06));
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 14px;
    padding: 14px 14px 12px 14px;
    transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.kpi-card:hover {
    transform: translateY(-1px);
    border-color: rgba(59, 130, 246, 0.35);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
}

.kpi-label {
    font-size: 11px;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    margin-bottom: 6px;
}

.kpi-value {
    font-family: var(--font-mono);
    font-weight: 800;
    font-size: 15px;
    line-height: 1.2;
}

.kpi-card.kpi-card--jackpot-won {
    border-color: rgba(250, 204, 21, 0.65);
    box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.16);
    animation: jackpotBlink 950ms ease-in-out infinite;
}

.kpi-card.kpi-card--jackpot-won .kpi-value {
    color: #facc15;
    text-shadow: 0 0 18px rgba(250, 204, 21, 0.35);
}

@keyframes jackpotBlink {
    0%, 100% {
        filter: brightness(1);
        transform: translateY(0);
    }
    50% {
        filter: brightness(1.35);
        transform: translateY(-1px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .kpi-card.kpi-card--jackpot-won {
        animation: none;
    }
}

.toast-root {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 9999;
    display: grid;
    gap: 10px;
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    width: min(420px, calc(100vw - 32px));
    border-radius: 14px;
    padding: 12px 14px;
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.35);
    color: #e2e8f0;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 180ms ease, transform 180ms ease;
}

.toast.toast--show {
    opacity: 1;
    transform: translateY(0);
}

.toast-title {
    font-weight: 900;
    letter-spacing: 0.2px;
    margin: 0 0 4px 0;
    font-size: 13px;
}

.toast-message {
    margin: 0;
    font-size: 13px;
    line-height: 1.35;
    opacity: 0.95;
}

.toast.toast--warn {
    border-color: rgba(245, 158, 11, 0.5);
    box-shadow: 0 12px 28px rgba(245, 158, 11, 0.18);
}

.toast.toast--warn .toast-title {
    color: #f59e0b;
}

@media (prefers-reduced-motion: reduce) {
    .toast,
    .toast.toast--show {
        transition: none;
        transform: none;
    }
}

.timeline-section.section-card {
    max-width: none;
    margin-left: auto;
    margin-right: auto;
}

.results-meta {
    font-size: 12px;
    opacity: 0.8;
}

/* Reuse timeline visuals similar to player timeline */
.timeline {
    padding: 10px 6px 2px 6px;
}

.timeline-list {
    position: relative;
    display: grid;
    gap: 12px;
    padding-left: 34px;
}

.timeline-list::before {
    content: "";
    position: absolute;
    left: 14px;
    top: 6px;
    bottom: 6px;
    width: 2px;
    background: linear-gradient(
        to bottom,
        rgba(59, 130, 246, 0.0),
        rgba(59, 130, 246, 0.55),
        rgba(59, 130, 246, 0.0)
    );
    border-radius: 2px;
}

.event-item {
    position: relative;
    border-radius: 14px;
    padding: 14px 14px 12px 14px;
    background: var(--card-bg, rgba(255, 255, 255, 0.06));
    border: 1px solid rgba(148, 163, 184, 0.25);
    transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.event-item--enter {
    opacity: 0;
    transform: translateY(-12px);
    animation: timelineItemIn 0.42s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    will-change: opacity, transform;
}

@keyframes timelineItemIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .event-item--enter {
        animation: none;
        opacity: 1;
        transform: none;
        will-change: auto;
    }
}

.event-item:hover {
    transform: translateY(-1px);
    border-color: rgba(59, 130, 246, 0.35);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
}

.event-item::before {
    content: "";
    position: absolute;
    left: -28px;
    top: 18px;
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.95);
    box-shadow:
        0 0 0 4px rgba(59, 130, 246, 0.18),
        0 10px 18px rgba(0, 0, 0, 0.18);
}

.event-item::after {
    content: "";
    position: absolute;
    left: -16px;
    top: 23px;
    width: 16px;
    height: 2px;
    background: rgba(59, 130, 246, 0.45);
    border-radius: 2px;
}

.event-top {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.event-title {
    display: flex;
    gap: 10px;
    align-items: center;
    min-width: 220px;
}

.event-type {
    font-weight: 800;
    letter-spacing: 0.2px;
    line-height: 1.15;
}

.event-chip {
    display: inline-flex;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 12px;
    background: rgba(59, 130, 246, 0.14);
    border: 1px solid rgba(59, 130, 246, 0.3);
    white-space: nowrap;
}

.event-meta {
    display: grid;
    gap: 2px;
    font-size: 12px;
    opacity: 0.9;
}

.event-meta strong {
    font-weight: 800;
}

.event-message {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(148, 163, 184, 0.06);
    font-size: 13px;
    line-height: 1.35;
}

.event-message b {
    font-weight: 800;
}

.empty-state {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 18px 14px;
    opacity: 0.9;
}

.empty-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: rgba(148, 163, 184, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.2);
    font-size: 20px;
}

.empty-text h3 {
    margin: 0 0 2px 0;
    font-size: 14px;
}

.empty-text p {
    margin: 0;
    font-size: 12px;
    opacity: 0.8;
}

.header-left {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
}

.header-left h1 {
    margin: 0;
}

.header-left .connection-status {
    margin-left: 4px;
}

.timer {
    color: var(--text-secondary, var(--text-muted));
    font-size: 14px;
}

.timer strong {
    color: var(--primary-color, var(--accent-primary));
}

@media (max-width: 1100px) {
    .toolbar-row {
        grid-template-columns: 1fr;
    }
}

.live-pip {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 320px;
    max-width: calc(100vw - 40px);
    z-index: 900;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.live-pip.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(8px);
}

.live-pip-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 12px;
    background: var(--hover-bg);
    border-bottom: 1px solid var(--border-color);
}

.live-pip-title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.4px;
    color: var(--text-primary);
}

.live-pip-close {
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 1rem;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 6px;
    line-height: 1;
}

.live-pip-close:hover {
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.06);
}

.live-pip-body {
    background: #000;
    aspect-ratio: 16 / 9;
}

.live-pip-body video {
    width: 100%;
    height: 100%;
    display: block;
}

@media (max-width: 600px) {
    .live-pip {
        right: 12px;
        bottom: 12px;
        width: 260px;
    }
}

