/* ===========================
   GoRanked — About (Gaming) v5
   Scope: .gx-about
   =========================== */

:root {
    --gx-bg: #0b0f14;
    --gx-surface: #0f141b;
    --gx-surface-2: #131a22;
    --gx-line: #1a2330;

    --gx-text: #dfe7f1;
    --gx-text-dim: #a3b2c4;
    --gx-heading: #ffffff;

    --gx-accent: #7c4dff;
    --gx-accent-2: #00e5ff;
    --gx-ok: #24d164;

    --gx-radius: 18px;
    --gx-radius-lg: 22px;

    --gx-shadow-1: 0 2px 18px rgba(0, 0, 0, 0.35);
    --gx-shadow-2: 0 8px 32px rgba(0, 0, 0, 0.45);
    --gx-ring:
        0 0 0 2px rgba(124, 77, 255, 0.25), 0 0 24px rgba(124, 77, 255, 0.35);

    --gx-speed-1: 0.25s;
    --gx-speed-2: 0.45s;

    --gx-maxw: 1200px;
    /* ШИРЕ карточки эксперта — поместятся все баджи в один ряд */
    --gx-card-min: 360px;
}

/* ROOT */
.gx-about__root {
    position: relative;
    isolation: isolate;
    background: var(--gx-bg);
    overflow: hidden;
}
.gx-about__container {
    max-width: var(--gx-maxw);
}

/* BG */
.gx-about__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}
.gx-about__bg-layer {
    position: absolute;
    inset: -10%;
    opacity: 0.6;
}
.gx-about__bg-layer--grid {
    background:
        linear-gradient(transparent 95%, rgba(124, 77, 255, 0.15) 96%),
        linear-gradient(90deg, transparent 95%, rgba(124, 77, 255, 0.1) 96%);
    background-size: 28px 28px;
    filter: blur(0.3px);
}
.gx-about__bg-layer--glow {
    background:
        radial-gradient(
            60% 60% at 50% 10%,
            rgba(0, 229, 255, 0.1),
            transparent 60%
        ),
        radial-gradient(
            40% 40% at 80% 20%,
            rgba(124, 77, 255, 0.12),
            transparent 60%
        ),
        radial-gradient(
            30% 30% at 10% 30%,
            rgba(36, 209, 100, 0.08),
            transparent 60%
        );
}
.gx-about__bg-layer--stars {
    background-image:
        radial-gradient(
            1px 1px at 15% 25%,
            rgba(255, 255, 255, 0.15),
            transparent
        ),
        radial-gradient(
            1px 1px at 35% 65%,
            rgba(255, 255, 255, 0.12),
            transparent
        ),
        radial-gradient(
            1px 1px at 75% 15%,
            rgba(255, 255, 255, 0.17),
            transparent
        ),
        radial-gradient(
            1px 1px at 55% 85%,
            rgba(255, 255, 255, 0.1),
            transparent
        );
    animation: gxTwinkle 8s linear infinite;
}
@keyframes gxTwinkle {
    0%,
    100% {
        opacity: 0.35;
    }
    50% {
        opacity: 0.7;
    }
}

/* HERO */
.gx-hero {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: clamp(24px, 6vw, 48px) 0 clamp(16px, 4vw, 32px);
}
.gx-hero__eyebrow {
    color: var(--gx-accent-2);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.9;
}
.gx-hero__title {
    margin-top: 8px;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.1;
    color: var(--gx-heading);
    text-shadow: 0 2px 24px rgba(0, 229, 255, 0.15);
}
.gx-hero__cta {
    margin-top: 18px;
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}
.gx-btn {
    --_bg: transparent;
    --_fg: var(--gx-text);
    --_bd: var(--gx-accent-2);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border-radius: 14px;
    padding: 12px 18px;
    border: 1px solid var(--_bd);
    color: var(--_fg);
    background: var(--_bg);
    box-shadow: var(--gx-shadow-1);
    transition:
        transform var(--gx-speed-1),
        box-shadow var(--gx-speed-2),
        background var(--gx-speed-2);
}
.gx-btn:focus-visible {
    outline: none;
    box-shadow: var(--gx-ring);
}
.gx-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--gx-shadow-2);
}
.gx-btn--primary {
    --_bg: linear-gradient(
        135deg,
        rgba(124, 77, 255, 0.15),
        rgba(0, 229, 255, 0.15)
    );
    --_bd: rgba(124, 77, 255, 0.45);
}
.gx-btn--inverted {
    --_bg: #0a0e12;
    --_fg: #fff;
    --_bd: rgba(0, 0, 0, 0.7);
}

