.stats-body {
    min-height: 100vh;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(10, 30, 46, 0.55), transparent 60%),
        linear-gradient(180deg, rgba(3, 5, 9, 0.75), rgba(3, 5, 9, 0.96) 45%, #030509 100%),
        url('../image/gui_elemek/mp_background_2.png') center top / cover no-repeat,
        url('../image/gui_elemek/mp_background.jpg') center top / cover no-repeat fixed;
    color: #e8f6ff;
    font-family: "Outfit", sans-serif;
    padding: 20px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.stats-body::-webkit-scrollbar {
    display: none;
}

#stats-wrapper {
    max-width: 1700px;
    margin: 0 auto;
}

.stats-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 14px;
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid rgba(0, 195, 255, 0.35);
    background: rgba(4, 14, 26, 0.7);
    color: #9fe6ff;
    text-decoration: none;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    transition: 0.2s ease;
}

.stats-back-link:hover {
    background: rgba(0, 80, 140, 0.6);
    border-color: #00c3ff;
    box-shadow: 0 0 12px rgba(0, 195, 255, 0.5);
    color: #fff;
}

/* ============================
   MATCH LIST – LOL STYLE
============================ */

.match-row {
    background: linear-gradient(180deg, rgba(10, 18, 28, 0.9), rgba(3, 6, 10, 0.88));
    border: 1px solid var(--border-glass, rgba(255,255,255,0.08));
    border-left: 3px solid var(--c-gold-dim, #a67f2c);
    padding: 16px 20px;
    margin-bottom: 14px;
    border-radius: var(--radius-l, 18px);
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.35);
    transition: transform var(--t-fast, 150ms) var(--ease-premium, ease), border-color var(--t-fast, 150ms), box-shadow var(--t-fast, 150ms);
    cursor: pointer;
}

