* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-height: 100%;
}

body {
    background: #000;
    color: #fff;

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Arial,
        sans-serif;

    display: flex;
    justify-content: center;
}


/* =========================
   ОСНОВНОЙ ЭКРАН
========================= */

.app {
    --accent: #39ff88;
    --accent-rgb: 57, 255, 136;

    position: relative;

    width: 100%;
    max-width: 430px;

    min-height: 100vh;

    overflow-x: hidden;

    padding:
        max(26px, env(safe-area-inset-top))
        18px
        110px;

    background-color: #020604;

    isolation: isolate;

    transition:
        background-image .35s ease,
        --accent .35s ease;
}


/* Затемнение поверх картинки */

.app::before {
    content: "";

    position: fixed;

    top: 0;
    bottom: 0;

    width: min(100%, 430px);

    left: 50%;
    transform: translateX(-50%);

    pointer-events: none;

    background:
        linear-gradient(
            180deg,
            rgba(0, 0, 0, .08) 0%,
            rgba(0, 0, 0, .20) 35%,
            rgba(0, 0, 0, .40) 100%
        );

    z-index: 0;
}


/* Всё содержимое над фоном */

.app > * {
    position: relative;
    z-index: 1;
}


/* =========================
   ФОНЫ СПОРТА
========================= */

.app.theme-football {
    --accent: #39ff88;
    --accent-rgb: 57, 255, 136;
}


.app.theme-basketball {
    --accent: #ff8a1f;
    --accent-rgb: 255, 138, 31;
}


.app.theme-esports {
    --accent: #b15cff;
    --accent-rgb: 177, 92, 255;
}




/* ========================================
   ФИКСИРОВАННЫЙ ФОН СПОРТА
   Фон остаётся на месте при прокрутке карточек
======================================== */

.app::after {
    content: "";

    position: fixed;

    top: 0;
    bottom: 0;

    left: 50%;
    transform: translateX(-50%);

    width: min(100%, 430px);

    background-position: center top;
    background-size: cover;
    background-repeat: no-repeat;

    pointer-events: none;

    z-index: -1;
}

.app.theme-football::after {
    background-image:
        url("./images/football-bg.jpeg");
}

.app.theme-basketball::after {
    background-image:
        url("./images/basketball-bg.jpeg");
}

.app.theme-esports::after {
    background-image:
        url("./images/esports-bg.jpeg");
}


/* =========================
   HEADER
========================= */

.header {
    height: 90px;

    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}


/* =========================
   NEIRO BET
========================= */

.brand {
    position: relative;

    width: 155px;
    height: 75px;

    transform: skew(-7deg);
}


.brand-neiro {
    display: inline-block;

    font-size: 37px;
    line-height: .95;

    font-weight: 950;
    font-style: italic;

    letter-spacing: -2.5px;

    background:
        linear-gradient(
            110deg,
            var(--accent) 0%,
            #ffffff 25%,
            var(--accent) 48%,
            #ffffff 68%,
            var(--accent) 100%
        );

    background-size: 250% 100%;

    -webkit-background-clip: text;
    background-clip: text;

    -webkit-text-fill-color: transparent;

    /* Keep the neon gradient fixed: animated transparent text flickers in iOS WebKit. */
    background-position: 180% center;

    filter:
        drop-shadow(
            0 0 10px
            rgba(var(--accent-rgb), .25)
        );
}


.brand-bet {
    position: absolute;

    left: 71px;
    top: 39px;

    font-size: 12px;
    font-weight: 800;

    letter-spacing: 7px;

    color: var(--accent);

    text-shadow:
        0 0 10px
        rgba(var(--accent-rgb), .55);
}


@keyframes logoShimmer {

    0% {
        background-position: 180% center;
    }

    100% {
        background-position: -80% center;
    }

}


/* =========================
   PREMIUM
========================= */

.header-actions {
    display: flex;
    align-items: center;

    gap: 9px;

    padding-top: 5px;
}


.premium {
    height: 39px;

    padding: 0 14px;

    border-radius: 18px;

    border:
        1px solid
        rgba(255, 213, 100, .30);

    background:
        linear-gradient(
            180deg,
            rgba(255,255,255,.09),
            rgba(255,255,255,.025)
        );

    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);

    color: #ffd96c;

    font-size: 11px;
    font-weight: 750;

    letter-spacing: .4px;

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.12),
        0 7px 20px rgba(0,0,0,.28);
}


.notification {
    width: 39px;
    height: 39px;

    border-radius: 50%;

    border:
        1px solid
        rgba(255,255,255,.09);

    background:
        linear-gradient(
            180deg,
            rgba(255,255,255,.10),
            rgba(255,255,255,.025)
        );

    color: white;

    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}


/* =========================
   SPORT TABS
========================= */

.sport-tabs {
    height: 54px;

    padding: 5px;

    display: grid;
    grid-template-columns: repeat(3, 1fr);

    gap: 5px;

    border-radius: 21px;

    border:
        1px solid
        rgba(255,255,255,.09);

    background:
        linear-gradient(
            180deg,
            rgba(16,21,19,.82),
            rgba(3,7,5,.88)
        );

    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.08),
        0 14px 32px rgba(0,0,0,.35);
}


.sport-tab {
    position: relative;

    border: 1px solid transparent;

    border-radius: 16px;

    background: transparent;

    color: rgba(255,255,255,.55);

    font-size: 11px;
    font-weight: 750;

    display: flex;
    justify-content: center;
    align-items: center;

    gap: 6px;

    cursor: pointer;

    overflow: hidden;

    transition:
        color .25s ease,
        border-color .25s ease,
        background .25s ease,
        box-shadow .25s ease;
}


.sport-icon {
    position: relative;
    z-index: 2;

    font-size: 15px;
}


/* =========================
   ГЛЯНЕЦ
========================= */

.sport-tab::before {
    content: "";

    position: absolute;

    left: 8px;
    right: 8px;
    top: 2px;

    height: 42%;

    border-radius: 14px 14px 50% 50%;

    background:
        linear-gradient(
            180deg,
            rgba(255,255,255,.20) 0%,
            rgba(255,255,255,.055) 55%,
            transparent 100%
        );

    opacity: 0;

    pointer-events: none;

    transition: opacity .25s ease;

    z-index: 1;
}


/* =========================
   АКТИВНЫЙ ВИД СПОРТА
========================= */

.sport-tab.active {
    color: var(--accent);

    border:
        1px solid
        rgba(var(--accent-rgb), .78);

    background:
        linear-gradient(
            180deg,
            rgba(16,22,20,.96) 0%,
            rgba(5,10,8,.98) 55%,
            rgba(1,5,3,.99) 100%
        );

    box-shadow:
        0 0 2px rgba(var(--accent-rgb), .95),
        0 0 8px rgba(var(--accent-rgb), .50),
        0 0 22px rgba(var(--accent-rgb), .23),

        inset 0 1px 0 rgba(255,255,255,.20),
        inset 0 0 14px rgba(var(--accent-rgb), .07);

    text-shadow:
        0 0 5px rgba(var(--accent-rgb), .80),
        0 0 12px rgba(var(--accent-rgb), .35);
}


.sport-tab.active::before {
    opacity: 1;
}


/* =========================
   ФИЛЬТРЫ
========================= */

.filters {
    margin-top: 15px;

    display: flex;
    justify-content: space-between;

    gap: 14px;
}


.filter-button {
    flex: 1;

    height: 48px;

    padding: 0 14px;

    border-radius: 14px;

    border:
        1px solid
        rgba(255,255,255,.09);

    background:
        linear-gradient(
            180deg,
            rgba(29,36,34,.78),
            rgba(10,15,14,.72)
        );

    color: rgba(255,255,255,.90);

    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);

    display: flex;
    align-items: center;

    gap: 8px;

    font-size: 12px;
    font-weight: 650;

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.09),
        0 10px 25px rgba(0,0,0,.24);
}


.arrow {
    margin-left: auto;

    color:
        rgba(255,255,255,.55);
}


/* =========================
   СОБЫТИЯ
========================= */

