/* Карточки матчей — новый дизайн */
.matches-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 800px;
    margin: 0 auto;
}

.search-results .matches-container {
    max-width: 100%;
    margin: 0;
}

.match-card-new {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 12px 16px;
    transition: all 0.2s;
    cursor: pointer;
    text-align: left;
    width: 100%;
    color: inherit;
    font: inherit;
    box-sizing: border-box;
}

.match-card-new:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(102, 126, 234, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.match-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 3;
    min-width: 0;
}

.match-flag {
    font-size: 20px;
    width: 36px;
    text-align: center;
    flex-shrink: 0;
    line-height: 1.1;
}

.match-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.match-league-new {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.match-main-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    row-gap: 4px;
    width: 100%;
}

.match-teams-new {
    font-size: 15px;
    font-weight: 500;
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1 1 140px;
    min-width: 0;
}

.match-inline-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    flex-shrink: 0;
}

.match-time-part {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    white-space: nowrap;
}

.match-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.match-probability {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.prob-main {
    font-size: 16px;
    font-weight: 600;
    color: #00d2ff;
    min-width: 42px;
    text-align: right;
}

.match-card-new .prob-label {
    display: none;
}

.prob-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
}

@media (max-width: 600px) {
    .match-main-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .match-inline-meta {
        margin-left: 0;
    }
}

.match-arrow {
    color: rgba(255, 255, 255, 0.3);
    font-size: 20px;
    transition: transform 0.2s;
}

.match-card-new:hover .match-arrow {
    transform: translateX(4px);
    color: #667eea;
}

.match-status {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
}

.status-live {
    background: rgba(255, 68, 68, 0.2);
    color: #ff4444;
    border: 1px solid rgba(255, 68, 68, 0.3);
}

.status-scheduled {
    background: rgba(255, 200, 0, 0.15);
    color: #ffc800;
    border: 1px solid rgba(255, 200, 0, 0.3);
}

.status-finished {
    background: rgba(0, 255, 136, 0.1);
    color: #00ff88;
    border: 1px solid rgba(0, 255, 136, 0.2);
}

/* Страница деталей матча (не конфликтует с вкладками главного экрана) */
.match-details-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 20px;
}

.back-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 16px;
    cursor: pointer;
    padding: 10px 0;
    margin-bottom: 20px;
}

.back-btn:hover {
    color: white;
}

.match-header-detail {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 24px;
    margin-bottom: 24px;
}

.match-flag-large {
    font-size: 40px;
    line-height: 1.1;
    flex-shrink: 0;
    letter-spacing: 1px;
}

.match-league-detail {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.match-teams-detail {
    font-size: 24px;
    font-weight: 600;
    margin: 8px 0 4px;
}

.match-time-detail {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.45);
}

.match-status-detail {
    margin-left: auto;
    flex-shrink: 0;
}

.top-predictions-block {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.block-title {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 16px;
    color: rgba(255, 255, 255, 0.8);
}

.predictions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.prediction-item {
    padding: 16px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.prediction-name {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.prediction-value {
    font-size: 24px;
    font-weight: 700;
    color: #00d2ff;
}

.probabilities-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.prob-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    cursor: default;
    transition: all 0.2s;
}

.prob-row:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(102, 126, 234, 0.2);
}

.prob-name {
    font-size: 15px;
    padding-right: 12px;
}

.prob-values {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.prob-number {
    font-size: 20px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.05);
}

.prob-number.high {
    background: rgba(0, 255, 136, 0.15);
    color: #00ff88;
}

.prob-number.medium {
    background: rgba(255, 200, 0, 0.15);
    color: #ffc800;
}

.prob-number.low {
    background: rgba(255, 100, 100, 0.15);
    color: #ff6b6b;
}

.confidence-badge {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
}

.match-forecast-tabs-wrap {
    margin: 24px 0;
}

.match-forecast-tabs {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 12px;
    flex-wrap: wrap;
}

.mft-tab {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    padding: 10px 20px;
    font-size: 15px;
    cursor: pointer;
    border-radius: 30px;
    transition: all 0.2s;
}

.mft-tab:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.mft-tab.active {
    background: #667eea;
    color: white;
}

.mft-panel {
    display: none;
    padding: 20px 0;
}

.mft-panel.active {
    display: block;
}

.match-detail-ai-row {
    margin-top: 20px;
}

.btn-ai-match {
    width: 100%;
    padding: 14px 18px;
    border-radius: 16px;
    border: 1px solid rgba(0, 210, 255, 0.35);
    background: rgba(0, 210, 255, 0.08);
    color: #00d2ff;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.btn-ai-match:hover {
    background: rgba(0, 210, 255, 0.15);
    border-color: rgba(0, 210, 255, 0.55);
}

/* Экспресс-бандлы: статистика */
.bundle-stats {
    margin: 12px 0 14px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.75);
}

.bundle-stats .stat-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.bundle-stats .stat-row:last-child {
    border-bottom: none;
}

.bundle-stats .stat-row.success span:last-child {
    color: #00ff88;
    font-weight: 600;
}

.bundle-progress-dual {
    display: flex;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
    margin: 10px 0 14px;
}

.bundle-progress-dual .bp-seg {
    height: 100%;
    transition: width 0.25s ease;
}

.bundle-progress-dual .bp-success {
    background: linear-gradient(90deg, #00c853, #00ff88);
}

.bundle-progress-dual .bp-miss {
    background: rgba(255, 200, 0, 0.65);
}

.bundle-progress-dual .bp-rest {
    background: rgba(255, 255, 255, 0.12);
}

.forecast-detail-score-inline {
    font-size: 22px;
    font-weight: 600;
    color: #00d2ff;
    margin: 8px 0;
}

/* Компактные карточки «Мои экспрессы» */
.express-bundle-compact {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    padding: 16px;
    margin-bottom: 12px;
    border-left: 4px solid #667eea;
    transition: background 0.2s, border-color 0.2s;
}

.express-bundle-compact.win {
    border-left-color: #00ff88;
    background: rgba(0, 255, 136, 0.04);
}

.express-bundle-compact.lose {
    border-left-color: #ff6b6b;
    background: rgba(255, 107, 107, 0.05);
}

.express-bundle-compact.pending {
    border-left-color: #ffc800;
}

.express-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    gap: 10px;
}

.express-date {
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
}

.express-status {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
}

.express-stats-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 20px;
    margin-bottom: 12px;
    align-items: flex-end;
}

.express-stats-row .stat-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.express-stats-row .stat-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.express-stats-row .stat-value {
    font-size: 18px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.92);
}

.express-stats-row .stat-value.highlight {
    color: #00d2ff;
}

.stat-item-oval-wrap {
    align-items: center;
}

.express-accuracy-oval {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.express-accuracy-oval.success {
    border-color: rgba(0, 255, 136, 0.45);
    background: rgba(0, 255, 136, 0.12);
    color: #00ff88;
}

.express-accuracy-oval.fail {
    border-color: rgba(255, 107, 107, 0.45);
    background: rgba(255, 107, 107, 0.1);
    color: #ff6b6b;
}

.express-accuracy-oval.muted {
    opacity: 0.5;
    font-weight: 500;
}

.express-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.express-legs {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.55);
}

.btn-details {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    transition: background 0.2s, border-color 0.2s;
}

.btn-details:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: #667eea;
}