.match-row:hover {
    transform: translateY(-2px);
    border-left-color: var(--c-gold, #ffd24c);
    box-shadow: 0 0 20px rgba(255, 210, 76, 0.18);
}

.match-row.open {
    border-left-color: var(--c-gold, #ffd24c);
}

.match-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.match-id {
    font-size: 1rem;
    font-weight: 700;
    color: var(--c-gold, #ffd24c);
    letter-spacing: 1px;
}

.match-teams {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: center;
}


.match-expand-arrow {
    font-size: 1.4rem;
    color: var(--c-cyan, #4cd4ff);
    transition: transform 0.25s ease;
}

.match-row.open .match-expand-arrow {
    transform: rotate(180deg);
}

/* Lenyíló rész */
.match-details {
    margin-top: 12px;
    padding: 12px;
    background: rgba(255,255,255,0.03);
    border-radius: 6px;
    display: none;
}

/* TEAM BLOCKS */

.team-block {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.team-avatar-large {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255,255,255,0.4);
}

.team-avatar-large.team-1 { border-color: #4cb3ff; }
.team-avatar-large.team-2 { border-color: #b066ff; }
.team-avatar-large.team-3 { border-color: #4cff88; }
.team-avatar-large.team-4 { border-color: #ffe86b; }


/* TEAM-COLORED AVATAR OUTLINES */

.team-avatar-large.team-1 {
    border-color: #4cb3ff;
    box-shadow: 0 0 8px #4cb3ff88;
}

.team-avatar-large.team-2 {
    border-color: #b066ff;
    box-shadow: 0 0 8px #b066ff88;
}

.team-avatar-large.team-3 {
    border-color: #4cff88;
    box-shadow: 0 0 8px #4cff8888;
}

.team-avatar-large.team-4 {
    border-color: #ffe86b;
    box-shadow: 0 0 8px #ffe86b88;
}


.team-avatars {
    display: flex;
    gap: 4px;
}

.team-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.4);
    box-shadow: 0 0 6px rgba(255,255,255,0.3);
}

/* ============================
   2 TEAM INLINE LAYOUT
============================ */



.match-teams-4col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 10px;
}

.match-teams-4vs .team-side {
    display: flex;
    flex-direction: row !important;
    gap: 6px;
}


.team-side {
    display: flex;
    flex-direction: row;   /* <<< EZ FONTOS */
    gap: 6px;
}


.team-side .team-name {
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 4px;
}

.team-name {
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 4px;
}

.team-avatars-large {
    display: flex;
    gap: 6px;
}


.vs-label {
    font-size: 1.6rem;
    font-weight: 900;
    color: #00d9ff;
    text-shadow: 0 0 8px #00d9ff;
    padding: 0 10px;
}

/* DETAILS */

.match-details {
    margin-top: 12px;
    padding: 12px;
    background: rgba(255,255,255,0.04);
    border-radius: 6px;
    display: none;
}


/* gomgok legyenek egységesek */

#pagination button {
    background: transparent;
    border: 2px solid #00aaff;
    box-shadow: 0 0 10px #00aaff55;
    color: #e8f6ff;
    padding: 8px 16px;
    cursor: pointer;
    border-radius: 8px;
    font-family: "Outfit", sans-serif;
    font-weight: 400;
    transition: 0.2s ease;
}

#pagination button:hover {
    box-shadow: 0 0 14px #00d9ff;
    transform: translateY(-2px);
}

.team-name.team-1 { color: #4cb3ff; }
.team-name.team-2 { color: #b066ff; }
.team-name.team-3 { color: #4cff88; }
.team-name.team-4 { color: #ffe86b; }


/* ============================
   2 CSAPATOS VS KÁRTYA – DÖNTÖTT, TŰZ-VS
============================ */

.match-vs-card {
    position: relative;
    display: flex;
    height: 110px;
    margin: 10px 0 4px 0;
    border-radius: var(--radius-l, 18px);
    overflow: hidden;
    border: 2px solid rgba(255, 210, 76, 0.5);
    box-shadow: 0 0 18px rgba(255, 210, 76, 0.16), inset 0 0 30px rgba(0, 0, 0, 0.45);
    background: #050810;
}

.match-vs-side {
    display: flex;
    flex: 1;
}

/* EGYMÁS UTÁN KÖVETKEZŐ, DÖNTÖTT KÁRTYÁK – RÉS NÉLKÜL KITÖLTIK A DIVET */
.match-vs-panel {
    position: relative;
    flex: 1;
    overflow: hidden;
    transform: skewX(-11deg);
    margin-left: -14px;
}

.match-vs-panel:first-child {
    margin-left: 0;
}

.match-vs-panel img {
    position: absolute;
    top: -15%;
    left: -25%;
    width: 150%;
    height: 130%;
    object-fit: cover;
    transform: skewX(11deg);
}

.match-vs-panel::after {
    content: "";
    position: absolute;
    inset: 0;
    box-shadow: inset 0 -5px 0 rgba(255, 255, 255, 0.12);
}

.match-vs-panel.team-1::after { background: linear-gradient(0deg, rgba(76, 179, 255, 0.22), transparent 55%); box-shadow: inset 0 -5px 0 rgba(76, 179, 255, 0.75); }
.match-vs-panel.team-2::after { background: linear-gradient(0deg, rgba(176, 102, 255, 0.22), transparent 55%); box-shadow: inset 0 -5px 0 rgba(176, 102, 255, 0.75); }

.match-row:hover .match-vs-panel { flex: 1.12; }

/* KÖZÉPEN LEBEGŐ VS JELVÉNY – ELVÁLASZTÓ VONAL NÉLKÜL */
.match-vs-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(10, 14, 22, 0.92), rgba(4, 6, 10, 0.85));
    border: 1px solid rgba(255, 210, 76, 0.55);
    box-shadow: 0 0 16px rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

.match-vs-fire {
    position: relative;
    font-size: 1.35rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    background: linear-gradient(180deg, #fff6d8 0%, #ffd24c 35%, #ff8a3d 65%, #ff3d3d 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: match-vs-flicker 2.2s ease-in-out infinite;
}

.match-vs-rounds {
    position: relative;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--c-text-dim, #9fb3c2);
}

@keyframes match-vs-flicker {
    0%, 100% {
        filter: drop-shadow(0 0 6px rgba(255, 138, 61, 0.65)) drop-shadow(0 0 2px rgba(255, 61, 61, 0.4));
        transform: scale(1);
    }
    50% {
        filter: drop-shadow(0 0 13px rgba(255, 170, 61, 0.9)) drop-shadow(0 0 5px rgba(255, 61, 61, 0.6));
        transform: scale(1.06);
    }
}

/* GYŐZTES JOBB OLDALT */
.match-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
}


/* ============================
   LOL STYLE SIDE-BY-SIDE BARS
============================ */

.chart-row-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    margin: 6px 0;
    gap: 20px;
}

/* A teljes sor kap egy halvány keretet + gradient hátteret */
.chart-row {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 1px 1px;
}

.chart-row.left-side {
    justify-content: flex-start;
}

.chart-row.right-side {
    flex-direction: row-reverse;
}

.chart-row:hover {
    box-shadow: 0 0 12px var(--border-glow-cyan, rgba(76,212,255,0.35));
    transform: scale(1.01);
    transition: var(--t-fast, 150ms) var(--ease-premium, ease);
}


.chart-row.right-side .chart-bar {
    direction: rtl;
}

.chart-row.right-side .chart-bar-fill {
    transform-origin: right;
}

.chart-bar-fill {
    transition: width var(--t-slow, 300ms) var(--ease-premium, ease);
}

.chart-row.right-side .chart-bar {
    background: rgba(0, 0, 0, 0.35);
}


.chart-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-glass, rgba(255,255,255,0.08));
}


.chart-bar {
    width: 100%; /* <<< teljes szélesség */
    max-width: 400px; /* opcionális limit */
    height: 14px; /* vékonyabb */
    border-radius: var(--radius-s, 6px);
    background: rgba(0, 0, 0, 0.35);
    overflow: hidden;
    position: relative;
}

.chart-bar-fill {
    height: 100%;
    border-radius: var(--radius-s, 6px);
}

.chart-value-side {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--c-text, #eaf4fb);
    min-width: 40px;
    text-align: center;
}

.charts-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;   /* két oszlop */
    grid-template-rows: auto auto;    /* két sor */
    gap: 18px;
    margin-top: 24px;
}

.chart-block {
    position: relative;
    padding: 16px;
    border-radius: var(--radius-l, 18px);
    border: 1px solid var(--border-glass, rgba(255,255,255,0.08));
    background: linear-gradient(180deg, rgba(10, 18, 28, 0.85), rgba(3, 6, 10, 0.85));
    box-shadow: 0 0 12px rgba(0,0,0,0.4);
    transition: var(--t-fast, 150ms) var(--ease-premium, ease);
}

.chart-block h3 {
    color: var(--c-gold, #ffd24c);
    font-size: 0.95rem;
    letter-spacing: 0.02em;
}

.chart-block:hover {
    box-shadow: 0 0 18px var(--border-glow-cyan, rgba(76,212,255,0.35));
    border-color: var(--border-glow-cyan, rgba(76,212,255,0.35));
    transform: translateY(-2px);
}

.match-teams-4vs {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    justify-items: center;
    gap: 10px;
    padding: 0 20px 10px 20px;
}

.team-row {
    display: flex;
    justify-content: center;
    gap: 20px;
}


.vs-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.vs-winner {
    font-size: 0.9rem;
    font-weight: 700;
    color: #ffd700;
}

.vs-rounds {
    font-size: 0.9rem;
    font-weight: 700;
    color: #b366ff;
}

/* ============================
   D RÉSZ – RÉSZLETES OSZLOPDIAGRAM
============================ */

.detailed-stats-panel {
    margin-top: 32px;
    padding: 20px;
    background: linear-gradient(180deg, rgba(10, 18, 28, 0.85), rgba(3, 6, 10, 0.85));
    border: 1px solid var(--border-glass, rgba(255,255,255,0.08));
    border-radius: var(--radius-l, 18px);
    box-shadow: 0 0 14px rgba(0,0,0,0.5);
    min-height: 500px; /* <<< magasabb panel */
}

.detailed-stats-filter {
    display: flex;
    flex-wrap: wrap; /* <<< EZ KELL */
    gap: 8px;
    margin-bottom: 20px;
    font-family: "Outfit", sans-serif;
}

.detailed-stats-filter button {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-glass, rgba(255,255,255,0.08));
    color: var(--c-text-dim, #9fb3c2);
    padding: 6px 12px;
    border-radius: var(--radius-s, 6px);
    cursor: pointer;
    transition: var(--t-fast, 150ms) var(--ease-premium, ease);
    font-family: "Outfit", sans-serif;
}

.detailed-stats-filter button:hover {
    background: rgba(76, 212, 255, 0.1);
    border-color: var(--border-glow-cyan, rgba(76,212,255,0.35));
    color: var(--c-text, #eaf4fb);
    box-shadow: 0 0 10px var(--border-glow-cyan, rgba(76,212,255,0.35));
}

.detailed-stats-grid {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(60px, 1fr);
    gap: 14px;
    align-items: end; /* <<< csíkok alul legyenek */
    justify-items: center;
    margin-top: 20px;
}


.stat-bar-fill {
    width: 100%;
    border-radius: 6px 6px 0 0;
    transition: height 0.4s ease;
}

.stat-value {
    margin-top: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #e8f6ff;
}

.detailed-stats-avatars {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-top: 10px;
}

.detailed-stats-avatars img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.4);
}

.dstat-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.dstat-bar {
    width: 100%;
    height: 350px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-glass, rgba(255,255,255,0.08));
    border-radius: var(--radius-s, 6px);
    position: relative;
    overflow: hidden;
}

.dstat-bar-fill {
    position: absolute;
    bottom: 0;
    width: 100%;
    transition: height var(--t-slow, 300ms) var(--ease-premium, ease);
}

.dstat-value {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--c-text, #eaf4fb);
}

.dstat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--border-glass, rgba(255,255,255,0.08));
}