.section-title {
    margin-top: 20px;

    display: flex;
    align-items: center;
    justify-content: space-between;
}


.section-title h1 {
    font-size: 18px;
    font-weight: 850;

    letter-spacing: .5px;
}


.section-title span {
    font-size: 11px;
    font-weight: 700;

    color: var(--accent);

    text-shadow:
        0 0 8px
        rgba(var(--accent-rgb), .45);
}


.events {
    min-height: 510px;
}


/* =========================
   BOTTOM NAV
========================= */

.bottom-nav {
    position: fixed;

    left: 50%;
    transform: translateX(-50%);

    bottom:
        max(
            12px,
            env(safe-area-inset-bottom)
        );

    width:
        min(
            calc(100% - 28px),
            402px
        );

    height: 67px;

    padding: 5px;

    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 3px;

    border-radius: 23px;

    border:
        1px solid
        rgba(255,255,255,.10);

    background:
        linear-gradient(
            180deg,
            rgba(12,16,15,.88),
            rgba(2,4,3,.94)
        );

    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);

    box-shadow:
        0 -5px 35px rgba(0,0,0,.48),
        inset 0 1px 0 rgba(255,255,255,.07);

    z-index: 50;
}


.nav-item {
    border: 0;

    border-radius: 18px;

    background: transparent;

    color:
        rgba(255,255,255,.43);

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    gap: 4px;

    font-size: 8px;
    font-weight: 650;

    cursor: pointer;
}


.nav-icon {
    font-size: 17px;
}


.nav-item.active {
    color: #43ff8a;

    background:
        linear-gradient(
            180deg,
            rgba(51,255,132,.15),
            rgba(51,255,132,.06)
        );

    box-shadow:
        inset 0 0 0 1px
        rgba(51,255,132,.16);
}


.nav-item.active .nav-icon {
    filter:
        drop-shadow(
            0 0 6px
            rgba(51,255,132,.8)
        );
}


/* =========================
   МАЛЕНЬКИЕ ЭКРАНЫ
========================= */

@media (max-width: 370px) {

    .app {
        padding-left: 12px;
        padding-right: 12px;
    }

    .brand-neiro {
        font-size: 32px;
    }

    .brand {
        width: 130px;
    }

    .premium {
        padding: 0 9px;
        font-size: 9px;
    }

    .notification {
        width: 36px;
        height: 36px;
    }

    .sport-tab {
        font-size: 9px;
    }

}
/* =========================
   SVG ИКОНКИ НИЖНЕГО МЕНЮ
========================= */

.nav-item svg {
    width: 22px;
    height: 22px;

    display: block;

    margin: 0 auto 5px;

    color: rgba(255, 255, 255, 0.42);

    transition:
        color 0.25s ease,
        filter 0.25s ease,
        transform 0.25s ease;
}

.nav-item span {
    transition: color 0.25s ease;
}

.nav-item.active svg {
    color: #38ff88;

    filter:
        drop-shadow(0 0 4px rgba(56,255,136,.9))
        drop-shadow(0 0 10px rgba(56,255,136,.55));

    transform: translateY(-1px);
}

.nav-item.active span {
    color: #38ff88;
}


/* лёгкое свечение активного пункта */

.nav-item.active {
    background:
        radial-gradient(
            circle at 50% 35%,
            rgba(38,255,126,.17),
            rgba(38,255,126,.05) 48%,
            transparent 72%
        );
}


/* кнопки без стандартного браузерного оформления */

.nav-item {
    border: 0;
    outline: 0;
    appearance: none;
    -webkit-appearance: none;
}
/* ========================================
   КАРТОЧКИ СОБЫТИЙ
======================================== */

.events {
    min-height: 510px;

    display: flex;
    flex-direction: column;

    gap: 14px;

    margin-top: 14px;
}


/* Карточка */

.event-card {
    position: relative;

    width: 100%;

    padding: 1px;

    border-radius: 19px;

    overflow: hidden;

    background:
        linear-gradient(
            135deg,
            rgba(var(--accent-rgb), .95),
            rgba(var(--accent-rgb), .15) 28%,
            rgba(255,255,255,.10) 48%,
            rgba(var(--accent-rgb), .18) 68%,
            rgba(var(--accent-rgb), .95)
        );

    box-shadow:
        0 0 5px rgba(var(--accent-rgb), .50),
        0 0 17px rgba(var(--accent-rgb), .16);

    isolation: isolate;
}


/* БЕГУЩЕЕ СВЕЧЕНИЕ ПО КОНТУРУ */

.event-card::before {
    content: "";

    position: absolute;

    width: 170px;
    height: 170px;

    left: 50%;
    top: 50%;

    margin-left: -85px;
    margin-top: -85px;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(var(--accent-rgb), 0),
            rgba(var(--accent-rgb), 1),
            #ffffff,
            rgba(var(--accent-rgb), 1),
            transparent
        );

    filter: blur(3px);

    animation: eventBorderLight 4.5s linear infinite;

    z-index: -1;
}


@keyframes eventBorderLight {

    from {
        transform: rotate(0deg) scale(3);
    }

    to {
        transform: rotate(360deg) scale(3);
    }

}


/* Чёрная внутренняя часть */

.event-card-inner {
    position: relative;

    border-radius: 18px;

    padding: 13px;

    background:
        linear-gradient(
            145deg,
            rgba(10,15,14,.94),
            rgba(2,5,4,.97)
        );

    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.08),
        inset 0 0 25px rgba(var(--accent-rgb), .035);
}


/* лёгкий глянец */

.event-card-inner::before {
    content: "";

    position: absolute;

    left: 10px;
    right: 10px;
    top: 2px;

    height: 42%;

    border-radius: 17px 17px 50% 50%;

    background:
        linear-gradient(
            180deg,
            rgba(255,255,255,.055),
            rgba(255,255,255,.012) 55%,
            transparent
        );

    pointer-events: none;
}


/* Верх карточки */

.event-top {
    display: flex;

    justify-content: space-between;
    align-items: center;

    min-height: 20px;

    color: rgba(255,255,255,.60);

    font-size: 10px;
}


.event-league {
    display: flex;

    align-items: center;

    gap: 6px;
}


.league-icon {
    font-size: 13px;
}


.event-time {
    color: rgba(255,255,255,.62);
}


/* ========================================
   КОМАНДЫ
======================================== */

.event-teams {
    display: grid;

    grid-template-columns: 1fr 55px 1fr;

    align-items: center;

    margin-top: 8px;
    margin-bottom: 11px;
}


.event-team {
    min-width: 0;

    text-align: center;
}


.team-logo {
    width: 48px;
    height: 48px;

    margin: 0 auto 5px;

    border-radius: 50%;

    display: flex;

    align-items: center;
    justify-content: center;

    border:
        1px solid
        rgba(var(--accent-rgb), .38);

    background:
        radial-gradient(
            circle at 35% 30%,
            rgba(255,255,255,.16),
            rgba(var(--accent-rgb), .12) 45%,
            rgba(0,0,0,.65)
        );

    color: #fff;

    font-size: 12px;
    font-weight: 900;

    box-shadow:
        0 0 12px
        rgba(var(--accent-rgb), .15);
}


.team-name {
    min-height: 28px;

    display: flex;

    justify-content: center;
    align-items: flex-start;

    color: rgba(255,255,255,.94);

    font-size: 11px;
    line-height: 1.2;

    font-weight: 750;
}


/* VS */

.event-vs {
    position: relative;

    display: flex;

    justify-content: center;
    align-items: center;
}


.event-vs::before {
    content: "";

    position: absolute;

    width: 1px;
    height: 50px;

    background:
        linear-gradient(
            transparent,
            var(--accent),
            transparent
        );

    transform: rotate(28deg);

    opacity: .75;

    box-shadow:
        0 0 10px
        rgba(var(--accent-rgb), .75);
}


.event-vs span {
    position: relative;

    z-index: 2;

    color: rgba(255,255,255,.70);

    font-size: 20px;
    font-weight: 500;

    text-shadow:
        0 0 12px
        rgba(var(--accent-rgb), .65);
}


