/* ============================================================
   STATISZTIKÁK — PREMIUM TACTICAL ARCHIVE LAYER
   Külön, utolsóként betöltődő vizuális réteg. A statisztikai
   adatokhoz és a működéshez nem nyúl.
   ============================================================ */

.stats-body {
    --stp-gold: #e7bd61;
    --stp-gold-bright: #ffe7a2;
    --stp-cyan: #57d8f0;
    --stp-blue: #438cff;
    --stp-violet: #9c70ff;
    --stp-line: rgba(119, 187, 214, 0.18);
    --stp-panel: rgba(5, 12, 21, 0.94);
    --stp-panel-deep: rgba(2, 7, 13, 0.97);
    min-height: 100vh;
    padding: 0;
    background:
        radial-gradient(circle at 11% 25%, rgba(52, 135, 185, 0.14), transparent 27%),
        radial-gradient(circle at 88% 58%, rgba(131, 77, 194, 0.11), transparent 29%),
        linear-gradient(145deg, #02060c 0%, #07111b 47%, #02050a 100%);
    color: #e9f1f4;
}

.stats-body::before {
    inset: 72px 0 0;
    opacity: 0.26;
    background-image:
        linear-gradient(rgba(87, 216, 240, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(87, 216, 240, 0.03) 1px, transparent 1px),
        radial-gradient(circle, rgba(124, 216, 241, 0.7) 0 1px, transparent 1.5px);
    background-size: 52px 52px, 52px 52px, 230px 230px;
    animation: stpGridDrift 28s linear infinite;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 15%, #000 82%, transparent);
    mask-image: linear-gradient(to bottom, transparent 0, #000 15%, #000 82%, transparent);
}

.stats-body::after {
    inset: 72px 0 0;
    opacity: 0.45;
    background:
        radial-gradient(circle at 50% 2%, rgba(87, 216, 240, 0.12), transparent 33%),
        linear-gradient(90deg, rgba(1, 5, 10, 0.85), transparent 8%, transparent 92%, rgba(1, 5, 10, 0.85));
    animation: none;
    transform: none;
}

#stats-wrapper {
    width: min(100%, 1780px);
    max-width: none;
    box-sizing: border-box;
    margin: 0 auto;
    padding: 30px clamp(20px, 3vw, 58px) 76px;
}

/* ---------- Parancsnoki fejléc ---------- */

.stp-command-hero {
    position: relative;
    isolation: isolate;
    min-height: 260px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 48px;
    margin-bottom: 18px;
    padding: 38px clamp(34px, 5vw, 82px);
    box-sizing: border-box;
    overflow: hidden;
    border: 1px solid rgba(231, 189, 97, 0.3);
    background-image:
        linear-gradient(90deg, rgba(2, 8, 15, 0.98) 0%, rgba(4, 13, 23, 0.91) 45%, rgba(4, 10, 18, 0.5) 76%, rgba(2, 7, 13, 0.91) 100%),
        url("../image/backgrounds/battlev3_vs.webp");
    background-position: center;
    background-size: cover;
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.42), inset 0 0 90px rgba(0, 0, 0, 0.5);
    clip-path: polygon(0 0, calc(100% - 28px) 0, 100% 28px, 100% 100%, 28px 100%, 0 calc(100% - 28px));
}

.stp-command-hero::before {
    content: "";
    position: absolute;
    inset: 10px;
    z-index: -1;
    border: 1px solid rgba(87, 216, 240, 0.13);
    clip-path: inherit;
}

.stp-command-hero::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 2%, var(--stp-blue), var(--stp-gold), var(--stp-violet), transparent 98%);
    box-shadow: 0 0 20px rgba(87, 216, 240, 0.55);
}

.stp-command-copy { max-width: 830px; }

.stp-eyebrow {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--stp-cyan);
    font: 700 0.65rem/1 "Montserrat", sans-serif;
    letter-spacing: 0.23em;
    text-transform: uppercase;
}

.stp-eyebrow span {
    width: 36px;
    height: 1px;
    background: linear-gradient(90deg, transparent, currentColor);
}

.stp-eyebrow span:last-child { background: linear-gradient(90deg, currentColor, transparent); }

.stp-command-hero h1 {
    margin: 12px 0 10px;
    color: #f5f0e7;
    font: 400 clamp(2.8rem, 4.8vw, 5.2rem)/1 "AOW", serif;
    letter-spacing: 0.035em;
    text-transform: uppercase;
    text-shadow: 0 7px 30px rgba(0, 0, 0, 0.78);
}