/* rivary panel */

.rivalry-panel {
    margin-top: 20px;
    padding: 16px;
    background: linear-gradient(180deg, rgba(10, 18, 28, 0.85), rgba(3, 6, 10, 0.85));
    border: 1px solid var(--border-glass, rgba(255,255,255,0.08));
    border-radius: var(--radius-l, 18px);
    box-shadow: 0 0 12px rgba(0,0,0,0.4);
}

.rivalry-header,
.rivalry-row {
    display: grid;
    grid-template-columns:
        120px   /* Hős */
        120px   /* First Blood */
        150px   /* Counter */
        70px    /* DMG */
        150px   /* Nemesis */
        80px    /* DMG */
        140px   /* K/A/S */
        1fr     /* Summary */
        1fr;    /* Death reason */
    align-items: center;
    text-align: center;
    padding: 10px 0;
}


.rivalry-header {
    font-weight: 900;
    color: var(--c-gold, #ffd24c);
    letter-spacing: 0.02em;
    border-bottom: 1px solid var(--border-glass, rgba(255,255,255,0.08));
    margin-bottom: 8px;
}

.rivalry-row {
    border-bottom: 1px solid var(--border-glass, rgba(255,255,255,0.08));
    padding-bottom: 12px;
    margin-bottom: 12px;
    transition: background var(--t-fast, 150ms);
}

.rivalry-row:hover {
    background: rgba(76, 212, 255, 0.04);
}

.rivalry-row:last-child {
    border-bottom: none;
}

.r-cell {
    display: flex;
    align-items: center;
    justify-content: center; /* <<< EZ HIÁNYZOTT */
    gap: 8px;
}

.hero-cell {
    gap: 12px;
    justify-content: center; /* <<< KELL */
}


.r-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--border-glass, rgba(255,255,255,0.08));
}