/* ========================================
   НИЗ КАРТОЧКИ
======================================== */

.event-bottom {
    display: grid;

    grid-template-columns: minmax(0, 1.35fr) minmax(118px, .95fr);

    gap: 9px;
}


/* Коэффициенты */

.event-odds {
    display: grid;

    grid-template-columns: repeat(3, 1fr);

    min-width: 0;

    border:
        1px solid
        rgba(255,255,255,.15);

    border-radius: 12px;

    overflow: hidden;

    background:
        rgba(0,0,0,.28);
}


.odd {
    min-width: 0;

    min-height: 45px;

    display: flex;

    flex-direction: column;

    justify-content: center;
    align-items: center;

    border-right:
        1px solid
        rgba(255,255,255,.09);
}


.odd:last-child {
    border-right: 0;
}


.odd small {
    color: rgba(255,255,255,.50);

    font-size: 8px;

    line-height: 1;
}


.odd strong {
    margin-top: 3px;

    color: rgba(255,255,255,.94);

    font-size: 13px;
    line-height: 1;

    font-weight: 800;
}


/* ========================================
   РАССЧИТАТЬ
======================================== */

.calculate-button {
    position: relative;
    min-width: 0;
    min-height: 45px;
    border: 0;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    color: #071008;
    background: var(--accent);
    font-size: 10px;
    font-weight: 900;
    cursor: pointer;
    box-shadow:
        0 0 6px rgba(var(--accent-rgb), .65),
        0 0 18px rgba(var(--accent-rgb), .30),
        inset 0 1px 0 rgba(255,255,255,.50);
}

.calculate-button::before {
    content: "";
    position: absolute;
    top: -40%;
    left: -55%;
    width: 32%;
    height: 180%;
    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(255,255,255,.15),
            rgba(255,255,255,.88),
            rgba(255,255,255,.15),
            transparent
        );
    transform: skewX(-20deg);
    filter: blur(2px);
    pointer-events: none;
    animation: buttonLightSweep 4s ease-in-out infinite;
}

.calculate-button > * {
    position: relative;
    z-index: 2;
}

.brain {
    font-size: 17px;
}

