:root {
    --bg: #05070b;
    --bg-soft: #0c111b;
    --panel: rgba(16, 23, 36, 0.88);
    --panel-strong: #121b2b;
    --line: rgba(255, 255, 255, 0.08);
    --text: #f4f8ff;
    --muted: rgba(228, 235, 247, 0.66);
    --dim: rgba(228, 235, 247, 0.42);
    --accent: #19d39b;
    --accent-soft: rgba(25, 211, 155, 0.14);
    --accent-alt: #48b8ff;
    --danger: #ff6f91;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
    --radius: 22px;
    --radius-sm: 14px;
    --content-width: min(1440px, calc(100vw - 48px));
}

* {
    box-sizing: border-box;
}

html {
    background: var(--bg);
}

body {
    margin: 0;
    color: var(--text);
    font: 16px/1.6 "Poppins", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(31, 101, 255, 0.18), transparent 34%),
        radial-gradient(circle at top right, rgba(25, 211, 155, 0.12), transparent 30%),
        linear-gradient(180deg, #060910 0%, #070b11 40%, #04060a 100%);
    min-height: 100vh;
}

body::before,
body::after {
    content: "";
    position: fixed;
    z-index: -1;
    inset: auto;
    border-radius: 999px;
    filter: blur(80px);
    pointer-events: none;
}

body::before {
    width: 22rem;
    height: 22rem;
    top: 4rem;
    left: -8rem;
    background: rgba(72, 184, 255, 0.18);
}