.r-avatar-small {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-glass, rgba(255,255,255,0.08));
}

.team-border-1 { border-color: #4cb3ff !important; box-shadow: 0 0 8px #4cb3ff55; }
.team-border-2 { border-color: #ff4c4c !important; box-shadow: 0 0 8px #ff4c4c55; }
.team-border-3 { border-color: #4cff88 !important; box-shadow: 0 0 8px #4cff8855; }
.team-border-4 { border-color: #ffe86b !important; box-shadow: 0 0 8px #ffe86b55; }

.r-icon {
    width: 28px;
    height: 28px;
}

.r-dmg-out {
    color: #bf373b;
    font-weight: 800;
}

.r-dmg-in {
    color: #ff5700;
    font-weight: 800;
}

.r-kad {
    display: flex;
    gap: 10px;
    font-weight: 700;
}

.kad-k { color: #ff4c4c; }   /* vörös */
.kad-a { color: #1dc49b; }   /* zöld */
.kad-d { color: #bbbbbb; }   /* szürke */
.kad-s { color: #b366ff; }   /* lila */

.r-summary-cell {
    text-align: center;
    font-size: 0.8rem;
    line-height: 1.3;
    opacity: 0.9;
}

.r-death-cell {
    text-align: center;
    font-size: 0.8rem;
    line-height: 1.3;
    opacity: 0.9;
}

.r-summary b {
    font-weight: 800;
}

.firstblood-name {
    color: var(--c-text, #eaf4fb);
    font-weight: 700;
}

.firstblood-name.is-firstblood {
    color: var(--c-gold, #ffd24c);
}

.death-buff-icon {
    width: 18px;
    height: 18px;
    vertical-align: middle;
    margin: 0 4px;
    border-radius: 3px;
}

.duel-wrapper {
    margin-top: 30px;
}

.duel-select {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: #800d80;
    font-weight: 600;
    padding: 2px 6px;
    position: absolute; top: 10px; right: 10px; margin: 0; /* ne tolja le a tartalmat */
}

.duel-select:focus,
.duel-select:hover {
    outline: none;
    border: none;
}


.duel-rows {
    margin-top: 6px;
}
.duel-empty {
    font-size: 0.85rem;
    opacity: 0.8;
    margin-top: 6px;
}

#hero-analysis {
    margin: 25px 0;
    padding: 15px;
    background: rgba(20,20,40,0.6);
    border: 1px solid #382f66;
    border-radius: 10px;
}

#hero-analysis-toggle {
    cursor: pointer;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #4cb3ff;
}

#hero-analysis-panel.hidden {
    display: none;
}


#hero-analysis-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

#hero-analysis-header span {
    font-size: 1.4rem;
    font-weight: 700;
}

#hero-analysis-select {
    padding: 6px 10px;
    background: rgba(255,255,255,0.05);
    border: 1px solid #ed4cff3c;
    color: rgb(130, 21, 128);
    border-radius: 6px;
}

.hero-analysis-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 6px 0;
    padding: 6px 10px;
    border-radius: 6px;
    background: rgba(255,255,255,0.04);
}

.hero-analysis-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.hero-analysis-name {
    width: 140px;
    font-weight: 700;
}

.hero-analysis-bar {
    flex: 1;
    height: 14px;
    background: rgba(255,255,255,0.08);
    border-radius: 6px;
    position: relative;
    overflow: hidden;
}

.hero-analysis-bar-fill {
    height: 100%;
    background: #4cb3ff;
    border-radius: 6px;
}

.hero-analysis-value {
    width: 80px;
    text-align: right;
    font-weight: 700;
}

/* TOP 3 SZÍNEK */
.rank-1 {
    border: 2px solid gold;
    box-shadow: 0 0 10px gold;
}
.rank-1 .hero-analysis-name,
.rank-1 .hero-analysis-value {
    color: gold;
}
.rank-1 .hero-analysis-bar-fill {
    background: gold;
}

.rank-2 {
    border: 2px solid silver;
    box-shadow: 0 0 10px silver;
}
.rank-2 .hero-analysis-name,
.rank-2 .hero-analysis-value {
    color: silver;
}
.rank-2 .hero-analysis-bar-fill {
    background: silver;
}

.rank-3 {
    border: 2px solid #cd7f32;
    box-shadow: 0 0 10px #cd7f32;
}
.rank-3 .hero-analysis-name,
.rank-3 .hero-analysis-value {
    color: #cd7f32;
}
.rank-3 .hero-analysis-bar-fill {
    background: #cd7f32;
}

/* TOP 4–13 ZÖLD */
.rank-green .hero-analysis-bar-fill {
    background: #4cff88;
}
.rank-green .hero-analysis-name,
.rank-green .hero-analysis-value {
    color: #4cff88;
}