@keyframes buttonLightSweep {
    0% {
        left: -55%;
        opacity: 0;
    }
    5% {
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    40% {
        left: 125%;
        opacity: 1;
    }
    45% {
        left: 125%;
        opacity: 0;
    }
    100% {
        left: 125%;
        opacity: 0;
    }
}


/* ========================================
   КИБЕРСПОРТ: ЭЛЕКТРИЧЕСКИЕ УГЛЫ
======================================== */

.theme-esports .event-card-inner::after {
    content: "";

    position: absolute;

    inset: 0;

    border-radius: 18px;

    pointer-events: none;

    background:
        linear-gradient(
            135deg,
            rgba(var(--accent-rgb), .38),
            transparent 12%
        ),
        linear-gradient(
            315deg,
            rgba(var(--accent-rgb), .30),
            transparent 13%
        );

    opacity: .75;

    filter:
        drop-shadow(
            0 0 5px
            rgba(var(--accent-rgb), .55)
        );
}


/* ========================================
   МАЛЕНЬКИЕ ЭКРАНЫ
======================================== */

@media (max-width: 370px) {

    .event-card-inner {
        padding: 11px;
    }

    .event-bottom {
        grid-template-columns:
            minmax(0, 1.25fr)
            minmax(108px, .95fr);

        gap: 6px;
    }

    .calculate-button {
        font-size: 8px;
    }

    .brain {
        font-size: 14px;
    }

    .team-logo {
        width: 43px;
        height: 43px;
    }

}
/* ========================================
   НЕОНОВЫЕ SVG ИКОНКИ
======================================== */

.sport-icon {
    width: 20px;
    height: 20px;

    display: flex;
    align-items: center;
    justify-content: center;
}

.sport-icon svg {
    width: 19px;
    height: 19px;

    fill: none;
    stroke: currentColor;

    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;

    transition:
        color .25s ease,
        filter .25s ease;
}

/* неактивные */
.sport-tab:not(.active) .sport-icon svg {
    color: rgba(255,255,255,.50);
}

/* активная спортивная иконка */
.sport-tab.active .sport-icon svg {
    color: var(--accent);

    filter:
        drop-shadow(0 0 3px rgba(var(--accent-rgb), .95))
        drop-shadow(0 0 7px rgba(var(--accent-rgb), .65));
}


/* МОЗГ */

.brain {
    width: 21px;
    height: 21px;

    display: flex;
    align-items: center;
    justify-content: center;
}

.brain svg {
    width: 21px;
    height: 21px;

    fill: none;
    stroke: #071008;

    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}


/* ========================================
   СПИСКИ СОБЫТИЙ ПО ВИДАМ СПОРТА
======================================== */

.event-list {
    display: none;
    flex-direction: column;
    gap: 14px;
}

.event-list.active {
    display: flex;
}


/* ========================================
   ЭКРАНЫ WEBAPP
======================================== */

.page {
    display: none;
}

.page.active {
    display: block;
}

.page-profile {
    min-height: calc(100vh - 136px);
}

.app.theme-profile {
    --accent: #39ff88;
    --accent-rgb: 57, 255, 136;
}

.app.theme-profile::after {
    background-image: url("./images/football-bg.jpeg");
}

/* ========================================
   ПРОФИЛЬ
======================================== */

.profile-screen {
    width: 100%;
    padding: 2px 0 8px;
}

.profile-brand {
    position: relative;
    width: 160px;
    height: 66px;
    margin: 0 0 2px 2px;
    transform: skew(-7deg);
}

.profile-brand-neiro {
    display: inline-block;
    font-size: 35px;
    line-height: .95;
    font-weight: 950;
    font-style: italic;
    letter-spacing: -2.5px;
    background: linear-gradient(110deg, #39ff88 0%, #fff 25%, #39ff88 48%, #fff 68%, #39ff88 100%);
    background-size: 250% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    /* Keep the neon gradient fixed: animated transparent text flickers in iOS WebKit. */
    background-position: 180% center;
    filter: drop-shadow(0 0 10px rgba(57,255,136,.26));
}

.profile-brand-bet {
    position: absolute;
    left: 72px;
    top: 37px;
    color: #39ff88;
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 7px;
    text-shadow: 0 0 10px rgba(57,255,136,.55);
}

.profile-brand-tagline {
    position: absolute;
    top: 55px;
    left: 1px;
    white-space: nowrap;
    color: rgba(57,255,136,.55);
    font-size: 6.5px;
    font-weight: 800;
    letter-spacing: 2px;
}

.profile-hero {
    margin-top: -2px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.profile-avatar {
    position: relative;
    width: 122px;
    height: 122px;
    padding: 3px;
    border: 1px solid rgba(57,255,136,.92);
    border-radius: 50%;
    background: rgba(1,5,3,.9);
    box-shadow:
        0 0 4px rgba(57,255,136,.95),
        0 0 18px rgba(57,255,136,.36),
        inset 0 0 16px rgba(57,255,136,.09);
    cursor: pointer;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
    filter: contrast(1.06) brightness(.92);
}

.profile-camera {
    position: absolute;
    right: -1px;
    bottom: 12px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: rgba(7,18,13,.96);
    border: 1px solid rgba(57,255,136,.55);
    box-shadow: 0 0 14px rgba(57,255,136,.28);
}

.profile-camera svg {
    width: 18px;
    height: 18px;
}

.profile-name {
    margin-top: 9px;
    font-size: 25px;
    line-height: 1;
    font-weight: 900;
    letter-spacing: -.5px;
    text-shadow: 0 3px 14px rgba(0,0,0,.6);
}

.profile-username {
    margin-top: 5px;
    color: rgba(255,255,255,.62);
    font-size: 12px;
    font-weight: 550;
}

.profile-premium-status {
    width: min(294px, 88%);
    min-height: 61px;
    margin: 13px auto 0;
    padding: 9px 12px;
    display: grid;
    grid-template-columns: 43px 1fr 18px;
    align-items: center;
    gap: 8px;
    color: #fff;
    border: 1px solid rgba(57,255,136,.82);
    border-radius: 15px;
    background:
        linear-gradient(100deg, rgba(27,255,125,.12), rgba(8,14,11,.88) 58%, rgba(57,255,136,.08));
    box-shadow:
        0 0 4px rgba(57,255,136,.55),
        0 0 16px rgba(57,255,136,.14),
        inset 0 1px 0 rgba(255,255,255,.07);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    text-align: left;
    cursor: pointer;
}

.profile-premium-crown {
    color: #ffd85e;
    font-size: 31px;
    line-height: 1;
    text-align: center;
    filter: drop-shadow(0 0 8px rgba(255,216,94,.34));
}

.profile-premium-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.profile-premium-copy strong {
    color: #ffe27a;
    font-size: 16px;
    font-weight: 900;
    letter-spacing: .25px;
}

.profile-premium-copy small {
    color: rgba(255,255,255,.68);
    font-size: 10px;
    font-weight: 600;
}

.profile-chevron {
    color: rgba(255,255,255,.62);
    font-size: 26px;
    font-weight: 300;
    line-height: 1;
}

.profile-attempts-card {
    min-height: 72px;
    margin-top: 13px;
    padding: 10px 17px;
    display: grid;
    grid-template-columns: 38px 62px 1fr;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(57,255,136,.52);
    border-radius: 17px;
    background:
        linear-gradient(110deg, rgba(17,38,29,.72), rgba(4,10,7,.91) 58%, rgba(9,18,13,.86));
    box-shadow:
        0 0 14px rgba(57,255,136,.10),
        inset 0 1px 0 rgba(255,255,255,.06);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.attempts-icon {
    width: 32px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #39ff88;
    filter: drop-shadow(0 0 8px rgba(57,255,136,.6));
}

.attempts-icon svg {
    width: 31px;
    height: 39px;
}

.attempts-number {
    color: #fff;
    font-size: 35px;
    font-weight: 950;
    line-height: 1;
    text-shadow: 0 0 12px rgba(255,255,255,.10);
}

.attempts-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    color: rgba(255,255,255,.66);
    font-size: 11px;
}

.attempts-copy strong {
    color: rgba(255,255,255,.72);
    font-size: 11px;
    font-weight: 650;
}

.profile-menu {
    margin-top: 13px;
    overflow: hidden;
    border: 1px solid rgba(57,255,136,.45);
    border-radius: 17px;
    background:
        linear-gradient(145deg, rgba(8,18,13,.90), rgba(2,8,5,.94));
    box-shadow:
        0 0 14px rgba(57,255,136,.08),
        inset 0 1px 0 rgba(255,255,255,.05);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.profile-row {
    width: 100%;
    min-height: 68px;
    padding: 9px 13px;
    border: 0;
    border-bottom: 1px solid rgba(255,255,255,.08);
    background: transparent;
    color: #fff;
    display: grid;
    grid-template-columns: 43px 1fr 20px;
    align-items: center;
    gap: 8px;
    text-align: left;
    cursor: pointer;
    transition: background .2s ease, transform .2s ease;
}

.profile-row:last-child {
    border-bottom: 0;
}

.profile-row:active {
    background: rgba(57,255,136,.06);
}

.profile-row-icon {
    width: 39px;
    height: 39px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #39ff88;
    filter: drop-shadow(0 0 7px rgba(57,255,136,.30));
}

.profile-row-icon svg {
    width: 29px;
    height: 29px;
}

.profile-row-icon-white {
    color: rgba(255,255,255,.88);
    filter: none;
}

.profile-row-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.profile-row-copy strong {
    color: rgba(255,255,255,.96);
    font-size: 13px;
    font-weight: 760;
}

.profile-row-copy small {
    color: rgba(255,255,255,.48);
    font-size: 9.5px;
    line-height: 1.25;
    font-weight: 500;
}

.profile-row-toggle {
    cursor: default;
}

.profile-switch {
    position: relative;
    width: 48px;
    height: 28px;
    justify-self: end;
}

.profile-switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.profile-switch span {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: rgba(255,255,255,.16);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.10);
    transition: background .2s ease, box-shadow .2s ease;
    cursor: pointer;
}

.profile-switch span::after {
    content: "";
    position: absolute;
    width: 22px;
    height: 22px;
    top: 3px;
    left: 3px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.35);
    transition: transform .22s ease;
}

.profile-switch input:checked + span {
    background: #16c86d;
    box-shadow:
        inset 0 0 0 1px rgba(57,255,136,.30),
        0 0 12px rgba(57,255,136,.18);
}

.profile-switch input:checked + span::after {
    transform: translateX(20px);
}

@media (max-width: 370px) {
    .profile-brand {
        transform: skew(-7deg) scale(.92);
        transform-origin: left top;
        margin-bottom: -2px;
    }

    .profile-avatar {
        width: 110px;
        height: 110px;
    }

    .profile-name {
        font-size: 23px;
    }

    .profile-premium-status {
        width: 90%;
    }

    .profile-row {
        min-height: 64px;
        grid-template-columns: 39px 1fr 18px;
        padding-left: 10px;
        padding-right: 10px;
    }

    .profile-row-copy strong {
        font-size: 12px;
    }

    .profile-row-copy small {
        font-size: 8.7px;
    }
}


/* Декоративный слоган профиля */
.profile-motto {
    position: absolute;
    top: 78px;
    right: 5px;
    z-index: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: rotate(-10deg) skew(-6deg);
    color: rgba(57,255,136,.22);
    font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
    font-size: 21px;
    font-style: italic;
    font-weight: 900;
    line-height: .92;
    letter-spacing: -.5px;
    text-transform: uppercase;
    text-shadow: 0 0 12px rgba(57,255,136,.12);
    pointer-events: none;
    user-select: none;
}

.profile-motto span:nth-child(2) {
    margin-left: 8px;
}

.profile-motto span:nth-child(3) {
    margin-left: 19px;
}

.profile-screen {
    position: relative;
}

.profile-screen > *:not(.profile-motto) {
    position: relative;
    z-index: 1;
}

@media (max-width: 370px) {
    .profile-motto {
        right: 0;
        top: 82px;
        font-size: 18px;
        opacity: .82;
    }
}


/* ========================================
   СТАТИСТИКА
======================================== */

.page-statistics {
    min-height: calc(100vh - 110px);
}

.stats-screen {
    padding-bottom: 8px;
}

.stats-topbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 18px;
}

.stats-brand {
    position: relative;
    width: 120px;
    height: 54px;
    transform: skew(-7deg);
}

.stats-brand-neiro {
    display: inline-block;
    font-size: 29px;
    line-height: .95;
    font-weight: 950;
    font-style: italic;
    letter-spacing: -2px;
    background: linear-gradient(110deg, var(--accent), #fff 28%, var(--accent) 54%, #fff 72%, var(--accent));
    background-size: 240% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    /* Keep the neon gradient fixed: animated transparent text flickers in iOS WebKit. */
    background-position: 180% center;
    filter: drop-shadow(0 0 8px rgba(var(--accent-rgb), .28));
}

.stats-brand-bet {
    position: absolute;
    left: 56px;
    top: 31px;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: 6px;
    color: var(--accent);
}

.stats-user {
    display: flex;
    align-items: center;
    gap: 9px;
    padding-top: 3px;
}

.stats-user img {
    width: 42px;
    height: 42px;
    object-fit: cover;
    border-radius: 50%;
    border: 1px solid rgba(var(--accent-rgb), .8);
    box-shadow: 0 0 13px rgba(var(--accent-rgb), .28);
}

.stats-user div {
    display: flex;
    flex-direction: column;
    text-align: right;
}

.stats-user strong {
    font-size: 12px;
}

.stats-user small {
    margin-top: 2px;
    color: rgba(255,255,255,.45);
    font-size: 8px;
}

.stats-controls {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: center;
}

.stats-sport-tabs {
    height: 48px;
    padding: 4px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 17px;
    background: rgba(2,7,5,.72);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.stats-sport-tab {
    border: 1px solid transparent;
    border-radius: 13px;
    background: transparent;
    color: rgba(255,255,255,.55);
    font-size: 9px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
}

.stats-sport-tab.active {
    color: var(--accent);
    border-color: rgba(var(--accent-rgb), .7);
    background: linear-gradient(180deg, rgba(var(--accent-rgb), .15), rgba(0,0,0,.32));
    box-shadow:
        0 0 4px rgba(var(--accent-rgb), .7),
        0 0 16px rgba(var(--accent-rgb), .22),
        inset 0 1px 0 rgba(255,255,255,.11);
}

.stats-tab-icon {
    font-size: 14px;
}

.stats-period {
    height: 48px;
    padding: 0 12px;
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 14px;
    background: rgba(18,23,22,.82);
    color: rgba(255,255,255,.88);
    font-size: 9px;
    font-weight: 750;
    display: flex;
    align-items: center;
    gap: 7px;
}

.stats-heading {
    margin: 19px 2px 14px;
}

.stats-heading h1 {
    font-size: 26px;
    line-height: 1;
    font-weight: 950;
    letter-spacing: .3px;
}

.stats-heading p {
    margin-top: 7px;
    font-size: 10px;
    color: rgba(255,255,255,.55);
}

.stats-winrate-row {
    display: grid;
    grid-template-columns: 1fr 38px 1fr;
    align-items: stretch;
    gap: 4px;
}

.stats-winrate-card {
    min-height: 118px;
    padding: 16px 10px 13px;
    border-radius: 17px;
    background:
        linear-gradient(180deg, rgba(25,31,30,.50), rgba(2,7,5,.58));
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.06),
        0 14px 30px rgba(0,0,0,.18);
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stats-winrate-card small {
    font-size: 11px;
    font-weight: 900;
    color: rgba(255,255,255,.88);
}

.stats-winrate-card strong {
    margin: 4px 0 2px;
    font-size: 32px;
    line-height: 1;
    font-weight: 950;
}

.stats-winrate-user strong {
    color: var(--accent);
    text-shadow: 0 0 18px rgba(var(--accent-rgb), .22);
}

.stats-winrate-ai strong {
    color: #d8dce0;
}

.stats-winrate-card span {
    margin-top: 7px;
    font-size: 9px;
    color: rgba(255,255,255,.58);
}

.stats-winrate-card span b {
    color: var(--accent);
}

.stats-winrate-ai span b {
    color: rgba(255,255,255,.72);
}

.stats-vs {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-style: italic;
    font-weight: 850;
    color: rgba(255,255,255,.9);
    text-shadow: 0 0 12px rgba(var(--accent-rgb), .28);
}

.stats-panel {
    position: relative;
    border: 1px solid rgba(var(--accent-rgb), .52);
    border-radius: 17px;
    background:
        linear-gradient(145deg, rgba(7,13,11,.91), rgba(1,4,3,.93));
    box-shadow:
        0 0 5px rgba(var(--accent-rgb), .22),
        0 0 18px rgba(var(--accent-rgb), .08),
        inset 0 1px 0 rgba(255,255,255,.05);
    overflow: hidden;
}

.stats-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(130deg, rgba(var(--accent-rgb), .08), transparent 24%),
        linear-gradient(315deg, rgba(var(--accent-rgb), .05), transparent 20%);
}

.stats-chart-card {
    margin-top: 12px;
    padding: 14px 13px 12px;
}

.stats-panel-head {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.stats-panel-head > strong {
    font-size: 10px;
    font-weight: 900;
}

.stats-muted {
    font-size: 8px;
    color: rgba(255,255,255,.50);
}

.stats-legend {
    display: flex;
    gap: 10px;
    font-size: 8px;
    color: rgba(255,255,255,.6);
}

.stats-legend span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.stats-legend i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.legend-user {
    background: var(--accent);
    box-shadow: 0 0 6px rgba(var(--accent-rgb), .8);
}

.legend-ai {
    background: #9da3aa;
}

.stats-chart {
    position: relative;
    z-index: 1;
    margin-top: 12px;
    display: grid;
    grid-template-columns: 28px 1fr;
    min-height: 172px;
}

.stats-yaxis {
    height: 145px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2px 4px 0 0;
    color: rgba(255,255,255,.42);
    font-size: 7px;
    text-align: right;
}

.stats-chart-area {
    position: relative;
    min-width: 0;
    height: 172px;
}

.stats-grid {
    position: absolute;
    inset: 0 0 25px 0;
    background-image:
        linear-gradient(rgba(255,255,255,.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
    background-size: 100% 25%, 16.66% 100%;
    border-left: 1px solid rgba(255,255,255,.06);
    border-bottom: 1px solid rgba(255,255,255,.06);
}

.stats-lines {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    width: 100%;
    height: 145px;
    overflow: visible;
}

.stats-lines path {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}

.stats-line-user {
    stroke: var(--accent);
    stroke-width: 2.2;
    filter: drop-shadow(0 0 4px rgba(var(--accent-rgb), .65));
}

.stats-line-ai {
    stroke: #9ea4aa;
    stroke-width: 1.7;
    opacity: .85;
}

.stats-chart-end {
    position: absolute;
    right: -2px;
    padding: 3px 5px;
    border-radius: 6px;
    background: rgba(5,10,8,.90);
    font-size: 9px;
    font-weight: 900;
}

.stats-chart-end-user {
    top: 25px;
    color: var(--accent);
    border: 1px solid rgba(var(--accent-rgb), .35);
}

.stats-chart-end-ai {
    top: 50px;
    color: #d8dce0;
    border: 1px solid rgba(255,255,255,.14);
}

.stats-xaxis {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: space-between;
    font-size: 6.5px;
    color: rgba(255,255,255,.42);
}

.stats-lower-grid {
    margin-top: 12px;
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: 10px;
}

.stats-general-card,
.stats-sports-card,
.stats-compare-card {
    padding: 13px;
}

.stats-list {
    position: relative;
    z-index: 1;
    margin-top: 8px;
}

.stats-list > div {
    min-height: 35px;
    padding: 7px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border-bottom: 1px solid rgba(255,255,255,.06);
    font-size: 9px;
}

.stats-list > div:last-child {
    border-bottom: 0;
}

.stats-list span {
    color: rgba(255,255,255,.62);
}

.stats-list strong {
    font-size: 12px;
}

.stats-positive {
    color: var(--accent) !important;
}

.stats-negative {
    color: #ff4c5d !important;
}

.stats-side-column {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sport-progress-row {
    position: relative;
    z-index: 1;
    margin-top: 10px;
}

.sport-progress-row > div:first-child {
    display: flex;
    justify-content: space-between;
    font-size: 8px;
    color: rgba(255,255,255,.65);
}

.sport-progress-row > div:first-child strong {
    color: #fff;
    font-size: 10px;
}

.sport-progress {
    margin-top: 5px;
    height: 5px;
    border-radius: 99px;
    background: rgba(255,255,255,.09);
    overflow: hidden;
}

.sport-progress i {
    display: block;
    height: 100%;
    border-radius: inherit;
}

.stats-compare-row {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    gap: 6px;
    margin-top: 10px;
    font-size: 8px;
    color: rgba(255,255,255,.62);
}

.stats-compare-row strong {
    color: #fff;
    font-size: 10px;
}

.stats-result-card {
    margin-top: 12px;
    min-height: 86px;
    padding: 13px 14px;
    display: grid;
    grid-template-columns: 44px 1fr 42px 1fr;
    align-items: center;
    gap: 8px;
}

.stats-trophy {
    position: relative;
    z-index: 1;
    font-size: 31px;
    filter: drop-shadow(0 0 10px rgba(255,205,70,.38));
}

.stats-result-copy {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
}

.stats-result-copy strong {
    font-size: 13px;
    font-weight: 950;
}

.stats-result-copy span {
    margin-top: 4px;
    font-size: 8px;
    color: rgba(255,255,255,.55);
}

.stats-result-arrow {
    position: relative;
    z-index: 1;
    font-size: 33px;
    color: var(--accent);
    text-shadow: 0 0 12px rgba(var(--accent-rgb), .4);
}

.stats-result-card em {
    position: relative;
    z-index: 1;
    font-size: 7.5px;
    line-height: 1.35;
    color: rgba(255,255,255,.42);
    font-style: italic;
}

@media (max-width: 370px) {
    .stats-heading h1 {
        font-size: 22px;
    }

    .stats-sport-tab {
        font-size: 8px;
    }

    .stats-period {
        padding: 0 8px;
        font-size: 8px;
    }

    .stats-winrate-card strong {
        font-size: 28px;
    }

    .stats-lower-grid {
        grid-template-columns: 1fr;
    }

    .stats-result-card {
        grid-template-columns: 38px 1fr 36px;
    }

    .stats-result-card em {
        display: none;
    }
}

/* ========================================
   СТАТИСТИКА — ДОПИЛ ПО РЕФЕРЕНСУ v2
======================================== */

.stats-topbar {
    align-items: center;
    margin-bottom: 15px;
}

.stats-top-actions {
    display: flex;
    align-items: center;
    gap: 7px;
}

.stats-premium-pill {
    height: 35px;
    padding: 0 11px;
    border-radius: 16px;
    border: 1px solid rgba(255, 213, 100, .34);
    background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.018));
    color: #ffd96c;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .25px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.10), 0 7px 18px rgba(0,0,0,.22);
}

.stats-premium-crown {
    font-size: 13px;
    line-height: 1;
}

.stats-notification {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.11);
    background: linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,.02));
    color: rgba(255,255,255,.90);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}

.stats-notification svg {
    width: 17px;
    height: 17px;
}

.stats-user {
    gap: 5px;
    padding-top: 0;
}

.stats-user img {
    width: 38px;
    height: 38px;
}

.stats-user strong {
    font-size: 10px;
    font-weight: 800;
}

.stats-sport-tab {
    position: relative;
    overflow: hidden;
}

.stats-sport-tab.active {
    background: linear-gradient(180deg, rgba(11,17,15,.90), rgba(2,6,4,.92));
    border-color: rgba(var(--accent-rgb), .78);
    box-shadow:
        0 0 2px rgba(var(--accent-rgb), .90),
        0 0 8px rgba(var(--accent-rgb), .48),
        0 0 18px rgba(var(--accent-rgb), .18),
        inset 0 1px 0 rgba(255,255,255,.13),
        inset 0 0 10px rgba(var(--accent-rgb), .045);
}

.stats-tab-icon {
    width: 17px;
    height: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stats-tab-icon svg {
    width: 17px;
    height: 17px;
    display: block;
}

/* VS с неоновой диагональной вспышкой */
.stats-vs {
    position: relative;
    isolation: isolate;
}

.stats-vs::before {
    content: "";
    position: absolute;
    width: 2px;
    height: 64px;
    border-radius: 99px;
    background: linear-gradient(180deg, transparent 0%, var(--accent) 35%, #fff 52%, var(--accent) 68%, transparent 100%);
    transform: rotate(29deg);
    opacity: .78;
    filter: blur(.15px);
    box-shadow:
        0 0 4px rgba(var(--accent-rgb), .85),
        0 0 12px rgba(var(--accent-rgb), .55),
        0 0 24px rgba(var(--accent-rgb), .26);
    z-index: -1;
}

.stats-vs span {
    position: relative;
    z-index: 1;
    text-shadow: 0 0 12px rgba(0,0,0,.9), 0 0 9px rgba(var(--accent-rgb), .35);
}

/* ========================================
   СТАТИСТИКА — АККУРАТНЫЙ КОНТУР КАК В СОБЫТИЯХ
   Без бегущих палок и без заливки карточек
======================================== */

.stats-panel {
    position: relative;

    /* Прозрачная граница нужна для двух слоёв background */
    border: 1px solid transparent;
    border-radius: 17px;

    /*
       Первый слой — обычный тёмный фон карточки.
       Второй слой — тот же характер градиентной подсветки,
       что используется у карточек событий.
    */
    background:
        linear-gradient(
            145deg,
            rgba(7,13,11,.93),
            rgba(1,4,3,.96)
        ) padding-box,

        linear-gradient(
            135deg,
            rgba(var(--accent-rgb), .95),
            rgba(var(--accent-rgb), .15) 28%,
            rgba(255,255,255,.10) 48%,
            rgba(var(--accent-rgb), .18) 68%,
            rgba(var(--accent-rgb), .95)
        ) border-box;

    box-shadow:
        0 0 5px rgba(var(--accent-rgb), .50),
        0 0 17px rgba(var(--accent-rgb), .16),
        inset 0 1px 0 rgba(255,255,255,.05);

    overflow: hidden;
    isolation: isolate;
}

/* Лёгкий мягкий отблеск внутри, как у карточек событий */
.stats-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;

    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,.035),
            transparent 28%
        ),
        radial-gradient(
            circle at 50% 0%,
            rgba(var(--accent-rgb), .055),
            transparent 42%
        );

    z-index: 0;
}