.stp-command-copy > p {
    max-width: 740px;
    margin: 0;
    color: rgba(207, 224, 231, 0.69);
    font-size: 0.96rem;
    line-height: 1.65;
}

.stp-command-status {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 26px;
    margin-top: 23px;
    color: rgba(185, 207, 216, 0.52);
    font: 700 0.59rem/1 "Montserrat", sans-serif;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.stp-command-status span { display: inline-flex; align-items: center; gap: 7px; }

.stp-command-status i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #67f2b3;
    box-shadow: 0 0 10px #67f2b3;
    animation: stpPulse 2.5s ease-in-out infinite;
}

.stp-scan-core {
    position: relative;
    width: 168px;
    height: 168px;
    flex: 0 0 168px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(87, 216, 240, 0.26);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(67, 140, 255, 0.15), rgba(3, 9, 16, 0.82) 58%, rgba(156, 112, 255, 0.1));
    box-shadow: 0 0 50px rgba(87, 216, 240, 0.13), inset 0 0 32px rgba(87, 216, 240, 0.08);
}

.stp-scan-ring {
    position: absolute;
    border-radius: 50%;
}

.stp-scan-ring--outer {
    inset: 10px;
    border: 1px dashed rgba(231, 189, 97, 0.45);
    animation: stpSpin 26s linear infinite;
}

.stp-scan-ring--inner {
    inset: 32px;
    border: 1px dotted rgba(87, 216, 240, 0.5);
    animation: stpSpinReverse 17s linear infinite;
}

.stp-scan-cross,
.stp-scan-cross::after {
    position: absolute;
    width: 118px;
    height: 1px;
    content: "";
    background: linear-gradient(90deg, transparent, rgba(87, 216, 240, 0.28), transparent);
}

.stp-scan-cross::after { transform: rotate(90deg); }

.stp-scan-core strong {
    color: var(--stp-gold-bright);
    font: 400 3.1rem/1 "AOW", serif;
    filter: drop-shadow(0 0 12px rgba(231, 189, 97, 0.6));
}

.stp-scan-core small {
    position: absolute;
    bottom: 28px;
    color: rgba(141, 212, 230, 0.52);
    font: 700 0.45rem/1 "Montserrat", sans-serif;
    letter-spacing: 0.18em;
}

/* ---------- Csataarchívum keret ---------- */

.stp-archive-panel {
    position: relative;
    padding: 0 clamp(14px, 2vw, 26px) 24px;
    border: 1px solid var(--stp-line);
    background:
        linear-gradient(145deg, rgba(87, 216, 240, 0.025), transparent 24%),
        rgba(3, 9, 16, 0.82);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.32), inset 0 1px rgba(255, 255, 255, 0.025);
}

.stp-archive-panel::before,
.stp-archive-panel::after {
    content: "";
    position: absolute;
    top: -1px;
    width: 110px;
    height: 1px;
    background: linear-gradient(90deg, var(--stp-gold), transparent);
    box-shadow: 0 0 13px rgba(231, 189, 97, 0.4);
}

.stp-archive-panel::before { left: -1px; }
.stp-archive-panel::after { right: -1px; transform: scaleX(-1); }

.stp-section-heading {
    min-height: 94px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    margin: 0 calc(clamp(14px, 2vw, 26px) * -1) 20px;
    padding: 17px clamp(20px, 3vw, 42px);
    box-sizing: border-box;
    border-bottom: 1px solid var(--stp-line);
    background: linear-gradient(90deg, rgba(87, 216, 240, 0.045), transparent 60%);
}

.stp-section-heading span {
    display: block;
    margin-bottom: 6px;
    color: var(--stp-gold);
    font: 700 0.56rem/1 "Montserrat", sans-serif;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.stp-section-heading h2 {
    margin: 0;
    color: #f0eee8;
    font: 400 clamp(1.35rem, 2.2vw, 2rem)/1.1 "AOW", serif;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.stp-section-heading p {
    margin: 0;
    color: rgba(184, 205, 214, 0.48);
    font-size: 0.78rem;
    letter-spacing: 0.04em;
}

#match-list:empty {
    min-height: 360px;
    display: grid;
    place-items: center;
    border: 1px dashed rgba(87, 216, 240, 0.16);
    background: radial-gradient(circle, rgba(87, 216, 240, 0.055), transparent 30%);
}

#match-list:empty::before {
    content: "MÉG NINCS RÖGZÍTETT CSATA";
    color: rgba(189, 210, 218, 0.42);
    font: 400 1rem/1 "AOW", serif;
    letter-spacing: 0.14em;
}