body::after {
    width: 20rem;
    height: 20rem;
    right: -8rem;
    bottom: 10rem;
    background: rgba(25, 211, 155, 0.16);
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

button,
input,
textarea,
select {
    font: inherit;
}

.site-shell {
    width: var(--content-width);
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    backdrop-filter: blur(20px);
    background: linear-gradient(180deg, rgba(3, 6, 12, 0.92), rgba(3, 6, 12, 0.68));
    border-bottom: 1px solid var(--line);
}

.site-header__inner {
    width: var(--content-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 24px;
    align-items: center;
    padding: 18px 0;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background:
        linear-gradient(135deg, rgba(25, 211, 155, 1), rgba(72, 184, 255, 1));
    position: relative;
    box-shadow: 0 16px 32px rgba(25, 211, 155, 0.28);
}

.brand-mark::before,
.brand-mark::after {
    content: "";
    position: absolute;
    inset: 11px;
    border-radius: 999px 999px 999px 5px;
}

.brand-mark::before {
    background: rgba(5, 7, 11, 0.88);
}

.brand-mark::after {
    inset: 14px 12px 14px 16px;
    background: linear-gradient(135deg, rgba(25, 211, 155, 1), rgba(72, 184, 255, 1));
    clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.brand-title {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.brand-title strong {
    font-size: 18px;
    line-height: 1.1;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.brand-title span {
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 0.06em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.channel-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.channel-nav::-webkit-scrollbar {
    display: none;
}

.nav-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    padding: 10px 16px;
    border-radius: 999px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
    transition: 180ms ease;
}

.nav-chip:hover,
.nav-chip.is-active {
    color: var(--text);
    border-color: rgba(25, 211, 155, 0.32);
    background: rgba(25, 211, 155, 0.12);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    cursor: pointer;
}

.search-form {
    position: relative;
}

.search-box {
    width: min(420px, 42vw);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.search-box input {
    flex: 1;
    color: var(--text);
    background: transparent;
    border: 0;
    outline: 0;
    min-width: 0;
}

.search-box button {
    border: 0;
    border-radius: 999px;
    padding: 9px 14px;
    color: #03110d;
    background: linear-gradient(135deg, var(--accent), #84f2cf);
    cursor: pointer;
    font-weight: 600;
}

.search-box button:hover {
    transform: translateY(-1px);
}

.search-icon {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.82);
    border-radius: 50%;
    position: relative;
    flex: none;
}

.search-icon::after {
    content: "";
    position: absolute;
    width: 7px;
    height: 2px;
    background: rgba(255, 255, 255, 0.82);
    right: -5px;
    bottom: -1px;
    transform: rotate(45deg);
    border-radius: 2px;
}

.search-suggest {
    display: none;
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    width: 100%;
    padding: 10px;
    border-radius: 20px;
    background: rgba(8, 12, 19, 0.96);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.search-suggest.is-open {
    display: block;
}

.suggest-item {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 12px;
    padding: 10px;
    border-radius: 14px;
    align-items: center;
}

.suggest-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.suggest-item img {
    width: 56px;
    height: 72px;
    object-fit: cover;
    border-radius: 10px;
    background: #111827;
}

.suggest-item small {
    color: var(--dim);
}

.header-user {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px 8px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.header-user img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.header-user span {
    color: var(--muted);
    font-size: 14px;
}

.header-user strong {
    display: block;
    color: var(--text);
    font-size: 14px;
}

.mobile-panel {
    display: none;
    width: var(--content-width);
    margin: 0 auto 16px;
    padding: 16px;
    border-radius: 20px;
    background: rgba(8, 12, 19, 0.92);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.mobile-panel.is-open {
    display: grid;
    gap: 12px;
}

.mobile-panel .channel-nav {
    flex-wrap: wrap;
    overflow: visible;
}

.page-main {
    padding: 26px 0 88px;
}

.section {
    margin-top: 34px;
    padding: 22px;
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(13, 19, 30, 0.92), rgba(10, 14, 24, 0.88));
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 460ms ease, transform 460ms ease;
}

.section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.section--compact {
    padding: 18px;
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.section-head h2,
.section-head h1 {
    margin: 0;
    font-size: clamp(24px, 3vw, 32px);
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.section-head p {
    margin: 6px 0 0;
    color: var(--muted);
}

.section-link {
    color: var(--accent);
    white-space: nowrap;
}

.hero-slide img,
.mini-card img,
.video-card__thumb img,
.poster-card img,
.topic-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-slide::after,
.mini-card::after,
.video-card__thumb::after,
.topic-card::after,
.poster-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2, 4, 9, 0.08), rgba(2, 4, 9, 0.72) 68%, rgba(2, 4, 9, 0.94));
    pointer-events: none;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: rgba(25, 211, 155, 0.16);
    color: #9ff6d9;
}

.hero-actions {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 13px 18px;
    border-radius: 999px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: 180ms ease;
}

.button {
    color: #03110d;
    background: linear-gradient(135deg, var(--accent), #8ef2d2);
    font-weight: 700;
}

.ghost-button {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.08);
}

.button:hover,
.ghost-button:hover,
.filter-chip:hover,
.tag-chip:hover {
    transform: translateY(-1px);
}

.hero-carousel {
    display: grid;
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(13, 19, 30, 1), rgba(8, 11, 18, 1));
}

.hero-carousel__viewport {
    overflow: hidden;
    height: clamp(220px, 32vw, 320px);
}

.hero-carousel__track {
    display: flex;
    transition: transform 360ms ease;
    will-change: transform;
}

.hero-slide {
    position: relative;
    flex: 0 0 100%;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.hero-slide__content {
    position: absolute;
    z-index: 2;
    inset: auto 0 0 0;
    padding: 18px 22px 22px;
}

.hero-slide h2 {
    margin: 8px 0 6px;
    font-size: clamp(20px, 2.3vw, 30px);
    line-height: 1.04;
    max-width: 12ch;
}

.hero-slide p {
    margin: 0;
    max-width: 46ch;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

.hero-carousel__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: rgba(6, 9, 16, 0.62);
    color: var(--text);
    cursor: pointer;
    backdrop-filter: blur(12px);
}

.hero-carousel__nav::before {
    content: "";
    position: absolute;
    inset: 0;
    margin: auto;
    width: 10px;
    height: 10px;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
}

.hero-carousel__nav--prev {
    left: 14px;
}

.hero-carousel__nav--prev::before {
    transform: rotate(-135deg);
    left: 3px;
}

.hero-carousel__nav--next {
    right: 14px;
}

.hero-carousel__nav--next::before {
    transform: rotate(45deg);
    right: 3px;
}

.hero-carousel__dots {
    position: absolute;
    right: 18px;
    bottom: 74px;
    z-index: 3;
    display: flex;
    gap: 8px;
}

.hero-carousel__dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 50%;
    padding: 0;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.26);
}

.hero-carousel__dot.is-active {
    background: var(--accent);
}

.hero-carousel__thumbs {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    padding: 10px;
    background: rgba(4, 8, 14, 0.88);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.hero-carousel__thumb {
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    color: var(--muted);
    padding: 10px 12px;
    text-align: left;
    cursor: pointer;
    min-height: 58px;
}

.hero-carousel__thumb strong,
.hero-carousel__thumb span {
    display: block;
}

.hero-carousel__thumb strong {
    color: var(--text);
    font-size: 13px;
    line-height: 1.3;
}

.hero-carousel__thumb span {
    margin-top: 2px;
    font-size: 11px;
}

.hero-carousel__thumb.is-active {
    border-color: rgba(25, 211, 155, 0.36);
    background: rgba(25, 211, 155, 0.12);
}

.mini-card {
    position: relative;
    min-height: 158px;
    border-radius: 22px;
    overflow: hidden;
}

.mini-card__body {
    position: absolute;
    z-index: 2;
    inset: auto 0 0 0;
    padding: 20px;
}

.mini-card__body h3 {
    margin: 0 0 6px;
    font-size: 20px;
    line-height: 1.15;
}

.mini-card__body p {
    margin: 0;
    color: var(--muted);
}

.meta-row,
.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.meta-row {
    margin-top: 14px;
    color: var(--muted);
    font-size: 14px;
}

.tag-chip,
.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: var(--muted);
}

.tag-chip.is-active,
.filter-chip.is-active {
    color: var(--text);
    border-color: rgba(25, 211, 155, 0.36);
    background: rgba(25, 211, 155, 0.14);
}

.shelf-grid,
.video-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 18px;
}

.video-card,
.poster-card,
.topic-card {
    display: block;
}

.video-card__thumb,
.poster-card__thumb,
.topic-card__thumb {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    background: linear-gradient(180deg, #0d1119, #0b0f17);
}

.video-card__thumb {
    aspect-ratio: 0.72 / 1;
}

.poster-card__thumb {
    aspect-ratio: 16 / 9;
}

.topic-card__thumb {
    aspect-ratio: 1.55 / 1;
}

.badge {
    position: absolute;
    z-index: 2;
    left: 12px;
    top: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(3, 7, 12, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 12px;
}

.badge--score {
    left: auto;
    right: 12px;
    color: #ffdf7d;
}

.play-pill {
    position: absolute;
    z-index: 2;
    right: 12px;
    bottom: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(25, 211, 155, 0.18);
    border: 1px solid rgba(25, 211, 155, 0.28);
}

.play-pill::before {
    content: "";
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 13px solid #9ff6d9;
    margin-left: 4px;
}

.video-card h3,
.poster-card h3,
.topic-card h3 {
    margin: 12px 0 6px;
    font-size: 17px;
    line-height: 1.32;
}

.video-card p,
.poster-card p,
.topic-card p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.rank-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
    gap: 22px;
}

.rank-list,
.panel-list {
    display: grid;
    gap: 12px;
}

.rank-item,
.panel-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.rank-item strong,
.panel-item strong {
    color: var(--text);
}

.rank-item small,
.panel-item small {
    color: var(--dim);
    display: block;
}

.rank-index {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(25, 211, 155, 0.12);
    color: #9ff6d9;
    font-weight: 700;
}

.channel-shelves {
    display: grid;
    gap: 22px;
}

.split-card {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 20px;
    padding: 18px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.split-card__lead {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    min-height: 280px;
    background: #0c1118;
}

.split-card__lead::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2, 4, 9, 0.18), rgba(2, 4, 9, 0.88));
}

.split-card__lead > div {
    position: absolute;
    z-index: 2;
    inset: auto 0 0 0;
    padding: 22px;
}

.split-card__lead h3 {
    margin: 10px 0 8px;
    font-size: 28px;
    line-height: 1.05;
}

.split-card__lead p {
    margin: 0;
    color: var(--muted);
}

.split-card__content {
    display: grid;
    gap: 16px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--muted);
    margin-bottom: 16px;
    font-size: 14px;
}

.breadcrumb span {
    color: var(--dim);
}

.page-hero {
    display: grid;
    gap: 12px;
}

.page-hero h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.04;
}

.page-hero p {
    margin: 0;
    max-width: 70ch;
    color: var(--muted);
}

.filter-panel {
    display: grid;
    gap: 18px;
}

.filter-row {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.filter-row strong {
    color: var(--text);
    line-height: 38px;
}

.cards-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 22px;
}

.sidebar-panel {
    padding: 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    align-self: start;
    position: sticky;
    top: 108px;
}

.sidebar-panel h3 {
    margin: 0 0 14px;
    font-size: 20px;
}

.detail-hero {
    display: grid;
    grid-template-columns: 300px minmax(0, 1.2fr) 320px;
    gap: 26px;
    align-items: start;
}

.detail-poster {
    border-radius: 26px;
    overflow: hidden;
    aspect-ratio: 0.72 / 1;
    background: #0c1118;
    box-shadow: var(--shadow);
}

.detail-body h1 {
    margin: 0 0 12px;
    font-size: clamp(32px, 4vw, 50px);
    line-height: 1.02;
}

.detail-subtitle {
    margin: 0 0 16px;
    color: var(--muted);
    font-size: 18px;
}

.stats-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0 22px;
}