/* Полностью отключаем старый бегущий огонёк */
.stats-panel::after {
    content: none !important;
    display: none !important;
    animation: none !important;
}

/* Контент всегда поверх декоративной подсветки */
.stats-panel > * {
    position: relative;
    z-index: 1;
}

/* Иконки общей статистики */
.stats-list-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.stats-list-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,.82);
    filter: drop-shadow(0 0 4px rgba(255,255,255,.07));
}

.stats-list-icon svg {
    width: 18px;
    height: 18px;
}

.stats-icon-positive {
    color: var(--accent);
    filter: drop-shadow(0 0 5px rgba(var(--accent-rgb), .55));
}

.stats-icon-negative {
    color: #ff4c5d;
    filter: drop-shadow(0 0 5px rgba(255,76,93,.45));
}

/* Красивый мини-график в карточке результата */
.stats-result-arrow {
    width: 46px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stats-result-arrow svg {
    width: 46px;
    height: 38px;
    overflow: visible;
    filter:
        drop-shadow(0 0 4px rgba(var(--accent-rgb), .72))
        drop-shadow(0 0 10px rgba(var(--accent-rgb), .28));
}

@media (max-width: 370px) {
    .stats-brand {
        width: 104px;
        transform: skew(-7deg) scale(.92);
        transform-origin: left center;
    }

    .stats-top-actions {
        gap: 4px;
    }

    .stats-premium-pill {
        height: 32px;
        padding: 0 7px;
        font-size: 8px;
    }

    .stats-notification {
        width: 32px;
        height: 32px;
    }

    .stats-user img {
        width: 33px;
        height: 33px;
    }

    .stats-user div {
        display: none;
    }
}

/* ========================================
   МОИ ПРОГНОЗЫ
======================================== */

.page-predictions {
    min-height: calc(100vh - 110px);
}

.pred-screen {
    width: 100%;
    padding-bottom: 10px;
}

.pred-topbar {
    min-height: 74px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.pred-brand {
    position: relative;
    width: 160px;
    height: 68px;
    transform: skew(-7deg);
}

.pred-brand-neiro {
    display: inline-block;
    font-size: 35px;
    line-height: .95;
    font-weight: 950;
    font-style: italic;
    letter-spacing: -2.5px;
    background:
        linear-gradient(
            110deg,
            var(--accent) 0%,
            #fff 25%,
            var(--accent) 48%,
            #fff 68%,
            var(--accent) 100%
        );
    background-size: 250% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    /* Keep the neon gradient fixed: animated transparent text flickers in iOS WebKit. */
    background-position: 180% center;
    filter: drop-shadow(0 0 10px rgba(var(--accent-rgb), .25));
}

.pred-brand-bet {
    position: absolute;
    left: 71px;
    top: 38px;
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 7px;
    color: var(--accent);
    text-shadow: 0 0 10px rgba(var(--accent-rgb), .55);
}

.pred-brand-tagline {
    position: absolute;
    top: 56px;
    left: 1px;
    white-space: nowrap;
    color: rgba(var(--accent-rgb), .58);
    font-size: 6.4px;
    font-weight: 800;
    letter-spacing: 1.9px;
}

.pred-user-area {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.pred-premium {
    min-height: 45px;
    padding: 6px 12px;
    border-radius: 18px;
    border: 1px solid rgba(255,213,100,.35);
    background:
        linear-gradient(
            180deg,
            rgba(255,255,255,.08),
            rgba(255,255,255,.025)
        );
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.10),
        0 8px 22px rgba(0,0,0,.24);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    gap: 7px;
}

.pred-premium-crown {
    color: #ffd85e;
    font-size: 18px;
    filter: drop-shadow(0 0 6px rgba(255,216,94,.35));
}

.pred-premium-copy {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.pred-premium-copy strong {
    color: #ffe27a;
    font-size: 10px;
    line-height: 1.05;
    letter-spacing: .2px;
}

.pred-premium-copy small {
    color: rgba(255,255,255,.58);
    font-size: 6.8px;
}

.pred-user {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.pred-user img {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(var(--accent-rgb), .8);
    box-shadow:
        0 0 4px rgba(var(--accent-rgb), .75),
        0 0 14px rgba(var(--accent-rgb), .20);
}

.pred-user span {
    font-size: 9px;
    font-weight: 750;
}

.pred-title-row {
    margin-top: 8px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 138px;
    gap: 13px;
    align-items: end;
}

.pred-title-row h1 {
    font-size: 25px;
    line-height: 1;
    font-weight: 950;
    letter-spacing: .3px;
}

.pred-title-row p {
    margin-top: 7px;
    max-width: 280px;
    color: rgba(255,255,255,.60);
    font-size: 9.5px;
    line-height: 1.35;
}

.pred-history-meter {
    padding-bottom: 3px;
}

.pred-history-count {
    text-align: left;
    font-size: 9px;
    font-weight: 800;
    color: rgba(255,255,255,.88);
}

.pred-history-track {
    height: 5px;
    margin-top: 6px;
    border-radius: 999px;
    background: rgba(255,255,255,.10);
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0,0,0,.45);
}

.pred-history-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--accent);
    box-shadow:
        0 0 5px rgba(var(--accent-rgb), .85),
        0 0 11px rgba(var(--accent-rgb), .35);
}

.pred-history-meter small {
    display: block;
    margin-top: 5px;
    color: rgba(255,255,255,.38);
    font-size: 6.3px;
    white-space: nowrap;
}

.pred-sport-tabs {
    height: 58px;
    margin-top: 17px;
    padding: 5px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 20px;
    background:
        linear-gradient(
            180deg,
            rgba(15,20,18,.78),
            rgba(3,7,5,.88)
        );
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.06),
        0 12px 28px rgba(0,0,0,.24);
}

