/* AivanExtremes v2: список, меню раздела, машина времени. Шрифт — Oxygene 1 (как в Geometry Dash). */
@font-face {
    font-family: "Oxygene1";
    src: url("/static/fonts/Oxygene1.ttf") format("truetype");
    font-display: swap;
}
@font-face {
    font-family: "PusabGD";
    src: url("/static/fonts/Pusab.ttf") format("truetype");
    font-display: swap;
}
/* В Oxygene 1 нет кириллицы и нормальных строчных — пишем капсом, кириллица уходит в Pusab/системный. */
.axl-gd {
    font-family: "Oxygene1", "PusabGD", system-ui, sans-serif;
    text-transform: uppercase;
    letter-spacing: .02em;
    font-weight: 400;
    text-shadow: 0 2px 0 rgba(0,0,0,.55), 0 0 1px #000;
}

.axl-page { --gold: #fbbf24; --rose: #fb7185; --line: rgba(251,113,133,.24); --card: rgba(30,8,16,.82); --muted: #fda4af; }
.axl-page > * { max-width: 72rem; margin-left: auto; margin-right: auto; }

/* ---------- Шапка ---------- */
.axl-hero { text-align: center; margin-bottom: 1rem; }
.axl-hero h1 {
    font-size: clamp(1.4rem, 3.6vw, 2.5rem); margin: .35rem 0 .6rem; line-height: 1.15;
    background: linear-gradient(180deg, #fffbe6 0%, #fde68a 40%, #f59e0b 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
    filter: drop-shadow(0 3px 0 rgba(0,0,0,.6));
    text-shadow: none;
}
.axl-lead { color: var(--muted); max-width: 40rem; margin: 0 auto; }
.axl-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; }
.axl-stat {
    min-width: 8.5rem; padding: .55rem .9rem; border-radius: .9rem; text-decoration: none;
    background: rgba(40,8,18,.75); border: 1px solid var(--line); color: #ffe4e6;
}
.axl-stat b { display: block; font-size: 1.25rem; color: #fff; }
.axl-stat span { font-size: .66rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--rose); }
.axl-stat.is-gold { border-color: rgba(251,191,36,.6); background: rgba(60,36,6,.7); }
.axl-stat.is-gold b { color: var(--gold); }

/* ---------- Меню раздела ---------- */
.axl-tabs {
    display: flex; flex-wrap: wrap; justify-content: center; gap: .45rem;
    margin-bottom: 1rem; padding: .45rem; border-radius: 1.1rem;
    background: rgba(20,5,10,.85); border: 1px solid var(--line, rgba(251,113,133,.24));
}
.axl-tab {
    display: inline-flex; align-items: center; gap: .45rem; padding: .55rem 1rem; border-radius: .8rem;
    font-weight: 800; font-size: .9rem; text-decoration: none; color: #ffe4e6;
    border: 1px solid transparent; transition: background .15s, border-color .15s, transform .15s;
}
.axl-tab:hover { background: rgba(251,113,133,.1); color: #fff; transform: translateY(-1px); }
.axl-tab.is-on { color: #1c0a00; background: linear-gradient(180deg, #fde68a, #f59e0b); }

/* ---------- Панель поиска и сортировки ---------- */
.axl-toolbar {
    display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; justify-content: space-between;
    margin-bottom: 1rem; padding: .7rem .8rem; border-radius: 1rem; background: rgba(32,8,16,.82); border: 1px solid var(--line);
}
.axl-search { position: relative; display: flex; gap: .45rem; align-items: center; flex: 1 1 18rem; margin: 0; }
.axl-search-ico { position: absolute; left: .7rem; color: var(--muted); pointer-events: none; font-size: 1.1rem; }
.axl-search input[type="search"] {
    flex: 1; min-width: 0; padding: .55rem .8rem .55rem 2rem; border-radius: .7rem;
    background: rgba(12,4,8,.85); border: 1px solid rgba(251,113,133,.35); color: #fff;
}
.axl-search input[type="search"]:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(251,191,36,.18); }
.axl-clear { font-size: .8rem; font-weight: 700; color: var(--muted); text-decoration: none; white-space: nowrap; }
.axl-btn {
    padding: .5rem .95rem; border-radius: .7rem; border: 0; font-weight: 800; cursor: pointer;
    color: #1c0a00; background: linear-gradient(180deg, #fde68a, #f59e0b);
}
.axl-btn.is-ghost { color: #ffe4e6; background: rgba(255,255,255,.07); border: 1px solid var(--line); }
.axl-sort { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.axl-label { font-size: .7rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.axl-seg { display: inline-flex; padding: .2rem; border-radius: .7rem; background: rgba(12,4,8,.8); border: 1px solid var(--line); }
.axl-seg a { padding: .35rem .7rem; border-radius: .5rem; font-size: .82rem; font-weight: 800; color: #ffe4e6; text-decoration: none; }
.axl-seg a.is-on { background: var(--rose); color: #1c0a00; }
.axl-dir {
    display: inline-flex; align-items: center; gap: .35rem; padding: .4rem .75rem; border-radius: .7rem;
    font-size: .82rem; font-weight: 800; text-decoration: none; color: var(--gold);
    border: 1px solid rgba(251,191,36,.45); background: rgba(60,36,6,.45);
}
.axl-dir span { font-size: 1rem; }
.axl-found { color: var(--muted); font-weight: 700; margin-bottom: .6rem; }

/* ---------- Карточка уровня ---------- */
.axl-list { display: flex; flex-direction: column; gap: .75rem; }
.axl-card {
    display: grid; grid-template-columns: 4.6rem minmax(0, 300px) 1fr; gap: 1rem; align-items: center;
    padding: .75rem; border-radius: 1.1rem; text-decoration: none; color: #ffe4e6;
    background: var(--card); border: 1px solid var(--line);
    transition: transform .15s, border-color .15s, box-shadow .15s;
    animation: axlRise .35s ease both; animation-delay: var(--d, 0ms);
}
@keyframes axlRise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.axl-card:hover { transform: translateY(-2px); border-color: rgba(251,191,36,.55); box-shadow: 0 14px 34px -18px rgba(244,63,94,.8); color: #fff; }
.axl-card.is-gold { border-color: rgba(251,191,36,.7); box-shadow: inset 0 0 0 1px rgba(251,191,36,.35); }
.axl-card.is-silver { border-color: rgba(226,232,240,.5); }
.axl-card.is-bronze { border-color: rgba(217,119,6,.55); }
.axl-rank { text-align: center; }
.axl-rank b { display: block; font-size: 2.7rem; line-height: 1; color: #fff; }
.axl-card.is-gold .axl-rank b { color: var(--gold); }
.axl-card.is-silver .axl-rank b { color: #e2e8f0; }
.axl-card.is-bronze .axl-rank b { color: #f59e0b; }
.axl-rank small { display: block; margin-top: .3rem; font-size: .64rem; font-weight: 800; color: var(--muted); letter-spacing: .04em; }
/* Картинка видна целиком: contain поверх размытой копии. */
.axl-thumb { position: relative; aspect-ratio: 16 / 9; border-radius: .75rem; overflow: hidden; background: #000; }
.axl-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; }
.axl-thumb-bg { object-fit: cover; filter: blur(14px) brightness(.55); transform: scale(1.15); }
.axl-thumb-img { object-fit: contain; }
.axl-body { min-width: 0; }
.axl-name { margin: 0; font-size: clamp(1.05rem, 2.2vw, 1.55rem); color: #fff; overflow-wrap: anywhere; }
.axl-creator { display: flex; align-items: center; gap: .4rem; margin: .2rem 0 .45rem; color: var(--muted); font-weight: 600; }
.axl-aivan { width: 22px; height: 22px; object-fit: contain; vertical-align: middle; filter: drop-shadow(0 0 4px rgba(251,191,36,.7)); }
.axl-badges { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .5rem; }
.axl-badge { padding: .18rem .6rem; border-radius: 999px; font-size: .74rem; font-weight: 800; }
.axl-badge.is-current { color: #1c0a00; background: linear-gradient(90deg, #fde68a, #f59e0b); }
.axl-badge.is-former { color: #fde68a; background: rgba(251,191,36,.12); border: 1px solid rgba(251,191,36,.45); }
.axl-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.axl-facts > div { padding: .4rem .55rem; border-radius: .6rem; background: rgba(0,0,0,.28); }
.axl-facts span { display: block; font-size: .64rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.axl-facts b { font-size: 1rem; color: #fff; font-variant-numeric: tabular-nums; }
.axl-facts small { color: var(--muted); font-weight: 600; }
.axl-enj i { display: block; height: 5px; margin-top: .3rem; border-radius: 99px; background: rgba(255,255,255,.1); overflow: hidden; }
.axl-enj em { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #f43f5e, #fbbf24, #4ade80); }
.axl-empty { text-align: center; color: var(--muted); padding: 2rem 0; }

@media (max-width: 767.98px) {
    .axl-card { grid-template-columns: 3rem 1fr; }
    .axl-thumb { grid-column: 2; }
    .axl-body { grid-column: 1 / -1; }
    .axl-rank b { font-size: 1.6rem; }
    .axl-facts { grid-template-columns: 1fr 1fr; }
    .axl-enj { grid-column: 1 / -1; }
    .axl-toolbar { flex-direction: column; align-items: stretch; }
    .axl-search { flex: none; }
    .axl-seg { flex-wrap: wrap; }
}

/* ---------- Машина времени ---------- */
.tmx-controls { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-bottom: .6rem; }
.tmx-field { display: inline-flex; align-items: center; gap: .4rem; margin: 0; font-size: .78rem; font-weight: 700; color: var(--muted); }
.tmx-field input, .tmx-field select { width: 5rem; padding: .35rem .5rem; border-radius: .55rem; background: rgba(12,4,8,.85); border: 1px solid var(--line); color: #fff; }
.tmx-date { margin-left: auto; font-size: clamp(1.3rem, 3vw, 2rem); color: var(--gold); }
.tmx-slider { width: 100%; accent-color: #f59e0b; margin-bottom: 1rem; }
.tmx-grid { display: grid; grid-template-columns: minmax(0, 340px) 1fr; gap: 1rem; align-items: start; }
.tmx-leader { position: sticky; top: 5rem; border-radius: 1.1rem; overflow: hidden; background: var(--card); border: 1px solid rgba(251,191,36,.55); }
.tmx-leader.is-flash { animation: tmxFlash .9s ease; }
@keyframes tmxFlash { 0% { box-shadow: 0 0 0 0 rgba(251,191,36,.9); } 100% { box-shadow: 0 0 0 22px rgba(251,191,36,0); } }
.tmx-leader-img { position: relative; aspect-ratio: 16 / 9; background: #000; overflow: hidden; }
.tmx-leader-img img { position: absolute; inset: 0; width: 100%; height: 100%; }
#tmx-leader-bg { object-fit: cover; filter: blur(14px) brightness(.5); transform: scale(1.15); }
#tmx-leader-img { object-fit: contain; }
.tmx-leader-body { padding: .8rem 1rem 1rem; }
.tmx-leader-body h2 { margin: .25rem 0 .1rem; font-size: 1.6rem; color: var(--gold); }
.tmx-leader-body p { display: flex; gap: .4rem; align-items: center; color: var(--muted); margin: 0 0 .7rem; }
.tmx-leader-stats { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.tmx-leader-stats div { padding: .45rem .6rem; border-radius: .6rem; background: rgba(0,0,0,.3); }
.tmx-leader-stats b { display: block; font-size: 1.5rem; color: #fff; }
.tmx-leader-stats span { font-size: .64rem; font-weight: 800; text-transform: uppercase; color: var(--muted); }
.tmx-board { position: relative; transition: height .35s ease; }
.tmx-row {
    position: absolute; left: 0; right: 0; top: 0; height: 66px;
    display: grid; grid-template-columns: 3.4rem 104px 1fr auto; gap: .7rem; align-items: center;
    padding: 0 .8rem 0 .4rem; border-radius: .9rem; text-decoration: none; color: #ffe4e6;
    background: var(--card); border: 1px solid var(--line);
    transition: transform .45s cubic-bezier(.2,.8,.2,1), opacity .35s ease, border-color .2s;
}
.tmx-row:hover { color: #fff; border-color: rgba(251,191,36,.5); }
.tmx-row.is-leader { border-color: var(--gold); background: rgba(60,36,6,.85); }
.tmx-row.is-new { box-shadow: 0 0 0 2px rgba(80,230,255,.7), 0 0 22px rgba(80,230,255,.35); }
.tmx-rank { text-align: center; font-size: 1.5rem; color: #fff; }
.tmx-row.is-leader .tmx-rank { color: var(--gold); }
.tmx-thumb { position: relative; width: 104px; aspect-ratio: 16 / 9; border-radius: .5rem; overflow: hidden; background: #000; }
.tmx-thumb img { width: 100%; height: 100%; object-fit: contain; }
.tmx-txt { min-width: 0; }
.tmx-txt b { display: block; font-size: 1.05rem; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tmx-txt small { display: flex; align-items: center; gap: .35rem; color: var(--muted); font-weight: 600; }
.tmx-txt .axl-aivan { width: 18px; height: 18px; }
.tmx-when { font-size: .78rem; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.tmx-h3 { margin: 1.6rem 0 .6rem; font-size: 1.05rem; font-weight: 900; color: #ffe4e6; }
.tmx-reigns { position: relative; height: 54px; border-radius: .8rem; background: rgba(12,4,8,.85); border: 1px solid var(--line); overflow: hidden; }
.tmx-reign {
    position: absolute; top: 6px; bottom: 6px; padding: 0 .35rem; border: 0; border-radius: .45rem; cursor: pointer;
    background: hsl(var(--h) 70% 45% / .55); color: #fff; font-size: .68rem; font-weight: 800; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.tmx-reign span { pointer-events: none; }
.tmx-reign.is-on { background: linear-gradient(180deg, #fde68a, #f59e0b); color: #1c0a00; z-index: 1; }
.tmx-reign-marker { position: absolute; top: 0; bottom: 0; width: 2px; background: #fff; box-shadow: 0 0 8px #fff; z-index: 2; pointer-events: none; }
.tmx-reign-list { margin: .8rem 0 0; padding-left: 1.4rem; columns: 2 18rem; color: var(--muted); font-size: .86rem; }
.tmx-reign-list li { margin: .2rem 0; break-inside: avoid; }
.tmx-reign-list b { color: #fff; font-size: .95rem; }
.tmx-reign-list em { font-style: normal; color: var(--gold); font-weight: 800; }
.tmx-montage { margin-top: 1.4rem; padding: .7rem 1rem; border-radius: .9rem; background: rgba(12,4,8,.7); border: 1px dashed var(--line); color: var(--muted); }
.tmx-montage summary { cursor: pointer; font-weight: 800; color: #ffe4e6; }
.tmx-montage a { color: var(--gold); word-break: break-all; }

@media (max-width: 860px) {
    .tmx-grid { grid-template-columns: 1fr; }
    .tmx-leader { position: static; }
    .tmx-row { grid-template-columns: 2.6rem 80px 1fr; }
    .tmx-thumb { width: 80px; }
    .tmx-when { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .axl-card, .tmx-row, .tmx-leader.is-flash { animation: none; transition: none; }
}

/* ---------- Годовая статистика ---------- */
.axl-years { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; margin-bottom: 1rem; }
.axl-years a {
    padding: .4rem .8rem; border-radius: .7rem; font-size: 1.05rem; text-decoration: none; color: #ffe4e6;
    background: rgba(20,5,10,.85); border: 1px solid var(--line);
}
.axl-years a:hover { border-color: rgba(251,191,36,.55); color: #fff; }
.axl-years a.is-on { color: #1c0a00; background: linear-gradient(180deg, #fde68a, #f59e0b); text-shadow: none; }
.axy-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: .6rem; margin-bottom: 1rem; }
.axy-stats .axl-stat { min-width: 0; }
.axy-stats .axl-stat b { overflow-wrap: anywhere; }
.axl-stat.is-big b { font-size: 2rem; color: var(--gold); }
.axl-stat em { display: block; margin-top: .2rem; font-style: normal; font-size: .72rem; font-weight: 800; color: var(--muted); }
.axl-stat em.is-up { color: #4ade80; }
.axl-stat em.is-down { color: #f87171; }
.axy-months { margin-bottom: 1rem; padding: .6rem 1rem 1rem; border-radius: 1rem; background: rgba(20,5,10,.85); border: 1px solid var(--line); }
.axy-months .tmx-h3 { margin-top: .2rem; }
.axy-bars { display: grid; grid-template-columns: repeat(12, 1fr); gap: .4rem; height: 150px; align-items: end; }
.axy-bar { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: .25rem; }
.axy-bar b { font-size: .95rem; color: #fff; min-height: 1.1em; }
.axy-bar i { display: block; width: 100%; max-width: 2.6rem; min-height: 3px; border-radius: .4rem .4rem .15rem .15rem; background: linear-gradient(180deg, #fbbf24, #f43f5e); transition: height .5s ease; }
.axy-bar span { font-size: .66rem; font-weight: 800; text-transform: uppercase; color: var(--muted); }
.axl-toolbar .axl-label + .axl-seg { margin-right: auto; }

/* ---------- Возможные прохождения ---------- */
.axp-panel { border-radius: 1.1rem; background: var(--card); border: 1px solid var(--line); }
.axp-groups { display: flex; flex-direction: column; gap: .9rem; }
.axp-group { padding: .9rem 1rem; animation: axlRise .35s ease both; animation-delay: calc(var(--i, 0) * 50ms); }
.axp-head { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem 1.2rem; }
.axp-title { display: flex; align-items: center; gap: .5rem; min-width: 0; flex: 1 1 16rem; }
.axp-title h2 { margin: 0; font-size: 1.45rem; color: var(--gold); overflow-wrap: anywhere; }
.axp-count { font-size: .72rem; font-weight: 800; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.axp-desire { display: flex; align-items: center; gap: .5rem; min-width: 12rem; }
.axp-desire span { font-size: .66rem; font-weight: 800; text-transform: uppercase; color: var(--muted); }
.axp-desire i { flex: 1; height: 8px; border-radius: 99px; background: rgba(255,255,255,.1); overflow: hidden; }
.axp-desire em { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #f43f5e, #fbbf24, #4ade80); }
.axp-desire b { min-width: 2.2rem; text-align: right; font-size: 1.1rem; color: #fff; }
.axp-desire.is-small { min-width: 9rem; }
.axp-desire.is-small b { font-size: .95rem; }
.axp-actions { display: flex; gap: .4rem; }
.axp-actions form, .axp-item form { margin: 0; }
.axp-items { display: flex; flex-direction: column; gap: .4rem; margin-top: .8rem; }
.axp-item {
    display: flex; align-items: center; gap: .6rem; padding: .45rem .7rem; border-radius: .8rem;
    background: rgba(0,0,0,.28); border: 1px solid transparent; transition: border-color .15s;
}
.axp-item:hover { border-color: rgba(251,191,36,.4); }
.axp-face { width: 30px; height: 30px; object-fit: contain; flex: none; }
.axp-name { flex: 1; min-width: 0; font-size: 1.05rem; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.axp-mini { padding: 0 .35rem; border-radius: .4rem; border: 1px solid var(--line); background: rgba(255,255,255,.05); color: var(--muted); font-size: .7rem; line-height: 1.6; cursor: pointer; }
.axp-mini:hover { color: #fff; border-color: rgba(251,191,36,.5); }
.axl-btn.is-danger { color: #fecaca; background: rgba(220,38,38,.18); border: 1px solid rgba(248,113,113,.45); }
.axl-btn { font-size: .82rem; }
.axp-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .6rem; padding: .8rem 1rem; margin-bottom: .9rem; }
.axp-form.is-sub { margin: .7rem 0 0; padding: .6rem .7rem; border-radius: .8rem; background: rgba(0,0,0,.25); border: 1px dashed var(--line); }
.axp-form label { display: flex; flex-direction: column; gap: .25rem; flex: 1 1 14rem; margin: 0; font-size: .7rem; font-weight: 800; text-transform: uppercase; color: var(--muted); }
.axp-form label.is-short { flex: 0 1 8rem; }
.axp-form input { padding: .45rem .6rem; border-radius: .6rem; background: rgba(12,4,8,.85); border: 1px solid rgba(251,113,133,.35); color: #fff; font-size: .9rem; text-transform: none; }
.axp-form input:focus { outline: none; border-color: var(--gold); }
.axl-lead a { color: var(--gold); }
@media (max-width: 575.98px) {
    .axy-bars { gap: .2rem; height: 120px; }
    .axy-bar span { font-size: .55rem; }
    .axp-item { flex-wrap: wrap; }
    .axp-desire.is-small { min-width: 0; flex: 1 1 100%; }
}

/* Future records have no rank or completion date. */
.axl-card.is-future { grid-template-columns: 9rem minmax(0, 1fr); }
@media (max-width: 600px) { .axl-card.is-future { grid-template-columns: 5rem minmax(0, 1fr); } }
