/* =========================================
   H2H STATS PAGE - TOPBETPREDICT STYLE
========================================= */

.h2h-wrap,
.h2h-pro-wrap {
    width: 100%;
    max-width: none;
    margin: 0;
    color: #e8edf7;
}

.pp-main {
    min-width: 0;
}

/* =========================
   PAGE TITLE / HERO
========================= */

.h2h-page-title {
    margin: 0 0 18px;
    color: #ffffff;
    font-size: 34px;
    line-height: 1.08;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.h2h-pro-hero {
    position: relative;
    overflow: hidden;
    margin-bottom: 18px;
    padding: 28px;
    border-radius: 22px;
    background:
        radial-gradient(circle at 15% 20%, rgba(79, 140, 255, 0.22), transparent 32%),
        radial-gradient(circle at 92% 50%, rgba(250, 204, 21, 0.12), transparent 26%),
        linear-gradient(135deg, #0d1834 0%, #091225 100%);
    border: 1px solid rgba(80, 140, 255, 0.24);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
}

.h2h-pro-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(255,255,255,0.03), transparent 45%),
        radial-gradient(circle at 70% 0%, rgba(255,255,255,0.06), transparent 35%);
    pointer-events: none;
}

.h2h-pro-hero > * {
    position: relative;
    z-index: 1;
}

.h2h-pro-hero span {
    display: block;
    margin-bottom: 8px;
    color: #9ec2ff;
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 950;
    letter-spacing: 0.08em;
}

.h2h-pro-hero h1 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(30px, 3vw, 42px);
    line-height: 1.05;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.h2h-pro-hero p {
    max-width: 760px;
    margin: 10px 0 0;
    color: #cbd8ef;
    font-size: 14px;
    line-height: 1.55;
    font-weight: 600;
}

/* =========================
   FILTER BAR FIX
========================= */

.h2h-pro-wrap .pp-filterbar,
.h2h-wrap .pp-filterbar,
.pp-filterbar.h2h-filterbar {
    background: #152142;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 18px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    box-shadow: 0 14px 30px rgba(0,0,0,0.18);
}

.h2h-pro-wrap .pp-filter-tabs,
.h2h-wrap .pp-filter-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.h2h-pro-wrap .pp-tab,
.h2h-wrap .pp-tab {
    min-height: 34px;
    padding: 0 14px;
    border-radius: 12px;
    background: #ececec;
    color: #16213b;
    border: 0;
    font-size: 11px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    box-shadow: none;
}

.h2h-pro-wrap .pp-tab.active,
.h2h-wrap .pp-tab.active {
    background: #4f8cff;
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(79, 140, 255, 0.22);
}

.h2h-pro-wrap .pp-tab:hover,
.h2h-wrap .pp-tab:hover {
    transform: translateY(-1px);
}

.h2h-pro-wrap .pp-date-arrow,
.h2h-pro-wrap .pp-date-current,
.h2h-wrap .pp-date-arrow,
.h2h-wrap .pp-date-current {
    background: #ececec;
    color: #111827;
    border: 0;
    box-shadow: none;
}

.h2h-pro-wrap .pp-date-arrow:hover,
.h2h-pro-wrap .pp-date-current:hover,
.h2h-wrap .pp-date-arrow:hover,
.h2h-wrap .pp-date-current:hover {
    background: #ffffff;
}

/* =========================
   OLD SIMPLE CARD SUPPORT
========================= */

.h2h-pro-card,
.h2h-pro-card,
.h2h-pro-card {
    display: block;
}

.h2h-pro-card,
.h2h-pro-card,
.h2h-pro-card,
.h2h-pro-card,
.h2h-pro-card,
.h2h-pro-card,
.h2h-pro-card,
.h2h-pro-card,
.h2h-pro-card,
.h2h-pro-card,
.h2h-pro-card,
.h2h-pro-card {
    width: 100%;
}

