/* Страница матча / прогноза */
.match-page-hero {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 16px;
    position: relative;
    overflow: hidden;
}
.match-page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 0%, var(--accent-soft), transparent 70%);
    pointer-events: none;
}
.match-page-hero .league-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-bottom: 16px;
    position: relative;
}
.match-teams-large {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    position: relative;
}
.match-teams-large .team-block {
    flex: 1;
    text-align: center;
    max-width: 140px;
}
.match-teams-large .team-block .team-name {
    font-weight: 700;
    font-size: 1rem;
    margin-top: 8px;
}
.match-teams-large .score-block {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 2px 6px;
    font-family: var(--font-mono);
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
    min-width: 88px;
    text-align: center;
}
.match-teams-large .score-block .score-num,
.match-teams-large .score-block .score-sep {
    display: inline-block;
    line-height: 1;
}
.match-teams-large .vs-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.match-meta-row {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 14px;
    font-size: 0.75rem;
    color: var(--text-tertiary);
    flex-wrap: wrap;
}
.match-meta-row .live-badge {
    color: var(--red);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
}
.match-meta-row .live-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--red);
    animation: pulse 1.5s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}
.odds-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-bottom: 12px;
}
.odds-section h4 {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-tertiary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.odds-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.odds-grid .odds-btn {
    min-width: 72px;
}
.odds-grid.odds-1x2-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    flex-wrap: unset;
}
.odds-grid.odds-1x2-row .odds-btn {
    min-width: 0;
    width: 100%;
}
.odds-bk-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    width: 100%;
}
.odds-bk-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 4px;
    border-radius: var(--radius-xs);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
}
.odds-bk-label {
    font-size: 0.62rem;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
}
.odds-bk-value {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 700;
}
.odds-empty {
    text-align: center;
    padding: 24px;
    color: var(--text-tertiary);
    font-size: 0.85rem;
}
.odds-empty a { color: var(--accent); }
.prediction-detail-card {
    background: linear-gradient(135deg, var(--bg-card), var(--bg-elevated));
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-lg);
    padding: 18px;
    margin-bottom: 16px;
}
.prediction-detail-card .author-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.prediction-detail-card .pick-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.prediction-detail-card .pick-odds {
    font-family: var(--font-mono);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--accent);
}
.prediction-detail-card .confidence-pill {
    font-size: 0.72rem;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 600;
}
.match-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}
.match-stat-item {
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    padding: 12px;
    text-align: center;
}
.match-stat-item .val {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1.1rem;
}
.match-stat-item .lbl {
    font-size: 0.65rem;
    color: var(--text-tertiary);
    margin-top: 4px;
    text-transform: uppercase;
}
.comments-block {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
}
.comment-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
}
.comment-item:last-child { border-bottom: none; }
.comment-form textarea {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.85rem;
    resize: vertical;
    margin-bottom: 10px;
}
.comment-form button {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 10px 22px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
}