.pred-sport-tab {
    border: 1px solid transparent;
    border-radius: 15px;
    background: transparent;
    color: rgba(255,255,255,.58);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-size: 9px;
    font-weight: 800;
    cursor: pointer;
}

.pred-sport-tab.active {
    color: var(--accent);
    border-color: rgba(var(--accent-rgb), .78);
    background:
        linear-gradient(
            180deg,
            rgba(16,22,20,.95),
            rgba(3,8,6,.96)
        );
    box-shadow:
        0 0 3px rgba(var(--accent-rgb), .95),
        0 0 10px rgba(var(--accent-rgb), .40),
        0 0 22px rgba(var(--accent-rgb), .17),
        inset 0 1px 0 rgba(255,255,255,.13);
    text-shadow: 0 0 8px rgba(var(--accent-rgb), .45);
}

.pred-sport-icon {
    width: 21px;
    height: 21px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pred-sport-icon svg {
    width: 20px;
    height: 20px;
    color: currentColor;
    filter: drop-shadow(0 0 5px rgba(var(--accent-rgb), .18));
}

.pred-toolbar {
    margin-top: 14px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
}

.pred-filters {
    display: flex;
    gap: 6px;
    min-width: 0;
}

.pred-filter {
    height: 34px;
    padding: 0 9px;
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 15px;
    background:
        linear-gradient(
            180deg,
            rgba(25,31,30,.70),
            rgba(6,11,9,.78)
        );
    color: rgba(255,255,255,.72);
    font-size: 8.5px;
    font-weight: 700;
    cursor: pointer;
}

.pred-filter.active {
    color: #061008;
    border-color: var(--accent);
    background: var(--accent);
    box-shadow:
        0 0 7px rgba(var(--accent-rgb), .55),
        0 0 17px rgba(var(--accent-rgb), .18);
}

.pred-sort {
    height: 36px;
    padding: 0 11px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 14px;
    background: rgba(13,18,16,.84);
    color: rgba(255,255,255,.86);
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 8px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.pred-sort-icon {
    font-size: 15px;
    color: rgba(255,255,255,.85);
}

.pred-list {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pred-card {
    position: relative;
    padding: 10px 10px 9px;
    border: 1px solid rgba(var(--accent-rgb), .50);
    border-radius: 17px;
    background:
        linear-gradient(
            145deg,
            rgba(7,14,11,.92),
            rgba(2,6,4,.96)
        );
    box-shadow:
        0 0 4px rgba(var(--accent-rgb), .25),
        0 0 14px rgba(var(--accent-rgb), .07),
        inset 0 1px 0 rgba(255,255,255,.05);
    backdrop-filter: blur(17px);
    -webkit-backdrop-filter: blur(17px);
    overflow: hidden;
}

.pred-card[hidden] {
    display: none !important;
}

.pred-card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(
            135deg,
            rgba(var(--accent-rgb), .055),
            transparent 22%
        ),
        linear-gradient(
            315deg,
            rgba(var(--accent-rgb), .035),
            transparent 18%
        );
}

.pred-card > * {
    position: relative;
    z-index: 1;
}

.pred-card-top {
    min-height: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: rgba(255,255,255,.50);
    font-size: 7.6px;
}

.pred-league {
    color: rgba(255,255,255,.70);
}

.pred-card-grid {
    margin-top: 7px;
    display: grid;
    grid-template-columns: 1.30fr .95fr 92px;
    gap: 9px;
    align-items: stretch;
}

.pred-match {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0,1fr) auto minmax(0,1fr);
    gap: 6px;
    align-items: center;
}

.pred-team {
    min-width: 0;
    text-align: center;
}

.pred-team-logo {
    width: 36px;
    height: 36px;
    margin: 0 auto 4px;
    border-radius: 50%;
    border: 1px solid rgba(var(--accent-rgb), .48);
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(
            circle at 35% 30%,
            rgba(255,255,255,.13),
            rgba(var(--accent-rgb), .10) 45%,
            rgba(0,0,0,.75)
        );
    color: rgba(255,255,255,.92);
    font-size: 7px;
    font-weight: 900;
    box-shadow: 0 0 9px rgba(var(--accent-rgb), .13);
}

.pred-team span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: rgba(255,255,255,.86);
    font-size: 7.5px;
    font-weight: 700;
}