.h2h-pro-card,
.h2h-pro-card,
.h2h-pro-card,
.h2h-pro-card,
.h2h-pro-card,
.h2h-pro-card,
.h2h-pro-card {
    margin-bottom: 22px;
}

.h2h-pro-card,
.h2h-pro-card,
.h2h-pro-card,
.h2h-pro-card,
.h2h-pro-card,
.h2h-pro-card,
.h2h-pro-card,
.h2h-pro-card,
.h2h-pro-card,
.h2h-pro-card,
.h2h-pro-card,
.h2h-pro-card,
.h2h-pro-card,
.h2h-pro-card,
.h2h-pro-card,
.h2h-pro-card,
.h2h-pro-card {
    overflow: hidden;
    border-radius: 22px;
    color: #ffffff;
    background: linear-gradient(180deg, #111c3a 0%, #0f1730 100%);
    border: 1px solid rgba(80, 140, 255, 0.20);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.24);
}

.h2h-pro-card,
.h2h-pro-card * {
    box-sizing: border-box;
}

/* legacy simple */
.h2h-pro-card {
    background: linear-gradient(180deg, #111c3a 0%, #0f1730 100%);
}

.h2h-pro-teams {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 18px;
    padding: 20px;
    background:
        radial-gradient(circle at top left, rgba(79, 140, 255, 0.13), transparent 30%),
        linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.02));
    border-bottom: 1px solid rgba(255,255,255,0.07);
}

.h2h-team {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 950;
}

.h2h-team.right {
    justify-content: flex-end;
    text-align: right;
}

.h2h-team img {
    width: 46px;
    height: 46px;
    object-fit: contain;
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    padding: 5px;
}

.h2h-vs {
    min-width: 72px;
    text-align: center;
    color: #ffffff;
    font-size: 26px;
    font-weight: 950;
}

.h2h-played {
    text-align: center;
    padding: 10px;
    color: #b7c8e8;
    font-size: 13px;
    font-weight: 900;
    background: rgba(255,255,255,0.025);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

/* =========================
   PRO TOP AREA
========================= */

.h2h-pro-top {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 18px;
    padding: 20px;
    background:
        radial-gradient(circle at top left, rgba(79, 140, 255, 0.13), transparent 30%),
        linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.02));
    border-bottom: 1px solid rgba(255,255,255,0.07);
}

.h2h-pro-team {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.h2h-pro-team.away {
    justify-content: flex-end;
    text-align: right;
}

.h2h-pro-team img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    padding: 5px;
    flex: 0 0 48px;
}

.h2h-pro-team strong {
    display: block;
    color: #ffffff;
    font-size: 15px;
    font-weight: 950;
    line-height: 1.15;
    overflow: hidden;
    text-overflow: ellipsis;
}

.h2h-pro-team span,
.h2h-pro-mid span,
.h2h-pro-mid em {
    display: block;
    margin-top: 4px;
    color: #9fb0c7;
    font-size: 11px;
    font-style: normal;
    font-weight: 800;
}

.h2h-pro-mid {
    text-align: center;
    min-width: 150px;
}

.h2h-pro-mid b {
    display: block;
    margin: 7px 0;
    color: #ffffff;
    font-size: 28px;
    font-weight: 950;
    line-height: 1;
}

/* =========================
   RESULT CARDS
========================= */

.h2h-result-grid,
.h2h-result-pro {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    padding: 16px;
    text-align: center;
    background: transparent;
}

.h2h-result-grid div,
.h2h-result-pro div {
    min-height: 98px;
    padding: 16px;
    border-radius: 16px;
    background: rgba(255,255,255,0.045);
    border: 1px solid rgba(255,255,255,0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #ffffff;
}

.h2h-result-grid div.hot,
.h2h-result-pro div.hot {
    background: linear-gradient(135deg, rgba(79, 140, 255, 0.22), rgba(34, 197, 94, 0.10));
    border-color: rgba(79, 140, 255, 0.35);
}

.h2h-result-grid span,
.h2h-result-pro span {
    display: block;
    color: #9fc1ff;
    font-size: 12px;
    font-weight: 900;
}

.h2h-result-grid strong,
.h2h-result-pro strong {
    display: block;
    margin-top: 2px;
    color: #ffffff;
    font-size: 30px;
    line-height: 1;
    font-weight: 950;
}

.h2h-result-grid small,
.h2h-result-pro small {
    color: #6dff9d;
    font-size: 14px;
    font-weight: 950;
}

/* =========================
   RESULT BAR
========================= */

.h2h-bars {
    display: flex;
    height: 8px;
    margin: 0 16px 16px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255,255,255,0.10);
}

