@charset "UTF-8";

/*
 * Личный кабинет — редакционная вёрстка: крупная типографика, тонкие линейки,
 * асимметричная сетка. Никаких карточек с иконками-эмодзи.
 */

.account-page {
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    padding-bottom: 110px;
}

.acct {
    --ink: #f4f4f2;
    --dim: #8b8b91;
    --faint: #5f5f66;
    --hair: rgba(255, 255, 255, 0.1);
    --accent: #cc1d1d;
    --gold: #e3bd58;
    --low: #c2564f;

    color: var(--ink);
}

/*===================================================================================================================
    Шапка профиля
===================================================================================================================*/
.acct-head {
    padding: 10px 0 30px;
    /* Глобальное правило для <header> рисует белую линию — здесь она не нужна */
    border-bottom: none;
}

.acct-eyebrow {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--faint);
}

.acct-eyebrow-mark {
    color: var(--accent);
    font-weight: 800;
}

.acct-eyebrow-sep {
    color: rgba(255, 255, 255, 0.2);
}

.acct-head-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: 22px;
}

.acct-identity {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    min-width: 0;
}

/* Аватар: круглая плашка с инициалом, тонкая обводка вместо тяжёлой рамки */
.acct-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 152px;
    height: 152px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 50%;
    background: radial-gradient(circle at 30% 25%, #24242a, #131317 70%);
    color: var(--ink);
    font-size: 56px;
    font-weight: 800;
    letter-spacing: -0.02em;
    user-select: none;
}

/* Логин стоит под аватаром и уже не спорит с ним размером */
.acct-title {
    display: flex;
    align-items: baseline;
    gap: 0.06em;
    max-width: 100%;
    margin: 0;
    font-size: clamp(16px, 1.5vw, 21px);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.acct-title-prefix {
    font-size: 0.9em;
    font-weight: 500;
    color: var(--faint);
}

.acct-title-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Выход — текстом с иконкой выхода, тише, чем красная кнопка */
.acct-exit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    padding: 6px 0;
    border: none;
    border-bottom: 1px solid transparent;
    background: none;
    color: var(--dim);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.acct-exit-icon {
    flex-shrink: 0;
    transition: color 0.2s ease, transform 0.2s ease;
}

.acct-exit:hover {
    color: var(--ink);
    border-bottom-color: var(--accent);
}

.acct-exit:hover .acct-exit-icon {
    color: var(--accent);
    transform: translateX(2px);
}

.acct-meta {
    display: flex;
    flex-wrap: wrap;
    margin: 30px 0 0;
    padding-top: 18px;
    border-top: 1px solid var(--hair);
}

.acct-meta-item {
    padding: 0 30px;
    border-left: 1px solid var(--hair);
    min-width: 0;
}

.acct-meta-item:first-child {
    padding-left: 0;
    border-left: none;
}

.acct-meta-item dt {
    font-size: 9.5px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--faint);
}

.acct-meta-item dd {
    margin: 7px 0 0;
    font-size: 13.5px;
    color: var(--ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/*===================================================================================================================
    Сетка страницы
===================================================================================================================*/
.acct-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(210px, 262px);
    gap: 72px;
    padding-top: 46px;
    align-items: start;
}

/* Без заметок правая колонка не нужна — секции занимают всю ширину */
.acct-body--solo {
    grid-template-columns: minmax(0, 1fr);
}

.acct-main {
    display: grid;
    gap: 62px;
    min-width: 0;
}

.acct-aside {
    display: grid;
    gap: 42px;
    position: sticky;
    top: 104px;
}

/*===================================================================================================================
    Секции
===================================================================================================================*/
.acct-section {
    min-width: 0;
}

.acct-section-head {
    display: flex;
    align-items: baseline;
    gap: 14px;
    margin-bottom: 22px;
}

.acct-index {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.16em;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
}

.acct-section-title {
    margin: 0;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ink);
    white-space: nowrap;
}

/* Линейка между заголовком и счётчиком — вместо подчёркивания из каталога */
.acct-rule {
    flex: 1;
    min-width: 16px;
    height: 1px;
    background-color: var(--hair);
}

.acct-count {
    font-size: 12px;
    letter-spacing: 0.06em;
    color: var(--dim);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.acct-section-note {
    flex-basis: 100%;
    margin: 0;
    font-size: 12px;
    color: var(--faint);
}

.acct-empty {
    max-width: 54ch;
    margin: 0;
    padding: 20px 0;
    border-top: 1px solid var(--hair);
    border-bottom: 1px solid var(--hair);
    font-size: 13px;
    line-height: 1.65;
    color: var(--dim);
}

/*===================================================================================================================
    Показатели в боковой колонке
===================================================================================================================*/
.acct-block-head {
    margin: 0 0 14px;
    font-size: 9.5px;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--faint);
}

