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

:root {
    --bg: #f2f3f3;
    --bg-card: #ffffff;
    --bg-hover: #f5f6f8;
    --primary: #385EE2;
    --primary-dim: rgba(56, 94, 226, 0.1);
    --accent: #385EE2;
    --gold: #e6a700;
    --danger: #e53935;
    --text: #333333;
    --text-dim: #888888;
    --border: #e7e5e5;
    --radius: 10px;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

body {
    font-family: "Verdana", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: transparent;
    color: var(--text);
    min-height: 100vh;
    line-height: 1.5;
}

/* Header */
.header {
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.04);
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-icon {
    width: 36px;
    height: 48px;
    flex-shrink: 0;
    object-fit: contain;
    display: block;
}

.brand h1 {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.subtitle {
    font-size: 13px;
    color: var(--text-dim);
    margin-top: 2px;
}

.header-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.badge {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 20px;
    background: var(--primary-dim);
    color: var(--primary);
    border: 1px solid rgba(56, 94, 226, 0.2);
}

.badge.offline {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.3);
}

.btn-refresh {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 6px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.btn-refresh:hover {
    background: var(--bg-hover);
    border-color: var(--primary);
}

/* Sticky Controls Wrapper */
.sticky-controls {
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

/* Control Bar */
.control-bar {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
}

.control-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.control-tabs {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    padding: 10px 0;
}

.tab {
    background: transparent;
    border: none;
    color: var(--text-dim);
    padding: 8px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
    transition: all 0.2s;
}

.tab:hover {
    color: var(--text);
    background: var(--bg-hover);
}

.tab.active {
    background: var(--primary);
    color: #fff;
    font-weight: 600;
}

.control-actions {
    display: flex;
    gap: 8px;
    padding: 10px 0;
}

.search-input,
.group-select {
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 7px 12px;
    border-radius: 8px;
    font-size: 13px;
    outline: none;
}

.search-input {
    width: 160px;
}

.search-input:focus,
.group-select:focus {
    border-color: var(--primary);
}

/* Realtime Prediction Bar */
.realtime-bar {
    background: #fff;
    border-bottom: 1px solid var(--border);
}

.realtime-bar.active {
    border-bottom-color: var(--primary);
    box-shadow: 0 2px 8px rgba(56, 94, 226, 0.08);
}

.realtime-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 10px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.realtime-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.realtime-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
}

.realtime-status {
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 500;
}

.realtime-status.idle {
    background: rgba(139, 156, 184, 0.15);
    color: var(--text-dim);
}

.realtime-status.running {
    background: var(--primary-dim);
    color: var(--primary);
    animation: pulse 1.5s infinite;
}

.realtime-timer {
    font-size: 12px;
    color: var(--gold);
    font-variant-numeric: tabular-nums;
}

.realtime-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.rt-label {
    font-size: 12px;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: 6px;
}

.rt-select {
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 5px 8px;
    border-radius: 6px;
    font-size: 12px;
    outline: none;
}

.btn-rt-start {
    background: var(--primary);
    border: none;
    color: #fff;
    padding: 8px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-rt-start:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.4);
}

.btn-rt-start:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-rt-stop {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: var(--danger);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.btn-rt-stop:hover:not(:disabled) {
    background: var(--danger);
    color: #fff;
}

.btn-rt-stop:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.rt-hint {
    font-size: 11px;
    color: var(--text-dim);
    max-width: 200px;
    line-height: 1.4;
}

/* Math Prediction Bar */
.math-bar {
    background: #fff;
    border-bottom: 1px solid var(--border);
}

.math-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 10px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.math-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.math-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
}

.math-formula-tag {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 10px;
    background: var(--primary-dim);
    color: var(--primary);
    border: 1px solid rgba(56, 94, 226, 0.2);
}

.math-formulas {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.formula-box {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid;
}

.formula-poisson {
    border-color: rgba(56, 94, 226, 0.3);
    background: rgba(56, 94, 226, 0.06);
}

.formula-poisson .formula-expr {
    color: #385EE2;
    font-size: 15px;
}

.formula-bayes {
    border-color: rgba(230, 167, 0, 0.4);
    background: rgba(230, 167, 0, 0.08);
}

.formula-bayes .formula-expr {
    color: #c99200;
    font-size: 15px;
}

.formula-label {
    font-size: 10px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.formula-expr {
    font-family: 'Cambria Math', 'Times New Roman', serif;
}

.formula-expr sup {
    font-size: 10px;
}

.math-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-math-predict {
    background: linear-gradient(135deg, #2563eb, #0891b2);
    border: none;
    color: #fff;
    padding: 8px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-math-predict:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.btn-math-predict:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.btn-math-predict.active {
    background: linear-gradient(135deg, #0891b2, #2563eb);
    box-shadow: 0 0 12px rgba(37, 99, 235, 0.5);
}

/* Accurate Prediction Bar */
.accurate-bar {
    background: #fff;
    border-bottom: 1px solid var(--border);
}

.accurate-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 10px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.accurate-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.accurate-title {
    font-size: 14px;
    font-weight: 600;
    color: #0d7a4a;
}

.accurate-formula-tag {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 10px;
    background: rgba(13, 122, 74, 0.08);
    color: #0d7a4a;
    border: 1px solid rgba(13, 122, 74, 0.2);
}

.accurate-factors {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.factor-chip {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 12px;
    background: #f7f8fa;
    border: 1px solid #e7e5e5;
    color: #666;
}

.accurate-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.accurate-selected-match {
    font-size: 12px;
    color: var(--text-dim);
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.accurate-selected-match.ready {
    color: #0d7a4a;
    font-weight: 600;
}

.btn-accurate-predict {
    background: linear-gradient(135deg, #0d7a4a, #10b981);
    color: #fff;
    border: none;
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-accurate-predict:hover:not(:disabled) {
    box-shadow: 0 4px 12px rgba(13, 122, 74, 0.3);
}

.btn-accurate-predict:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.btn-accurate-predict.active {
    background: linear-gradient(135deg, #065f37, #0d7a4a);
    box-shadow: 0 4px 16px rgba(13, 122, 74, 0.35);
}

.accurate-status {
    font-size: 11px;
    color: var(--text-dim);
    max-width: 280px;
    line-height: 1.4;
}

.math-status {
    font-size: 12px;
    color: var(--text-dim);
}

/* Math result in predict panel */
.math-result-header {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(8, 145, 178, 0.08));
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: var(--radius);
    padding: 14px;
    margin-bottom: 16px;
    text-align: center;
}

.math-result-header .method-tag {
    font-size: 11px;
    color: #60a5fa;
    margin-bottom: 6px;
}

.math-formula-display {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 10px 0;
}

.math-formula-display .f-item {
    font-size: 13px;
    padding: 8px 14px;
    border-radius: 8px;
    font-family: 'Cambria Math', 'Times New Roman', serif;
    border: 1px solid;
}

.math-formula-display .f-poisson {
    color: #86efac;
    border-color: rgba(134, 239, 172, 0.5);
    background: rgba(6, 78, 59, 0.25);
}

.math-formula-display .f-bayes {
    color: #fde68a;
    border-color: rgba(253, 224, 71, 0.5);
    background: rgba(66, 56, 14, 0.25);
}

.math-formula-display .frac,
.formula-expr .frac {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    vertical-align: middle;
    margin: 0 2px;
}

.math-formula-display .frac > span:first-child,
.formula-expr .frac > span:first-child {
    border-bottom: 1px solid currentColor;
    padding-bottom: 1px;
    opacity: 0.85;
}

.math-formula-display .frac > span:last-child,
.formula-expr .frac > span:last-child {
    padding-top: 1px;
    font-size: 12px;
}

.lambda-display {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 14px;
    font-size: 13px;
}

.lambda-display .lambda-item {
    text-align: center;
    background: var(--bg);
    padding: 10px 16px;
    border-radius: 8px;
}

.lambda-display .lambda-val {
    font-size: 20px;
    font-weight: 700;
    color: #60a5fa;
    font-family: 'Cambria Math', serif;
}

.lambda-display .lambda-label {
    font-size: 11px;
    color: var(--text-dim);
    margin-top: 2px;
}

.bayes-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    margin-bottom: 14px;
}

.bayes-table th,
.bayes-table td {
    padding: 8px 10px;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.bayes-table th {
    color: var(--text-dim);
    font-weight: 500;
    font-size: 11px;
}

.bayes-table .col-prior { color: #fbbf24; }
.bayes-table .col-like { color: #a78bfa; }
.bayes-table .col-post { color: #60a5fa; font-weight: 600; }

.calc-steps {
    background: var(--bg);
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 14px;
    max-height: 160px;
    overflow-y: auto;
}

.calc-steps li {
    font-size: 11px;
    color: var(--text-dim);
    padding: 4px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    line-height: 1.5;
    list-style: none;
}

.calc-steps li::before {
    content: '';
}

.poisson-demo {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 14px;
}

.poisson-demo-col h4 {
    font-size: 11px;
    color: var(--text-dim);
    margin-bottom: 6px;
}

.poisson-demo-item {
    font-size: 10px;
    color: var(--text-dim);
    padding: 4px 0;
    font-family: 'Consolas', monospace;
    line-height: 1.4;
}

.score-formula {
    font-size: 10px;
    color: #60a5fa;
    margin-top: 2px;
    font-family: 'Consolas', monospace;
}

/* Realtime Feed */
.realtime-feed {
    max-width: 1400px;
    margin: 0 auto;
    border-top: 1px solid var(--border);
    transition: max-height 0.3s ease;
}

.realtime-feed.collapsed .feed-list {
    display: none;
}

.realtime-feed:not(.collapsed) .feed-list {
    display: block;
    max-height: 160px;
    overflow-y: auto;
}

.feed-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 24px;
    font-size: 12px;
    color: var(--text-dim);
}

.btn-toggle-feed {
    background: transparent;
    border: none;
    color: var(--accent);
    font-size: 12px;
    cursor: pointer;
}

.feed-list {
    padding: 0 24px 10px;
}

.feed-item {
    display: flex;
    gap: 10px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 12px;
    animation: feedIn 0.3s ease;
}

@keyframes feedIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.feed-time {
    color: var(--text-dim);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.feed-match {
    color: var(--accent);
    white-space: nowrap;
}

.feed-result {
    color: var(--text);
    flex: 1;
}

.feed-result strong {
    color: var(--primary);
}

.feed-item.changed .feed-result {
    color: var(--gold);
}

.live-badge {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 10px;
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
    animation: pulse 1.5s infinite;
}

.live-badge.hidden {
    display: none;
}

.pred-live-tag {
    display: inline-block;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
    margin-bottom: 8px;
}

.pred-updated-at {
    font-size: 11px;
    color: var(--text-dim);
    text-align: center;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

.score-item.flash {
    animation: scoreFlash 0.6s ease;
}

@keyframes scoreFlash {
    0%, 100% { background: var(--bg); }
    50% { background: rgba(56, 94, 226, 0.12); }
}

.feed-item.event .feed-result {
    color: #a78bfa;
}

.feed-item.event {
    border-left: 2px solid #a78bfa;
    padding-left: 8px;
}

/* Event Timeline */
.events-section {
    margin-bottom: 16px;
}

.events-section h3 {
    font-size: 13px;
    color: var(--text-dim);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.event-timeline {
    max-height: 180px;
    overflow-y: auto;
    background: var(--bg);
    border-radius: 8px;
    padding: 8px;
}

.event-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 4px;
    border-bottom: 1px solid var(--border);
    font-size: 12px;
}

.event-item:last-child {
    border-bottom: none;
}

.event-icon {
    font-size: 14px;
    width: 20px;
    text-align: center;
}

.event-minute {
    color: var(--gold);
    font-weight: 600;
    min-width: 28px;
    font-variant-numeric: tabular-nums;
}

.event-detail {
    flex: 1;
    color: var(--text);
}

.event-src {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    background: var(--bg-hover);
    color: var(--text-dim);
}

.event-item.type-red_card .event-detail,
.event-item.type-yellow_card .event-detail {
    color: var(--gold);
}

.event-item.type-substitution .event-detail {
    color: #a78bfa;
}

.event-item.type-penalty .event-detail {
    color: var(--primary);
}

/* Main Layout */
.main-layout {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 24px;
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 20px;
    align-items: start;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.panel-header h2 {
    font-size: 16px;
    font-weight: 600;
}

.count-badge {
    font-size: 12px;
    color: var(--text-dim);
    background: var(--bg-hover);
    padding: 3px 10px;
    border-radius: 12px;
}

/* Selected Match Bar */
.selected-match-bar {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 12px;
    transition: all 0.2s;
}

.selected-match-bar.empty {
    border-style: dashed;
    border-color: rgba(139, 156, 184, 0.3);
}

.selected-match-bar.has-match {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px rgba(56, 94, 226, 0.15);
}

.selected-match-inner {
    padding: 12px 14px;
}

.selected-label {
    font-size: 11px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 6px;
}

.selected-match-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.selected-empty {
    font-size: 13px;
    color: var(--text-dim);
}

.selected-teams {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
}

.selected-meta {
    font-size: 11px;
    color: var(--text-dim);
}

.selected-id {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    background: var(--bg-hover);
    color: var(--primary);
}

.rt-selected-match,
.math-selected-match {
    font-size: 12px;
    color: var(--text-dim);
    max-width: 220px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rt-selected-match.ready,
.math-selected-match.ready {
    color: var(--primary);
    font-weight: 500;
}

.btn-ai-predict {
    background: var(--primary-dim);
    border: 1px solid rgba(56, 94, 226, 0.3);
    color: var(--primary);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-ai-predict:hover:not(:disabled) {
    background: var(--primary);
    color: #fff;
}

.btn-ai-predict:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.btn-rt-start:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* Predict Match Banner */
.predict-match-banner {
    background: var(--primary-dim);
    border: 1px solid rgba(56, 94, 226, 0.2);
    border-radius: var(--radius);
    padding: 12px 14px;
    margin-bottom: 12px;
}

.predict-match-banner.hidden {
    display: none;
}

.predict-banner-mode {
    font-size: 11px;
    color: var(--primary);
    margin-bottom: 6px;
}

.predict-banner-teams {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.predict-banner-meta {
    text-align: center;
    font-size: 11px;
    color: var(--text-dim);
}

/* Match List */
.match-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.match-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.match-card:hover {
    border-color: rgba(56, 94, 226, 0.4);
    background: var(--bg-hover);
}

.match-card.selected {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary);
}

.match-card.live {
    border-left: 3px solid var(--danger);
}

.match-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 12px;
    color: var(--text-dim);
}

.status-tag {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.status-tag.live {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
    animation: pulse 1.5s infinite;
}

.status-tag.finished {
    background: rgba(139, 156, 184, 0.2);
    color: var(--text-dim);
}

.status-tag.scheduled {
    background: rgba(59, 130, 246, 0.2);
    color: var(--accent);
}

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

.match-teams {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
}

.team {
    display: flex;
    align-items: center;
    gap: 8px;
}

.team.away {
    flex-direction: row-reverse;
    text-align: right;
}

.team-flag {
    width: 32px;
    height: 22px;
    object-fit: cover;
    border-radius: 3px;
    border: 1px solid var(--border);
}

.team-name {
    font-size: 14px;
    font-weight: 500;
}

.team-name-wrap {
    display: flex;
    flex-direction: column;
    gap: 1px;
    line-height: 1.3;
}

.team-name-en {
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.team-name-zh {
    font-size: 12px;
    color: #385EE2;
    font-weight: 500;
}

.team.away .team-name-wrap {
    align-items: flex-end;
}

.user-badge {
    background: var(--primary-dim);
    color: var(--primary);
    border: 1px solid rgba(56, 94, 226, 0.2);
}

.match-teams .team {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pred-team .team-name-wrap {
    align-items: center;
}

.selected-teams .team-name-wrap {
    display: inline-flex;
}

.match-score {
    text-align: center;
    min-width: 70px;
}

.score-display {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 2px;
}

.score-vs {
    font-size: 13px;
    color: var(--text-dim);
}

.predict-btn {
    margin-top: 12px;
    width: 100%;
    background: var(--primary-dim);
    border: 1px solid rgba(56, 94, 226, 0.2);
    color: var(--primary);
    padding: 7px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.predict-btn:hover {
    background: var(--primary);
    color: #fff;
}

.select-hint {
    margin-top: 8px;
    text-align: center;
    font-size: 11px;
    color: var(--text-dim);
    padding: 4px;
    border-radius: 4px;
}

.select-hint.selected-hint {
    color: var(--primary);
    background: var(--primary-dim);
    font-weight: 600;
}

.match-card.selected .select-hint {
    color: var(--primary);
}

/* Predict Panel */
.predict-panel {
    position: sticky;
    top: 175px;
}

.predict-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    min-height: 400px;
}

.predict-placeholder {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-dim);
}

.placeholder-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.hint {
    font-size: 12px;
    margin-top: 8px;
    line-height: 1.6;
}

/* Prediction Result */
.pred-match-header {
    text-align: center;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
}

.pred-teams-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 8px;
}

.pred-team {
    text-align: center;
    flex: 1;
}

.pred-team img {
    width: 40px;
    height: 28px;
    border-radius: 3px;
    margin-bottom: 4px;
}

.pred-team span {
    display: block;
    font-size: 13px;
    font-weight: 500;
}

.pred-vs {
    font-size: 18px;
    color: var(--text-dim);
}

.winner-box {
    background: var(--primary-dim);
    border: 1px solid rgba(56, 94, 226, 0.2);
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
    margin-bottom: 16px;
}

.winner-label {
    font-size: 12px;
    color: var(--text-dim);
    margin-bottom: 4px;
}

.winner-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
}

.winner-confidence {
    font-size: 13px;
    color: var(--gold);
    margin-top: 4px;
}

.prob-bars {
    margin-bottom: 16px;
}

.prob-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 12px;
}

.prob-label {
    width: 60px;
    color: var(--text-dim);
}

.prob-bar-bg {
    flex: 1;
    height: 8px;
    background: var(--bg);
    border-radius: 4px;
    overflow: hidden;
}

.prob-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s ease;
}

.prob-bar-fill.home { background: var(--primary); }
.prob-bar-fill.draw { background: var(--gold); }
.prob-bar-fill.away { background: var(--accent); }

.prob-value {
    width: 40px;
    text-align: right;
    font-weight: 600;
}

.scores-section h3,
.analysis-section h3,
.players-section h3 {
    font-size: 13px;
    color: var(--text-dim);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.score-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 16px;
}

.score-item {
    background: var(--bg);
    border-radius: 8px;
    padding: 12px;
    text-align: center;
}

.score-item .score-val {
    font-size: 22px;
    font-weight: 700;
}

.score-item .score-prob {
    font-size: 11px;
    color: var(--primary);
    margin-top: 2px;
}

.score-item:first-child {
    border: 1px solid rgba(56, 94, 226, 0.3);
    background: var(--primary-dim);
}

.analysis-list {
    list-style: none;
    margin-bottom: 16px;
}

.analysis-list li {
    font-size: 12px;
    color: var(--text-dim);
    padding: 6px 0;
    border-bottom: 1px solid var(--border);
    line-height: 1.5;
}

.analysis-list li::before {
    content: '▸ ';
    color: var(--primary);
}

.players-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.player-col h4 {
    font-size: 12px;
    margin-bottom: 6px;
    color: var(--text);
}

.player-col ul {
    list-style: none;
}

.player-col li {
    font-size: 11px;
    color: var(--text-dim);
    padding: 2px 0;
}

.expected-goals {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 16px;
    font-size: 12px;
    color: var(--text-dim);
}

.expected-goals strong {
    color: var(--text);
    font-size: 16px;
}

.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-dim);
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--text-dim);
}

.footer {
    text-align: center;
    padding: 20px;
    font-size: 12px;
    color: var(--text-dim);
    border-top: 1px solid var(--border);
    margin-top: 20px;
}

/* Responsive */
@media (max-width: 900px) {
    .main-layout {
        grid-template-columns: 1fr;
    }

    .predict-panel {
        position: static;
    }

    .control-inner {
        flex-direction: column;
        align-items: stretch;
    }

    .control-actions {
        width: 100%;
    }

    .search-input {
        flex: 1;
        width: auto;
    }
}