.h2h-bars div:nth-child(1) {
    background: #4f8cff;
}

.h2h-bars div:nth-child(2) {
    background: #94a3b8;
}

.h2h-bars div:nth-child(3) {
    background: #22c55e;
}

/* =========================
   STATS TABLE - PRO
========================= */

.h2h-stat-table-pro {
    padding: 0 16px 16px;
}

.h2h-stat-head,
.h2h-stat-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1.5fr 1fr 1fr;
    align-items: center;
    text-align: center;
}

.h2h-stat-head {
    padding: 12px 10px;
    color: #9fc1ff;
    font-size: 11px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: rgba(5, 12, 28, 0.72);
    border-radius: 14px 14px 0 0;
}

.h2h-stat-row {
    padding: 13px 10px;
    background: rgba(255,255,255,0.035);
    border-top: 1px solid rgba(255,255,255,0.06);
}

.h2h-stat-row:nth-child(even) {
    background: rgba(255,255,255,0.05);
}

.h2h-stat-row span {
    color: #ffffff;
    font-size: 14px;
    font-weight: 900;
}

.h2h-stat-row strong {
    color: #dbe8ff;
    font-size: 13px;
    font-weight: 950;
}

/* Legacy table */
.h2h-stat-table {
    border-top: 1px solid rgba(255,255,255,0.07);
}

.h2h-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1.6fr 1fr 1fr;
    align-items: center;
    text-align: center;
    min-height: 42px;
    padding: 0 10px;
    background: rgba(255,255,255,0.035);
    border-top: 1px solid rgba(255,255,255,0.06);
}

.h2h-row:nth-child(even) {
    background: rgba(255,255,255,0.05);
}

.h2h-row.head {
    color: #9fc1ff;
    background: rgba(5, 12, 28, 0.72);
    font-size: 11px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.h2h-row strong {
    color: #dbe8ff;
    font-size: 13px;
    font-weight: 950;
}

.h2h-row span {
    color: #ffffff;
    font-weight: 900;
}

/* =========================
   TREND CARDS
========================= */

.h2h-trend-pro {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    padding: 0 16px 16px;
    background: transparent;
}

.h2h-trend-pro div {
    padding: 14px;
    border-radius: 16px;
    background: rgba(255,255,255,0.045);
    border: 1px solid rgba(255,255,255,0.08);
    color: #ffffff;
}

.h2h-trend-pro span {
    display: block;
    color: #9fc1ff;
    font-size: 12px;
    font-weight: 900;
    line-height: 1.25;
}

.h2h-trend-pro strong {
    display: block;
    margin-top: 6px;
    color: #ffffff;
    font-size: 20px;
    font-weight: 950;
    line-height: 1.05;
}

.h2h-trend-pro em {
    display: block;
    margin-top: 3px;
    color: #6dff9d;
    font-size: 14px;
    font-style: normal;
    font-weight: 950;
}

/* =========================
   STREAKS
========================= */

.h2h-streak {
    grid-column: span 2;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.02em;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.045);
}

.streak-win {
    background: rgba(34,197,94,0.13);
    color: #75ff9e;
}

.streak-away {
    background: rgba(79,140,255,0.15);
    color: #9fc1ff;
}

.streak-draw {
    background: rgba(148,163,184,0.15);
    color: #dbe8ff;
}

.streak-btts {
    background: rgba(79,140,255,0.14);
    color: #9fc1ff;
}