.figures {
    display: grid;
}

.figures-group {
    margin: 0;
    padding: 22px 0 10px;
    border-top: 1px solid var(--hair);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--dim);
}

.figures-group:first-child {
    padding-top: 0;
    border-top: 0;
}

/* Заголовок группы уже даёт линию — у первой строки она лишняя */
.figures-group + .figure {
    border-top: 0;
}

.figure {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 0;
    border-top: 1px solid var(--hair);
}

.figure:last-child {
    border-bottom: 1px solid var(--hair);
}

.figure-label {
    font-size: 12.5px;
    color: var(--dim);
}

.figure-value {
    font-size: 29px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}

/*===================================================================================================================
    Заметки: любимый жанр и последняя оценка
===================================================================================================================*/
.notes {
    display: grid;
}

.note {
    display: grid;
    gap: 6px;
    padding: 14px 0;
    border-top: 1px solid var(--hair);
    color: inherit;
    text-decoration: none;
}

.note:last-child {
    border-bottom: 1px solid var(--hair);
}

.note-label {
    font-size: 9.5px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--faint);
}

.note-value {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--ink);
}

.note-hint {
    font-size: 11.5px;
    color: var(--dim);
    font-variant-numeric: tabular-nums;
}

.note--last {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
}

.note--last:hover .note-value {
    color: var(--accent);
}

.note-body {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.note-body .note-value {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.note-score {
    font-size: 26px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}

/* Цвет оценки: 9–10 — золото, 7–8 — светлая, 5–6 — приглушённая, ниже — красная */
.is-top {
    color: var(--gold);
}

.is-high {
    color: #e2e2e5;
}

.is-mid {
    color: #9a9aa0;
}

.is-low {
    color: var(--low);
}

/*===================================================================================================================
    Библиотека: чипы статусов
===================================================================================================================*/
.acct-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.acct-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background-color: transparent;
    color: var(--dim);
    font-family: inherit;
    font-size: 12.5px;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.acct-chip:hover {
    border-color: rgba(255, 255, 255, 0.3);
    color: var(--ink);
}

.acct-chip.is-active {
    border-color: rgba(204, 29, 29, 0.6);
    background-color: rgba(204, 29, 29, 0.16);
    color: #ff6b6b;
}

.acct-chip-count {
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    color: var(--faint);
}

.acct-chip.is-active .acct-chip-count {
    color: rgba(255, 255, 255, 0.75);
}

/* Пояснение к автостатусу «Брошено» */
.acct-hint {
    margin: -8px 0 18px;
    font-size: 11.5px;
    line-height: 1.5;
    color: var(--faint);
}

/*===================================================================================================================
    Закладки — горизонтальная лента постеров
===================================================================================================================*/
.rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 138px;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 14px;
    /* Правый край растворяется — видно, что лента продолжается */
    mask-image: linear-gradient(to right, #000 78%, rgba(0, 0, 0, 0.45) 94%, transparent);
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
}

.rail::-webkit-scrollbar {
    height: 3px;
}

.rail::-webkit-scrollbar-track {
    background-color: transparent;
}

.rail::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.22);
}

.rail:hover::-webkit-scrollbar-thumb {
    background-color: rgba(204, 29, 29, 0.6);
}

.rail-tile {
    display: grid;
    gap: 10px;
    align-content: start;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.rail-poster {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 3px;
    background-color: #141416;
    color: #3f3f45;
    font-size: 26px;
    font-weight: 800;
}

.rail-poster img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.85) brightness(0.94);
    transition: transform 0.55s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.35s ease;
}

/* Тонкая внутренняя рамка вместо жирной обводки карточек */
.rail-poster::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 3px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.09);
    pointer-events: none;
}

.rail-tile:hover .rail-poster img {
    transform: scale(1.05);
    filter: none;
}

.rail-meta {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.rail-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    /* Два ряда всегда: подписи под постерами встают на одну линию */
    height: 2.7em;
    font-size: 12.5px;
    line-height: 1.35;
    color: var(--ink);
}

.rail-tile:hover .rail-title {
    color: var(--accent);
}

.rail-sub {
    font-size: 10.5px;
    letter-spacing: 0.03em;
    color: var(--faint);
    font-variant-numeric: tabular-nums;
}