.pred-score {
    min-width: 38px;
    text-align: center;
    color: #fff;
    font-size: 15px;
    font-weight: 900;
    letter-spacing: .4px;
}

.pred-analysis {
    min-width: 0;
    padding-left: 9px;
    border-left: 1px solid rgba(255,255,255,.07);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
}

.pred-analysis small {
    color: rgba(255,255,255,.45);
    font-size: 7px;
}

.pred-analysis strong {
    color: var(--accent);
    font-size: 8px;
    line-height: 1.25;
    font-weight: 800;
    text-shadow: 0 0 8px rgba(var(--accent-rgb), .18);
}

.pred-analysis span {
    color: rgba(255,255,255,.54);
    font-size: 6.8px;
    line-height: 1.25;
}

.pred-analysis span b {
    color: rgba(255,255,255,.88);
}

.pred-result {
    min-width: 0;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    text-align: center;
    padding: 6px;
}

.pred-result strong {
    font-size: 8.2px;
    font-weight: 900;
}

.pred-result span {
    font-size: 6.7px;
    line-height: 1.25;
    color: rgba(255,255,255,.58);
}

.pred-result-success {
    color: #49ff9a;
    background:
        linear-gradient(
            135deg,
            rgba(24,255,132,.12),
            rgba(3,20,12,.38)
        );
}