.stats-row span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--muted);
}

.detail-copy {
    color: var(--muted);
}

.detail-copy p {
    margin: 0;
}

.info-list {
    display: grid;
    gap: 12px;
}

.info-line {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 12px;
    color: var(--muted);
}

.info-line strong {
    color: var(--text);
    font-size: 14px;
}

.episode-group {
    margin-top: 20px;
}

.episode-group h3 {
    margin: 0 0 12px;
    font-size: 20px;
}

.episode-grid,
.download-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
    gap: 12px;
}

.episode-link,
.download-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 10px 12px;
    text-align: center;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--muted);
}

.episode-link.is-active,
.download-link.is-active,
.episode-link:hover,
.download-link:hover {
    color: var(--text);
    background: rgba(25, 211, 155, 0.12);
    border-color: rgba(25, 211, 155, 0.32);
}

.player-shell {
    overflow: hidden;
    border-radius: 24px;
    background: #020407;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.player-frame {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.player-frame iframe,
.player-frame .MacPlayer {
    width: 100%;
    height: 100%;
}

.player-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 22px;
}

.player-meta h1 {
    margin: 0;
    font-size: clamp(26px, 3vw, 38px);
}

.player-meta p {
    margin: 10px 0 0;
    color: var(--muted);
}

.playlist-panel {
    padding: 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    align-self: start;
}