/* ---------- Csatarekordok ---------- */

.match-row {
    position: relative;
    margin-bottom: 12px;
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(116, 181, 208, 0.16);
    border-left: 1px solid rgba(116, 181, 208, 0.16);
    border-radius: 0;
    background:
        linear-gradient(125deg, rgba(67, 140, 255, 0.035), transparent 30%),
        var(--stp-panel);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.26), inset 0 1px rgba(255, 255, 255, 0.02);
    clip-path: polygon(0 0, calc(100% - 15px) 0, 100% 15px, 100% 100%, 15px 100%, 0 calc(100% - 15px));
}

.match-row::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    z-index: 4;
    background: linear-gradient(to bottom, transparent, var(--stp-blue), transparent);
    opacity: 0.55;
    box-shadow: 0 0 10px var(--stp-blue);
}

.match-row:hover {
    transform: translateY(-2px);
    border-color: rgba(87, 216, 240, 0.34);
    border-left-color: rgba(87, 216, 240, 0.34);
    box-shadow: 0 20px 42px rgba(0, 0, 0, 0.36), 0 0 25px rgba(87, 216, 240, 0.055);
}

.match-row.open {
    border-color: rgba(231, 189, 97, 0.36);
    border-left-color: rgba(231, 189, 97, 0.36);
}

.match-row.open::before {
    background: linear-gradient(to bottom, transparent, var(--stp-gold), transparent);
    box-shadow: 0 0 12px var(--stp-gold);
}

.match-header {
    min-height: 58px;
    grid-template-columns: minmax(150px, auto) 1fr 48px;
    padding: 0 15px 0 21px;
    border-bottom: 1px solid rgba(116, 181, 208, 0.1);
    background: linear-gradient(90deg, rgba(87, 216, 240, 0.045), rgba(255, 255, 255, 0.008));
    cursor: pointer;
}

.match-id {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--stp-gold-bright);
    font: 400 1rem/1 "AOW", serif;
    letter-spacing: 0.08em;
}

.match-id::before {
    content: "BATTLE RECORD";
    padding-right: 12px;
    border-right: 1px solid rgba(87, 216, 240, 0.18);
    color: rgba(87, 216, 240, 0.48);
    font: 700 0.48rem/1 "Montserrat", sans-serif;
    letter-spacing: 0.15em;
}

.match-winner {
    color: var(--stp-gold);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-align: center;
    text-transform: uppercase;
}

.match-expand-arrow {
    width: 31px;
    height: 31px;
    display: grid;
    place-items: center;
    justify-self: end;
    border: 1px solid rgba(87, 216, 240, 0.2);
    color: var(--stp-cyan);
    font-size: 0.72rem;
    background: rgba(2, 7, 13, 0.55);
    clip-path: polygon(0 0, calc(100% - 7px) 0, 100% 7px, 100% 100%, 7px 100%, 0 calc(100% - 7px));
}

.match-row.open .match-expand-arrow {
    color: var(--stp-gold);
    border-color: rgba(231, 189, 97, 0.42);
}

.match-vs-card {
    height: clamp(132px, 10vw, 174px);
    margin: 0;
    border: 0;
    border-radius: 0;
    background: #02060b;
    box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.62);
}

.match-vs-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(67, 140, 255, 0.08), transparent 32%, rgba(0, 0, 0, 0.12) 50%, transparent 68%, rgba(156, 112, 255, 0.08));
}

.match-vs-panel {
    margin-left: -18px;
    filter: saturate(0.88) brightness(0.78);
    transition: flex 320ms ease, filter 320ms ease;
}

.match-vs-panel img { top: -24%; height: 148%; }

.match-vs-panel.team-1::after {
    background: linear-gradient(0deg, rgba(48, 132, 230, 0.35), transparent 62%);
    box-shadow: inset 0 -4px 0 rgba(67, 140, 255, 0.72);
}

.match-vs-panel.team-2::after {
    background: linear-gradient(0deg, rgba(139, 78, 214, 0.35), transparent 62%);
    box-shadow: inset 0 -4px 0 rgba(156, 112, 255, 0.72);
}