.pred-result-error {
    color: #ff6570;
    background:
        linear-gradient(
            135deg,
            rgba(255,54,71,.13),
            rgba(25,3,6,.42)
        );
}

.pred-result-pending {
    color: #ffd777;
    background:
        linear-gradient(
            135deg,
            rgba(255,184,55,.15),
            rgba(27,17,2,.42)
        );
}

.pred-empty {
    display: none;
    margin-top: 16px;
    padding: 25px 14px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 17px;
    background: rgba(5,10,8,.70);
    color: rgba(255,255,255,.48);
    text-align: center;
    font-size: 10px;
}

.pred-empty.show {
    display: block;
}

@media (max-width: 390px) {
    .pred-title-row {
        grid-template-columns: 1fr;
    }

    .pred-history-meter {
        width: 145px;
    }

    .pred-toolbar {
        grid-template-columns: 1fr;
    }

    .pred-sort {
        width: max-content;
    }

    .pred-filters {
        overflow-x: auto;
        padding-bottom: 2px;
        scrollbar-width: none;
    }

    .pred-filters::-webkit-scrollbar {
        display: none;
    }

    .pred-card-grid {
        grid-template-columns: 1fr 82px;
    }

    .pred-analysis {
        grid-column: 1 / 2;
        grid-row: 2;
        margin-top: 8px;
        padding-top: 8px;
        padding-left: 0;
        border-left: 0;
        border-top: 1px solid rgba(255,255,255,.07);
    }

    .pred-result {
        grid-column: 2;
        grid-row: 1 / 3;
    }
}



/* ========================================
   PROFILE AVATAR: ПРОСМОТР И СМЕНА ФОТО
======================================== */

.profile-camera {
    padding: 0;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.avatar-viewer,
.avatar-sheet-backdrop {
    position: fixed;
    inset: 0;
    width: min(100%, 430px);
    margin: 0 auto;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .22s ease, visibility .22s ease;
}

.avatar-viewer {
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.avatar-viewer.open,
.avatar-sheet-backdrop.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.avatar-viewer-photo-wrap {
    position: relative;
    width: min(78vw, 320px);
    aspect-ratio: 1;
}

.avatar-viewer-photo {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid rgba(57,255,136,.9);
    box-shadow: 0 0 8px rgba(57,255,136,.7), 0 0 34px rgba(57,255,136,.25);
}

.avatar-viewer-close {
    position: absolute;
    top: max(20px, env(safe-area-inset-top));
    right: 20px;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 50%;
    background: rgba(15,18,17,.82);
    color: #fff;
    font-size: 29px;
    line-height: 1;
    cursor: pointer;
}

.avatar-viewer-camera {
    position: absolute;
    right: 10px;
    bottom: 24px;
    width: 52px;
    height: 52px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(57,255,136,.72);
    background: rgba(7,18,13,.97);
    color: #fff;
    box-shadow: 0 0 20px rgba(57,255,136,.38);
    cursor: pointer;
}

.avatar-viewer-camera svg {
    width: 24px;
    height: 24px;
}

.avatar-sheet-backdrop {
    z-index: 1100;
    display: flex;
    align-items: flex-end;
    background: rgba(0,0,0,.64);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
}

.avatar-sheet {
    width: 100%;
    padding: 10px 16px max(20px, env(safe-area-inset-bottom));
    border: 1px solid rgba(57,255,136,.28);
    border-bottom: 0;
    border-radius: 24px 24px 0 0;
    background: linear-gradient(180deg, rgba(12,20,16,.99), rgba(2,6,4,.99));
    box-shadow: 0 -10px 45px rgba(0,0,0,.55), 0 0 22px rgba(57,255,136,.10);
    transform: translateY(22px);
    transition: transform .22s ease;
}

.avatar-sheet-backdrop.open .avatar-sheet { transform: translateY(0); }

.avatar-sheet-handle {
    width: 42px;
    height: 4px;
    margin: 0 auto 14px;
    border-radius: 10px;
    background: rgba(255,255,255,.22);
}

.avatar-sheet strong {
    display: block;
    margin: 0 4px 12px;
    font-size: 17px;
}

.avatar-sheet button {
    width: 100%;
    min-height: 50px;
    margin-top: 8px;
    border-radius: 14px;
    border: 1px solid rgba(57,255,136,.20);
    background: rgba(57,255,136,.075);
    color: #fff;
    font-size: 14px;
    font-weight: 750;
    cursor: pointer;
}

.avatar-sheet .avatar-sheet-cancel {
    border-color: rgba(255,255,255,.09);
    background: rgba(255,255,255,.055);
    color: rgba(255,255,255,.7);
}

.avatar-file-input { display: none; }

body.avatar-modal-open { overflow: hidden; }


/* ========================================
   МОИ ПРОГНОЗЫ — ДИНАМИЧЕСКАЯ ИСТОРИЯ
======================================== */

.pred-score {
    color: rgba(255,255,255,.92);
}

.pred-card[data-pred-status="pending"] .pred-score {
    color: rgba(255,255,255,.55);
    font-size: 11px;
    letter-spacing: 1px;
}

.pred-empty.show {
    min-height: 86px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========================================
   МОИ ПРОГНОЗЫ — WIN / LOSS / PENDING
======================================== */
.pred-card[data-pred-status="success"] {
    border-color: rgba(73,255,154,.62);
    box-shadow: 0 0 5px rgba(73,255,154,.28), 0 0 18px rgba(73,255,154,.08), inset 0 1px 0 rgba(255,255,255,.05);
}
.pred-card[data-pred-status="error"] {
    border-color: rgba(255,101,112,.58);
    box-shadow: 0 0 5px rgba(255,101,112,.24), 0 0 18px rgba(255,101,112,.07), inset 0 1px 0 rgba(255,255,255,.05);
}
.pred-card[data-pred-status="success"] .pred-score { color:#49ff9a; }
.pred-card[data-pred-status="error"] .pred-score { color:#ff6570; }
.pred-result-success strong { text-shadow:0 0 10px rgba(73,255,154,.38); }
.pred-result-error strong { text-shadow:0 0 10px rgba(255,101,112,.34); }
.pred-result-pending strong { text-shadow:0 0 10px rgba(255,215,119,.30); }

/* Keep a solid glyph beneath the moving highlight for mobile WebKit. Padding
   includes the italic O overhang in both the base and highlight paint boxes. */
.brand-neiro,
.profile-brand-neiro,
.stats-brand-neiro,
.pred-brand-neiro {
    position: relative;
    padding-right: .22em;
    background: none;
    -webkit-text-fill-color: currentColor;
    color: var(--accent, #39ff88);
    overflow: visible;
}

.brand-neiro::after,
.profile-brand-neiro::after,
.stats-brand-neiro::after,
.pred-brand-neiro::after {
    content: "NEIRO";
    position: absolute;
    inset: 0;
    padding-right: .22em;
    font: inherit;
    letter-spacing: inherit;
    pointer-events: none;
    background: linear-gradient(110deg, transparent 38%, #fff 49%, transparent 60%);
    background-size: 300% 100%;
    background-repeat: no-repeat;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: logoShimmer 4s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
    .brand-neiro::after,
    .profile-brand-neiro::after,
    .stats-brand-neiro::after,
    .pred-brand-neiro::after { animation: none; background-position: 180% center; }
}


/* Keep result coverage explanations readable on narrow prediction cards. */
.pred-analysis .pred-coverage-note { display: block; font-size: 12px; line-height: 1.5; margin-top: 8px; color: #b5c3bc; }

.neiro-schedule-updated { color: #aab8b0; font-size: 12px; line-height: 1.5; margin: 0 0 14px; }