.streak-over {
    background: rgba(250,204,21,0.13);
    color: #facc15;
}

/* =========================
   CTA BUTTONS
========================= */

.h2h-open-pro,
.h2h-open-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 18px;
    text-align: center;
    color: #ffffff;
    font-size: 14px;
    font-weight: 950;
    background: #4f8cff;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.h2h-open-pro:hover,
.h2h-open-btn:hover {
    background: #3f7ef8;
}

.h2h-loadmore-wrap {
    display: flex;
    justify-content: center;
    margin: 28px 0 40px;
}

.h2h-loadmore-btn {
    min-height: 44px;
    padding: 0 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: #4f8cff;
    color: #ffffff;
    font-weight: 950;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(79,140,255,0.20);
}

.h2h-loadmore-btn:hover {
    background: #3f7ef8;
}

/* =========================
   PAGINATION
========================= */

.h2h-pagination {
    margin-top: 25px;
}

/* =========================
   MOBILE
========================= */

@media (max-width: 980px) {
    .h2h-pro-top,
    .h2h-pro-teams {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 14px;
    }

    .h2h-pro-team,
    .h2h-pro-team.away,
    .h2h-team,
    .h2h-team.right {
        justify-content: center;
        text-align: center;
    }

    .h2h-pro-mid {
        min-width: 0;
    }

    .h2h-result-grid,
    .h2h-result-pro {
        grid-template-columns: 1fr;
    }

    .h2h-trend-pro {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .h2h-pro-hero {
        padding: 22px;
        border-radius: 18px;
    }

    .h2h-pro-hero h1 {
        font-size: 30px;
    }

    .h2h-pro-hero p {
        font-size: 13px;
    }

    .h2h-pro-wrap .pp-filterbar,
    .h2h-wrap .pp-filterbar {
        padding: 10px;
        border-radius: 16px;
    }

    .h2h-pro-wrap .pp-filter-tabs,
    .h2h-wrap .pp-filter-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 2px;
    }

    .h2h-pro-wrap .pp-tab,
    .h2h-wrap .pp-tab {
        flex: 0 0 auto;
        min-height: 32px;
        padding: 0 12px;
        font-size: 10px;
    }

    .h2h-pro-card {
        border-radius: 18px;
    }

    .h2h-pro-top,
    .h2h-pro-teams {
        padding: 16px;
    }

    .h2h-pro-team img,
    .h2h-team img {
        width: 42px;
        height: 42px;
    }

    .h2h-pro-team strong {
        font-size: 14px;
    }

    .h2h-pro-mid b,
    .h2h-vs {
        font-size: 24px;
    }

    .h2h-result-grid,
    .h2h-result-pro {
        padding: 12px;
    }

    .h2h-result-grid div,
    .h2h-result-pro div {
        min-height: 82px;
        padding: 14px;
    }

    .h2h-result-grid strong,
    .h2h-result-pro strong {
        font-size: 26px;
    }

    .h2h-stat-table-pro {
        padding: 0 12px 12px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .h2h-stat-head,
    .h2h-stat-row {
        min-width: 520px;
        grid-template-columns: 0.8fr 0.9fr 1.4fr 0.9fr 0.8fr;
        font-size: 12px;
    }

    .h2h-stat-row span {
        font-size: 13px;
    }

    .h2h-stat-row strong {
        font-size: 12px;
    }

    .h2h-row {
        min-width: 520px;
        grid-template-columns: 0.8fr 0.9fr 1.4fr 0.9fr 0.8fr;
        font-size: 12px;
    }

    .h2h-stat-table {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .h2h-trend-pro {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        padding: 0 12px 12px;
    }

    .h2h-trend-pro div {
        padding: 12px;
    }

    .h2h-trend-pro strong {
        font-size: 18px;
    }

    .h2h-open-pro,
    .h2h-open-btn {
        min-height: 46px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .h2h-trend-pro {
        grid-template-columns: 1fr;
    }
}