/* Форма прогноза на странице матча */
.match-prediction-box {
    background: var(--bg-card);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-lg);
    padding: 18px;
    margin-bottom: 20px;
}
.match-prediction-box.muted {
    border-color: var(--border);
    text-align: center;
    color: var(--text-tertiary);
    font-size: 0.85rem;
}
.match-prediction-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 8px;
}
.match-prediction-head h3 { margin: 0; font-size: 1rem; }
.match-prediction-hint { font-size: 0.72rem; color: var(--text-tertiary); }
.odds-section-pick { margin-bottom: 12px; }
.odds-section-pick h4 { margin-bottom: 8px; }
.match-prediction-meta {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border-light);
}
.picked-summary {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 12px;
    min-height: 1.2em;
}
.confidence-field label { font-size: 0.75rem; color: var(--text-tertiary); }
.confidence-slider { width: 100%; accent-color: var(--accent); margin: 8px 0 12px; }
.analysis-field {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.85rem;
    margin-bottom: 12px;
    resize: vertical;
}
.match-pred-submit { width: 100%; justify-content: center; }
.pred-flash {
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    font-size: 0.85rem;
}
.pred-flash.success { background: var(--green-soft); }
.pred-flash.error { background: var(--red-soft); color: var(--red); }
.status-pill { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; }
.prediction-analysis { margin-top: 14px; font-size: 0.88rem; line-height: 1.65; color: var(--text-secondary); }
.comment-head { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.comment-time { font-size: 0.7rem; color: var(--text-muted); margin-left: auto; }
.comment-text { font-size: 0.85rem; margin-left: 36px; }
.comments-empty { color: var(--text-tertiary); font-size: 0.85rem; }
.match-comment-form { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.odds-extra-row { flex-wrap: wrap; }
.odds-extra-row .odds-btn { min-width: calc(33% - 6px); flex: 1; }

/* Хлебные крошки */
.match-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    color: var(--text-tertiary);
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.match-breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
}
.match-breadcrumb a:hover { color: var(--accent); }
.match-breadcrumb-current {
    color: var(--text-primary);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 200px;
}

/* Баннер результата */
.match-page-hero--finished::before {
    background: radial-gradient(ellipse at 50% 0%, rgba(34, 197, 94, 0.15), transparent 70%);
}
.match-page-hero--live::before {
    background: radial-gradient(ellipse at 50% 0%, rgba(239, 68, 68, 0.12), transparent 70%);
}
.match-result-banner {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    margin-bottom: 14px;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(34, 197, 94, 0.05));
    border: 1px solid rgba(34, 197, 94, 0.35);
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--green);
    position: relative;
}
.match-hero-actions {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
}
.match-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    font-size: 0.72rem;
    font-weight: 600;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}
.match-share-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* Победитель */
.team-block--winner .team-name { color: var(--green); }
.team-block--winner .team-logo,
.team-block--winner .team-logo-fallback {
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25);
    border-radius: 8px;
}
.team-winner-badge {
    display: inline-flex;
    color: var(--amber);
    margin-top: 4px;
}
.score-block--final {
    display: inline-flex;
    flex-wrap: wrap;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 2px 6px;
}
.score-block--final .score-num {
    font-family: var(--font-mono);
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}
.score-num--winner { color: var(--green); }
.score-sep { font-size: 1.5rem; color: var(--text-muted); line-height: 1; }
.score-ht {
    flex-basis: 100%;
    width: 100%;
    text-align: center;
    font-size: 0.65rem;
    color: var(--text-tertiary);
    font-weight: 500;
    margin-top: 2px;
}
.match-pred-count {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Распределение прогнозов */
.match-pred-distribution {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-bottom: 16px;
}
.match-pred-distribution h4 {
    font-size: 0.78rem;
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
}
.pred-dist-bars { display: flex; flex-direction: column; gap: 8px; }
.pred-dist-row {
    display: grid;
    grid-template-columns: 1fr 2fr auto;
    align-items: center;
    gap: 10px;
    font-size: 0.75rem;
}
.pred-dist-row--winner .pred-dist-label { color: var(--green); font-weight: 700; }
.pred-dist-bar {
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
}
.pred-dist-bar span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-soft));
    border-radius: 3px;
    transition: width 0.4s ease;
}
.pred-dist-row--winner .pred-dist-bar span { background: var(--green); }
.pred-dist-pct {
    font-family: var(--font-mono);
    font-weight: 700;
    min-width: 32px;
    text-align: right;
    color: var(--text-tertiary);
}

