/* ── AgeraPVP ── */

.tesla-server-section .tesla-server-ip-box:hover {
    box-shadow: 0 12px 28px rgba(88, 120, 255, 0.16);
}

/* ── Profile card overflow for hints ── */

.profile-card .profile-main {
    overflow: visible;
}

.profile-card .profile-meta {
    overflow: visible;
}

/* ── Online / offline badge tooltips ── */

.agera-online-badge,
.agera-offline-badge {
    position: relative;
    z-index: 1;
    cursor: default;
}

.agera-online-badge:hover,
.agera-online-badge:focus-visible,
.agera-offline-badge:hover,
.agera-offline-badge:focus-visible {
    z-index: 45;
}

.agera-online-badge-tip,
.agera-offline-badge-tip {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    z-index: 50;
    max-width: min(280px, 80vw);
    padding: 7px 12px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(-4px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.agera-online-badge-tip {
    border: 1px solid rgba(62, 207, 142, 0.35);
    background: rgba(10, 18, 14, 0.97);
    color: #d7ffe9;
    box-shadow:
        0 10px 24px rgba(0, 0, 0, 0.35),
        0 0 16px rgba(62, 207, 142, 0.12);
}

.agera-offline-badge-tip {
    border: 1px solid rgba(255, 107, 122, 0.35);
    background: rgba(18, 10, 12, 0.97);
    color: #ffd5da;
    box-shadow:
        0 10px 24px rgba(0, 0, 0, 0.35),
        0 0 16px rgba(255, 107, 122, 0.1);
    white-space: normal;
}

.agera-online-badge:hover .agera-online-badge-tip,
.agera-online-badge:focus-visible .agera-online-badge-tip,
.agera-offline-badge:hover .agera-offline-badge-tip,
.agera-offline-badge:focus-visible .agera-offline-badge-tip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* ── Shared module head + hint ── */

.agera-module-head {
    position: relative;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.agera-module-head .panel-section-title,
.agera-module-title {
    margin: 0;
}

.agera-hint-btn {
    position: relative;
    z-index: 50;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid rgba(104, 128, 255, 0.28);
    border-radius: 999px;
    background: rgba(104, 128, 255, 0.1);
    color: #dce4ff;
    font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.agera-hint-btn-mark {
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    transform: translateY(-0.5px);
    pointer-events: none;
    user-select: none;
}

.agera-hint-btn:hover,
.agera-hint-btn:focus-visible {
    border-color: rgba(136, 160, 255, 0.55);
    background: rgba(104, 128, 255, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(88, 120, 255, 0.22);
    outline: none;
}

.agera-hint-btn--corner {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 6;
    width: 22px;
    height: 22px;
}

.agera-hint-btn--corner .agera-hint-btn-mark {
    font-size: 12px;
    transform: translateY(-0.25px);
}

.agera-hint-hover-label {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 80;
    padding: 5px 9px;
    border-radius: 8px;
    border: 1px solid rgba(104, 128, 255, 0.28);
    background: rgba(12, 16, 30, 0.96);
    color: #b8c4e6;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(4px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}

.agera-hint-btn--click:hover .agera-hint-hover-label,
.agera-hint-btn--click:focus-visible .agera-hint-hover-label {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.agera-hint-btn--click .agera-hint-tooltip {
    display: none !important;
}

.agera-hint-btn--dual.is-open,
.agera-hint-btn--dual:hover,
.agera-hint-btn--dual:focus-visible {
    z-index: 200;
}

.agera-hint-tooltip {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 300;
    width: max-content;
    min-width: 240px;
    max-width: min(360px, calc(100vw - 24px));
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(104, 128, 255, 0.35);
    background: rgba(12, 16, 30, 0.98);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(6px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.agera-hint-tooltip--wide {
    min-width: 280px;
    max-width: min(420px, calc(100vw - 24px));
}

.agera-hint-tooltip--up {
    top: auto;
    bottom: calc(100% + 10px);
    transform: translateY(-6px);
}

.agera-hint-btn--dual:hover .agera-hint-tooltip,
.agera-hint-btn--dual:focus-visible .agera-hint-tooltip,
.agera-hint-btn--dual.is-open .agera-hint-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.agera-hint-tooltip-title {
    margin: 0 0 10px;
    color: #b8c4e6;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.agera-hint-tier-grid {
    display: grid;
    gap: 6px;
}

.agera-hint-tier-row {
    display: grid;
    grid-template-columns: 14px auto 1fr;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 400;
}

.agera-hint-tier-grid--division .agera-hint-tier-row {
    grid-template-columns: 18px auto 1fr;
    gap: 8px;
    align-items: center;
    min-height: 18px;
}

.agera-hint-tier-grid--division .agera-division-emblem--hint {
    align-self: center;
}

.agera-hint-tier-name {
    font-weight: 500;
}

.agera-hint-tier-swatch {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--tier-color, #8b95a8);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.agera-hint-tier-swatch.has-glow {
    box-shadow: 0 0 10px var(--tier-color), 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.agera-hint-tier-range {
    color: #9aa8c8;
    font-size: 11px;
    font-weight: 400;
    white-space: nowrap;
}

.agera-hint-live-action {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.agera-hint-live-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 9px 12px;
    border-radius: 8px;
    border: 1px solid color-mix(in srgb, #ff4d8d 55%, rgba(255, 255, 255, 0.15));
    background:
        linear-gradient(135deg, rgba(255, 77, 141, 0.35), rgba(255, 77, 141, 0.12)),
        rgba(8, 12, 28, 0.92);
    color: #ffd8e8;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-decoration: none;
    text-transform: uppercase;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    box-shadow: 0 0 16px rgba(255, 77, 141, 0.18);
}

.agera-hint-live-btn:hover,
.agera-hint-live-btn:focus-visible {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, #ff4d8d 75%, #fff);
    box-shadow: 0 0 22px rgba(255, 77, 141, 0.32);
    color: #fff;
}

.agera-hint-modal-body .agera-hint-live-action {
    margin-top: 16px;
}

/* ── Profile division (inline info-item) ── */

.info-item--division-inline {
    position: relative;
    overflow: visible;
    padding-right: 40px;
}

.info-item--division-inline .agera-hint-btn--corner {
    top: 12px;
    right: 12px;
}

.info-item--division-inline:focus-within,
.info-item--division-inline:hover {
    z-index: 40;
}

.agera-profile-division-value {
    display: block;
    padding-right: 0;
    color: var(--division-color, #eef2ff);
    font-size: 16px;
    font-weight: 700;
    word-break: break-word;
}

.agera-profile-division-value.has-glow {
    text-shadow: 0 0 14px color-mix(in srgb, var(--division-color) 45%, transparent);
}

/* ── Profile best streak (inline info-item) ── */

.info-item--best-streak {
    position: relative;
    overflow: visible;
    z-index: 1;
}

.info-item--best-streak:focus-within,
.info-item--best-streak:hover {
    z-index: 40;
}

.agera-profile-best-streak-value {
    display: block;
    color: var(--ws-color);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
}

.agera-profile-best-streak-value--pulse {
    display: inline-block;
    transform-origin: center center;
    animation: ageraProfileStreakPulse 2.2s ease-in-out infinite;
    font-weight: 800;
    text-shadow:
        0 0 14px color-mix(in srgb, var(--ws-color) 50%, transparent),
        0 0 28px color-mix(in srgb, var(--ws-color) 22%, transparent);
}

@keyframes ageraProfileStreakPulse {
    0%, 100% {
        transform: scale(1);
        text-shadow:
            0 0 12px color-mix(in srgb, var(--ws-color) 40%, transparent),
            0 0 24px color-mix(in srgb, var(--ws-color) 18%, transparent);
    }

    50% {
        transform: scale(1.06);
        text-shadow:
            0 0 18px color-mix(in srgb, var(--ws-color) 58%, transparent),
            0 0 34px color-mix(in srgb, var(--ws-color) 28%, transparent);
    }
}

.agera-profile-best-streak-pop {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);
    z-index: 50;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    min-width: 120px;
    max-width: min(240px, 88vw);
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid color-mix(in srgb, var(--ws-color) 48%, rgba(255, 255, 255, 0.12));
    background:
        linear-gradient(145deg, color-mix(in srgb, var(--ws-color) 28%, transparent), color-mix(in srgb, var(--ws-color) 10%, transparent)),
        rgba(10, 14, 28, 0.97);
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(6px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    box-shadow:
        0 12px 28px rgba(0, 0, 0, 0.38),
        0 0 22px color-mix(in srgb, var(--ws-color) 22%, transparent),
        inset 0 0 14px color-mix(in srgb, var(--ws-color) 12%, transparent);
}

.agera-profile-best-streak-pop-modes {
    display: block;
    color: #c5d0ec;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.35;
    text-align: center;
    text-transform: none;
    letter-spacing: normal;
    white-space: normal;
}

.agera-profile-best-streak-pop-tier {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 5px;
    border: 1px solid color-mix(in srgb, var(--ws-color) 55%, rgba(255, 255, 255, 0.15));
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--ws-color) 50%, transparent), color-mix(in srgb, var(--ws-color) 28%, transparent)),
        color-mix(in srgb, var(--ws-color) 14%, rgba(8, 12, 28, 0.9));
    color: color-mix(in srgb, var(--ws-color) 95%, #fff);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-shadow: 0 0 12px color-mix(in srgb, var(--ws-color) 50%, transparent);
    white-space: nowrap;
    box-shadow: 0 0 14px color-mix(in srgb, var(--ws-color) 24%, transparent);
}

.agera-profile-best-streak-pop-tier .agera-winstreak-tier-badge-label {
    text-shadow: inherit;
}

.info-item--best-streak .agera-profile-best-streak-pop {
    display: flex;
    margin-bottom: 0;
}

.info-item--best-streak .agera-profile-best-streak-pop-modes {
    display: block;
    margin-bottom: 0;
}

.info-item--best-streak .agera-profile-best-streak-pop-tier {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    margin-bottom: 0;
}

.info-item--best-streak .agera-winstreak-tier-badge-label {
    display: inline;
    margin-bottom: 0;
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
}

.info-item--best-streak:hover .agera-profile-best-streak-pop,
.info-item--best-streak:focus-within .agera-profile-best-streak-pop,
.info-item--best-streak.is-open .agera-profile-best-streak-pop {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* ── Mode division (highlight-box style) ── */

.agera-mode-division {
    position: relative;
    z-index: 2;
    margin-top: 18px;
}

.agera-mode-division:focus-within,
.agera-mode-division:hover {
    z-index: 80;
}

.agera-mode-division-box {
    margin-top: 0;
    text-align: left;
    overflow: visible;
}

.highlight-box .agera-division-emblem,
.highlight-box .agera-division-emblem-shape,
.highlight-box .agera-ws-fx,
.highlight-box .agera-ws-fx-dot,
.highlight-box .agera-ws-flame,
.highlight-box .agera-ws-arrow {
    margin-bottom: 0;
    text-transform: none;
    letter-spacing: normal;
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
}

.highlight-box .agera-division-emblem-shape {
    font-size: 0;
}

.agera-mode-division-inner {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 18px;
    align-items: center;
}

.agera-mode-division-emblem-wrap {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    overflow: visible;
}

.agera-mode-division-text {
    min-width: 0;
}

.agera-mode-division-scope {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.agera-division-name {
    display: block;
    color: var(--division-color);
    font-size: clamp(1.4rem, 3vw, 1.8rem);
    line-height: 1.15;
}

.agera-division-name.has-glow {
    text-shadow: 0 0 18px color-mix(in srgb, var(--division-color) 42%, transparent);
}

.agera-mode-division-wins {
    display: block;
    margin-top: 6px;
    color: #b8c4e6;
    font-size: 13px;
    font-weight: 500;
}

.agera-mode-division-progress {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.agera-division-progress-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    color: #9aa8c8;
    font-size: 12px;
    font-weight: 500;
}

.agera-division-progress-track {
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.agera-division-progress-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--division-color), color-mix(in srgb, var(--division-color) 65%, white));
    transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.agera-mode-division-max {
    margin: 14px 0 0;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--division-color);
    font-size: 13px;
    font-weight: 500;
}

/* ── Division emblems (different shapes) ── */

.agera-division-emblem {
    position: relative;
    display: block;
    flex-shrink: 0;
    overflow: visible;
    box-sizing: border-box;
}

.agera-division-emblem-shape {
    position: absolute;
    inset: 4px;
    background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--division-color) 75%, white), var(--division-color));
    transition: transform 0.3s ease, filter 0.3s ease;
}

.agera-division-emblem.has-glow .agera-division-emblem-shape {
    box-shadow: 0 0 20px color-mix(in srgb, var(--division-color) 55%, transparent);
    animation: ageraEmblemBreathe 3.2s ease-in-out infinite;
}

@keyframes ageraEmblemBreathe {
    0%, 100% { filter: brightness(1); opacity: 1; }
    50% { filter: brightness(1.14); opacity: 0.95; }
}

.agera-division-emblem--novice .agera-division-emblem-shape,
.agera-division-emblem--student .agera-division-emblem-shape {
    border-radius: 50%;
}

.agera-division-emblem--intern .agera-division-emblem-shape {
    border-radius: 12px;
    transform: rotate(45deg);
}

.agera-division-emblem--skilled .agera-division-emblem-shape {
    clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
}

.agera-division-emblem--experienced .agera-division-emblem-shape {
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

.agera-division-emblem--professional .agera-division-emblem-shape {
    clip-path: polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%);
}

.agera-division-emblem--expert .agera-division-emblem-shape {
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

.agera-division-emblem--master .agera-division-emblem-shape {
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
}

.agera-division-emblem--magister .agera-division-emblem-shape {
    border-radius: 4px;
    transform: rotate(45deg);
}

.agera-division-emblem--legend-1 .agera-division-emblem-shape {
    clip-path: polygon(50% 0%, 65% 35%, 100% 38%, 74% 62%, 82% 100%, 50% 78%, 18% 100%, 26% 62%, 0% 38%, 35% 35%);
}

.agera-division-emblem--legend-2 .agera-division-emblem-shape {
    clip-path: polygon(50% 0%, 95% 25%, 80% 100%, 20% 100%, 5% 25%);
}

.agera-division-emblem--legend-3 .agera-division-emblem-shape {
    clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
}

.agera-division-emblem--legend-4 .agera-division-emblem-shape {
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

.agera-division-emblem--legend-5 .agera-division-emblem-shape {
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

/* Emblem sizes: card (рядом с дивизией) и hint (список в подсказке) */

.agera-division-emblem.agera-division-emblem--card {
    width: 64px;
    height: 64px;
    min-width: 64px;
    min-height: 64px;
}

.agera-division-emblem.agera-division-emblem--card .agera-division-emblem-shape {
    inset: 5px;
}

.agera-division-emblem.agera-division-emblem--card.agera-division-emblem--intern .agera-division-emblem-shape {
    border-radius: 10px;
}

.agera-division-emblem.agera-division-emblem--card.agera-division-emblem--magister .agera-division-emblem-shape {
    border-radius: 5px;
}

.agera-division-emblem.agera-division-emblem--hint {
    width: 16px;
    height: 16px;
    min-width: 16px;
    min-height: 16px;
}

.agera-division-emblem.agera-division-emblem--hint .agera-division-emblem-shape {
    inset: 3px;
}

.agera-division-emblem.agera-division-emblem--hint.agera-division-emblem--intern .agera-division-emblem-shape,
.agera-division-emblem.agera-division-emblem--hint.agera-division-emblem--magister .agera-division-emblem-shape {
    border-radius: 2px;
}

.agera-division-emblem.agera-division-emblem--hint.has-glow .agera-division-emblem-shape {
    box-shadow: none;
    animation: none;
    filter: none;
}

/* ── Winstreak module ── */

.agera-winstreak-module {
    position: relative;
    z-index: 1;
    margin-top: 18px;
}

.agera-winstreak-module:focus-within,
.agera-winstreak-module:hover {
    z-index: 60;
}

.agera-winstreak-hero {
    position: relative;
    z-index: 1;
    margin-top: 18px;
    text-align: center;
    overflow: visible;
}

.agera-winstreak-hero:has(.agera-hint-btn--dual:hover),
.agera-winstreak-hero:has(.agera-hint-btn--dual:focus-visible),
.agera-winstreak-hero:has(.agera-hint-btn--dual.is-open) {
    z-index: 80;
}

.agera-winstreak-hero--building.highlight-box {
    padding-top: 14px;
}

.agera-winstreak-hero--building .agera-module-head {
    position: relative;
    z-index: 5;
    margin-top: -4px;
    margin-bottom: 12px;
    align-items: center;
}

.agera-winstreak-hero--building .agera-module-title {
    margin-top: -2px;
    line-height: 1.2;
}

.agera-winstreak-hero--building .agera-hint-btn--dual {
    margin-top: -2px;
}

.agera-winstreak-hero .agera-hint-tooltip {
    z-index: 400;
}

.agera-winstreak-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.agera-ws-arrow {
    position: absolute;
    bottom: -12px;
    width: 10px;
    height: 10px;
    border-left: 2px solid color-mix(in srgb, var(--ws-color) 55%, transparent);
    border-top: 2px solid color-mix(in srgb, var(--ws-color) 55%, transparent);
    transform: rotate(45deg);
    opacity: 0;
    filter: blur(0.2px);
    animation: ageraWsArrowRise 3.6s linear infinite;
}

.agera-ws-arrow--1 { left: 8%; animation-delay: 0s; }
.agera-ws-arrow--2 { left: 18%; animation-delay: 0.6s; transform: rotate(45deg) scale(0.8); }
.agera-ws-arrow--3 { left: 32%; animation-delay: 1.4s; transform: rotate(45deg) scale(0.65); }
.agera-ws-arrow--4 { left: 48%; animation-delay: 0.3s; transform: rotate(45deg) scale(0.9); }
.agera-ws-arrow--5 { left: 62%; animation-delay: 1.9s; transform: rotate(45deg) scale(0.7); }
.agera-ws-arrow--6 { left: 76%; animation-delay: 1.1s; transform: rotate(45deg) scale(0.85); }
.agera-ws-arrow--7 { left: 88%; animation-delay: 2.4s; transform: rotate(45deg) scale(0.6); }
.agera-ws-arrow--8 { left: 94%; animation-delay: 0.9s; transform: rotate(45deg) scale(0.75); }

.agera-winstreak-hero-body {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    padding: 8px 0 4px;
}

.agera-winstreak-hero-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 100%;
}

.agera-winstreak-hero-value-wrap {
    position: relative;
    display: block;
    margin-bottom: 8px;
    padding: 12px 8px;
}

.agera-winstreak-hero-rings {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.agera-ws-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 108%;
    height: 108%;
    border-radius: 50%;
    border: 2px solid color-mix(in srgb, var(--ws-color) 42%, transparent);
    transform: translate(-50%, -50%);
    opacity: 0;
    pointer-events: none;
}

.agera-winstreak-tier--bronze .agera-ws-ring--1 {
    animation: ageraWsRingPulse 2.8s ease-in-out infinite;
    opacity: 0.55;
}

.agera-winstreak-tier--silver .agera-ws-ring--1 {
    border-style: dashed;
    animation: ageraWsRingSpin 5.5s linear infinite;
    opacity: 0.6;
}

.agera-winstreak-tier--gold .agera-ws-ring--1 {
    animation: ageraWsRingPulse 2.2s ease-in-out infinite;
    opacity: 0.65;
    box-shadow: 0 0 18px color-mix(in srgb, var(--ws-color) 28%, transparent);
}

.agera-winstreak-tier--gold .agera-ws-ring--2 {
    width: 92%;
    height: 92%;
    border-width: 1px;
    animation: ageraWsRingPulse 2.2s ease-in-out 0.6s infinite;
    opacity: 0.4;
}

.agera-winstreak-tier--platinum .agera-ws-ring--1 {
    border-style: dotted;
    animation: ageraWsRingSpin 4.2s linear infinite;
    opacity: 0.62;
}

.agera-winstreak-tier--platinum .agera-ws-ring--2 {
    width: 94%;
    height: 94%;
    animation: ageraWsRingSpinReverse 3.6s linear infinite;
    opacity: 0.45;
}

.agera-winstreak-tier--diamond .agera-ws-ring--1 {
    animation: ageraWsRingSpin 3.8s linear infinite;
    opacity: 0.68;
    box-shadow: 0 0 14px color-mix(in srgb, var(--ws-color) 22%, transparent);
}

.agera-winstreak-tier--diamond .agera-ws-ring--2 {
    width: 88%;
    height: 88%;
    animation: ageraWsRingSpinReverse 3.2s linear infinite;
    opacity: 0.5;
}

.agera-winstreak-tier--legendary .agera-ws-ring--1 {
    animation: ageraWsRingBreathe 2s ease-in-out infinite;
    opacity: 0.75;
    box-shadow: 0 0 22px color-mix(in srgb, var(--ws-color) 35%, transparent);
}

.agera-winstreak-tier--legendary .agera-ws-ring--2 {
    width: 96%;
    height: 96%;
    animation: ageraWsRingSpin 2.8s linear infinite;
    opacity: 0.55;
}

.agera-winstreak-tier--legendary .agera-ws-ring--3 {
    width: 84%;
    height: 84%;
    border-width: 1px;
    animation: ageraWsRingSpinReverse 2.2s linear infinite;
    opacity: 0.4;
}

.agera-winstreak-tier--bronze .agera-ws-ring--2,
.agera-winstreak-tier--bronze .agera-ws-ring--3,
.agera-winstreak-tier--silver .agera-ws-ring--2,
.agera-winstreak-tier--silver .agera-ws-ring--3,
.agera-winstreak-tier--gold .agera-ws-ring--3,
.agera-winstreak-tier--platinum .agera-ws-ring--3,
.agera-winstreak-tier--diamond .agera-ws-ring--3 {
    display: none;
}

.agera-winstreak-hero-flames {
    position: absolute;
    left: 50%;
    bottom: 8%;
    z-index: 0;
    width: 140%;
    height: 70%;
    transform: translateX(-50%);
    pointer-events: none;
}

.agera-ws-flame {
    position: absolute;
    bottom: 0;
    width: 10px;
    height: 28px;
    border-radius: 50% 50% 18% 18%;
    background: linear-gradient(
        to top,
        color-mix(in srgb, var(--ws-color) 90%, #fff),
        color-mix(in srgb, var(--ws-color) 40%, transparent) 55%,
        transparent
    );
    opacity: 0;
    filter: blur(0.5px);
    animation: ageraWsFlameRise 1.35s ease-out infinite;
}

.agera-ws-flame--1 { left: 12%; animation-delay: 0s; }
.agera-ws-flame--2 { left: 28%; width: 8px; height: 22px; animation-delay: 0.25s; }
.agera-ws-flame--3 { left: 44%; width: 12px; height: 32px; animation-delay: 0.5s; }
.agera-ws-flame--4 { left: 58%; width: 9px; height: 24px; animation-delay: 0.15s; }
.agera-ws-flame--5 { left: 72%; width: 11px; height: 30px; animation-delay: 0.4s; }
.agera-ws-flame--6 { left: 86%; width: 7px; height: 20px; animation-delay: 0.65s; }

.agera-winstreak-hero-value {
    position: relative;
    z-index: 1;
    font-size: clamp(3.2rem, 11vw, 5rem);
    font-weight: 800;
    line-height: 1;
    color: var(--ws-color);
    text-shadow:
        0 0 24px color-mix(in srgb, var(--ws-color) 70%, transparent),
        0 0 48px color-mix(in srgb, var(--ws-color) 35%, transparent);
    animation: ageraWsNumberPulse 1.7s ease-in-out infinite;
}

.agera-winstreak-hero-tagline {
    margin: 0 0 8px;
    width: 100%;
    color: #b8c4e6;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-align: center;
    text-transform: uppercase;
}

.agera-winstreak-tier-badge--hero {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    width: auto;
    max-width: max-content;
    padding: 5px 12px;
    gap: 7px;
    border-width: 1px;
    border-style: solid;
    border-radius: 6px;
    border-color: color-mix(in srgb, var(--ws-color) 65%, rgba(255, 255, 255, 0.2));
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--ws-color) 78%, transparent), color-mix(in srgb, var(--ws-color) 48%, transparent)),
        color-mix(in srgb, var(--ws-color) 38%, rgba(6, 10, 24, 0.92));
    color: color-mix(in srgb, var(--ws-color) 95%, #fff);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.05em;
    line-height: 1.2;
    vertical-align: middle;
    box-shadow:
        0 0 16px color-mix(in srgb, var(--ws-color) 38%, transparent),
        inset 0 0 12px color-mix(in srgb, var(--ws-color) 22%, transparent);
    animation: ageraWsBadgeGlow 2.4s ease-in-out infinite;
}

.agera-winstreak-tier-badge--hero .agera-winstreak-tier-icon {
    width: 16px;
    height: 16px;
    transform: translateY(-1.5px);
}

@keyframes ageraWsRingPulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(0.9);
        opacity: 0.35;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.06);
        opacity: 0.8;
    }
}

@keyframes ageraWsRingSpin {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes ageraWsRingSpinReverse {
    from {
        transform: translate(-50%, -50%) rotate(360deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(0deg);
    }
}

@keyframes ageraWsRingBreathe {
    0%, 100% {
        transform: translate(-50%, -50%) scale(0.86);
        opacity: 0.45;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0.9;
    }
}

@keyframes ageraWsNumberPulse {
    0%, 100% {
        transform: translateY(0) scale(1);
    }

    35% {
        transform: translateY(-5px) scale(1.04);
    }

    70% {
        transform: translateY(-2px) scale(1.01);
    }
}

@keyframes ageraWsFlameRise {
    0% {
        opacity: 0;
        transform: translateY(12px) scale(0.5);
    }

    25% {
        opacity: 0.85;
    }

    100% {
        opacity: 0;
        transform: translateY(-52px) scale(1.15);
    }
}

@keyframes ageraWsArrowRise {
    0% {
        opacity: 0;
        transform: translateY(0) rotate(45deg) scale(0.7);
    }

    15% {
        opacity: 0.35;
    }

    100% {
        opacity: 0;
        transform: translateY(-120px) rotate(45deg) scale(1);
    }
}

@keyframes ageraWsBadgeGlow {
    0%, 100% {
        box-shadow:
            0 0 12px color-mix(in srgb, var(--ws-color) 32%, transparent),
            inset 0 0 8px color-mix(in srgb, var(--ws-color) 14%, transparent);
    }

    50% {
        box-shadow:
            0 0 22px color-mix(in srgb, var(--ws-color) 50%, transparent),
            inset 0 0 14px color-mix(in srgb, var(--ws-color) 24%, transparent);
    }
}

@media (prefers-reduced-motion: reduce) {
    .agera-winstreak-hero-value,
    .agera-profile-best-streak-value--pulse,
    .agera-winstreak-tier-badge--hero,
    .agera-ws-flame,
    .agera-ws-arrow,
    .agera-ws-ring {
        animation: none !important;
    }

    .agera-profile-best-streak-value--pulse {
        transform: none;
    }

    .agera-ws-ring {
        opacity: 0.45;
    }
}

.agera-winstreak-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 14px;
    align-items: stretch;
}

.agera-winstreak-cell {
    position: relative;
    margin: 0;
    min-height: 110px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    overflow: hidden;
    text-align: center;
}

.agera-winstreak-cell--best {
    grid-row: 1 / span 2;
}

.agera-winstreak-cell--progress {
    grid-column: 2;
    grid-row: 1;
    text-align: left;
}

.agera-winstreak-cell--current {
    grid-column: 2;
    grid-row: 2;
}

.agera-winstreak-cell-label {
    position: relative;
    z-index: 2;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.agera-winstreak-cell-value {
    position: relative;
    z-index: 2;
    color: var(--ws-color, #eef2ff);
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    line-height: 1.1;
    text-shadow: 0 0 16px color-mix(in srgb, var(--ws-color) 40%, transparent);
}

.agera-winstreak-cell-value--best {
    text-shadow: 0 0 20px color-mix(in srgb, var(--ws-color) 50%, transparent);
}

.agera-winstreak-tier-badge {
    position: relative;
    z-index: 2;
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 5px;
    align-self: center;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(104, 128, 255, 0.22);
    background: rgba(104, 128, 255, 0.1);
    color: var(--ws-color);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.agera-winstreak-tier-icon {
    display: block;
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    object-fit: contain;
    image-rendering: auto;
    align-self: center;
    transform: translateY(-1px);
}

.agera-winstreak-tier-badge-label {
    line-height: 1.2;
    align-self: center;
}

.agera-winstreak-tier-badge--small {
    font-size: 11px;
    padding: 4px 10px;
    gap: 6px;
}

.agera-winstreak-tier-badge--small .agera-winstreak-tier-icon {
    width: 16px;
    height: 16px;
    transform: translateY(-1.5px);
}

.agera-profile-best-streak-pop-tier .agera-winstreak-tier-icon {
    transform: translateY(-1.5px);
}

.highlight-box .agera-winstreak-tier-badge--hero {
    display: inline-flex;
    margin-bottom: 0;
}

.highlight-box .agera-winstreak-tier-icon {
    margin-bottom: 0;
}

.highlight-box .agera-winstreak-tier-badge,
.highlight-box span.agera-winstreak-tier-badge,
.highlight-box span.agera-profile-best-streak-pop-tier {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    margin-bottom: 0;
}

.highlight-box .agera-winstreak-tier-badge-label {
    margin-bottom: 0;
    display: inline;
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
}

/* Best cell tier backgrounds + fx */

.agera-winstreak-tier--bronze .agera-winstreak-cell--best {
    background:
        radial-gradient(circle at 50% 0%, rgba(205, 127, 50, 0.28), transparent 62%),
        rgba(104, 128, 255, 0.08);
}

.agera-winstreak-tier--silver .agera-winstreak-cell--best {
    background:
        radial-gradient(circle at 50% 0%, rgba(200, 208, 220, 0.24), transparent 62%),
        rgba(104, 128, 255, 0.08);
}

.agera-winstreak-tier--gold .agera-winstreak-cell--best {
    background:
        radial-gradient(circle at 50% 0%, rgba(255, 213, 74, 0.26), transparent 62%),
        rgba(104, 128, 255, 0.08);
}

.agera-winstreak-tier--platinum .agera-winstreak-cell--best {
    background:
        radial-gradient(circle at 50% 0%, rgba(103, 232, 249, 0.22), transparent 62%),
        rgba(104, 128, 255, 0.08);
}

.agera-winstreak-tier--diamond .agera-winstreak-cell--best {
    background:
        radial-gradient(circle at 50% 0%, rgba(91, 157, 255, 0.24), transparent 62%),
        rgba(104, 128, 255, 0.08);
}

.agera-winstreak-tier--legendary .agera-winstreak-cell--best {
    background:
        radial-gradient(circle at 50% 0%, rgba(255, 102, 236, 0.26), transparent 62%),
        rgba(104, 128, 255, 0.08);
    animation: ageraWsCellBreathe 3.5s ease-in-out infinite;
}

.agera-ws-fx {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.agera-ws-fx-dot {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--ws-color);
    opacity: 0.35;
    filter: blur(0.5px);
}

.agera-ws-fx-dot--1 {
    left: 18%;
    animation: ageraWsFall 4.2s ease-in-out infinite;
}

.agera-ws-fx-dot--2 {
    left: 52%;
    width: 4px;
    height: 4px;
    animation: ageraWsFall 5.1s ease-in-out 0.8s infinite;
}

.agera-ws-fx-dot--3 {
    left: 78%;
    width: 5px;
    height: 5px;
    animation: ageraWsFall 4.6s ease-in-out 1.4s infinite;
}

.agera-winstreak-progress-track {
    position: relative;
    z-index: 1;
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.agera-winstreak-progress-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, rgba(104, 128, 255, 0.55), rgba(104, 128, 255, 0.95));
    transition: width 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.agera-winstreak-progress-caption {
    position: relative;
    z-index: 2;
    color: #9aa8c8;
    font-size: 12px;
    font-weight: 500;
}

.agera-winstreak-remaining {
    position: relative;
    z-index: 2;
    color: #b8c4e6;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.35;
}

.agera-winstreak-remaining strong {
    color: var(--ws-color);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
    text-shadow: none;
}

.highlight-box .agera-winstreak-remaining strong {
    font-size: 12px;
    line-height: 1.35;
}

/* ── Tier color vars ── */

.agera-winstreak-tier--bronze { --ws-color: #cd7f32; }
.agera-winstreak-tier--silver { --ws-color: #c8d0dc; }
.agera-winstreak-tier--gold { --ws-color: #ffd54a; }
.agera-winstreak-tier--platinum { --ws-color: #67e8f9; }
.agera-winstreak-tier--diamond { --ws-color: #5b9dff; }
.agera-winstreak-tier--legendary { --ws-color: #ff66ec; }

[data-stats-panel] {
    overflow: visible;
}

/* ── Hint modal (center screen) ── */

@media (prefers-reduced-motion: reduce) {
    .agera-winstreak-hero-bg,
    .agera-winstreak-hero-rings,
    .agera-winstreak-hero-flames,
    .agera-winstreak-hero-value--pulse,
    .agera-profile-best-streak-value--pulse,
    .agera-winstreak-tier-icon {
        animation: none !important;
    }
}

body.agera-hint-modal-open {
    overflow: hidden;
}

.agera-hint-modal {
    position: fixed;
    inset: 0;
    z-index: 1400;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.agera-hint-modal[hidden] {
    display: none !important;
}

.agera-hint-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 8, 18, 0.72);
    backdrop-filter: blur(4px);
}

.agera-hint-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(440px, calc(100vw - 32px));
    max-height: min(78vh, 560px);
    padding: 20px 18px 18px;
    border-radius: 18px;
    border: 1px solid rgba(104, 128, 255, 0.35);
    background: rgba(12, 16, 30, 0.98);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
    overflow: auto;
    animation: ageraHintModalIn 0.22s ease;
}

.agera-hint-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    color: #dce4ff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.agera-hint-modal-close:hover,
.agera-hint-modal-close:focus-visible {
    background: rgba(104, 128, 255, 0.16);
    border-color: rgba(104, 128, 255, 0.35);
    outline: none;
}

.agera-hint-modal-body .agera-hint-tooltip-title {
    padding-right: 36px;
}

.agera-hint-modal-body .agera-hint-tier-grid--division {
    gap: 5px;
}

.agera-hint-modal-body .agera-hint-tier-grid {
    gap: 8px;
}

@keyframes ageraHintModalIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ── Animations ── */

@keyframes ageraWsCellBreathe {
    0%, 100% { box-shadow: 0 12px 28px rgba(54, 85, 212, 0.14); }
    50% { box-shadow: 0 16px 34px rgba(255, 102, 236, 0.18); }
}

@keyframes ageraWsFall {
    0% { top: -8%; opacity: 0; transform: translateY(0) scale(0.6); }
    20% { opacity: 0.45; }
    100% { top: 92%; opacity: 0; transform: translateY(0) scale(1); }
}

@keyframes ageraCountPop {
    0% { transform: scale(0.88); opacity: 0.4; }
    100% { transform: scale(1); opacity: 1; }
}
