/* ==========================================================
   Lunar Vox — чистые стили (тёмная и светлая темы)
   ========================================================== */

/* ---------- Переменные ---------- */

:root {
    --bg: #0f1115;
    --card: #171a21;
    --input: #10131a;
    --text: #e8e8e8;
    --muted: #9aa0a6;
    --accent: #6c5ce7;
    --accent-hover: #7f71ef;
    --border: #2a2f3a;
    --hover: rgba(255, 255, 255, .05);
    --shadow: rgba(0, 0, 0, .35);
}

[data-theme="light"] {
    --bg: #f4f6fa;
    --card: #ffffff;
    --input: #f0f2f7;
    --text: #1a1f2b;
    --muted: #5c6675;
    --border: #d9dfe9;
    --hover: rgba(108, 92, 231, .08);
    --shadow: rgba(30, 40, 70, .12);
}

/* ---------- База ---------- */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Inter, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

h1, h2, h3 {
    line-height: 1.2;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 16px;
    width: 100%;
}

.page-content {
    flex: 1;
    padding-top: 24px;
    padding-bottom: 40px;
}

.muted {
    color: var(--muted);
}

/* ---------- Шапка ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--card);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 12px var(--shadow);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 60px;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    font-size: 20px;
    color: var(--text);
    text-decoration: none;
    flex: none;
}

.logo:hover {
    text-decoration: none;
}

.logo-moon {
    font-size: 22px;
    filter: drop-shadow(0 0 6px rgba(124, 108, 240, .8));
}

.logo-accent {
    color: var(--accent);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
}

.main-nav a:not(.btn) {
    padding: 8px 12px;
    border-radius: 10px;
    color: var(--muted);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: background .2s ease, color .2s ease;
}

.main-nav a:not(.btn):hover {
    color: var(--text);
    background: var(--hover);
    text-decoration: none;
}

.main-nav a.active {
    color: #fff;
    background: var(--accent);
}

.nav-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-bell {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 4px 6px;
    font-size: 18px;
    text-decoration: none;
}

.bell-badge {
    position: absolute;
    top: -4px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    margin-right: 4px;
}

.nav-user:hover {
    text-decoration: none;
    color: var(--accent);
}

.nav-avatar {
    width: 28px;
    height: 28px;
    font-size: 12px;
    flex: none;
}

.nav-logout {
    color: var(--muted);
    font-size: 13px;
    text-decoration: none;
}

.nav-logout:hover {
    color: #e74c3c;
    text-decoration: none;
}

/* Тумблер темы */

.theme-toggle {
    width: 52px;
    height: 28px;
    border-radius: 999px;
    background: var(--input);
    border: 1px solid var(--border);
    position: relative;
    cursor: pointer;
    padding: 0;
    flex: none;
    transition: background .25s ease;
}

.theme-toggle::after {
    content: '🌙';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: left .25s ease;
}

[data-theme="light"] .theme-toggle {
    background: #dfe6f5;
}

[data-theme="light"] .theme-toggle::after {
    left: 26px;
    content: '☀️';
}

/* Бургер и мобильная шапка */

.burger {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: 0;
    cursor: pointer;
    padding: 8px;
    margin-left: auto;
}

.burger span {
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform .25s ease, opacity .25s ease;
}

.burger.open span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.burger.open span:nth-child(2) {
    opacity: 0;
}

.burger.open span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

@media (max-width: 900px) {
    .burger {
        display: flex;
    }

    .main-nav {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 12px 16px 16px;
        background: var(--card);
        border-bottom: 1px solid var(--border);
        box-shadow: 0 18px 34px var(--shadow);
        max-height: calc(100vh - 60px);
        overflow-y: auto;
        z-index: 99;
    }

    .main-nav.open {
        display: flex;
    }

    .main-nav a:not(.btn) {
        padding: 12px;
        font-size: 15px;
    }

    .nav-right {
        margin-left: 0;
        margin-top: 8px;
        padding-top: 12px;
        border-top: 1px solid var(--border);
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .logo-text {
        font-size: 17px;
    }

    .header-inner {
        gap: 8px;
    }
}

/* ---------- Подвал ---------- */

.footer {
    background: var(--card);
    border-top: 1px solid var(--border);
    padding: 14px 0;
    margin-top: auto;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.footer-social {
    display: flex;
    gap: 8px;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--input);
    color: var(--text);
    font-size: 12px;
    font-weight: 700;
}

.social-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    text-decoration: none;
}

/* ---------- Кнопки, формы, алерты ---------- */

.btn {
    display: inline-block;
    background: var(--accent);
    color: white;
    border: 0;
    border-radius: 10px;
    padding: 10px 14px;
    cursor: pointer;
    text-decoration: none;
}

.btn:hover {
    background: var(--accent-hover);
    text-decoration: none;
}

.btn-small {
    padding: 6px 10px;
    font-size: 14px;
}

.btn-danger {
    background: #e74c3c;
}

.btn-danger:hover {
    background: #ff6b6b;
}

.btn-accent {
    background: var(--accent);
    color: #fff;
}

.btn-vip {
    background: #f1c40f;
    color: #221a00;
}

input,
textarea,
select {
    width: 100%;
    background: var(--input);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 12px;
}

input:focus,
textarea:focus,
select:focus {
    outline: 1px solid var(--accent);
}

.inline-form {
    display: inline-block;
    margin-right: 6px;
    margin-top: 4px;
}

.form-card {
    max-width: 520px;
}

.form-card label {
    display: block;
    margin-bottom: 14px;
    color: var(--text);
}

.form-card input {
    margin-top: 6px;
}

.form-card .btn {
    margin-top: 8px;
}

.alert {
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 16px;
    border: 1px solid transparent;
}

.alert-success {
    background: rgba(46, 213, 115, .12);
    border-color: rgba(46, 213, 115, .35);
    color: #2e9c5c;
}

.alert-error {
    background: rgba(255, 107, 107, .12);
    border-color: rgba(255, 107, 107, .35);
    color: #e05252;
}

[data-theme="light"] .alert-success {
    color: #1d7a44;
}

.alert ul {
    margin: 0;
    padding-left: 18px;
}

.badge {
    display: inline-block;
    background: var(--input);
    border: 1px solid var(--border);
    color: var(--muted);
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 12px;
}

.badge-rating {
    color: #ffd32a;
    border-color: rgba(255, 211, 42, .4);
}

.status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 12px;
    border: 1px solid var(--border);
}

.status-approved {
    color: #2e9c5c;
    border-color: rgba(46, 213, 115, .35);
    background: rgba(46, 213, 115, .12);
}

.status-pending {
    color: #b28f00;
    border-color: rgba(255, 211, 42, .35);
    background: rgba(255, 211, 42, .12);
}

.status-rejected {
    color: #e05252;
    border-color: rgba(255, 107, 107, .35);
    background: rgba(255, 107, 107, .12);
}

[data-theme="light"] .status-pending {
    color: #8a6d00;
}

/* ---------- Карточки и сетки ---------- */

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px;
    margin-top: 20px;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

/* Карточки vcard */

.vcard {
    display: block;
    color: var(--text);
}

.vcard-poster {
    position: relative;
    aspect-ratio: 2 / 3;
    border-radius: 12px;
    overflow: hidden;
    background: var(--input);
    border: 1px solid var(--border);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.vcard:hover .vcard-poster {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 10px 24px var(--shadow);
}

.vcard-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.vcard-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, var(--card), var(--input));
    color: var(--muted);
    font-size: 42px;
    font-weight: 700;
}

.vcard-type {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(16, 19, 26, .8);
    font-size: 11px;
    color: #9aa0a6;
}

.vcard-rating {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(16, 19, 26, .8);
    color: #ffd32a;
    font-size: 11px;
    font-weight: 700;
}

.vcard-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 26px 10px 10px;
    background: linear-gradient(to top, rgba(8, 10, 14, .95), rgba(8, 10, 14, 0));
}

.vcard-title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.vcard-meta {
    font-size: 11px;
    color: #9aa0a6;
    margin-top: 3px;
}

/* Карточки acard */

.acard {
    display: block;
    color: var(--text);
    transition: transform .25s ease, box-shadow .25s ease;
}

.acard:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px var(--shadow);
}

.acard-poster {
    position: relative;
    aspect-ratio: 2 / 3;
    border-radius: 10px;
    overflow: hidden;
    background: var(--input);
    border: 1px solid var(--border);
}

.acard-poster img,
.acard img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s ease;
}

.acard:hover .acard-poster img,
.acard:hover img {
    transform: scale(1.06);
}

.acard-rating {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 3px 7px;
    border-radius: 6px;
    background: rgba(16, 19, 26, .85);
    font-size: 12px;
    font-weight: 700;
}

.acard-premium {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(255, 211, 42, .15);
    border: 1px solid rgba(255, 211, 42, .5);
    color: #ffd32a;
    font-size: 11px;
    font-weight: 700;
}

.acard-body {
    padding: 8px 2px 0;
}

.acard-title {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color .15s ease;
}

.acard:hover .acard-title {
    color: var(--accent);
}

.acard-meta {
    margin-top: 4px;
    font-size: 11px;
    color: var(--muted);
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.rate-good { color: #7bed9f; }
.rate-mid { color: #ffd32a; }
.rate-bad { color: #ff6b6b; }

/* ---------- Главная ---------- */

.home-section {
    margin-top: 30px;
}

.home-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}

.home-section-head h2 {
    margin: 0;
    font-size: 20px;
}

/* Продолжить просмотр */

.continue-row {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 6px;
}

.continue-card {
    min-width: 190px;
    max-width: 190px;
    color: var(--text);
}

.continue-card:hover {
    text-decoration: none;
}

.continue-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--input);
}

.continue-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.continue-progress {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 4px;
    background: rgba(255, 255, 255, .25);
}

.continue-progress span {
    display: block;
    height: 100%;
    background: var(--accent);
}

.continue-title {
    margin-top: 6px;
    font-size: 13px;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.continue-time {
    font-size: 11px;
}

/* Расписание выхода */

.schedule-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(140px, 1fr));
    gap: 12px;
}

.schedule-day {
    margin-top: 0;
    padding: 12px;
    min-height: 200px;
}

.schedule-day.today {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent) inset;
}

.schedule-day-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 0;
}

.schedule-today-mark {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 11px;
}

.schedule-date {
    font-size: 12px;
    margin: 2px 0 10px;
}

.schedule-item {
    display: block;
    padding: 8px;
    border-radius: 8px;
    margin-bottom: 4px;
    color: var(--text);
}

.schedule-item:hover {
    background: var(--hover);
    text-decoration: none;
}

.schedule-item.passed {
    opacity: .55;
}

.schedule-time {
    display: block;
    color: var(--accent);
    font-weight: 700;
    font-size: 12px;
    margin-bottom: 2px;
}

.schedule-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 13px;
    line-height: 1.35;
}

.schedule-empty {
    font-size: 13px;
}

@media (max-width: 1100px) {
    .schedule-grid {
        grid-template-columns: repeat(4, minmax(140px, 1fr));
    }
}

@media (max-width: 700px) {
    .schedule-grid {
        grid-template-columns: repeat(2, minmax(140px, 1fr));
    }
}

/* ---------- Страница видео ---------- */

.title-hero {
    display: flex;
    gap: 20px;
    margin-top: 8px;
}

.title-poster {
    position: relative;
    width: 220px;
    flex: none;
    aspect-ratio: 2 / 3;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--input);
}

.title-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.poster-rating {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 4px 10px;
    border-radius: 8px;
    background: rgba(16, 19, 26, .85);
    font-size: 14px;
    font-weight: 800;
}

.title-info h1 {
    margin: 0 0 10px;
    font-size: 26px;
}

.title-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.title-meta {
    margin-bottom: 12px;
    font-size: 14px;
}

.title-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.title-description {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}

@media (max-width: 700px) {
    .title-hero {
        flex-direction: column;
    }

    .title-poster {
        width: 160px;
    }
}

/* Плеер */

.player-row {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 16px;
    align-items: start;
    margin-top: 16px;
}

@media (max-width: 900px) {
    .player-row {
        grid-template-columns: 1fr;
    }
}

.player-card {
    position: relative;
    padding: 0;
    overflow: hidden;
    background: #000;
}

.player-card video {
    display: block;
    width: 100%;
    background: #000;
}

.plyr {
    --plyr-color-main: #6c5ce7;
    --plyr-video-background: #000;
    border-radius: 14px;
}

.plyr:fullscreen video,
.plyr:-webkit-full-screen video,
.plyr:-moz-full-screen video,
.plyr--fullscreen-fallback video {
    max-height: none !important;
    width: 100% !important;
    height: 100% !important;
}

.plyr:fullscreen .plyr__video-wrapper,
.plyr:-webkit-full-screen .plyr__video-wrapper,
.plyr:-moz-full-screen .plyr__video-wrapper,
.plyr--fullscreen-fallback .plyr__video-wrapper {
    height: 100% !important;
    padding-top: 0 !important;
}

/* Оценка */

.rate-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 10px 12px;
    margin-top: 12px;
}

.rate-form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.stars {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 4px;
    margin: 0;
}

.stars input {
    display: none;
}

.stars label {
    font-size: 22px;
    color: var(--border);
    cursor: pointer;
    transition: color .15s ease;
}

.stars input:checked ~ label,
.stars label:hover,
.stars label:hover ~ label {
    color: #ffd32a;
}

.rating-count {
    font-size: 12px;
    color: var(--muted);
}

/* Серии и сезоны */

.episodes-col {
    padding: 12px;
    max-height: 460px;
    overflow-y: auto;
}

.episodes-col h2 {
    font-size: 16px;
    margin: 0 0 10px;
}

.season-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.season-tab {
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--input);
    color: var(--text);
    font-size: 12px;
    font-weight: 600;
}

.season-tab:hover {
    border-color: var(--accent);
    text-decoration: none;
}

.season-tab.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.season-select {
    width: 100%;
    margin-bottom: 10px;
}

.range-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.range-tab {
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid var(--border);
    font-size: 12px;
    color: var(--muted);
}

.range-tab:hover {
    border-color: var(--accent);
    text-decoration: none;
}

.range-tab.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.episode-list-vertical {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.episode-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--input);
    color: var(--text);
}

.episode-row:hover {
    border-color: var(--accent);
    text-decoration: none;
}

.episode-row.active {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent) inset;
}

.episode-num {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: var(--card);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    flex: none;
}

.episode-row.active .episode-num {
    background: var(--accent);
    color: #fff;
}

.episode-title {
    font-size: 13px;
}

.episode-now {
    margin-left: auto;
    font-size: 11px;
    color: var(--accent);
}

.episode-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
    gap: 6px;
}

.episode-cell {
    padding: 8px 0;
    text-align: center;
    border-radius: 8px;
    border: 1px solid var(--border);
    color: var(--text);
    font-weight: 600;
    font-size: 13px;
}

.episode-cell:hover {
    border-color: var(--accent);
    text-decoration: none;
}

.episode-cell.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.episode-jump {
    display: flex;
    gap: 6px;
    margin-top: 12px;
}

.episode-jump input {
    width: 90px;
}

/* Обложка и субтитры */

.cover-form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.cover-form input[type="url"] {
    flex: 1 1 220px;
}

.subtitle-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

/* Комментарии */

.comment-form textarea {
    margin-bottom: 10px;
}

.comment-list {
    margin-top: 16px;
}

.comment {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--input);
}

.comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(160deg, #6c5ce7, #4834d4);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex: none;
}

.comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.comment-main {
    flex: 1;
    min-width: 0;
}

.comment-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 14px;
}

.comment-body {
    margin-top: 6px;
}

.link-btn {
    background: none;
    border: none;
    color: var(--accent);
    cursor: pointer;
    padding: 0;
    font-size: 14px;
}