.match-insight-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-bottom: 16px;
}
.match-insight-badge,
.match-insight-meta {
    font-size: 0.72rem;
    color: var(--text-tertiary);
}
.glicko-prob-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}
.glicko-prob-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px;
    text-align: center;
}
.glicko-prob-card.active {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent-glow) inset;
}
.glicko-prob-card strong {
    display: block;
    font-size: 1.3rem;
    font-family: var(--font-mono);
}
.glicko-prob-card small,
.glicko-prob-label {
    color: var(--text-tertiary);
}
.glicko-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}
.glicko-summary div,
.mini-standings-card,
.h2h-summary-card,
.team-form-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px;
}
.glicko-summary span,
.mini-standings-metrics,
.h2h-summary-card span {
    display: block;
    font-size: 0.72rem;
    color: var(--text-tertiary);
}
.glicko-summary strong {
    display: block;
    margin-top: 4px;
}
.value-bet-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}
.value-bet-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px;
    text-align: center;
}
.value-bet-card.active {
    border-color: var(--green);
    box-shadow: 0 0 0 1px rgba(74, 222, 128, 0.2) inset;
}
.value-bet-card span {
    display: block;
    color: var(--text-tertiary);
    font-size: 0.72rem;
}
.value-bet-card strong {
    display: block;
    margin-top: 4px;
    font-family: var(--font-mono);
    font-size: 1.1rem;
}
.mini-standings-compare,
.h2h-summary,
.team-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.mini-standings-team {
    font-weight: 700;
    margin-bottom: 8px;
}
.mini-standings-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.h2h-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 12px;
}
.h2h-summary-card {
    text-align: center;
}
.h2h-summary-card strong {
    display: block;
    font-size: 1.25rem;
    font-family: var(--font-mono);
}
.h2h-list,
.team-form-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.h2h-row,
.team-form-row {
    display: block;
    text-decoration: none;
    color: inherit;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 10px 12px;
}
.h2h-row:hover,
.team-form-row:hover {
    border-color: var(--border-active);
}
.h2h-row__meta,
.team-form-row {
    font-size: 0.74rem;
    color: var(--text-tertiary);
}
.h2h-row__meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 4px;
}
.h2h-row__teams {
    font-weight: 600;
    color: var(--text-primary);
}
.h2h-row__score {
    margin-top: 4px;
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--accent);
}
.team-form-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}
.team-form-head a {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.72rem;
}
.form-badges {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
}
.form-badge {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.72rem;
    font-weight: 700;
    color: #fff;
}
.form-badge--w { background: var(--green); }
.form-badge--d { background: var(--amber); color: #111; }
.form-badge--l { background: var(--red); }
.team-form-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
}
.team-form-row span:nth-child(2) {
    color: var(--text-primary);
}
.team-form-row strong {
    color: var(--accent);
    font-family: var(--font-mono);
}

@media (max-width: 767px) {
    .glicko-prob-grid,
    .value-bet-grid,
    .glicko-summary,
    .mini-standings-compare,
    .h2h-summary,
    .team-form-grid,
    .team-form-row {
        grid-template-columns: 1fr;
    }
}

/* Прогнозы сообщества на матче */
.match-community-preds {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}
.community-pred-mini {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: inherit;
    transition: border-color var(--transition-fast);
}
.community-pred-mini:hover { border-color: var(--accent); }
.community-pred-mini-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.community-pred-author { font-size: 0.78rem; font-weight: 600; }
.community-pred-pick { font-size: 0.72rem; color: var(--accent); }
.community-pred-status {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
}
.community-pred-status.won { background: var(--green-soft); color: var(--green); }
.community-pred-status.lost { background: var(--red-soft); color: var(--red); }
.community-pred-status.pending { background: var(--amber-soft); color: var(--amber); }

/* Связанные матчи */
.related-matches-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px;
    margin-bottom: 16px;
}
.related-match-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: inherit;
    transition: all var(--transition-fast);
}
.related-match-card:hover {
    border-color: var(--accent);
    transform: translateY(-1px);
}
.related-match-date { font-size: 0.68rem; color: var(--text-tertiary); }
.related-match-teams { font-size: 0.78rem; font-weight: 600; line-height: 1.3; }

/* Подсветка выигравшего исхода в линии */
.odds-winner,
.odds-btn.odds-winner,
.odds-bk-cell.odds-winner {
    border-color: var(--green) !important;
    background: var(--green-soft) !important;
}
.odds-winner .odds-label,
.odds-winner .odds-bk-label { color: var(--green); font-weight: 700; }
.odds-winner .odds-val,
.odds-winner .odds-bk-value { color: var(--green); }

@media (max-width: 500px) {
    .match-hero-actions { position: static; margin-bottom: 10px; text-align: right; }
    .match-teams-large { gap: 10px; }
    .match-teams-large .score-block .score-num { font-size: 1.5rem; }
}