.playlist-panel h3 {
    margin: 0 0 14px;
}

.article-layout,
.topic-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 22px;
}

.article-content {
    color: rgba(236, 240, 249, 0.86);
}

.article-content img {
    border-radius: 18px;
    margin: 18px 0;
}

.article-content p,
.article-content li {
    color: rgba(236, 240, 249, 0.86);
}

.author-box {
    padding: 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.search-banner,
.empty-state,
.password-shell,
.notice-shell {
    display: grid;
    gap: 16px;
    padding: 24px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.password-shell form {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.password-shell input {
    min-width: 240px;
    flex: 1;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 14px 16px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
    outline: 0;
}

.notice {
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(72, 184, 255, 0.08);
    border: 1px solid rgba(72, 184, 255, 0.18);
    color: #bfdeff;
}

.notice--danger {
    background: rgba(255, 111, 145, 0.08);
    border-color: rgba(255, 111, 145, 0.18);
    color: #ffc9d7;
}

.pager {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    margin-top: 24px;
}

.pager__list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.page-link,
.page-current {
    min-width: 44px;
    padding: 10px 14px;
    border-radius: 14px;
    text-align: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--muted);
}

.page-current,
.page-link:hover {
    color: var(--text);
    background: rgba(25, 211, 155, 0.12);
    border-color: rgba(25, 211, 155, 0.32);
}

.footer {
    margin-top: 40px;
    padding: 30px 0 54px;
    color: var(--dim);
}

.footer__inner {
    width: var(--content-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 20px;
    align-items: end;
}

.footer__links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.footer__links a {
    padding: 9px 13px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
}

.toast {
    position: fixed;
    left: 50%;
    bottom: 26px;
    transform: translateX(-50%) translateY(16px);
    opacity: 0;
    padding: 14px 18px;
    border-radius: 16px;
    background: rgba(8, 12, 19, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow);
    transition: 180ms ease;
    z-index: 60;
}

.toast.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.utility-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.utility-row .ghost-button {
    padding: 11px 16px;
}

.muted {
    color: var(--muted);
}

.tiny {
    font-size: 13px;
}

.align-end {
    justify-content: flex-end;
}

.centered {
    text-align: center;
}

@media (max-width: 1280px) {
    .shelf-grid,
    .video-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .detail-hero,
    .player-layout,
    .article-layout,
    .topic-layout,
    .cards-with-sidebar {
        grid-template-columns: 1fr;
    }

    .sidebar-panel,
    .playlist-panel {
        position: static;
    }
}

@media (max-width: 1080px) {
    .site-header__inner {
        grid-template-columns: auto 1fr auto;
    }

    .channel-nav {
        display: none;
    }

    .mobile-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .search-box {
        width: min(100%, 420px);
    }

    .rank-layout,
    .split-card,
    .cards-with-sidebar {
        grid-template-columns: 1fr;
    }

    .split-card__lead {
        min-height: 360px;
    }

    .shelf-grid,
    .video-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    :root {
        --content-width: min(100vw - 24px, 100%);
    }

    .site-header__inner {
        grid-template-columns: auto auto;
    }

    .search-form {
        grid-column: 1 / -1;
    }

    .header-actions {
        justify-self: end;
    }

    .section,
    .section--compact {
        padding: 18px;
    }

    .hero-carousel__thumbs {
        grid-template-columns: 1fr;
    }

    .hero-carousel__viewport {
        height: 260px;
    }

    .hero-slide h2 {
        max-width: none;
    }

    .shelf-grid,
    .video-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .detail-hero {
        grid-template-columns: 1fr;
    }

    .detail-poster {
        max-width: 280px;
    }

    .filter-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .episode-grid,
    .download-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .footer__inner {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .hero-carousel__viewport {
        height: 220px;
    }

    .hero-slide__content {
        padding: 14px 16px 18px;
    }

    .hero-slide p,
    .hero-slide .meta-row {
        display: none;
    }

    .hero-carousel__thumbs {
        display: none;
    }

    .hero-carousel__dots {
        bottom: 16px;
        right: 16px;
    }

    .header-user span {
        display: none;
    }

    .shelf-grid,
    .video-grid,
    .episode-grid,
    .download-grid {
        grid-template-columns: 1fr 1fr;
        gap: 14px;
    }

    .button,
    .ghost-button {
        width: 100%;
    }

    .hero-carousel__dots {
        bottom: 108px;
    }

    .hero-actions {
        flex-direction: row;
    }
}