.link-btn:hover {
    text-decoration: underline;
}

.mention {
    color: #7c6cf0;
    font-weight: 600;
}

.vip-crown {
    margin-left: 4px;
}

/* Бейджи ролей */

.role-badge {
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}

.role-admin {
    background: rgba(108, 92, 231, .15);
    color: var(--accent);
    border: 1px solid rgba(108, 92, 231, .4);
}

.role-mod {
    background: rgba(46, 213, 115, .12);
    color: #2e9c5c;
    border: 1px solid rgba(46, 213, 115, .35);
}

.role-helper {
    background: #2ecc71;
    color: #06281a;
}

.role-user {
    background: #3a4152;
    color: #dfe4ec;
}

/* ---------- История ---------- */

.history-item {
    margin-top: 14px;
}

.progress {
    height: 8px;
    background: var(--input);
    border: 1px solid var(--border);
    border-radius: 999px;
    overflow: hidden;
    margin-top: 6px;
    max-width: 420px;
}

.progress > div {
    height: 100%;
    background: var(--accent);
}

/* ---------- Каталог ---------- */

.filter-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-bar input[type="text"] {
    flex: 1 1 220px;
}

.filter-bar select {
    width: auto;
    min-width: 160px;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 24px;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--card);
    color: var(--text);
}

.pagination a:hover {
    border-color: var(--accent);
    text-decoration: none;
}

.pagination span.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

/* ---------- Тарифы и оплата ---------- */

.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
    margin-top: 16px;
}