/* SECTION */
.gx-section {
    position: relative;
    z-index: 1;
}
.gx-section__wrapper {
    padding-block: clamp(18px, 3.6vw, 36px);
}

/* CARD */
.gx-card {
    position: relative;
    border-radius: var(--gx-radius-lg);
}
.gx-card__wrapper {
    display: grid;
    align-items: stretch;
    gap: 22px;
    background: linear-gradient(180deg, var(--gx-surface), var(--gx-surface-2));
    border: 1px solid var(--gx-line);
    border-radius: var(--gx-radius-lg);
    padding: clamp(16px, 3vw, 28px);
    box-shadow: var(--gx-shadow-1);
    overflow: hidden;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
}
.gx-card--reverse .gx-card__wrapper {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
}
.gx-card--compact .gx-card__wrapper {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
}
.gx-card--flat .gx-card__wrapper {
    display: block !important;
    background: transparent;
    border: none;
    padding: 0;
    box-shadow: none;
}
.gx-card__wrapper > * {
    min-width: 0;
}
.gx-card__media {
    justify-self: end;
    align-self: stretch;
    position: relative;
    z-index: 1;
}
.gx-card__body {
    align-self: center;
    position: relative;
    z-index: 2;
}
@media (max-width: 1024px) {
    .gx-card__wrapper {
        grid-template-columns: 1fr;
    }
    .gx-card--reverse .gx-card__media {
        order: 2;
    }
    .gx-card--reverse .gx-card__body {
        order: 1;
    }
}

/* MEDIA */
.gx-media {
    position: relative;
    border-radius: var(--gx-radius);
    overflow: hidden;
    background: #0c1117;
    border: 1px solid var(--gx-line);
}
.gx-media img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    object-fit: contain;
    transform: translateZ(0);
}
.gx-media--shine::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        125deg,
        transparent 20%,
        rgba(255, 255, 255, 0.06) 40%,
        transparent 60%
    );
    transform: translateX(-120%);
    transition: transform 1.2s ease;
}
.gx-media--shine:hover::after {
    transform: translateX(120%);
}
.gx-media--ring {
    box-shadow:
        0 0 0 1px rgba(124, 77, 255, 0.35),
        0 0 32px rgba(124, 77, 255, 0.2) inset;
}

/* TEXT */
.gx-eyebrow {
    color: var(--gx-accent);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}
.gx-heading {
    font-size: clamp(22px, 2.6vw, 30px);
    color: var(--gx-heading);
    margin-top: 6px;
}
.gx-lead {
    color: var(--gx-text);
    opacity: 0.95;
}
.gx-text {
    color: var(--gx-text-dim);
    line-height: 1.65;
}

/* BANNER */
.gx-banner {
    margin-top: 18px;
}
.gx-banner__wrapper {
    background: linear-gradient(
        135deg,
        rgba(0, 229, 255, 0.16),
        rgba(124, 77, 255, 0.16)
    );
    border: 1px solid rgba(124, 77, 255, 0.35);
    border-radius: var(--gx-radius);
    padding: clamp(12px, 2.6vw, 18px);
    display: grid;
    gap: 8px;
    align-items: center;
    grid-template-columns: 1fr auto;
}