.match-row:hover .match-vs-panel { filter: saturate(1.05) brightness(0.9); }

.match-vs-badge {
    width: 72px;
    height: 72px;
    border: 1px solid rgba(231, 189, 97, 0.5);
    background: radial-gradient(circle, rgba(17, 25, 35, 0.98), rgba(2, 6, 11, 0.94));
    box-shadow: 0 0 0 7px rgba(2, 7, 13, 0.48), 0 0 28px rgba(231, 189, 97, 0.18), inset 0 0 25px rgba(87, 216, 240, 0.05);
}

.match-vs-fire {
    font-family: "AOW", serif;
    font-size: 1.45rem;
    background: linear-gradient(180deg, #fff9e7, #f5ce70 52%, #bd7045);
    -webkit-background-clip: text;
    background-clip: text;
}

.match-vs-rounds {
    color: rgba(179, 208, 218, 0.58);
    font-size: 0.52rem;
    letter-spacing: 0.1em;
}

.match-teams-4vs {
    min-height: 160px;
    padding: 24px 30px;
    background:
        radial-gradient(circle at 50% 50%, rgba(87, 216, 240, 0.07), transparent 22%),
        rgba(2, 7, 13, 0.42);
}

.team-avatar-large {
    width: 64px;
    height: 64px;
    border-width: 2px;
    background: #050a10;
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.team-avatar-large:hover { transform: translateY(-3px) scale(1.04); }

.team-name {
    font-family: "AOW", serif;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.vs-center .vs-label {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(231, 189, 97, 0.4);
    border-radius: 50%;
    color: var(--stp-gold-bright);
    background: rgba(2, 7, 13, 0.8);
    font-family: "AOW", serif;
    font-size: 1.15rem;
    text-shadow: 0 0 12px rgba(231, 189, 97, 0.45);
}

/* ---------- Lenyitott harci elemzés ---------- */

.match-details {
    margin: 0;
    padding: clamp(18px, 2.2vw, 34px);
    border-top: 1px solid rgba(231, 189, 97, 0.2);
    border-radius: 0;
    background:
        linear-gradient(rgba(87, 216, 240, 0.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(87, 216, 240, 0.018) 1px, transparent 1px),
        rgba(2, 7, 13, 0.8);
    background-size: 42px 42px, 42px 42px, auto;
}

.mss-root { color: rgba(224, 235, 239, 0.82); }

.mss-highlight-box,
.mss-team,
.mss-reward-panel,
.mss-mastery-panel {
    border-radius: 0;
    background-color: rgba(5, 12, 20, 0.8);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.25);
}

.mss-highlight-box {
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}

.mss-team { border-color: rgba(116, 181, 208, 0.16); }
.mss-team-winner { border-color: rgba(231, 189, 97, 0.42); box-shadow: 0 0 28px rgba(231, 189, 97, 0.07); }

.mss-team-header {
    min-height: 56px;
    padding-inline: 18px;
    border-bottom: 1px solid rgba(116, 181, 208, 0.14);
    background: linear-gradient(90deg, rgba(87, 216, 240, 0.045), transparent);
}

.mss-team-name,
.mss-highlight-hero { font-family: "AOW", serif; letter-spacing: 0.035em; }

.mss-player-row {
    border-radius: 0;
    border-color: rgba(116, 181, 208, 0.09);
    background: rgba(255, 255, 255, 0.012);
}

.mss-player-row:hover {
    border-color: rgba(87, 216, 240, 0.22);
    background: rgba(87, 216, 240, 0.035);
}

.mss-item-slot,
.mss-ability-icon-inner,
.mss-rune-circle { border-radius: 3px; }

.mss-reward-panel,
.mss-mastery-panel { border-color: rgba(116, 181, 208, 0.16); }

/* ---------- Grafikonok és elemző modulok ---------- */

.charts-wrapper {
    gap: 14px;
    margin-top: 18px;
}

.chart-block,
.relics-panel,
.detailed-stats-panel,
.rivalry-panel {
    position: relative;
    border-radius: 0;
    border: 1px solid rgba(116, 181, 208, 0.15);
    background:
        linear-gradient(145deg, rgba(87, 216, 240, 0.025), transparent 32%),
        rgba(4, 11, 19, 0.88);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.26), inset 0 1px rgba(255, 255, 255, 0.02);
}

.chart-block::before,
.relics-panel::before,
.detailed-stats-panel::before,
.rivalry-panel::before {
    content: "";
    position: absolute;
    left: -1px;
    top: -1px;
    width: 54px;
    height: 1px;
    background: linear-gradient(90deg, var(--stp-gold), transparent);
}

.chart-block { padding: 18px; }

.chart-block h3,
.relics-panel h3 {
    margin: 0 0 15px;
    color: var(--stp-gold);
    font: 400 0.86rem/1.2 "AOW", serif;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.chart-block:hover {
    transform: translateY(-2px);
    border-color: rgba(87, 216, 240, 0.3);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.33), 0 0 22px rgba(87, 216, 240, 0.055);
}

.chart-row-pair {
    gap: 14px;
    padding: 5px 0;
    border-bottom: 1px solid rgba(116, 181, 208, 0.06);
}

.chart-row-pair:last-child { border-bottom: 0; }

.chart-row:hover { box-shadow: none; transform: translateX(2px); }
.chart-row.right-side:hover { transform: translateX(-2px); }

.chart-avatar {
    width: 38px;
    height: 38px;
    border-color: rgba(87, 216, 240, 0.25);
    background: #02070c;
    box-shadow: 0 5px 13px rgba(0, 0, 0, 0.32);
}

.chart-bar {
    height: 10px;
    border-radius: 1px;
    border: 1px solid rgba(116, 181, 208, 0.1);
    background: rgba(0, 0, 0, 0.46);
}

.chart-bar-fill { border-radius: 0; box-shadow: 0 0 10px currentColor; }

.relic-row {
    border-radius: 0;
    border: 1px solid rgba(116, 181, 208, 0.09);
    background: rgba(1, 6, 11, 0.48);
}

.relic-row-avatar { border-color: rgba(231, 189, 97, 0.34); }

.relic-row-icon {
    width: 38px;
    height: 38px;
    filter: drop-shadow(0 0 8px rgba(231, 189, 97, 0.2));
}

.relic-row-level { color: var(--stp-gold); }

.detailed-stats-panel {
    min-height: 520px;
    padding: 22px;
}

.detailed-stats-filter button {
    min-height: 34px;
    border-radius: 0;
    border-color: rgba(116, 181, 208, 0.14);
    background: rgba(2, 7, 13, 0.62);
    color: rgba(191, 210, 217, 0.58);
    font-size: 0.71rem;
    letter-spacing: 0.04em;
}

.detailed-stats-filter button:hover,
.detailed-stats-filter button.active {
    color: var(--stp-gold-bright);
    border-color: rgba(231, 189, 97, 0.38);
    background: rgba(231, 189, 97, 0.07);
    box-shadow: 0 0 15px rgba(231, 189, 97, 0.06);
}

.dstat-bar {
    border-radius: 2px 2px 0 0;
    border-color: rgba(116, 181, 208, 0.13);
    background: linear-gradient(to top, rgba(87, 216, 240, 0.035), rgba(0, 0, 0, 0.42));
}

.dstat-bar-fill { box-shadow: 0 0 12px rgba(87, 216, 240, 0.18); }

.dstat-avatar {
    width: 44px;
    height: 44px;
    border-color: rgba(87, 216, 240, 0.25);
    background: #02070c;
}

.duel-select {
    top: 13px;
    right: 14px;
    min-height: 30px;
    padding: 4px 27px 4px 8px;
    border: 1px solid rgba(156, 112, 255, 0.25) !important;
    border-radius: 0;
    background: rgba(2, 7, 13, 0.86) !important;
    color: #c5aaff;
}

/* ---------- Rivalizálás ---------- */

.rivalry-panel {
    padding: 18px;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(87, 216, 240, 0.25) transparent;
}

.rivalry-header,
.rivalry-row { min-width: 1180px; }

.rivalry-header {
    min-height: 42px;
    margin: 0;
    padding: 8px 0;
    color: var(--stp-gold);
    background: rgba(231, 189, 97, 0.035);
    border-color: rgba(231, 189, 97, 0.16);
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.rivalry-row {
    margin: 0;
    padding: 12px 0;
    border-color: rgba(116, 181, 208, 0.08);
}

.rivalry-row:nth-child(odd) { background: rgba(255, 255, 255, 0.009); }
.rivalry-row:hover { background: rgba(87, 216, 240, 0.035); }

.r-avatar,
.r-avatar-small {
    background: #02070c;
    box-shadow: 0 7px 18px rgba(0, 0, 0, 0.3);
}

/* ---------- Lapozás ---------- */

#pagination {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 8px;
    border-top: 1px solid rgba(116, 181, 208, 0.11);
}

#pagination button {
    min-width: 124px;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 8px 15px;
    border: 1px solid rgba(87, 216, 240, 0.25);
    border-radius: 0;
    background: linear-gradient(135deg, rgba(87, 216, 240, 0.07), rgba(2, 7, 13, 0.72));
    box-shadow: none;
    color: rgba(209, 226, 232, 0.72);
    font: 700 0.64rem/1 "Montserrat", sans-serif;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}

#pagination button span { color: var(--stp-cyan); font-size: 1.2rem; line-height: 0; }

#pagination button:hover:not(:disabled) {
    transform: translateY(-2px);
    border-color: rgba(231, 189, 97, 0.45);
    background: rgba(231, 189, 97, 0.07);
    box-shadow: 0 0 18px rgba(231, 189, 97, 0.08);
    color: var(--stp-gold-bright);
}