/*===================================================================================================================
    Оценки — реестр со счётом справа
===================================================================================================================*/
.ledger {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ledger-row {
    display: flex;
    align-items: center;
    gap: 16px;
    border-top: 1px solid var(--hair);
}

.ledger-row:last-child {
    border-bottom: 1px solid var(--hair);
}

.ledger-link {
    display: flex;
    align-items: baseline;
    gap: 18px;
    flex: 1;
    min-width: 0;
    padding: 13px 0;
    color: inherit;
    text-decoration: none;
}

.ledger-pos {
    flex-shrink: 0;
    width: 22px;
    font-size: 10.5px;
    letter-spacing: 0.1em;
    color: var(--faint);
    font-variant-numeric: tabular-nums;
}

.ledger-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.ledger-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 15px;
    font-weight: 500;
    color: var(--ink);
    transition: color 0.2s ease;
}

.ledger-link:hover .ledger-title {
    color: var(--accent);
}

.ledger-meta {
    font-size: 11.5px;
    color: var(--faint);
    font-variant-numeric: tabular-nums;
}

.ledger-score {
    flex-shrink: 0;
    padding-left: 16px;
    font-size: 23px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

/*===================================================================================================================
    Достижения — индекс без иконок: номер, название, счётчик, полоска
===================================================================================================================*/
.ach-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 44px;
}

.ach {
    display: grid;
    gap: 9px;
    padding: 15px 0 16px;
    border-top: 1px solid var(--hair);
    opacity: 0.4;
    transition: opacity 0.25s ease;
}

.ach.is-unlocked {
    opacity: 1;
}

.ach-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.ach-index {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: var(--faint);
    font-variant-numeric: tabular-nums;
}

.ach.is-unlocked .ach-index {
    color: var(--accent);
}

.ach-count {
    font-size: 10.5px;
    color: var(--faint);
    font-variant-numeric: tabular-nums;
}

.ach-title {
    margin: 0;
    font-size: 14.5px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--ink);
}

.ach-note {
    margin: 4px 0 0;
    font-size: 11.5px;
    line-height: 1.45;
    color: var(--dim);
}

.ach-bar {
    height: 2px;
    background-color: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.ach-bar span {
    display: block;
    height: 100%;
    background-color: var(--faint);
    transition: width 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.ach.is-unlocked .ach-bar span {
    background-color: var(--accent);
}

/* Закрываем индекс линейкой: последние два элемента — нижний ряд сетки */
.ach:nth-last-child(1),
.ach:nth-last-child(2) {
    border-bottom: 1px solid var(--hair);
}

/*===================================================================================================================
    Появление блоков
===================================================================================================================*/
@keyframes acct-rise {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.acct-head,
.acct-section,
.acct-block {
    animation: acct-rise 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.acct-main .acct-section:nth-child(2) {
    animation-delay: 0.06s;
}

.acct-main .acct-section:nth-child(3) {
    animation-delay: 0.12s;
}

.acct-aside .acct-block:nth-child(2) {
    animation-delay: 0.06s;
}

@media (prefers-reduced-motion: reduce) {
    .acct-head,
    .acct-section,
    .acct-block,
    .ach-bar span,
    .rail-poster img {
        animation: none;
        transition: none;
    }
}

/*===================================================================================================================
    Адаптив
===================================================================================================================*/
@media (max-width: 1100px) {
    .acct-body {
        grid-template-columns: minmax(0, 1fr);
        gap: 46px;
        padding-top: 34px;
    }

    /* Показатели переезжают наверх — это сводка, с неё удобнее начинать */
    .acct-aside {
        order: -1;
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 32px;
    }
}

@media (max-width: 430px) {
    /* На узком экране подпись над заголовком должна влезать в одну строку */
    .acct-eyebrow {
        letter-spacing: 0.16em;
    }
}

@media (max-width: 760px) {
    .acct-aside {
        grid-template-columns: minmax(0, 1fr);
    }

    .ach-list {
        grid-template-columns: minmax(0, 1fr);
    }

    /* Выход уезжает под логин: рядом с заголовком ему тесно */
    .acct-head-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .acct-identity {
        gap: 12px;
        /* Без этого длинный логин в колонке растягивает строку и ломает страницу */
        width: 100%;
    }

    .acct-avatar {
        width: 108px;
        height: 108px;
        font-size: 40px;
    }

    .acct-main {
        gap: 46px;
    }

    .acct-head-row {
        gap: 16px;
    }

    .acct-meta {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px 18px;
        margin-top: 24px;
    }

    .acct-meta-item {
        padding: 0;
        border-left: none;
        min-width: 0;
    }

    .rail {
        grid-auto-columns: 118px;
        gap: 12px;
    }
}