/* =========================
   PROFILES GRID (auto-fit)
   ========================= */
.gx-profiles {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(var(--gx-card-min), 1fr));
}
.gx-profiles__item {
    min-width: 0;
}
.gx-profile-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    background: linear-gradient(180deg, var(--gx-surface), var(--gx-surface-2));
    border: 1px solid var(--gx-line);
    border-radius: var(--gx-radius);
    padding: 16px;
    overflow: hidden;
    box-shadow: var(--gx-shadow-1);
}

/* header/footer карточки */
.gx-avatar {
    width: 100%;
    border-radius: 14px;
    overflow: hidden;
    background: #0c1117;
    border: 1px solid var(--gx-line);
}
.gx-avatar img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    filter: saturate(0.95);
    transition: filter var(--gx-speed-2);
}
.gx-profile-card:hover .gx-avatar img {
    filter: saturate(1.05);
}
.gx-profiles__info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
}
.gx-label {
    color: var(--gx-text-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.gx-name {
    color: var(--gx-heading);
    font-weight: 700;
}
.gx-profiles__footer {
    display: flex;
    align-items: center;
    gap: 10px;
}
.gx-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(36, 209, 100, 0.12);
    border: 1px solid rgba(36, 209, 100, 0.35);
}
.gx-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(124, 77, 255, 0.12);
    border: 1px solid rgba(124, 77, 255, 0.35);
    transition:
        transform var(--gx-speed-1),
        background var(--gx-speed-1);
}
.gx-arrow:hover {
    transform: translateX(2px);
    background: rgba(124, 77, 255, 0.18);
}

/* =========================
   STATS — баджи в один ряд
   ========================= */
.gx-stats {
    margin-top: auto;
    display: grid !important;
    /* на десктопе — 5 колонок (Game, Rank, MMR, Winrate, Wins) */
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}
@media (max-width: 1100px) {
    /* на ноутбуках — 3 колонки, остальное переносится */
    .gx-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
@media (max-width: 640px) {
    /* на мобилках — 2 колонки */
    .gx-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Чип-бадж */
.gx-stats__item,
.gx-about .profile-stats__item {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;

    background: #10161d !important;
    border: 1px solid var(--gx-line) !important;
    border-radius: 14px !important;

    padding: 12px 14px !important;
    min-height: 56px !important;

    width: auto !important;
    height: auto !important;
    float: none !important;
    margin: 0 !important;
    writing-mode: horizontal-tb !important;
    transform: none !important;
    box-shadow: none !important;
}

/* отключаем старое «растягивание» больших карточек */
.gx-about .profile-stats__item--big {
    grid-column: span 1 !important;
}

.gx-stats__img img,
.gx-about .profile-stats__img img {
    width: 24px;
    height: 24px;
    display: block;
    margin: 0;
    flex: 0 0 auto;
}

.gx-stats__info,
.gx-about .profile-stats__info {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    min-width: 0 !important;
}
.gx-stats__info .gx-label {
    font-size: 11px;
    letter-spacing: 0.06em;
    opacity: 0.7;
    margin: 0 0 2px 0;
    white-space: nowrap;
}
.gx-stats__info .gx-value {
    font-size: clamp(14px, 1.6vw, 18px);
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    font-variant-numeric: tabular-nums;
}

/* убрать декоративные псевдоэлементы «столбиков» */
.gx-about .profile-stats__item::before,
.gx-about .profile-stats__item::after {
    display: none !important;
}

/* защитa от «наезда» */
.gx-about .gx-card__wrapper {
    overflow: hidden;
}
.gx-about .gx-card__wrapper > * {
    min-width: 0;
}
.gx-about .about-card__img img {
    display: block;
    width: 100%;
    height: auto;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .gx-about__bg-layer--stars {
        animation: none !important;
    }
    .gx-btn,
    .gx-profile-card {
        transition: none !important;
    }
}