#pagination button:disabled { opacity: 0.28; cursor: default; }

#page-info {
    min-width: 62px;
    color: var(--stp-gold);
    font: 400 0.82rem/1 "AOW", serif;
    letter-spacing: 0.1em;
    text-align: center;
}

@keyframes stpGridDrift { to { background-position: 52px 52px, 52px 52px, 230px 230px; } }
@keyframes stpPulse { 0%, 100% { opacity: 0.5; transform: scale(0.78); } 50% { opacity: 1; transform: scale(1); } }
@keyframes stpSpin { to { transform: rotate(360deg); } }
@keyframes stpSpinReverse { to { transform: rotate(-360deg); } }

@media (max-width: 1180px) {
    #stats-wrapper { padding-inline: 22px; }
    .mss-highlight-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mss-teams { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
    .stp-command-hero { min-height: 235px; }
    .stp-scan-core { width: 138px; height: 138px; flex-basis: 138px; }
    .charts-wrapper { grid-template-columns: 1fr; }
    .match-teams-4vs { grid-template-columns: 1fr; }
    .vs-center { order: -1; }
    .detailed-stats-grid { overflow-x: auto; justify-items: stretch; }
}

@media (max-width: 680px) {
    #stats-wrapper { padding: 16px 11px 62px; }
    .stp-command-hero {
        min-height: 270px;
        padding: 30px 23px;
        clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
    }
    .stp-scan-core { display: none; }
    .stp-eyebrow span { width: 18px; }
    .stp-command-status { gap: 10px 15px; }
    .stp-section-heading { align-items: flex-start; flex-direction: column; gap: 9px; padding-block: 20px; }
    .match-header { grid-template-columns: 1fr auto; padding-left: 14px; }
    .match-winner { display: none; }
    .match-id { gap: 8px; font-size: 0.86rem; }
    .match-id::before { padding-right: 8px; font-size: 0.42rem; }
    .match-vs-card { height: 122px; }
    .match-vs-badge { width: 58px; height: 58px; }
    .match-vs-fire { font-size: 1.1rem; }
    .team-row { gap: 8px; flex-wrap: wrap; }
    .team-avatar-large { width: 48px; height: 48px; }
    .mss-highlight-row { grid-template-columns: 1fr; }
    .chart-row-pair { grid-template-columns: 1fr; gap: 5px; }
    .chart-row.right-side { flex-direction: row; }
    .chart-row.right-side:hover { transform: translateX(2px); }
    .relic-row-stats { width: 100%; margin-left: 48px; gap: 9px; }
    .detailed-stats-panel { padding: 15px; min-height: 420px; }
    .dstat-bar { height: 270px; min-width: 52px; }
    #pagination { gap: 9px; }
    #pagination button { min-width: 104px; }
}

@media (max-width: 430px) {
    .stp-command-hero h1 { font-size: 2.35rem; }
    .stp-command-copy > p { font-size: 0.86rem; }
    .stp-command-status span:nth-child(n+2) { display: none; }
    .match-id::before { display: none; }
    .match-vs-panel { margin-left: -10px; }
    #pagination button { min-width: 94px; padding-inline: 10px; }
}

@media (prefers-reduced-motion: reduce) {
    .stats-body::before,
    .stp-command-status i,
    .stp-scan-ring,
    .match-vs-fire { animation: none !important; }
}