.plan-card {
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.plan-vip {
    border-color: #f1c40f;
    box-shadow: 0 0 0 1px #f1c40f inset;
}

.plan-price {
    font-size: 24px;
    font-weight: 800;
}

.plan-period {
    color: var(--muted);
    font-size: 13px;
}

.plan-features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pay-card {
    max-width: 480px;
}

.premium-lock {
    text-align: center;
    padding: 30px;
}

/* ---------- Профиль ---------- */

.profile-hero {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 22px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.profile-avatar {
    width: 96px;
    height: 96px;
    font-size: 36px;
    flex: none;
}

.profile-head-info {
    flex: 1;
    min-width: 200px;
}

.profile-head-info h1 {
    margin: 0 0 8px;
}

.profile-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.avatar-upload-btn {
    cursor: pointer;
}

.avatar-block {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.avatar-big {
    width: 72px;
    height: 72px;
    font-size: 28px;
}

/* ---------- Статистика и топ ---------- */

.stats-totals,
.admin-dash {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin: 16px 0;
}

.stat-card {
    margin-top: 0;
    padding: 16px;
    text-align: center;
}

.stat-value {
    font-size: 26px;
    font-weight: 800;
    color: var(--accent);
}

.stat-alert {
    border-color: #e74c3c;
    box-shadow: 0 0 0 1px #e74c3c inset;
}

.stat-alert .stat-value {
    color: #e74c3c;
}

.top-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
}

.top-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.top-row:last-child {
    border-bottom: 0;
}

.top-rank {
    width: 22px;
    font-weight: 700;
}

.top-avatar {
    width: 34px;
    height: 34px;
    font-size: 14px;
    flex: none;
}

.top-name {
    flex: 1;
    font-weight: 600;
}

/* ---------- Уведомления и тикеты ---------- */

.notif-item {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 8px;
    background: var(--input);
}

.notif-item.unread {
    border-color: var(--accent);
}

.ticket-msg {
    margin-top: 12px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--input);
}

.ticket-msg.staff {
    border-color: rgba(108, 92, 231, .5);
    background: rgba(108, 92, 231, .08);
}

/* ---------- Админка ---------- */

.admin-tabs {
    display: flex;
    gap: 6px;
    padding: 8px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.admin-link {
    padding: 8px 12px;
    border-radius: 8px;
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.admin-link:hover {
    background: var(--hover);
    text-decoration: none;
}

.admin-link.active {
    background: var(--accent);
    color: #fff;
}

.admin-link-site {
    margin-left: auto;
    color: var(--muted);
}

.admin-filter {
    display: flex;
    gap: 6px;
    padding: 8px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.admin-search {
    display: flex;
    gap: 6px;
    margin-left: auto;
    align-items: center;
}

.admin-search input {
    width: 200px;
}

.admin-video-row {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    align-items: center;
    flex-wrap: wrap;
}

.admin-video-row:last-child {
    border-bottom: 0;
}

.admin-video-thumb {
    width: 96px;
    height: 54px;
    border-radius: 8px;
    object-fit: cover;
    background: var(--input);
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
}

.admin-video-info {
    flex: 1;
    min-width: 220px;
}

.admin-video-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.admin-user-card {
    padding: 18px;
}

.admin-user-head {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.admin-user-head h2 {
    margin: 0 0 4px;
}

.admin-user-card h3 {
    margin: 16px 0 8px;
    font-size: 15px;
}

.comment-admin-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.comment-admin-row:last-child {
    border-bottom: 0;
}

.comment-admin-info {
    flex: 1;
    min-width: 220px;
}

.comment-admin-actions {
    display: flex;
    gap: 6px;
    align-items: flex-start;
    flex-wrap: wrap;
}

/* Таблицы */

.table-wrapper {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 10px 8px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.table th {
    color: var(--muted);
    font-size: 14px;
    text-align: left;
}

/* Графики статистики */

.chart-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.chart-date {
    width: 44px;
    font-size: 12px;
    color: var(--muted);
    flex: none;
}

.chart-track {
    flex: 1;
    height: 14px;
    background: var(--input);
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
}

.chart-bar {
    height: 100%;
    background: var(--accent);
}

.chart-count {
    width: 44px;
    text-align: right;
    font-size: 12px;
    flex: none;
}

.chart-title {
    flex: 1;
    color: var(--text);
}

.chart-title:hover {
    color: var(--accent);
    text-decoration: none;
}

/* ---------- Скачивание ---------- */

.download-row {
    margin-top: 16px;
}

/* ---------- Шапка v2 ---------- */

.logo-mark {
    width: 26px;
    height: 26px;
    filter: drop-shadow(0 0 8px rgba(108, 92, 231, .45));
}

.logo-text {
    letter-spacing: .3px;
}

.nav-bell {
    color: var(--muted);
}

.nav-bell:hover {
    color: var(--accent);
}

.nav-bell svg {
    width: 20px;
    height: 20px;
    display: block;
}

/* Тумблер «луна / солнце» */

.theme-switch {
    position: relative;
    width: 58px;
    height: 28px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: linear-gradient(180deg, #141b33, #0b1122);
    cursor: pointer;
    padding: 0;
    flex: none;
    transition: background .3s ease, border-color .3s ease;
}

.ts-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    line-height: 1;
    color: #5b647a;
}

.ts-sun {
    left: 7px;
}

.ts-moon {
    right: 7px;
    color: #9db1ff;
}

.ts-knob {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(160deg, #9db1ff, #6c5ce7);
    box-shadow: 0 0 10px rgba(108, 92, 231, .55);
    transition: left .3s ease, background .3s ease, box-shadow .3s ease;
}

[data-theme="light"] .theme-switch {
    background: linear-gradient(180deg, #cfe4ff, #eaf4ff);
}

[data-theme="light"] .ts-sun {
    color: #e8a13c;
}

[data-theme="light"] .ts-moon {
    color: #9aa7bd;
}

[data-theme="light"] .ts-knob {
    left: 32px;
    background: linear-gradient(160deg, #ffe29a, #ffb84d);
    box-shadow: 0 0 10px rgba(255, 184, 77, .5);
}

/* Плавная смена темы (включается только на момент переключения) */

html.theme-anim,
html.theme-anim *,
html.theme-anim *::before,
html.theme-anim *::after {
    transition:
        background-color .35s ease,
        color .35s ease,
        border-color .35s ease,
        fill .35s ease,
        box-shadow .35s ease !important;
}

/* Подписка в профиле */

.sub-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.sub-head h2 {
    margin: 0;
}

/* ---------- Строгая шапка ---------- */

.site-header {
    box-shadow: none;
}

.logo-mark {
    width: 18px;
    height: 18px;
    filter: none;
    color: var(--muted);
    transition: color .2s ease;
}

.logo:hover .logo-mark {
    color: var(--accent);
}

.logo-text {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.logo-accent {
    color: var(--text);
}

.logo:hover .logo-accent {
    color: var(--accent);
}

.main-nav a:not(.btn) {
    font-size: 13px;
    font-weight: 500;
    border-radius: 0;
    padding: 8px 10px;
}

.main-nav a:not(.btn):hover {
    background: transparent;
    color: var(--text);
}

.main-nav a.active {
    background: transparent;
    color: var(--text);
    box-shadow: inset 0 -2px 0 var(--accent);
}

.nav-user {
    font-size: 13px;
    font-weight: 500;
}

.nav-bell {
    color: var(--muted);
}

.nav-bell svg {
    width: 18px;
    height: 18px;
}

/* ---------- Шапка: возвращаем привычный вид ---------- */

.logo-mark {
    width: 26px;
    height: 26px;
    color: var(--accent);
    filter: drop-shadow(0 0 6px rgba(108, 92, 231, .45));
}

.logo-text {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: normal;
    text-transform: none;
}

.logo-accent {
    color: var(--accent);
}

.logo:hover .logo-accent {
    color: var(--accent-hover);
}

.main-nav a:not(.btn) {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    border-radius: 10px;
    padding: 8px 12px;
}

.main-nav a:not(.btn):hover {
    background: rgba(124, 108, 240, .12);
    color: var(--text);
}

.main-nav a.active,
.main-nav a.active:hover {
    background: var(--accent);
    color: #fff;
    box-shadow: none;
}

/* ---------- Тени и насыщенность ---------- */

.card {
    box-shadow: 0 8px 22px rgba(0, 0, 0, .28);
}

.vcard-poster img,
.acard-poster img,
.title-poster img,
.continue-thumb img {
    filter: saturate(1.18) contrast(1.06);
}

.vcard:hover .vcard-poster,
.acard:hover {
    box-shadow:
        0 12px 28px rgba(0, 0, 0, .5),
        0 0 0 1px rgba(108, 92, 231, .35);
}

.home-section-head h2 {
    position: relative;
    padding-left: 12px;
}

.home-section-head h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 4px;
    border-radius: 2px;
    background: linear-gradient(180deg, var(--accent), #4834d4);
}

/* ---------- Анимированный фон ---------- */

.bg-fx {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.page-content,
.footer {
    position: relative;
    z-index: 1;
}

/* Мерцающие звёзды */

.bg-fx::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(1px 1px at 10% 20%, rgba(255, 255, 255, .5) 50%, transparent 51%),
        radial-gradient(1px 1px at 30% 70%, rgba(255, 255, 255, .35) 50%, transparent 51%),
        radial-gradient(1.5px 1.5px at 55% 35%, rgba(255, 255, 255, .45) 50%, transparent 51%),
        radial-gradient(1px 1px at 75% 60%, rgba(255, 255, 255, .3) 50%, transparent 51%),
        radial-gradient(1.5px 1.5px at 90% 15%, rgba(255, 255, 255, .45) 50%, transparent 51%),
        radial-gradient(1px 1px at 45% 85%, rgba(255, 255, 255, .3) 50%, transparent 51%),
        radial-gradient(1px 1px at 65% 10%, rgba(255, 255, 255, .4) 50%, transparent 51%);
    background-size: 800px 600px;
    animation:
        bg-stars-move 140s linear infinite,
        bg-twinkle 7s ease-in-out infinite;
}

/* Лунное свечение */

.bg-fx::after {
    content: '';
    position: absolute;
    inset: -20%;
    background:
        radial-gradient(420px 420px at 82% 10%, rgba(108, 92, 231, .14), transparent 65%),
        radial-gradient(380px 380px at 10% 88%, rgba(72, 52, 212, .10), transparent 65%);
    animation: bg-orb-float 16s ease-in-out infinite;
}

@keyframes bg-stars-move {
    from {
        background-position: 0 0;
    }

    to {
        background-position: 0 -600px;
    }
}

@keyframes bg-twinkle {
    0%, 100% {
        opacity: .55;
    }

    50% {
        opacity: .2;
    }
}

@keyframes bg-orb-float {
    0%, 100% {
        transform: translate3d(0, 0, 0) scale(1);
    }

    50% {
        transform: translate3d(-40px, 30px, 0) scale(1.08);
    }
}

[data-theme="light"] .bg-fx::before {
    opacity: .25;
}

[data-theme="light"] .bg-fx::after {
    background:
        radial-gradient(420px 420px at 82% 10%, rgba(108, 92, 231, .08), transparent 65%),
        radial-gradient(380px 380px at 10% 88%, rgba(72, 52, 212, .06), transparent 65%);
}

/* ---------- Меню профиля (по клику на ник) ---------- */

.user-menu {
    position: relative;
}

.user-menu-btn {
    background: none;
    border: 0;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 10px;
}

.user-menu-btn:hover {
    background: rgba(124, 108, 240, .12);
}

.user-menu-caret {
    font-size: 10px;
    color: var(--muted);
    margin-left: 2px;
    transition: transform .2s ease;
}

.user-menu.open .user-menu-caret {
    transform: rotate(180deg);
}

.user-menu-drop {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 210px;
    background: var(--card, #171a21);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 14px 30px rgba(0, 0, 0, .4);
    padding: 6px;
    display: none;
    z-index: 120;
}

.user-menu.open .user-menu-drop {
    display: block;
}

.user-menu-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 8px;
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
}

.user-menu-link:hover {
    background: rgba(124, 108, 240, .12);
    text-decoration: none;
}

.user-menu-logout {
    color: #e74c3c;
}

.user-menu-sep {
    height: 1px;
    background: var(--border);
    margin: 6px 4px;
}

@media (max-width: 900px) {
    .user-menu-drop {
        right: auto;
        left: 0;
    }
}

/* ---------- Топ просмотров ---------- */

.top-list {
    padding: 8px;
}

.top-video-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 12px;
    color: var(--text);
}

.top-video-row:hover {
    background: rgba(124, 108, 240, .1);
    text-decoration: none;
}

.top-video-row + .top-video-row {
    margin-top: 4px;
}

.top-video-rank {
    width: 34px;
    font-size: 18px;
    font-weight: 800;
    color: var(--muted);
    text-align: center;
    flex: none;
}

.top-1 .top-video-rank {
    color: #ffd32a;
}

.top-2 .top-video-rank {
    color: #c0c8d8;
}

.top-3 .top-video-rank {
    color: #d08a4e;
}

.top-video-poster {
    width: 54px;
    height: 76px;
    border-radius: 8px;
    overflow: hidden;
    background: #10131a;
    border: 1px solid var(--border);
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-weight: 700;
}

.top-video-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.top-video-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.top-video-title {
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.top-video-views {
    flex: none;
    font-size: 13px;
    color: var(--muted);
    font-weight: 600;
}

/* ---------- Уведомления ---------- */

.notif-head {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.notif-head-actions {
    margin-left: auto;
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.notif-day-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    margin: 16px 0 6px;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.notif-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-top: 8px;
    padding: 12px;
}

.notif-item.unread {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px rgba(108, 92, 231, .35) inset;
}

.notif-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(108, 92, 231, .15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex: none;
}

.notif-body {
    flex: 1;
    min-width: 0;
}

.notif-body a {
    color: var(--text);
}

.notif-body a:hover {
    color: var(--accent);
}

.notif-time {
    font-size: 12px;
    margin-top: 2px;
}

.notif-read-btn {
    flex: none;
}

/* ---------- Красивый подвал ---------- */

.footer {
    position: relative;
    margin-top: 48px;
    background: var(--card, #171a21);
    border-top: 1px solid var(--border);
    padding: 34px 0 18px;
    z-index: 1;
}

.footer::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: min(560px, 80%);
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    filter: none;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 24px;
}

.footer-brand .logo {
    font-size: 18px;
}

.footer-tagline {
    color: var(--muted);
    font-size: 13px;
    margin: 10px 0 14px;
    max-width: 260px;
}

.footer-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--muted);
    margin-bottom: 10px;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-col a {
    color: var(--muted);
    font-size: 14px;
    text-decoration: none;
    transition: color .2s ease, transform .2s ease;
}

.footer-col a:hover {
    color: var(--text);
}

.footer-social {
    display: flex;
    gap: 8px;
}

.social-btn {
    transition: border-color .2s ease, color .2s ease, box-shadow .2s ease;
}

.social-btn:hover {
    box-shadow: 0 0 12px rgba(108, 92, 231, .35);
}

.footer-bottom {
    margin-top: 28px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 13px;
}

.footer-made {
    opacity: .8;
}

@media (max-width: 800px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .footer-bottom {
        justify-content: center;
        text-align: center;
    }
}

/* ---------- Шикарный профиль ---------- */

.profile-banner {
    height: 150px;
    border-radius: 0 0 20px 20px;
    background:
        radial-gradient(1.5px 1.5px at 20% 40%, rgba(255, 255, 255, .5) 50%, transparent 51%),
        radial-gradient(1px 1px at 60% 20%, rgba(255, 255, 255, .4) 50%, transparent 51%),
        radial-gradient(1.5px 1.5px at 80% 60%, rgba(255, 255, 255, .45) 50%, transparent 51%),
        radial-gradient(1px 1px at 40% 70%, rgba(255, 255, 255, .3) 50%, transparent 51%),
        radial-gradient(1px 1px at 90% 30%, rgba(255, 255, 255, .35) 50%, transparent 51%),
        linear-gradient(120deg, #2b2350, #171a21 60%, #10131a);
    position: relative;
    overflow: hidden;
}

.profile-banner::after {
    content: '🌙';
    position: absolute;
    right: 8%;
    top: 26px;
    font-size: 46px;
    filter: drop-shadow(0 0 18px rgba(108, 92, 231, .8));
}

.profile-hero {
    margin-top: -56px;
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    gap: 18px;
    flex-wrap: wrap;
}

.profile-avatar {
    width: 108px;
    height: 108px;
    font-size: 40px;
    border: 3px solid var(--accent);
    box-shadow: 0 0 0 4px var(--card, #171a21), 0 8px 24px rgba(0, 0, 0, .4);
}

.profile-stats-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 14px 0;
}

.profile-stat {
    flex: 1;
    min-width: 110px;
    background: var(--card, #171a21);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 14px;
    display: flex;
    align-items: baseline;
    gap: 8px;
    justify-content: center;
}

.profile-stat-value {
    font-size: 20px;
    font-weight: 800;
    color: var(--accent);
}

.profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.profile-grid .card {
    margin-top: 0;
}

@media (max-width: 900px) {
    .profile-grid {
        grid-template-columns: 1fr;
    }
}

/* Подписка компактно */

.sub-active {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border-radius: 12px;
    background: rgba(255, 211, 42, .08);
    border: 1px solid rgba(255, 211, 42, .4);
    margin-bottom: 12px;
}

.sub-active-icon {
    font-size: 26px;
}

.sub-plans {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sub-plan {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #10131a;
}

[data-theme="light"] .sub-plan {
    background: var(--input, #f0f2f7);
}

.sub-plan-active {
    border-color: #f1c40f;
    box-shadow: 0 0 0 1px rgba(241, 196, 15, .5) inset;
}

.sub-plan-name {
    font-weight: 700;
    flex: 1;
}

.sub-plan-price {
    font-size: 12px;
}

/* Достижения */

.achieve-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.achieve {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(124, 108, 240, .12);
    border: 1px solid var(--border);
    font-size: 13px;
    font-weight: 600;
}

.achieve-icon {
    font-size: 15px;
}

.mini-comment {
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

.mini-comment:last-child {
    border-bottom: 0;
}

/* Мои видео */

.myvideos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}

.myvideo {
    color: var(--text);
}

.myvideo:hover {
    text-decoration: none;
}

.myvideo-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: #10131a;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-weight: 700;
}

.myvideo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}

.myvideo:hover .myvideo-thumb img {
    transform: scale(1.06);
}

.myvideo-thumb .status {
    position: absolute;
    top: 6px;
    left: 6px;
}

.myvideo-title {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    font-weight: 600;
}

.myvideo-views {
    font-size: 11px;
}

/* ---------- Профиль: финальный шик ---------- */

.profile-banner {
    height: 160px;
    border-radius: 0 0 20px 20px;
    background:
        radial-gradient(1.5px 1.5px at 20% 40%, rgba(255, 255, 255, .5) 50%, transparent 51%),
        radial-gradient(1px 1px at 60% 20%, rgba(255, 255, 255, .4) 50%, transparent 51%),
        radial-gradient(1.5px 1.5px at 80% 60%, rgba(255, 255, 255, .45) 50%, transparent 51%),
        radial-gradient(1px 1px at 40% 70%, rgba(255, 255, 255, .3) 50%, transparent 51%),
        radial-gradient(1px 1px at 90% 30%, rgba(255, 255, 255, .35) 50%, transparent 51%),
        linear-gradient(120deg, #2b2350, #171a21 60%, #10131a);
    position: relative;
    overflow: hidden;
}

.profile-banner::after {
    content: '🌙';
    position: absolute;
    right: 8%;
    top: 28px;
    font-size: 50px;
    filter: drop-shadow(0 0 20px rgba(108, 92, 231, .8));
}

.profile-hero {
    margin-top: -70px;
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 22px;
    flex-wrap: wrap;
}

.profile-avatar {
    width: 140px;
    height: 140px;
    font-size: 52px;
    border: 4px solid var(--accent);
    box-shadow: 0 0 0 5px var(--card, #171a21), 0 10px 30px rgba(0, 0, 0, .45);
}

.rename-details summary {
    list-style: none;
    cursor: pointer;
}

.rename-details summary::-webkit-details-marker {
    display: none;
}

.rename-form {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    max-width: 340px;
}

.xp-card {
    padding: 14px 20px;
}

.xp-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
}

.xp-track {
    height: 10px;
    border-radius: 999px;
    background: #10131a;
    border: 1px solid var(--border);
    overflow: hidden;
}

[data-theme="light"] .xp-track {
    background: var(--input, #f0f2f7);
}

.xp-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), #9db1ff);
    border-radius: 999px;
    transition: width .4s ease;
    box-shadow: 0 0 10px rgba(108, 92, 231, .6);
}

.profile-stats-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 14px 0;
}

.profile-stat {
    flex: 1;
    min-width: 110px;
    background: var(--card, #171a21);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 14px;
    display: flex;
    align-items: baseline;
    gap: 8px;
    justify-content: center;
}

.profile-stat-value {
    font-size: 20px;
    font-weight: 800;
    color: var(--accent);
}

.profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.profile-grid .card {
    margin-top: 0;
}

@media (max-width: 900px) {
    .profile-grid {
        grid-template-columns: 1fr;
    }
}

.sub-active {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border-radius: 12px;
    background: rgba(255, 211, 42, .08);
    border: 1px solid rgba(255, 211, 42, .4);
    margin-bottom: 12px;
}

.sub-active-icon {
    font-size: 26px;
}

.sub-plans {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sub-plan {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #10131a;
}

[data-theme="light"] .sub-plan {
    background: var(--input, #f0f2f7);
}

.sub-plan-active {
    border-color: #f1c40f;
    box-shadow: 0 0 0 1px rgba(241, 196, 15, .5) inset;
}

.sub-plan-name {
    font-weight: 700;
    flex: 1;
}

.sub-plan-price {
    font-size: 12px;
}

.mini-comment {
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

.mini-comment:last-child {
    border-bottom: 0;
}

.myvideos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}

.myvideo {
    color: var(--text);
}

.myvideo:hover {
    text-decoration: none;
}

.myvideo-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: #10131a;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-weight: 700;
}

.myvideo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}

.myvideo:hover .myvideo-thumb img {
    transform: scale(1.06);
}

.myvideo-title {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    font-weight: 600;
}

/* ---------- Красивые бейджи профиля ---------- */

.p-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    border: 1px solid var(--border);
    background: #10131a;
    color: var(--text);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
}

[data-theme="light"] .p-badge {
    background: var(--input, #f0f2f7);
}

.p-badge-admin {
    border-color: rgba(108, 92, 231, .5);
    color: var(--accent);
    background: rgba(108, 92, 231, .12);
}

.p-badge-mod {
    border-color: rgba(46, 213, 115, .4);
    color: #2e9c5c;
    background: rgba(46, 213, 115, .1);
}

.p-badge-helper {
    border-color: rgba(46, 204, 113, .4);
    color: #27ae60;
    background: rgba(46, 204, 113, .1);
}

.p-badge-user {
    color: var(--muted);
}

.p-badge-level {
    border-color: rgba(157, 177, 255, .4);
    color: #9db1ff;
    background: rgba(108, 92, 231, .1);
}

.p-badge-ban {
    border-color: rgba(231, 76, 60, .5);
    color: #e74c3c;
    background: rgba(231, 76, 60, .1);
}

.p-badge-sub {
    border-color: rgba(241, 196, 15, .5);
    color: #f1c40f;
    background: rgba(241, 196, 15, .08);
}

.p-badge-date {
    color: var(--muted);
}

/* ---------- Уровень в комментариях ---------- */

.lvl-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    color: #9db1ff;
    background: rgba(108, 92, 231, .12);
    border: 1px solid rgba(108, 92, 231, .35);
}

/* ---------- Все уровни при наведении ---------- */

.xp-card {
    position: relative;
}

.xp-levels-pop {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    background: var(--card, #171a21);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .5);
    z-index: 60;
    overflow: hidden;
}

.xp-card:hover .xp-levels-pop {
    display: block;
}

.xp-levels-scroll {
    max-height: 320px;
    overflow-y: auto;
    padding: 8px;
}

.xp-level-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 13px;
}

.xp-level-row.current {
    background: rgba(108, 92, 231, .18);
    box-shadow: 0 0 0 1px var(--accent) inset;
    font-weight: 700;
}

.xp-level-num {
    width: 30px;
    font-weight: 800;
    color: var(--accent);
}

.xp-level-row .muted {
    margin-left: auto;
    font-size: 12px;
}

/* ---------- Подписка: шикарный вид ---------- */

.sub-hero {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 16px 20px;
    border-radius: 14px;
    background: linear-gradient(120deg, rgba(241, 196, 15, .14), rgba(108, 92, 231, .10));
    border: 1px solid rgba(241, 196, 15, .45);
    margin: 14px 0 18px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
}

.sub-hero-icon {
    font-size: 30px;
    filter: drop-shadow(0 0 10px rgba(241, 196, 15, .6));
}

.plan-card {
    position: relative;
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: transform .25s ease, box-shadow .25s ease;
}

.plan-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, .35);
}

.plan-icon {
    font-size: 30px;
}

.plan-name {
    font-size: 18px;
    font-weight: 800;
}

.plan-price {
    font-size: 26px;
    font-weight: 800;
    color: var(--accent);
}

.plan-vip .plan-price {
    color: #f1c40f;
}

.plan-desc {
    font-size: 13px;
}

.plan-feat {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 14px;
}

.plan-feat li::before {
    margin-right: 8px;
    font-weight: 700;
}

.plan-feat .ok::before {
    content: '✔';
    color: #2ecc71;
}

.plan-feat .no::before {
    content: '✖';
    color: var(--muted);
}

.plan-feat .no {
    color: var(--muted);
}

.plan-foot {
    margin-top: auto;
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

.btn-disabled {
    background: #10131a;
    color: var(--muted);
    cursor: not-allowed;
    border: 1px solid var(--border);
}

.btn-disabled:hover {
    background: #10131a;
}

[data-theme="light"] .btn-disabled {
    background: var(--input, #f0f2f7);
}

.plan-active {
    border-color: #f1c40f;
    box-shadow: 0 0 0 1px #f1c40f inset, 0 0 26px rgba(241, 196, 15, .22);
}

.plan-ribbon {
    position: absolute;
    top: 12px;
    right: 12px;
}

.plan-covered {
    opacity: .55;
}

.pay-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.pay-row:last-child {
    border-bottom: 0;
}

.pay-plan {
    flex: 1;
    font-weight: 600;
}

.pay-date {
    font-size: 12px;
}

/* ---------- Админ: кровавая рамка (ТОЛЬКО админы) ---------- */

.avatar-admin {
    border-color: #a93226 !important;
    box-shadow:
        0 0 0 5px var(--card, #171a21),
        0 0 28px rgba(169, 50, 38, .8) !important;
}

.p-badge-admin {
    border-color: rgba(231, 76, 60, .55);
    color: #ff5b5b;
    background: rgba(231, 76, 60, .12);
    text-shadow: 0 0 8px rgba(231, 76, 60, .45);
}

.role-admin {
    background: rgba(231, 76, 60, .15);
    color: #ff5b5b;
    border: 1px solid rgba(231, 76, 60, .5);
}

/* ---------- Ровная шапка профиля ---------- */

.profile-hero {
    align-items: center;
    gap: 22px;
}

.profile-head-info {
    flex: 1;
    min-width: 260px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.profile-head-info h1 {
    margin: 0;
}

.profile-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

/* ---------- Подписка: премиум-баннер ---------- */

.sub-active {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    border-radius: 16px;
    background: linear-gradient(120deg,
        rgba(241, 196, 15, .16),
        rgba(108, 92, 231, .14) 60%,
        rgba(108, 92, 231, .05));
    border: 1px solid rgba(241, 196, 15, .45);
    box-shadow:
        0 10px 30px rgba(0, 0, 0, .35),
        0 0 0 1px rgba(241, 196, 15, .15) inset;
    margin-bottom: 14px;
    overflow: hidden;
}

.sub-active::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(241, 196, 15, .25), transparent 70%);
    pointer-events: none;
}

.sub-active-crown {
    font-size: 34px;
    filter: drop-shadow(0 0 12px rgba(241, 196, 15, .7));
    animation: crown-float 3s ease-in-out infinite;
}

@keyframes crown-float {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-4px);
    }
}

.sub-active-info {
    flex: 1;
    min-width: 0;
}

.sub-active-name {
    font-size: 18px;
    font-weight: 800;
    color: #f1c40f;
    letter-spacing: .02em;
}

.sub-active-exp {
    font-size: 13px;
    margin-top: 2px;
}

.sub-active-days {
    text-align: center;
    padding: 8px 14px;
    border-radius: 12px;
    background: rgba(241, 196, 15, .12);
    border: 1px solid rgba(241, 196, 15, .4);
}

.sub-active-days-num {
    display: block;
    font-size: 22px;
    font-weight: 800;
    color: #f1c40f;
    line-height: 1;
}

.sub-active-days .muted {
    font-size: 11px;
}

/* ---------- Профиль: финальная версия ---------- */

.profile-banner {
    height: 150px;
    border-radius: 0 0 20px 20px;
    background:
        radial-gradient(1.5px 1.5px at 20% 40%, rgba(255, 255, 255, .5) 50%, transparent 51%),
        radial-gradient(1px 1px at 60% 20%, rgba(255, 255, 255, .4) 50%, transparent 51%),
        radial-gradient(1.5px 1.5px at 80% 60%, rgba(255, 255, 255, .45) 50%, transparent 51%),
        radial-gradient(1px 1px at 40% 70%, rgba(255, 255, 255, .3) 50%, transparent 51%),
        linear-gradient(120deg, #2b2350, #171a21 60%, #10131a);
    position: relative;
    overflow: hidden;
}

.profile-banner::after {
    content: '🌙';
    position: absolute;
    right: 8%;
    top: 28px;
    font-size: 46px;
    filter: drop-shadow(0 0 18px rgba(108, 92, 231, .8));
}

.profile-hero {
    margin-top: -60px;
    position: relative;
    z-index: 2;
    padding: 22px;
}

.profile-hero-row {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.profile-avatar {
    width: 120px !important;
    height: 120px !important;
    font-size: 44px !important;
    border: 4px solid var(--accent);
    border-radius: 50% !important;
    box-shadow: 0 0 0 5px var(--card, #171a21), 0 10px 30px rgba(0, 0, 0, .45);
    flex: none;
}

.avatar-admin {
    border-color: #a93226 !important;
    box-shadow: 0 0 0 5px var(--card, #171a21), 0 0 26px rgba(169, 50, 38, .75) !important;
}

.profile-head-info {
    flex: 1;
    min-width: 220px;
}

.profile-head-info h1 {
    margin: 0 0 10px;
    font-size: 26px;
}

.profile-hero .title-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
}

/* Бейджи — аккуратные пилюли, никакие старые правила не превратят их в круги */

.p-badge {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    width: auto !important;
    height: auto !important;
    aspect-ratio: auto !important;
    padding: 5px 12px !important;
    border-radius: 999px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
    border: 1px solid var(--border);
    background: #10131a;
    color: var(--text);
}

[data-theme="light"] .p-badge {
    background: var(--input, #f0f2f7);
}

.p-badge-admin {
    border-color: rgba(231, 76, 60, .55) !important;
    color: #ff5b5b !important;
    background: rgba(231, 76, 60, .12) !important;
    text-shadow: 0 0 8px rgba(231, 76, 60, .45);
}

.p-badge-mod {
    border-color: rgba(46, 213, 115, .4) !important;
    color: #2e9c5c !important;
    background: rgba(46, 213, 115, .1) !important;
}

.p-badge-helper {
    border-color: rgba(46, 204, 113, .4) !important;
    color: #27ae60 !important;
    background: rgba(46, 204, 113, .1) !important;
}

.p-badge-user {
    color: var(--muted) !important;
}

.p-badge-level {
    border-color: rgba(157, 177, 255, .4) !important;
    color: #9db1ff !important;
    background: rgba(108, 92, 231, .1) !important;
}

.p-badge-ban {
    border-color: rgba(231, 76, 60, .5) !important;
    color: #e74c3c !important;
    background: rgba(231, 76, 60, .1) !important;
}

.p-badge-date {
    color: var(--muted) !important;
}

/* Баннер подписки — отдельной строкой под шапкой */

.profile-hero .sub-active {
    margin-top: 18px;
}

.sub-active {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-radius: 16px;
    background: linear-gradient(120deg,
        rgba(241, 196, 15, .16),
        rgba(108, 92, 231, .14) 60%,
        rgba(108, 92, 231, .05));
    border: 1px solid rgba(241, 196, 15, .45);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
    overflow: hidden;
}

.sub-active-crown {
    font-size: 32px;
    filter: drop-shadow(0 0 12px rgba(241, 196, 15, .7));
    animation: crown-float 3s ease-in-out infinite;
    flex: none;
}

@keyframes crown-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

.sub-active-info {
    flex: 1;
    min-width: 0;
}

.sub-active-name {
    font-size: 18px;
    font-weight: 800;
    color: #f1c40f;
}

.sub-active-exp {
    font-size: 13px;
    margin-top: 2px;
}

.sub-active-days {
    text-align: center;
    padding: 8px 14px;
    border-radius: 12px;
    background: rgba(241, 196, 15, .12);
    border: 1px solid rgba(241, 196, 15, .4);
    flex: none;
}

.sub-active-days-num {
    display: block;
    font-size: 22px;
    font-weight: 800;
    color: #f1c40f;
    line-height: 1;
}

.sub-active-days .muted {
    font-size: 11px;
}

/* Кнопки профиля */

.profile-actions {
    margin-top: 16px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.rename-form {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    max-width: 340px;
}

/* XP и статистика — ровно */

.xp-note {
    margin: 8px 0 0;
    font-size: 12px;
}

.profile-stats-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 14px 0;
}

.profile-stat {
    flex: 1;
    min-width: 110px;
    margin-top: 0;
    background: var(--card, #171a21);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 14px;
    display: flex;
    align-items: baseline;
    gap: 8px;
    justify-content: center;
}

.profile-stat-value {
    font-size: 20px;
    font-weight: 800;
    color: var(--accent);
}

.profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.profile-grid > .card {
    margin-top: 0;
}

@media (max-width: 900px) {
    .profile-grid {
        grid-template-columns: 1fr;
    }
}
/* ---------- Баннер подписки: компактный ---------- */

.profile-hero .sub-active,
.sub-active {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 14px;
    margin-top: 14px;
    border-radius: 12px;
    background: linear-gradient(120deg,
        rgba(241, 196, 15, .12),
        rgba(108, 92, 231, .10));
    border: 1px solid rgba(241, 196, 15, .35);
    box-shadow: none;
    overflow: hidden;
}

.sub-active::before {
    display: none;
}

.sub-active-crown {
    font-size: 20px;
    filter: drop-shadow(0 0 6px rgba(241, 196, 15, .5));
    animation: none;
    flex: none;
}

.sub-active-info {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.sub-active-name {
    font-size: 14px;
    font-weight: 700;
    color: #f1c40f;
}

.sub-active-exp {
    font-size: 12px;
    margin-top: 0;
}

.sub-active-days {
    display: flex;
    align-items: baseline;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(241, 196, 15, .12);
    border: 1px solid rgba(241, 196, 15, .35);
    flex: none;
}

.sub-active-days-num {
    font-size: 14px;
    font-weight: 800;
    color: #f1c40f;
    line-height: 1.2;
}

.sub-active-days .muted {
    font-size: 11px;
}

/* ---------- Баннер подписки: компактный ---------- */

.profile-hero .sub-active,
.sub-active {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 14px;
    margin-top: 14px;
    border-radius: 12px;
    background: linear-gradient(120deg,
        rgba(241, 196, 15, .12),
        rgba(108, 92, 231, .10));
    border: 1px solid rgba(241, 196, 15, .35);
    box-shadow: none;
    overflow: hidden;
}

.sub-active::before {
    display: none;
}

.sub-active-crown {
    font-size: 20px;
    filter: drop-shadow(0 0 6px rgba(241, 196, 15, .5));
    animation: none;
    flex: none;
}

.sub-active-info {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.sub-active-name {
    font-size: 14px;
    font-weight: 700;
    color: #f1c40f;
}

.sub-active-exp {
    font-size: 12px;
    margin-top: 0;
}

.sub-active-days {
    display: flex;
    align-items: baseline;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(241, 196, 15, .12);
    border: 1px solid rgba(241, 196, 15, .35);
    flex: none;
}

.sub-active-days-num {
    font-size: 14px;
    font-weight: 800;
    color: #f1c40f;
    line-height: 1.2;
}

.sub-active-days .muted {
    font-size: 11px;
}

/* ---------- Герой профиля: ровный ---------- */

.profile-hero {
    padding: 22px;
}

.profile-hero-row {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.profile-hero .sub-active {
    width: 100%;
    margin-top: 16px;
}

.profile-hero .profile-actions {
    margin-top: 14px;
}

/* Компактный баннер подписки */

.sub-active {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 14px;
    border-radius: 12px;
    background: linear-gradient(120deg,
        rgba(241, 196, 15, .12),
        rgba(108, 92, 231, .10));
    border: 1px solid rgba(241, 196, 15, .35);
    overflow: hidden;
}

.sub-active-crown {
    font-size: 20px;
    filter: drop-shadow(0 0 6px rgba(241, 196, 15, .5));
    flex: none;
}

.sub-active-info {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.sub-active-name {
    font-size: 14px;
    font-weight: 700;
    color: #f1c40f;
}

.sub-active-exp {
    font-size: 12px;
}

.sub-active-days {
    display: flex;
    align-items: baseline;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(241, 196, 15, .12);
    border: 1px solid rgba(241, 196, 15, .35);
    flex: none;
}

.sub-active-days-num {
    font-size: 14px;
    font-weight: 800;
    color: #f1c40f;
}

.sub-active-days .muted {
    font-size: 11px;
}

/* ---------- Подписка: компактный бейдж рядом с датой ---------- */

.profile-hero .sub-active {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: auto;
    margin: 0;
    padding: 4px 10px;
    border-radius: 999px;
    background: linear-gradient(120deg,
        rgba(241, 196, 15, .14),
        rgba(108, 92, 231, .10));
    border: 1px solid rgba(241, 196, 15, .4);
    box-shadow: none;
    overflow: visible;
    vertical-align: middle;
}

.profile-hero .sub-active::before {
    display: none;
}

.profile-hero .sub-active-crown {
    font-size: 14px;
    filter: drop-shadow(0 0 5px rgba(241, 196, 15, .6));
    animation: none;
    flex: none;
}

.profile-hero .sub-active-name {
    font-size: 12px;
    font-weight: 800;
    color: #f1c40f;
}

.profile-hero .sub-active-exp {
    font-size: 11px;
}

.profile-hero .sub-active-days {
    display: inline-flex;
    align-items: baseline;
    gap: 3px;
    padding: 1px 8px;
    border-radius: 999px;
    background: rgba(241, 196, 15, .15);
    border: 1px solid rgba(241, 196, 15, .4);
}

.profile-hero .sub-active-days-num {
    font-size: 12px;
    font-weight: 800;
    color: #f1c40f;
    line-height: 1.3;
}

.profile-hero .sub-active-days .muted {
    font-size: 10px;
}

/* ---------- Колесо опыта ---------- */

.wheel-wrap {
    display: flex;
    justify-content: center;
    padding: 14px 0;
}

.wheel {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: conic-gradient(
        #6c5ce7 0 60deg,
        #4834d4 60deg 120deg,
        #9db1ff 120deg 180deg,
        #f1c40f 180deg 240deg,
        #e67e22 240deg 300deg,
        #2ecc71 300deg 360deg
    );
    border: 4px solid var(--border);
    box-shadow: 0 0 24px rgba(108, 92, 231, .4), inset 0 0 18px rgba(0, 0, 0, .5);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wheel-pointer {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    color: #ffd32a;
    font-size: 18px;
    text-shadow: 0 0 8px rgba(0, 0, 0, .6);
}

.wheel-result {
    background: rgba(16, 19, 26, .85);
    padding: 8px 14px;
    border-radius: 999px;
    font-weight: 800;
    color: #ffd32a;
    border: 1px solid rgba(241, 196, 15, .5);
}

.wheel-done {
    filter: saturate(.6) brightness(.8);
}

/* ---------- Достижения ---------- */

.achieve-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.achieve {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(124, 108, 240, .12);
    border: 1px solid var(--border);
    font-size: 13px;
    font-weight: 600;
}

.achieve-icon {
    font-size: 15px;
}

/* ---------- Форма выдачи подписки в админке ---------- */

.sub-grant-form {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-top: 10px;
}

.sub-grant-form label {
    display: block;
    font-size: 12px;
    color: var(--muted);
}

.sub-grant-form select,
.sub-grant-form input {
    margin-top: 4px;
    width: auto;
    min-width: 130px;
}

/* ---------- Колесо: анимация ---------- */

.wheel-wrap {
    position: relative;
    display: flex;
    justify-content: center;
    padding: 18px 0 10px;
}

.wheel-pointer {
    position: absolute;
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
    color: #ffd32a;
    font-size: 18px;
    z-index: 2;
    text-shadow: 0 0 8px rgba(0, 0, 0, .6);
}

.wheel {
    width: 190px;
    height: 190px;
    border-radius: 50%;
    position: relative;
    background: conic-gradient(
        #6c5ce7 0 60deg,
        #4834d4 60deg 120deg,
        #9db1ff 120deg 180deg,
        #f1c40f 180deg 240deg,
        #e67e22 240deg 300deg,
        #2ecc71 300deg 360deg
    );
    border: 4px solid var(--border);
    box-shadow: 0 0 24px rgba(108, 92, 231, .4), inset 0 0 18px rgba(0, 0, 0, .5);
    transition: transform 4s cubic-bezier(.15, .75, .15, 1);
    will-change: transform;
}

.wheel-seg {
    position: absolute;
    inset: 0;
    transform: rotate(var(--a));
    text-align: center;
    padding-top: 12px;
    font-size: 11px;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .55);
    pointer-events: none;
}

.wheel-result {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(16, 19, 26, .9);
    padding: 8px 14px;
    border-radius: 999px;
    font-weight: 800;
    color: #ffd32a;
    border: 1px solid rgba(241, 196, 15, .5);
    z-index: 3;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.wheel-done {
    filter: saturate(.6) brightness(.8);
}

/* ---------- Колокольчик с уведомлениями ---------- */

.nav-bell {
    position: relative;
    display: inline-flex;
    color: var(--muted);
}

.nav-bell svg {
    width: 19px;
    height: 19px;
    display: block;
}

.nav-bell.has-unread {
    color: #ffd32a;
}

.nav-bell.has-unread svg {
    filter: drop-shadow(0 0 6px rgba(255, 211, 42, .6));
    animation: bell-ring 2.5s ease-in-out infinite;
    transform-origin: top center;
}

@keyframes bell-ring {
    0%, 100% { transform: rotate(0); }
    8% { transform: rotate(10deg); }
    16% { transform: rotate(-10deg); }
    24% { transform: rotate(6deg); }
    32% { transform: rotate(-4deg); }
    40% { transform: rotate(0); }
}

.bell-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 8px rgba(108, 92, 231, .7);
}

/* ---------- Кнопки профиля всегда под шапкой ---------- */

.profile-hero .profile-actions {
    width: 100%;
    margin-top: 16px;
    justify-content: flex-start;
}

/* ---------- Избранное ---------- */

.fav-head {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.fav-head h1 {
    margin: 0;
}

.fav-empty {
    text-align: center;
    padding: 44px 20px;
}

.fav-empty-icon {
    font-size: 46px;
    margin-bottom: 8px;
    filter: drop-shadow(0 0 14px rgba(108, 92, 231, .6));
}

.fav-poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: #10131a;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.fav-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s ease;
    filter: saturate(1.1);
}

.fav-card:hover .fav-poster {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 12px 26px rgba(0, 0, 0, .45);
}

.fav-card:hover .fav-poster img {
    transform: scale(1.06);
}

.fav-letter {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    font-weight: 800;
    color: rgba(255, 255, 255, .25);
}

.fav-type {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(16, 19, 26, .8);
    font-size: 11px;
    color: #9aa0a6;
}

.fav-rating {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(16, 19, 26, .85);
    color: #ffd32a;
    font-size: 11px;
    font-weight: 700;
}

.fav-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(to top, rgba(8, 10, 14, .85), rgba(8, 10, 14, .15));
    opacity: 0;
    transition: opacity .25s ease;
}

.fav-card:hover .fav-overlay {
    opacity: 1;
}

.fav-watch {
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 0 16px rgba(108, 92, 231, .6);
}

.fav-body {
    padding: 10px 2px 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.fav-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.fav-title:hover {
    color: var(--accent);
    text-decoration: none;
}

.fav-meta {
    font-size: 12px;
}

.fav-remove .link-btn {
    color: #e74c3c;
    font-size: 12px;
}

.fav-remove .link-btn:hover {
    text-decoration: underline;
}

/* ---------- Чекбоксы в формах ---------- */

.check-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.check-row input {
    width: auto;
}

/* ---------- Карточка видео: премиальный вид ---------- */

.title-hero {
    display: flex;
    gap: 24px;
    padding: 20px;
    margin-top: 10px;
    background: linear-gradient(140deg,
        rgba(108, 92, 231, .08),
        rgba(23, 26, 33, .6) 45%);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .35);
}

.title-poster {
    width: 240px;
    flex: none;
    aspect-ratio: 2 / 3;
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border);
    background: #10131a;
    box-shadow: 0 0 24px rgba(108, 92, 231, .25);
}

.title-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.poster-rating {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    border-radius: 8px;
    background: rgba(16, 19, 26, .85);
    border: 1px solid rgba(255, 211, 42, .35);
    color: #ffd32a;
    font-size: 13px;
    font-weight: 800;
}

.title-info h1 {
    margin: 0 0 10px;
    font-size: 26px;
}

.title-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.title-badges .badge {
    background: rgba(124, 108, 240, .12);
    border-color: rgba(124, 108, 240, .35);
    color: var(--text);
}

.title-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--input, #10131a);
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: 13px;
}

.title-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.title-description {
    max-width: 720px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--input, #10131a);
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-line;
}

@media (max-width: 700px) {
    .title-hero {
        flex-direction: column;
    }

    .title-poster {
        width: 170px;
    }
}

/* ---------- Страница видео: кинематографично (в духе стримингов) ---------- */

.video-hero {
    position: relative;
    margin: -24px -16px 22px;
    overflow: hidden;
    border-radius: 0 0 24px 24px;
}

.video-hero::before {
    content: '';
    position: absolute;
    inset: -60px;
    background: var(--hero-img, linear-gradient(120deg, #2b2350, #171a21)) center / cover no-repeat;
    filter: saturate(1.25) brightness(.45);
    transform: scale(1.2);
}

.video-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
        rgba(15, 17, 21, .30),
        rgba(15, 17, 21, .80) 55%,
        rgba(15, 17, 21, .97) 100%);
}

.video-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 0 auto;
    padding: 44px 16px 30px;
    display: flex;
    gap: 28px;
    align-items: flex-start;
}

.video-hero .title-poster {
    width: 250px;
    flex: none;
    aspect-ratio: 2 / 3;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, .14);
    background: #10131a;
    box-shadow: 0 18px 44px rgba(0, 0, 0, .6), 0 0 30px rgba(108, 92, 231, .25);
}

.video-hero .title-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.video-hero .poster-rating {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 5px 12px;
    border-radius: 10px;
    background: rgba(16, 19, 26, .85);
    backdrop-filter: none;
    font-size: 15px;
    font-weight: 800;
    border: 1px solid rgba(255, 211, 42, .35);
}

.video-hero .title-info {
    flex: 1;
    min-width: 0;
}

.video-hero h1 {
    margin: 0 0 12px;
    font-size: 32px;
    font-weight: 800;
    text-shadow: 0 2px 14px rgba(0, 0, 0, .6);
}

.video-hero .title-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.hero-badge {
    background: rgba(255, 255, 255, .08) !important;
    border: 1px solid rgba(255, 255, 255, .14) !important;
    color: #e8e8e8 !important;
    backdrop-filter: none;
}

.video-hero .title-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.video-hero .meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .12);
    color: #cfd4dd;
    font-size: 13px;
    backdrop-filter: none;
}

.video-hero .title-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.btn-hero {
    background: rgba(255, 255, 255, .10);
    border: 1px solid rgba(255, 255, 255, .16);
    backdrop-filter: none;
    color: #fff;
}

.btn-hero:hover {
    background: var(--accent);
    border-color: var(--accent);
}

.btn-fav-active {
    background: rgba(241, 196, 15, .15);
    border-color: rgba(241, 196, 15, .5);
    color: #f1c40f;
}

.btn-hero-edit {
    background: rgba(231, 76, 60, .12);
    border-color: rgba(231, 76, 60, .4);
    color: #ff6b6b;
}

.video-hero .title-description {
    max-width: 760px;
    color: #cfd4dd;
    font-size: 14px;
    line-height: 1.7;
    text-shadow: 0 1px 8px rgba(0, 0, 0, .5);
    white-space: pre-line;
}

@media (max-width: 700px) {
    .video-hero-inner {
        flex-direction: column;
        padding-top: 28px;
    }

    .video-hero .title-poster {
        width: 170px;
    }

    .video-hero h1 {
        font-size: 24px;
    }
}

/* ---------- Паспорт тайтла ---------- */

.title-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 6px 18px;
    margin: 0 0 16px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .10);
    backdrop-filter: none;
}

.fact {
    display: flex;
    gap: 8px;
    font-size: 13px;
    align-items: baseline;
}

.fact-label {
    color: var(--muted);
    min-width: 92px;
    flex: none;
}

.fact-value {
    color: var(--text);
    font-weight: 600;
}

.edit-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.edit-grid .edit-wide {
    grid-column: 1 / -1;
}

@media (max-width: 600px) {
    .edit-grid {
        grid-template-columns: 1fr;
    }
}

/* ---------- Светлая тема: чиним шапку видео ---------- */

[data-theme="light"] .video-hero::before {
    filter: blur(30px) saturate(1.1) brightness(.85);
}

[data-theme="light"] .video-hero::after {
    background: linear-gradient(to bottom,
        rgba(244, 246, 250, .30),
        rgba(244, 246, 250, .82) 55%,
        rgba(244, 246, 250, .97) 100%);
}

[data-theme="light"] .video-hero h1 {
    color: var(--text);
    text-shadow: none;
}

[data-theme="light"] .hero-badge {
    background: rgba(255, 255, 255, .7) !important;
    border-color: var(--border) !important;
    color: var(--text) !important;
}

[data-theme="light"] .video-hero .meta-item {
    background: rgba(255, 255, 255, .7);
    border-color: var(--border);
    color: var(--muted);
}

[data-theme="light"] .title-facts {
    background: rgba(255, 255, 255, .65);
    border-color: var(--border);
}

[data-theme="light"] .btn-hero {
    background: rgba(255, 255, 255, .75);
    border-color: var(--border);
    color: var(--text);
}

[data-theme="light"] .btn-hero:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

[data-theme="light"] .video-hero .title-description {
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--text);
    text-shadow: none;
}

/* ---------- Плотная шапка видео ---------- */

.video-hero .title-actions {
    margin-bottom: 14px;
}

.video-hero .title-facts {
    margin: 0 0 14px;
}

.video-hero .title-description {
    margin: 0;
    padding: 14px 16px;
}

/* ---------- Шапка видео в стиле AniLibria / Animevost ---------- */

.video-hero {
    position: relative;
    margin: -24px -16px 22px;
    overflow: hidden;
}

.video-hero::before {
    content: '';
    position: absolute;
    inset: -60px;
    background: var(--hero-img, linear-gradient(120deg, #2b2350, #171a21)) center / cover no-repeat;
    filter: blur(34px) saturate(1.2) brightness(.4);
    transform: scale(1.2);
}

.video-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
        rgba(13, 15, 20, .35),
        rgba(13, 15, 20, .85) 60%,
        rgba(13, 15, 20, .98) 100%);
}

.video-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 0 auto;
    padding: 36px 16px 28px;
    display: flex;
    gap: 28px;
    align-items: flex-start;
}

/* Постер */

.vh-poster {
    width: 260px;
    flex: none;
    aspect-ratio: 2 / 3;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, .08);
    background: #10131a;
    box-shadow: 0 14px 40px rgba(0, 0, 0, .6);
}

.vh-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.vh-rating {
    position: absolute;
    left: 10px;
    bottom: 10px;
    padding: 4px 10px;
    border-radius: 8px;
    background: rgba(10, 12, 16, .82);
    font-size: 14px;
    font-weight: 800;
}

/* Инфо */

.vh-info {
    flex: 1;
    min-width: 0;
}

.vh-title {
    margin: 0 0 6px;
    font-size: 30px;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 2px 12px rgba(0, 0, 0, .55);
}

.vh-subline {
    font-size: 13px;
    margin-bottom: 16px;
}

.vh-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.vh-watch {
    padding: 11px 24px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 10px;
    background: var(--accent);
    color: #fff;
    box-shadow: 0 6px 18px rgba(108, 92, 231, .45);
}

.vh-watch:hover {
    background: var(--accent-hover);
}

.vh-btn {
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .14);
    color: #fff;
}

.vh-btn:hover {
    background: rgba(255, 255, 255, .16);
}

.vh-btn-fav {
    background: rgba(241, 196, 15, .15);
    border-color: rgba(241, 196, 15, .5);
    color: #f1c40f;
}

.vh-btn-edit {
    background: rgba(231, 76, 60, .12);
    border-color: rgba(231, 76, 60, .4);
    color: #ff6b6b;
}

/* Таблица фактов как у AniLibria */

.vh-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 8px 28px;
    margin-bottom: 20px;
}

.vh-fact {
    display: flex;
    gap: 10px;
    font-size: 13px;
}

.vh-label {
    color: var(--muted);
    min-width: 96px;
    flex: none;
}

.vh-value {
    color: #e8e8e8;
    font-weight: 600;
}

/* Описание без коробки */

.vh-desc h3 {
    margin: 0 0 6px;
    font-size: 15px;
    color: #fff;
}

.vh-desc p {
    margin: 0;
    color: #c6ccd8;
    font-size: 14px;
    line-height: 1.7;
    max-width: 820px;
}

/* Светлая тема */

[data-theme="light"] .video-hero::before {
    filter: blur(34px) saturate(1.1) brightness(.85);
}

[data-theme="light"] .video-hero::after {
    background: linear-gradient(to bottom,
        rgba(244, 246, 250, .35),
        rgba(244, 246, 250, .85) 60%,
        rgba(244, 246, 250, .98) 100%);
}

[data-theme="light"] .vh-title,
[data-theme="light"] .vh-desc h3 {
    color: var(--text);
    text-shadow: none;
}

[data-theme="light"] .vh-value,
[data-theme="light"] .vh-desc p {
    color: var(--text);
}

[data-theme="light"] .vh-btn {
    background: rgba(255, 255, 255, .7);
    border-color: var(--border);
    color: var(--text);
}

/* Мобильные */

@media (max-width: 700px) {
    .video-hero-inner {
        flex-direction: column;
        padding-top: 26px;
    }

    .vh-poster {
        width: 170px;
    }

    .vh-title {
        font-size: 24px;
    }
}

/* ---------- Загрузка: премиум-форма ---------- */

.upload-card {
    padding: 22px;
}

.upload-section {
    padding: 18px 0;
    border-bottom: 1px solid var(--border);
}

.upload-section:first-of-type {
    padding-top: 4px;
}

.upload-section:last-of-type {
    border-bottom: 0;
}

.upload-section h2 {
    font-size: 17px;
    margin: 0 0 14px;
}

.upload-label {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 8px;
}

.file-drop {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 18px;
    text-align: center;
    cursor: pointer;
    background: var(--input, #10131a);
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
    transition: border-color .2s ease, background .2s ease;
    margin-bottom: 12px;
}

.file-drop:hover {
    border-color: var(--accent);
    background: rgba(108, 92, 231, .08);
}

.genre-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.genre-chip input {
    display: none;
}

.genre-chip span {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--input, #10131a);
    color: var(--text);
    font-size: 13px;
    cursor: pointer;
    transition: all .2s ease;
}

.genre-chip span:hover {
    border-color: var(--accent);
}

.genre-chip input:checked + span {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    box-shadow: 0 0 12px rgba(108, 92, 231, .5);
}

/* ---------- Карточки каталога ---------- */

.vcard {
    display: block;
    background: var(--card, #171a21);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.vcard:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 12px 26px rgba(0, 0, 0, .4);
    text-decoration: none;
}

.vcard-thumb {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    background: #10131a;
    overflow: hidden;
}

.vcard-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s ease;
}

.vcard:hover .vcard-thumb img {
    transform: scale(1.05);
}

.vcard-letter {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: 800;
    color: rgba(255, 255, 255, .25);
}

/* PRO-бейдж на постере */

.vcard-pro {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 3px 9px;
    border-radius: 8px;
    background: linear-gradient(120deg,
        rgba(241, 196, 15, .95),
        rgba(230, 126, 34, .95));
    color: #1a1408;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .03em;
    box-shadow: 0 0 12px rgba(241, 196, 15, .55);
}

.vcard-rate {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 3px 8px;
    border-radius: 8px;
    background: rgba(16, 19, 26, .85);
    color: #ffd32a;
    font-size: 11px;
    font-weight: 700;
}

.vcard-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px 12px;
}

.vcard-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.vcard-meta {
    font-size: 12px;
}

/* PRO-бейдж в шапке видео */

.badge-pro {
    background: linear-gradient(120deg, #f1c40f, #e67e22) !important;
    border-color: transparent !important;
    color: #1a1408 !important;
    font-weight: 800;
    box-shadow: 0 0 12px rgba(241, 196, 15, .45);
}

/* ---------- PRO в шапке видео ---------- */

.vh-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 0 0 6px;
}

.vh-title-row .vh-title {
    margin: 0;
}

.vh-pro {
    padding: 4px 12px;
    border-radius: 999px;
    background: linear-gradient(120deg, #f1c40f, #e67e22);
    color: #1a1408;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .03em;
    box-shadow: 0 0 14px rgba(241, 196, 15, .5);
}

/* ---------- Комментарии: карточки ---------- */

.comment {
    background: var(--card, #171a21);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 10px;
}

.comment-head {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.comment-avatar {
    width: 36px;
    height: 36px;
    flex: none;
}

.comment-author {
    font-weight: 700;
    color: var(--text);
}

.comment-author:hover {
    color: var(--accent);
    text-decoration: none;
}

.comment-time {
    margin-left: auto;
    font-size: 12px;
}

.comment-reply-btn {
    font-size: 12px;
}

.comment-body {
    color: var(--text);
    font-size: 14px;
    line-height: 1.6;
    padding-left: 44px;
}

.comment-replies {
    margin: 4px 0 10px 22px;
    padding-left: 14px;
    border-left: 2px solid rgba(108, 92, 231, .35);
}

.comment-child {
    background: transparent;
    border-color: transparent;
    padding: 8px 6px;
    margin-bottom: 6px;
}

@media (max-width: 600px) {
    .comment-body {
        padding-left: 0;
    }
}

/* ---------- Топ пользователей ---------- */

.top-users {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px;
}

.top-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 12px;
    border: 1px solid transparent;
    transition: all .2s ease;
}

.top-user:hover {
    background: rgba(108, 92, 231, .08);
    border-color: var(--border);
    text-decoration: none;
}

.top-user-rank {
    width: 30px;
    text-align: center;
    font-size: 18px;
    font-weight: 800;
    color: var(--muted);
    flex: none;
}

.top-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--input, #10131a);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    flex: none;
}

.top-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.top-user-name {
    font-weight: 700;
    color: var(--text);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.top-user-level {
    font-size: 13px;
    color: #9db1ff;
    font-weight: 700;
    flex: none;
}

/* ---------- Топ-3: подсветка ---------- */

.top-user-lead {
    border: 1px solid;
}

.top-user-1 {
    background: linear-gradient(90deg, rgba(241, 196, 15, .16), transparent);
    border-color: rgba(241, 196, 15, .5) !important;
    box-shadow: 0 0 14px rgba(241, 196, 15, .25);
}

.top-user-2 {
    background: linear-gradient(90deg, rgba(192, 192, 192, .12), transparent);
    border-color: rgba(192, 192, 192, .45) !important;
    box-shadow: 0 0 12px rgba(192, 192, 192, .2);
}

.top-user-3 {
    background: linear-gradient(90deg, rgba(205, 127, 50, .14), transparent);
    border-color: rgba(205, 127, 50, .45) !important;
    box-shadow: 0 0 12px rgba(205, 127, 50, .2);
}

.profile-hero .sub-active {
    width: 100%;
    margin-top: 16px;
}

.p-badge-sub {
    border-color: rgba(241, 196, 15, .5) !important;
    color: #f1c40f !important;
    background: rgba(241, 196, 15, .12) !important;
}
/* ---------- Топ: шикарный вид ---------- */

.top-page-head {
    text-align: center;
    margin: 10px 0 28px;
}

.top-page-head h1 {
    margin: 0 0 6px;
    font-size: 34px;
    font-weight: 800;
    background: linear-gradient(90deg, #f1c40f, #6c5ce7);
    -webkit-background-clip: text;
    background-clip: text;
}

.top-page-head p {
    margin: 0;
}

.top-section-head h2 {
    position: relative;
    padding-left: 14px;
}

.top-section-head h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 22px;
    border-radius: 2px;
    background: linear-gradient(180deg, #f1c40f, #6c5ce7);
}

/* Медали-ранги на постерах */

.top-rank-wrap {
    position: relative;
}

.top-rank {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 3;
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(16, 19, 26, .85);
    border: 1px solid var(--border);
    font-size: 15px;
    font-weight: 800;
    color: var(--text);
    backdrop-filter: none;
}

.top-rank-wrap .vcard-pro {
    top: 52px;
}

.rank-gold {
    background: linear-gradient(120deg, rgba(241, 196, 15, .95), rgba(230, 126, 34, .95));
    color: #1a1408;
    border-color: transparent;
    box-shadow: 0 0 14px rgba(241, 196, 15, .5);
}

.rank-silver {
    background: linear-gradient(120deg, rgba(220, 220, 220, .95), rgba(150, 150, 150, .95));
    color: #10131a;
    border-color: transparent;
    box-shadow: 0 0 12px rgba(200, 200, 200, .45);
}

.rank-bronze {
    background: linear-gradient(120deg, rgba(205, 127, 50, .95), rgba(150, 90, 40, .95));
    color: #1a1008;
    border-color: transparent;
    box-shadow: 0 0 12px rgba(205, 127, 50, .45);
}

/* Бейджи званий пользователей */

.top-user-title {
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    border: 1px solid var(--border);
    background: var(--input, #10131a);
    color: var(--muted);
    flex: none;
    white-space: nowrap;
}

.tt-new {
    color: #8fd38f;
    border-color: rgba(46, 204, 113, .35);
    background: rgba(46, 204, 113, .08);
}

.tt-watch {
    color: #7ec3ff;
    border-color: rgba(52, 152, 219, .35);
    background: rgba(52, 152, 219, .08);
}

.tt-gem {
    color: #b07cff;
    border-color: rgba(155, 89, 182, .4);
    background: rgba(155, 89, 182, .1);
}

.tt-star {
    color: #ffd32a;
    border-color: rgba(241, 196, 15, .4);
    background: rgba(241, 196, 15, .1);
}

.tt-moon {
    color: #9db1ff;
    border-color: rgba(108, 92, 231, .5);
    background: rgba(108, 92, 231, .12);
}

.tt-legend {
    color: #ff8c69;
    border-color: rgba(230, 126, 34, .5);
    background: linear-gradient(120deg, rgba(241, 196, 15, .15), rgba(230, 126, 34, .15));
}

/* ---------- Вертикальные топы ---------- */

.top-list {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.top-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 12px;
    border: 1px solid transparent;
    transition: all .2s ease;
}

.top-row:hover {
    background: rgba(108, 92, 231, .08);
    border-color: var(--border);
    text-decoration: none;
}

.top-row-rank {
    width: 34px;
    text-align: center;
    font-size: 18px;
    font-weight: 800;
    color: var(--muted);
    flex: none;
}

.top-row-poster {
    width: 46px;
    height: 62px;
    border-radius: 8px;
    overflow: hidden;
    background: #10131a;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    flex: none;
}

.top-row-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.top-row-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--input, #10131a);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    flex: none;
}

.top-row-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.top-row-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.top-row-title {
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.top-row-meta {
    font-size: 12px;
}

.top-row-value {
    flex: none;
    font-weight: 800;
    font-size: 14px;
    color: var(--muted);
}

.top-row-value.rate {
    color: #ffd32a;
}

.top-row-lead {
    border: 1px solid;
}

.top-row-1 {
    background: linear-gradient(90deg, rgba(241, 196, 15, .14), transparent);
    border-color: rgba(241, 196, 15, .5) !important;
}

.top-row-2 {
    background: linear-gradient(90deg, rgba(192, 192, 192, .12), transparent);
    border-color: rgba(192, 192, 192, .45) !important;
}

.top-row-3 {
    background: linear-gradient(90deg, rgba(205, 127, 50, .14), transparent);
    border-color: rgba(205, 127, 50, .45) !important;
}

/* ---------- Окна входа и регистрации ---------- */

.auth-wrap {
    display: flex;
    justify-content: center;
    padding: 30px 0 10px;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    padding: 30px 28px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: linear-gradient(90deg, #6c5ce7, #f1c40f);
}

.auth-logo {
    font-size: 46px;
    filter: drop-shadow(0 0 16px rgba(108, 92, 231, .65));
    margin-bottom: 6px;
}

.auth-title {
    font-size: 24px;
    margin: 0 0 4px;
}

.auth-sub {
    margin: 0 0 20px;
    font-size: 13px;
}

.auth-form {
    text-align: left;
}

.auth-label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 12px;
}

.auth-label input {
    width: 100%;
    padding: 11px 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--input, #10131a);
    color: var(--text);
    font-size: 14px;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.auth-label input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, .2);
}

.auth-submit {
    width: 100%;
    padding: 12px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 10px;
    background: linear-gradient(90deg, #6c5ce7, #8e7bff);
    color: #fff;
    margin-top: 4px;
}

.auth-submit:hover {
    filter: brightness(1.12);
}

.auth-links {
    display: flex;
    justify-content: space-between;
    margin-top: 16px;
    font-size: 13px;
}
.auth-errors {
    margin: 0 0 14px;
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(231, 76, 60, .12);
    border: 1px solid rgba(231, 76, 60, .4);
    color: #ff6b6b;
    font-size: 13px;
    text-align: left;
}

/* ---------- Комментарии: карточки ---------- */

.comment {
    background: var(--card, #171a21);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 10px;
}

.comment-head {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--input, #10131a);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    flex: none;
}

.comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comment-author {
    font-weight: 700;
    color: var(--text);
}

.comment-author:hover {
    color: var(--accent);
    text-decoration: none;
}

.comment-time {
    font-size: 12px;
}

.comment-tools {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.comment-delete-btn {
    color: #ff6b6b !important;
    font-size: 12px;
}

.comment-body {
    color: var(--text);
    font-size: 14px;
    line-height: 1.6;
    padding-left: 44px;
    word-break: break-word;
}

.comment-deleted {
    opacity: .75;
}

.comment-deleted-text {
    font-style: italic;
}

.comment-replies {
    margin: 4px 0 10px 22px;
    padding-left: 14px;
    border-left: 2px solid rgba(108, 92, 231, .35);
}

.comment-child {
    background: transparent;
    border-color: transparent;
    padding: 8px 6px;
    margin-bottom: 6px;
}

@media (max-width: 600px) {
    .comment-body {
        padding-left: 0;
    }

    .comment-tools {
        margin-left: 0;
        width: 100%;
        justify-content: flex-end;
    }
}

.comment {
    display: block;
    background: var(--card, #171a21);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 10px;
}

.comment-head {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--input, #10131a);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    flex: none;
}

.comment-avatar img { width: 100%; height: 100%; object-fit: cover; }

.comment-author { font-weight: 700; color: var(--text); }
.comment-author:hover { color: var(--accent); text-decoration: none; }

.comment-time { font-size: 12px; }

.comment-tools {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.comment-delete-btn { color: #ff6b6b !important; font-size: 12px; }

.comment-body {
    display: block;
    color: var(--text);
    font-size: 14px;
    line-height: 1.6;
    padding-left: 44px;
    word-break: break-word;
}

.comment-deleted { opacity: .75; }
.comment-deleted-text { font-style: italic; }

.comment-replies {
    margin: 4px 0 10px 22px;
    padding-left: 14px;
    border-left: 2px solid rgba(108, 92, 231, .35);
}

.comment-child {
    background: transparent;
    border-color: transparent;
    padding: 8px 6px;
    margin-bottom: 6px;
}

@media (max-width: 600px) {
    .comment-body { padding-left: 0; }
    .comment-tools { margin-left: 0; width: 100%; justify-content: flex-end; }
}

.comment { display: block; background: var(--card, #171a21); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; }
.comment-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.comment-avatar { width: 36px; height: 36px; border-radius: 50%; overflow: hidden; background: var(--input, #10131a); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-weight: 800; flex: none; }
.comment-avatar img { width: 100%; height: 100%; object-fit: cover; }
.comment-author { font-weight: 700; color: var(--text); }
.comment-author:hover { color: var(--accent); text-decoration: none; }
.comment-time { font-size: 12px; }
.comment-tools { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.comment-delete-btn { color: #ff6b6b !important; font-size: 12px; }
.comment-body { display: block; color: var(--text); font-size: 14px; line-height: 1.6; padding-left: 44px; word-break: break-word; }
.comment-deleted { opacity: .75; }
.comment-deleted-text { font-style: italic; }
.comment-replies { margin: 4px 0 10px 22px; padding-left: 14px; border-left: 2px solid rgba(108, 92, 231, .35); }
.comment-child { background: transparent; border-color: transparent; padding: 8px 6px; margin-bottom: 6px; }
@media (max-width: 600px) { .comment-body { padding-left: 0; } .comment-tools { margin-left: 0; width: 100%; justify-content: flex-end; } }


/* ---------- Комментарии-пузыри ---------- */

.comment {
    display: flex;
    gap: 12px;
    margin-bottom: 18px;
}

.comment-side {
    flex: none;
    width: 64px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.comment-avatar {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: var(--input, #10131a);
    border: 1px solid var(--border);
    font-weight: 800;
    font-size: 20px;
    color: var(--muted);
    flex: none;
}

.comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.comment-crown {
    position: absolute;
    top: -13px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 14px;
    filter: drop-shadow(0 0 6px rgba(241, 196, 15, .8));
    z-index: 2;
}

.comment-premium-badge {
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid #f1c40f;
    color: #f1c40f;
    background: rgba(241, 196, 15, .1);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .05em;
}

.comment-content {
    flex: 1;
    min-width: 0;
}

.comment-head {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.comment-author {
    font-weight: 700;
    color: var(--text);
}

.comment-author:hover {
    color: var(--accent);
    text-decoration: none;
}

.comment-tools {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.comment-delete-btn {
    color: #ff6b6b !important;
    font-size: 12px;
}

.comment-bubble {
    position: relative;
    background: rgba(108, 92, 231, .10);
    border: 1px solid rgba(108, 92, 231, .28);
    border-radius: 12px;
    padding: 10px 14px;
    color: var(--text);
    font-size: 14px;
    line-height: 1.6;
    word-break: break-word;
}

.comment-bubble::before {
    content: '';
    position: absolute;
    top: 12px;
    left: -7px;
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-right: 7px solid rgba(108, 92, 231, .28);
}

.comment-time {
    margin-top: 5px;
    font-size: 12px;
}

/* Премиум-комментарии: золотая рамка, как огонь на референсе */

.comment-premium .comment-bubble {
    border-color: rgba(241, 196, 15, .65);
    background: rgba(241, 196, 15, .08);
    box-shadow: 0 0 16px rgba(241, 196, 15, .25);
}

.comment-premium .comment-bubble::before {
    border-right-color: rgba(241, 196, 15, .65);
}

.comment-premium .comment-avatar img {
    box-shadow: 0 0 0 2px #f1c40f, 0 0 14px rgba(241, 196, 15, .5);
}

/* Удалённые и ответы */

.comment-deleted .comment-bubble {
    opacity: .7;
    border-style: dashed;
}

.comment-deleted-text {
    font-style: italic;
}

.comment-replies {
    margin: -6px 0 14px 40px;
}

.comment-child {
    margin-bottom: 10px;
}

/* Светлая тема */

[data-theme="light"] .comment-bubble {
    background: rgba(52, 152, 219, .08);
    border-color: rgba(52, 152, 219, .3);
}

[data-theme="light"] .comment-bubble::before {
    border-right-color: rgba(52, 152, 219, .3);
}

/* Мобильные */

@media (max-width: 600px) {
    .comment-side {
        width: 44px;
    }

    .comment-avatar {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .comment-replies {
        margin-left: 12px;
    }
}

/* ---------- Складная админ-карточка ---------- */

.admin-tools-card h2 {
    margin-bottom: 12px;
}

.admin-tool {
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 8px;
    background: var(--input, #10131a);
    overflow: hidden;
}

.admin-tool summary {
    cursor: pointer;
    padding: 11px 14px;
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    transition: background .2s ease;
}

.admin-tool summary:hover {
    background: rgba(108, 92, 231, .08);
}

.admin-tool summary::before {
    content: '▸';
    color: var(--accent);
    transition: transform .2s ease;
}

.admin-tool[open] summary::before {
    transform: rotate(90deg);
}

.admin-tool form,
.admin-tool p,
.admin-tool .admin-tool-inner {
    padding: 4px 14px 12px;
}

.adm-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 8px;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid var(--border);
}

.adm-row input[type="text"],
.adm-row input[type="number"],
.adm-row select {
    padding: 7px 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--input, #10131a);
    color: var(--text);
}

.adm-cell {
    font-size: 14px;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.adm-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.adm-table th,
.adm-table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    color: var(--text);
}

.adm-table th {
    color: var(--muted);
}

.admin-hub-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* ========== Админка: единый гармоничный стиль ========== */

h1 {
    font-size: 26px;
    margin: 0 0 16px;
}

.card h2 {
    font-size: 17px;
    margin: 0 0 12px;
}

/* ---------- Компактные формы ---------- */

.cover-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.cover-form input[type="text"],
.cover-form input[type="number"],
.cover-form input[type="url"],
.cover-form input[type="email"],
.cover-form select {
    flex: 1 1 180px;
    max-width: 340px;
    padding: 9px 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--input, #10131a);
    color: var(--text);
    font-size: 13px;
}

.cover-form textarea {
    flex: 1 1 100%;
    min-height: 70px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--input, #10131a);
    color: var(--text);
    font-size: 13px;
}

.cover-form input:focus,
.cover-form select:focus,
.cover-form textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, .18);
}

.cover-form .btn {
    flex: none;
}

/* ---------- Строки-карточки (жанры, роли, тарифы, HLS) ---------- */

.adm-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--input, #10131a);
    margin-bottom: 8px;
}

.adm-row input[type="text"] {
    flex: 1 1 160px;
    min-width: 120px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--card, #171a21);
    color: var(--text);
    font-size: 13px;
}

.adm-row input[type="number"] {
    width: 74px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--card, #171a21);
    color: var(--text);
    font-size: 13px;
}

.adm-row select {
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--card, #171a21);
    color: var(--text);
    font-size: 13px;
}

.adm-cell {
    flex: 1 1 200px;
    min-width: 0;
    font-size: 13px;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---------- Таблицы ---------- */

.adm-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
}

.adm-table th {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--muted);
    text-align: left;
}

.adm-table th,
.adm-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
}

.adm-table td {
    color: var(--text);
}

.adm-table tbody tr:hover td {
    background: rgba(108, 92, 231, .06);
}

/* ---------- Галочки ---------- */

.check-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text);
    margin: 6px 0;
}

/* ---------- Плитки-ссылки админ-хаба ---------- */

.admin-hub-links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
}

.admin-hub-links .btn {
    display: flex;
    width: 100%;
    justify-content: center;
    padding: 12px 10px;
    border-radius: 12px;
    font-size: 13px;
}

/* ---------- Раскрывашки ---------- */

.admin-tool {
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 10px;
    background: var(--input, #10131a);
    overflow: hidden;
}

.admin-tool summary {
    cursor: pointer;
    padding: 12px 14px;
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    transition: background .2s ease;
}

.admin-tool summary:hover {
    background: rgba(108, 92, 231, .08);
}

.admin-tool summary::before {
    content: '▸';
    color: var(--accent);
    transition: transform .2s ease;
}

.admin-tool[open] summary::before {
    transform: rotate(90deg);
}

.admin-tool form,
.admin-tool p,
.admin-tool .admin-tool-inner {
    padding: 6px 14px 14px;
}

/* ---------- Кнопки ---------- */

.btn-small {
    padding: 7px 12px;
    font-size: 12px;
    border-radius: 8px;
}

/* ---------- Жанры/категории: шикарные строки ---------- */

.dict-page-head h1 {
    margin: 0 0 4px;
    font-size: 28px;
    background: linear-gradient(90deg, #6c5ce7, #f1c40f);
    -webkit-background-clip: text;
    background-clip: text;
}

.dict-page-head p {
    margin: 0 0 18px;
}

.dict-row {
    gap: 10px;
    transition: border-color .2s ease, background .2s ease;
}

.dict-row:hover {
    border-color: var(--accent);
    background: rgba(108, 92, 231, .06);
}

.dict-icon {
    font-size: 16px;
    flex: none;
}

.dict-row input[type="text"] {
    flex: 1;
}

.dict-row .btn-small {
    flex: none;
    white-space: nowrap;
    padding: 8px 12px;
}


/* ---------- Серии: одна строка ---------- */

.ep-row {
    gap: 10px;
}

.ep-badge {
    padding: 5px 10px;
    border-radius: 8px;
    background: rgba(108, 92, 231, .15);
    color: #9db1ff;
    font-weight: 800;
    font-size: 12px;
    flex: none;
}

.ep-field {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: none;
}

.ep-field span {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--muted);
}

.ep-field input {
    width: 76px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--card, #171a21);
    color: var(--text);
    font-size: 13px;
}

.ep-title-input {
    flex: 1;
    min-width: 140px;
}

/* ---------- HLS-статусы ---------- */

.hls-badge {
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    border: 1px solid;
    flex: none;
}

.hls-ready {
    color: #2ecc71;
    border-color: rgba(46, 204, 113, .4);
    background: rgba(46, 204, 113, .1);
}

.hls-processing {
    color: #f1c40f;
    border-color: rgba(241, 196, 15, .4);
    background: rgba(241, 196, 15, .1);
}

.hls-failed {
    color: #ff6b6b;
    border-color: rgba(231, 76, 60, .4);
    background: rgba(231, 76, 60, .1);
}

.hls-none {
    color: var(--muted);
    border-color: var(--border);
    background: var(--input, #10131a);
}

/* ---------- Уведомления ---------- */

.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--input, #10131a);
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--text);
}

.notif-icon {
    font-size: 16px;
    flex: none;
}

.notif-time {
    margin-left: auto;
    color: var(--muted);
    font-size: 11px;
    flex: none;
}
    width: 38px;
    padding: 7px 0;
    text-align: center;
}

.sub-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
/* ---------- Достижения: красиво и по-русски ---------- */

.ach-user-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--input, #10131a);
    margin-bottom: 8px;
}

.ach-user-id {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    flex: none;
}

.ach-user-name {
    font-weight: 700;
    color: var(--text);
    flex: none;
}

.ach-user-name:hover {
    color: var(--accent);
    text-decoration: none;
}

.ach-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ach-badge {
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    background: rgba(108, 92, 231, .12);
    border: 1px solid rgba(108, 92, 231, .3);
    color: #9db1ff;
    white-space: nowrap;
}

/* ID в профиле */

.p-badge-id {
    color: var(--muted);
    border-color: var(--border);
    background: var(--input, #10131a);
}

.ach-badge-form {
    display: inline;
    margin: 0;
    padding: 0;
}

.ach-badge-btn {
    cursor: pointer;
    font: inherit;
    transition: all .2s ease;
}

.ach-badge-btn:hover {
    border-color: rgba(231, 76, 60, .5);
    color: #ff6b6b;
    background: rgba(231, 76, 60, .1);
}

/* ---------- Тарифы: строки ---------- */

.plan-row {
    gap: 10px;
}

.plan-icon {
    font-size: 18px;
    flex: none;
}

.plan-name {
    flex: 1 1 160px;
    min-width: 140px;
}

.plan-row select {
    min-width: 150px;
}

/* ---------- Страница подписок ---------- */

.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    max-width: 900px;
    margin: 0 auto;
}

.plan-card {
    background: var(--card, #171a21);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.plan-vip {
    border-color: rgba(241, 196, 15, .6);
    box-shadow: 0 0 24px rgba(241, 196, 15, .15);
}

.plan-emoji {
    font-size: 30px;
}

.plan-card h2 {
    margin: 0;
    font-size: 20px;
}

.plan-price {
    font-size: 26px;
    font-weight: 800;
    color: var(--accent);
}

.plan-vip .plan-price {
    color: #f1c40f;
}

.plan-desc {
    font-size: 12px;
    margin: 0;
}

.plan-features {
    list-style: none;
    margin: 0 0 8px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
    color: var(--text);
}

.plan-btn,
.plan-btn-fake {
    width: 100%;
    margin-top: auto;
    text-align: center;
}

.plan-active {
    outline: 2px solid var(--accent);
}

.shop-off-note {
    text-align: center;
    color: #ff6b6b;
    border-color: rgba(231, 76, 60, .4);
    background: rgba(231, 76, 60, .08);
    margin: 0 auto 16px;
    max-width: 900px;
}

/* ---------- Настройки сайта ---------- */

.settings-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-width: 560px;
}

.settings-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 6px;
}

.settings-field input[type="text"] {
    width: 100%;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--input, #10131a);
    color: var(--text);
    font-size: 14px;
}

.settings-field input[type="text"]:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, .18);
}

.settings-form .check-row {
    font-size: 14px;
}

/* ---------- DMCA ---------- */

.dmca-grid {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 16px;
    align-items: start;
}

@media (max-width: 900px) {
    .dmca-grid {
        grid-template-columns: 1fr;
    }
}

.dmca-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dmca-form select,
.dmca-form textarea {
    width: 100%;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--input, #10131a);
    color: var(--text);
    font-size: 14px;
}

.dmca-form select:focus,
.dmca-form textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, .18);
}

.dmca-success {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    border-color: rgba(46, 204, 113, .5);
    background: rgba(46, 204, 113, .08);
    margin: 0 0 16px;
}

.dmca-success-icon {
    font-size: 26px;
    flex: none;
}

.dmca-success h2 {
    margin: 0 0 4px;
    font-size: 18px;
    color: #2ecc71;
}

.dmca-num {
    color: #2ecc71;
    font-size: 18px;
}

/* ---------- Модерация: вкладки, таблица, bulk ---------- */

.mod-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.mod-tab {
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.mod-tab.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.bulk-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.mod-actions {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.st-badge {
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    border: 1px solid;
    white-space: nowrap;
}

.st-pending {
    color: #f1c40f;
    border-color: rgba(241, 196, 15, .4);
    background: rgba(241, 196, 15, .1);
}

.st-approved {
    color: #2ecc71;
    border-color: rgba(46, 204, 113, .4);
    background: rgba(46, 204, 113, .1);
}

.st-rejected {
    color: #ff6b6b;
    border-color: rgba(231, 76, 60, .4);
    background: rgba(231, 76, 60, .1);
}

/* ---------- Поиск в шапке ---------- */

.header-search {
    margin-left: 14px;
}

.header-search input {
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--input, #10131a);
    color: var(--text);
    font-size: 13px;
    width: 190px;
    transition: width .25s ease, border-color .2s ease;
}

.header-search input:focus {
    outline: none;
    width: 260px;
    border-color: var(--accent);
}

@media (max-width: 900px) {
    .header-search {
        display: none;
    }
}

/* ---------- Мобильное доп-меню ---------- */

.mobile-links {
    display: none;
}

@media (max-width: 900px) {
    .mobile-links {
        display: flex;
        flex-direction: column;
        gap: 4px;
        padding: 10px 0;
        border-top: 1px solid var(--border);
        margin-top: 8px;
    }

    .mobile-links a {
        padding: 10px 12px;
        border-radius: 10px;
        color: var(--text);
        font-weight: 600;
        font-size: 14px;
    }

    .mobile-links a:hover {
        background: rgba(108, 92, 231, .1);
        text-decoration: none;
    }

    .main-nav.open {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }
}

/* ---------- Дашборд ---------- */

.dash-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.dash-stat {
    background: var(--card, #171a21);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px 12px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dash-value {
    font-size: 26px;
    font-weight: 800;
    color: var(--accent);
}

.log-timeline {
    display: flex;
    flex-direction: column;
}

.log-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 4px;
    border-bottom: 1px dashed var(--border);
}

.log-item:last-child {
    border-bottom: none;
}

.log-icon {
    flex: none;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(108, 92, 231, .12);
    border: 1px solid rgba(108, 92, 231, .3);
    border-radius: 10px;
    font-size: 16px;
}

.log-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: baseline;
}

.log-who {
    font-weight: 800;
    color: var(--text);
}

.log-act {
    font-size: 11px;
    font-weight: 700;
    color: #9db1ff;
    background: rgba(108, 92, 231, .12);
    padding: 2px 8px;
    border-radius: 999px;
}

.log-details {
    font-size: 13px;
}

.log-time {
    font-size: 11px;
    flex: none;
}

/* ---------- Премиум-аватар в профиле ---------- */

.avatar-premium {
    border-color: #f1c40f !important;
    box-shadow: 0 0 0 3px rgba(241, 196, 15, .9), 0 0 24px rgba(241, 196, 15, .55);
}

/* ---------- Пользователи: строки ---------- */

.user-sum {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.user-sum-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--input, #10131a);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    flex: none;
}

.user-sum-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.auth-errors {
    margin: 0 0 14px;
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(231, 76, 60, .12);
    border: 1px solid rgba(231, 76, 60, .4);
    color: #ff6b6b;
    font-size: 13px;
    text-align: left;
}

/* ---------- Лайки комментариев ---------- */

.comment-like-btn {
    color: var(--muted);
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color .15s ease, transform .1s ease;
}

.comment-like-btn:active {
    transform: scale(1.15);
}

.comment-like-btn.liked {
    color: #ff6b6b;
}

/* ---------- Половинные звёзды ---------- */

.stars-half {
    display: flex;
    gap: 4px;
    font-size: 22px;
    cursor: pointer;
    line-height: 1;
}

.star-half {
    color: var(--border);
    user-select: none;
    transition: transform .1s ease;
}

.star-half:hover {
    transform: scale(1.12);
}

.star-half.full {
    color: #ffd32a;
}

.star-half.half {
    background: linear-gradient(90deg, #ffd32a 50%, var(--border) 50%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

.rate-value {
    font-size: 13px;
    font-weight: 700;
    color: #ffd32a !important;
}

/* ---------- Кнопка «наверх» ---------- */

.scroll-top {
    position: fixed;
    right: 22px;
    bottom: 22px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--card, #171a21);
    color: var(--accent);
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all .25s ease;
    z-index: 60;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
}

.scroll-top.show {
    opacity: 1;
    visibility: visible;
    transform: none;
}

.scroll-top:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ---------- Последний комментарий на карточке ---------- */

.vcard-comment {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vcard-comment strong {
    color: var(--text);
    font-weight: 700;
}

.hls-title-card details summary {
    cursor: pointer;
    display: flex;
    gap: 10px;
    align-items: center;
    font-weight: 700;
    list-style: none;
}

.hls-title-card details summary::-webkit-details-marker {
    display: none;
}

.hls-title-card details summary::before {
    content: '▸';
    color: var(--accent);
    transition: transform .15s ease;
}

.hls-title-card details[open] summary::before {
    transform: rotate(90deg);
}

.hls-title-card details[open] summary {
    margin-bottom: 10px;
}

/* Ровная сетка кнопок админки */
.admin-hub-links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
    align-items: stretch;
}

.admin-hub-links .btn {
    width: 100%;
    height: auto;
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: normal;
    line-height: 1.25;
}

.admin-hub-links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
    align-items: stretch;
}

.admin-hub-links .btn {
    width: 100%;
    height: auto;
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: normal;
    line-height: 1.25;
}





/* ========== Красивый скроллбар списка серий ========== */
.episodes-col .episode-list-vertical {
    scrollbar-width: thin;                          /* Firefox */
    scrollbar-color: #6c5ce7 rgba(255, 255, 255, 0.06);
}

.episodes-col .episode-list-vertical::-webkit-scrollbar {
    width: 6px;
}

.episodes-col .episode-list-vertical::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin: 6px 0;
}

.episodes-col .episode-list-vertical::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #8d7ff5, #5a4bd8);
    border-radius: 8px;
    transition: background 0.2s;
}

.episodes-col .episode-list-vertical::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #a29af8, #6c5ce7);
}

.episodes-col .episode-list-vertical::-webkit-scrollbar-thumb:active {
    background: #5a4bd8;
}
/* ========== Единый скроллбар сайта ========== */
html {
    scrollbar-width: thin;
    scrollbar-color: #6c5ce7 #14161f;
}

body::-webkit-scrollbar,
html::-webkit-scrollbar {
    width: 10px;
}

body::-webkit-scrollbar-track,
html::-webkit-scrollbar-track {
    background: #14161f;
}

body::-webkit-scrollbar-thumb,
html::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #7c6cf0, #5a4bd8);
    border-radius: 8px;
    border: 2px solid #14161f;
}

body::-webkit-scrollbar-thumb:hover,
html::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #8d7ff5, #6c5ce7);
}

/* ========== Модерация 2.0 ========== */
.mod-card {
    background: #171a24;
    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: 16px;
    margin-bottom: 14px;
    overflow: hidden;
    transition: border-color .2s;
}
.mod-card:hover { border-color: rgba(141, 127, 245, .35); }
.mod-head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    flex-wrap: wrap;
}
.mod-thumb {
    width: 54px;
    height: 76px;
    border-radius: 10px;
    overflow: hidden;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2a2f45, #1a1d2b);
    font-weight: 700;
    font-size: 20px;
    color: #8d7ff5;
}
.mod-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mod-info { flex: 1 1 220px; min-width: 0; }
.mod-title { font-weight: 700; font-size: 15px; }
.mod-meta { font-size: 12.5px; margin-top: 3px; }
.mod-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.mod-eps {
    border-top: 1px dashed rgba(255, 255, 255, .09);
    padding: 10px 16px 12px;
    background: rgba(0, 0, 0, .18);
}
.mod-eps-title {
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #8b90a5;
    margin-bottom: 8px;
}
.mod-ep-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .03);
    margin-bottom: 6px;
    flex-wrap: wrap;
}
.mod-ep-num {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: #6c5ce7;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12.5px;
    font-weight: 700;
    flex: 0 0 auto;
}
.mod-ep-title { flex: 1 1 auto; font-size: 13.5px; }
.mod-badge {
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
}
.mod-badge.pending { background: rgba(255, 193, 7, .15); color: #ffc107; }
.mod-badge.approved, .mod-badge.ready { background: rgba(40, 167, 69, .18); color: #51cf66; }
.mod-badge.rejected { background: rgba(220, 53, 69, .18); color: #ff6b6b; }

/* ========== Модерация: раскрывающиеся серии ========== */
.mod-eps-details {
    border-top: 1px dashed rgba(255, 255, 255, .09);
    background: rgba(0, 0, 0, .18);
}
.mod-eps-summary {
    cursor: pointer;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #8b90a5;
    display: flex;
    align-items: center;
    gap: 8px;
    user-select: none;
    list-style: none;
    transition: color .2s;
}
.mod-eps-summary::-webkit-details-marker { display: none; }
.mod-eps-summary:hover { color: #a29af8; }
.mod-eps-arrow { margin-left: auto; transition: transform .2s; }
.mod-eps-details[open] .mod-eps-arrow { transform: rotate(180deg); }
.mod-card .mod-eps { border-top: none; padding: 0 16px 12px; background: transparent; }

/* ========== Кликабельные жанры ========== */
.genre-link {
    color: #8d7ff5;
    text-decoration: none;
    border-bottom: 1px dashed rgba(141, 127, 245, .4);
    transition: color .2s, border-color .2s;
}
.genre-link:hover {
    color: #a29af8;
    border-bottom-color: transparent;
}
/* Цвета ролей в профиле */
.profile-avatar.avatar-admin { border-color:#e53935 !important; box-shadow:0 0 0 3px rgba(229,57,53,.35); }
.profile-avatar.avatar-founder { border-color:#000 !important; box-shadow:0 0 0 3px #000, 0 0 14px rgba(0,0,0,.9); }
.p-badge-founder { background:#000 !important; color:#fff !important; border:1px solid #3a3a3a; }

/* Топ: доска и вкладки */
.top-board { background:#141a26; border:1px solid #232a3a; border-radius:14px; overflow:hidden; margin:18px 0; }
.top-board-head { display:flex; align-items:center; gap:10px; padding:12px 16px; border-bottom:1px solid #232a3a; }
.top-board-ico { width:34px; height:34px; display:flex; align-items:center; justify-content:center; background:#1d2534; border:1px solid #2a3345; border-radius:10px; }
.top-board-title { font-weight:700; font-size:18px; }
.top-tabs { display:flex; gap:6px; flex-wrap:wrap; padding:10px 12px; }
.top-tab { background:transparent; border:0; color:#8f98ab; font-weight:600; font-size:14px; cursor:pointer; padding:8px 12px; border-radius:10px; }
.top-tab:hover { color:#dfe4ee; }
.top-tab.active { color:#fff; background:#232a3a; }

/* Расписание: не растягивать, скролл внутри дня */
.schedule-grid { align-items: start; }
.schedule-day { height: 236px; max-height: 236px; overflow-y: auto; scrollbar-width: thin; }
.schedule-day::-webkit-scrollbar { width: 6px; }
.schedule-day::-webkit-scrollbar-thumb { background: #2c3345; border-radius: 3px; }
.schedule-grid > * { height: 236px; max-height: 236px; overflow-y: auto; scrollbar-width: thin; }
.schedule-grid > *::-webkit-scrollbar { width: 6px; }
.schedule-grid > *::-webkit-scrollbar-thumb { background: #2c3345; border-radius: 3px; }
body { overflow-x: hidden; }

/* Скроллбар страницы: виден только при прокрутке */
html { scrollbar-width: thin; scrollbar-color: transparent transparent; }
html.is-scrolling { scrollbar-color: #7c6fff #0e1116; }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: transparent; border-radius: 5px; }
html.is-scrolling::-webkit-scrollbar-thumb { background: #7c6fff; }

/* ===== FIXED PLAYER SIZE: всегда 16:9, видео вписывается с letterbox ===== */
.plyr {
    aspect-ratio: 16 / 9;
    max-height: 72vh;
    width: 100%;
    background: #000;
}
.plyr video {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    background: #000;
}

/* ===== FIXED PLAYER SIZE: всегда 16:9, видео вписывается с letterbox ===== */
.plyr {
    aspect-ratio: 16 / 9;
    max-height: 72vh;
    width: 100%;
    background: #000;
}
.plyr video {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    background: #000;
}

/* poster fills card */
.vh-poster { height: 100%; }
.vh-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* poster fill v2 */
.vh-poster { height: 100%; min-height: 0; }
.vh-poster img { width: 100% !important; height: 100% !important; object-fit: cover !important; display: block; }

/* PERF: stop infinite repaints */
/* Мерцающие звёзды */

.bg-fx::before { animation: none !important; }
/* Лунное свечение */

.bg-fx::after { animation: none !important; }
.sub-active-crown { animation: none !important; }
.sub-active-crown { animation: none !important; }
.nav-bell.has-unread svg { animation: none !important; }

/* PERF cards */
.vcard { content-visibility: auto; contain-intrinsic-size: auto 320px; }
.vcard:hover { transform: none; }
.vcard:hover img { transform: none; }
.vcard img { transition: none !important; }

/* FAV ROWS */
.fav-grid > a:nth-child(n+7) { display: none; }
.fav-wrap.expanded .fav-grid > a:nth-child(n+7) { display: flex; }
.fav-show-all {
    display: block;
    margin: 16px auto 0;
    padding: 10px 24px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.15);
    color: var(--text, #fff);
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    transition: background .2s;
}
.fav-show-all:hover { background: rgba(255,255,255,.15); }

a.fav-show-all { display: block; width: max-content; text-decoration: none; text-align: center; }


/* ===== panels final ===== */
.home-duo{display:grid;grid-template-columns:1fr 1fr;gap:16px;align-items:start}
@media (max-width:980px){.home-duo{grid-template-columns:1fr}}
.lv-panel{background:var(--card);border:1px solid var(--border);border-radius:12px;overflow:hidden}
.lv-row{display:flex;align-items:center;gap:10px;padding:9px 14px;border-top:1px solid var(--border);text-decoration:none;color:inherit}
.lv-row:first-child{border-top:0}
.lv-row:hover{background:var(--hover)}
.lv-row.today{background:rgba(124,93,250,.08)}
.lv-day{font-weight:600;font-size:13px;min-width:96px}
.lv-date{font-size:12px;min-width:60px}
.lv-right{margin-left:auto;text-align:right;font-size:12px;display:flex;flex-direction:column;gap:2px}
.lv-rel{color:var(--text);text-decoration:none}
.lv-rel b{color:var(--accent);font-weight:600}
.lv-rel:hover{text-decoration:underline}
.lv-dot{width:8px;height:8px;border-radius:50%;flex:0 0 auto}
.d-t{background:#7c5dfa}
.d-e{background:#2dd4bf}
.lv-main{display:flex;flex-direction:column;min-width:0}
.lv-t{font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.lv-s{font-size:12px}
.lv-time{margin-left:auto;font-size:12px;white-space:nowrap}
/* panels equal */
.home-duo{align-items:stretch}
.home-duo>.home-section{display:flex;flex-direction:column;margin:0}
.home-duo .lv-panel{flex:1;display:flex;flex-direction:column}
.home-duo .lv-row{flex:1}

/* panels polish */
.home-duo .home-section-head{padding-bottom:8px;border-bottom:2px solid var(--accent);margin-bottom:10px}
.home-duo .lv-row.today .lv-day{color:var(--accent)}
.home-duo .lv-rel b{background:rgba(124,93,250,.15);color:var(--accent);padding:2px 8px;border-radius:6px}
.home-duo .lv-right{align-items:flex-end}
.home-duo .lv-panel{box-shadow:0 4px 16px rgba(0,0,0,.25)}

/* panels polish2 */
.home-duo{margin-top:30px}
.home-duo .home-section-head h2{font-size:18px}
.home-duo .lv-row{padding:11px 16px}
.home-duo .lv-panel{border-radius:14px}
.home-duo .muted{opacity:.6}

/* panels polish3 */
.home-duo .lv-row{padding:12px 18px}
.home-duo .lv-day{font-weight:700;font-size:13.5px}
.home-duo .lv-dot{box-shadow:0 0 8px currentColor}
.home-duo .d-t{color:#7c5dfa}
.home-duo .d-e{color:#2dd4bf}
.home-duo .home-section-head .link-btn{font-size:12px;opacity:.8}
.home-duo .lv-row.today{box-shadow:inset 3px 0 0 var(--accent)}
.home-duo .lv-t{font-weight:600}

/* upd-page2 */
.upd-hero{background:linear-gradient(135deg,rgba(124,93,250,.18),rgba(45,212,191,.08));border:1px solid var(--border);border-radius:16px;padding:22px 24px}
.upd-hero h1{margin:0 0 6px;font-size:24px}
.upd-hero p{margin:0;font-size:13px}
.upd-day{display:flex;align-items:center;gap:8px;margin:16px 0 8px}
.upd-day b{background:var(--accent);color:#fff;padding:3px 12px;border-radius:999px;font-size:12px;font-weight:600}
.upd-day span{font-size:12px}
.upd-right{margin-left:auto;display:flex;flex-direction:column;align-items:flex-end;gap:4px}
.upd-pill{font-size:11px;padding:2px 9px;border-radius:999px;border:1px solid}
.pill-e{color:#2dd4bf;border-color:rgba(45,212,191,.4)}
.pill-t{color:#7c5dfa;border-color:rgba(124,93,250,.4)}
.upd-thumb{width:40px;height:56px;object-fit:cover;border-radius:8px;flex:0 0 auto}

/* upd-page3 */
.upd-stats{display:flex;gap:10px;margin-top:14px;flex-wrap:wrap}
.upd-stat{background:rgba(255,255,255,.06);border:1px solid var(--border);padding:6px 12px;border-radius:10px;font-size:12px}
.upd-stat b{color:var(--accent);font-size:14px;margin-right:4px}
.lv-row{transition:background .15s}
.upd-thumb{transition:transform .2s}
.lv-row:hover .upd-thumb{transform:scale(1.06)}
@keyframes lvFade{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
.upd-wrap .lv-panel{animation:lvFade .35s ease}

/* upd-page4 */
.upd-hero{background:linear-gradient(120deg,rgba(124,93,250,.22),rgba(45,212,191,.10),rgba(124,93,250,.12));background-size:200% 200%;animation:heroGrad 8s ease infinite}
@keyframes heroGrad{0%{background-position:0% 50%}50%{background-position:100% 50%}100%{background-position:0% 50%}}
.upd-day{position:sticky;top:64px;z-index:4;background:rgba(10,10,14,.9);backdrop-filter:blur(6px);padding:6px 0;margin:14px 0 8px}
.lv-row.is-today .lv-dot{animation:dotPulse 1.6s infinite}
@keyframes dotPulse{0%{box-shadow:0 0 0 0 rgba(45,212,191,.5)}70%{box-shadow:0 0 0 8px rgba(45,212,191,0)}100%{box-shadow:0 0 0 0 rgba(45,212,191,0)}}
.upd-pill{display:inline-flex;align-items:center;gap:4px}

/* upd-page5 */
.upd-wrap .lv-main{align-items:flex-start;gap:5px}
.upd-wrap .lv-pill,.upd-wrap .upd-pill{font-size:10.5px;padding:2px 8px}
.upd-wrap .lv-time{margin-left:auto;align-self:center;font-size:12px}

/* upd-page6 */
.upd-day{position:static;backdrop-filter:none;background:transparent}
.upd-hero{animation:none}
.upd-right{flex-direction:row;align-items:center;gap:12px}
.upd-right .lv-time{margin-left:0}

/* lv-rel-b */
.home-duo .lv-rel b{margin-right:8px}


/* vcard-new-home */
.vcard-new{display:none}
.home-new .vcard{transition:transform .25s,box-shadow .25s,border-color .25s}
.home-new .vcard:hover{transform:translateY(-4px);box-shadow:0 10px 30px rgba(0,0,0,.35);border-color:rgba(124,93,250,.4)}
.home-new .vcard-thumb img{transition:transform .4s}
.home-new .vcard:hover .vcard-thumb img{transform:scale(1.06)}
.home-new .vcard-new{display:block;position:absolute;top:10px;left:10px;background:#2dd4bf;color:#0a0a0e;font-size:11px;font-weight:700;padding:3px 8px;border-radius:6px;z-index:2}

/* novinki showcase */
.home-new .vcard:first-child{grid-column:1/-1;display:grid;grid-template-columns:240px minmax(0,1fr);align-items:stretch}
.home-new .vcard:first-child .vcard-thumb{aspect-ratio:auto;height:100%;min-height:260px}
.home-new .vcard:first-child .vcard-body{padding:20px 26px;justify-content:center;gap:12px}
.home-new .vcard:first-child .vcard-body::before{content:"Премьера недели";color:var(--accent);font-size:12px;font-weight:700;letter-spacing:.08em;text-transform:uppercase}
.home-new .vcard:first-child .vcard-title{font-size:22px}
.home-new .vcard:first-child .vcard-meta{font-size:13px}
@media (max-width:700px){.home-new .vcard:first-child{grid-template-columns:1fr}.home-new .vcard:first-child .vcard-thumb{aspect-ratio:2/3;min-height:0}}

/* rels tidy */
.home-duo .lv-right{gap:6px;align-items:stretch}
.home-duo .lv-rel{display:grid;grid-template-columns:auto minmax(0,1fr);gap:8px;align-items:center;justify-items:start}
.home-duo .lv-rel b{margin-right:0}



/* avatar rings */
@keyframes ringPulse{0%,100%{box-shadow:0 0 0 3px #0b0d12,0 0 0 5px #f1c40f,0 0 22px rgba(241,196,15,.55)}50%{box-shadow:0 0 0 3px #0b0d12,0 0 0 5px #f1c40f,0 0 34px rgba(241,196,15,.8)}}
.avatar-premium{border-color:#f1c40f!important;animation:ringPulse 2.5s ease infinite}
.comment-premium .comment-avatar{box-shadow:0 0 0 2px #0b0d12,0 0 0 4px #f1c40f,0 0 14px rgba(241,196,15,.5)}
.comment-sub .comment-avatar{box-shadow:0 0 0 2px #0b0d12,0 0 0 4px #7c5dfa,0 0 14px rgba(124,93,250,.5)}

@keyframes ringPulseViolet{0%,100%{box-shadow:0 0 0 3px #0b0d12,0 0 0 5px #7c5dfa,0 0 22px rgba(124,93,250,.55)}50%{box-shadow:0 0 0 3px #0b0d12,0 0 0 5px #7c5dfa,0 0 34px rgba(124,93,250,.8)}}
.avatar-basic{border-color:#7c5dfa!important;animation:ringPulseViolet 2.5s ease infinite}

/* no violet */
.comment-sub .comment-avatar{box-shadow:none!important;animation:none!important;border:2px solid var(--border)!important;background:var(--card)!important}

.cbadge{font-size:10px;padding:2px 8px;border-radius:999px;border:1px solid;margin-left:6px;vertical-align:middle;font-weight:600}
.cbadge-basic{color:#7c5dfa;border-color:rgba(124,93,250,.5)}
.cbadge-vip{color:#f1c40f;border-color:rgba(241,196,15,.5)}

.p-badge-xp{border-color:rgba(45,212,191,.5);color:#2dd4bf}

/* выравнивание кнопок тарифов по низу карточек */
.plans-grid { align-items: stretch; }
.plan-card { display: flex; flex-direction: column; height: 100%; }
.plan-card form, .plan-card .plan-btn-fake { margin-top: auto; }

/* ========== Лайки/Дизлайки комментариев ========== */
.comment-vote-group {
    display: inline-flex;
    gap: 4px;
    align-items: center;
}

.vote-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border: none;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted, #888);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 13px;
    font-weight: 500;
}

.vote-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary, #fff);
}

.vote-btn.active {
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent, #6366f1);
}

.vote-btn.vote-like.active {
    color: #10b981;
}

.vote-btn.vote-dislike.active {
    color: #ef4444;
}

.vote-btn svg {
    width: 16px;
    height: 16px;
}

.vote-count {
    min-width: 16px;
    text-align: center;
}
