:root {
    --bg: #f8fafc;
    --paper: #ffffff;
    --ink: #111827;
    --muted: #6b7280;
    --soft: #f3f4f6;
    --line: #e5e7eb;
    --dark: #111827;
    --dark-2: #1f2937;
    --accent: #2563eb;
    --accent-2: #7c3aed;
    --radius: 22px;
    --shadow: 0 18px 60px rgba(15, 23, 42, 0.12);
    --shadow-soft: 0 10px 32px rgba(15, 23, 42, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 45%, #f8fafc 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.7;
}

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

img,
video {
    max-width: 100%;
}

.container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.86);
    border-bottom: 1px solid rgba(229, 231, 235, 0.85);
    backdrop-filter: blur(18px);
}

.site-header__inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 26px;
    min-height: 72px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.logo span {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: white;
    border-radius: 15px;
    background: linear-gradient(135deg, var(--dark), var(--accent-2));
    box-shadow: var(--shadow-soft);
}

.logo strong {
    font-size: 18px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.main-nav a {
    padding: 8px 12px;
    color: #4b5563;
    border-radius: 999px;
    font-size: 14px;
    transition: 0.2s ease;
}

.main-nav a:hover,
.main-nav a.is-active {
    color: #111827;
    background: #f3f4f6;
}

.quick-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
}

.quick-search input,
.filter-bar input {
    width: 230px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ink);
    font: inherit;
}

.quick-search button,
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.quick-search button {
    padding: 8px 14px;
    color: white;
    background: var(--dark);
}

.btn {
    padding: 12px 20px;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn--primary {
    color: white;
    background: linear-gradient(135deg, var(--dark), var(--accent));
    box-shadow: var(--shadow-soft);
}

.btn--ghost {
    color: white;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.24);
}

.btn--ghost-dark {
    color: #111827;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
    color: #64748b;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero {
    position: relative;
    min-height: 540px;
    background: var(--dark);
    overflow: hidden;
}

.hero-slide {
    display: none;
    position: relative;
    min-height: 540px;
}

.hero-slide.is-active {
    display: block;
}

.hero-slide__backdrop {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 78% 22%, rgba(255, 255, 255, 0.18), transparent 25%),
        linear-gradient(120deg, rgba(17, 24, 39, 0.92), rgba(17, 24, 39, 0.70)),
        linear-gradient(135deg, var(--poster-a), var(--poster-b));
}

.hero-slide__backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(90deg, #000, transparent 82%);
}

.hero-slide__content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    align-items: center;
    gap: 70px;
    min-height: 540px;
    color: white;
}

.hero-copy h1 {
    margin: 0 0 18px;
    max-width: 760px;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.06em;
}

.hero-copy p {
    max-width: 720px;
    margin: 0 0 26px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
}

.hero-actions,
.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hero-meta {
    margin-top: 20px;
    color: rgba(255, 255, 255, 0.76);
    font-size: 14px;
}

.hero-meta span {
    padding: 7px 12px;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
}

.hero-poster {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 430px;
    padding: 28px;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.20);
    border-radius: 30px;
    background:
        radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.24), transparent 32%),
        linear-gradient(145deg, var(--poster-a), var(--poster-b));
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.36);
    transform: rotate(2deg);
}

.hero-poster span {
    align-self: flex-start;
    padding: 6px 10px;
    margin-bottom: auto;
    color: #111827;
    background: white;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.hero-poster strong {
    font-size: 30px;
    line-height: 1.16;
}

.hero-poster em {
    margin-top: 12px;
    color: rgba(255, 255, 255, 0.82);
    font-style: normal;
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 24px;
    z-index: 4;
    display: flex;
    gap: 10px;
    transform: translateX(-50%);
}

.hero-dots button {
    width: 34px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.32);
    color: transparent;
    cursor: pointer;
}

.hero-dots button.is-active {
    width: 54px;
    background: white;
}

.section {
    padding: 72px 0;
}

.section--soft {
    background: #f8fafc;
}

.section--intro {
    padding: 46px 0;
}

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

.section-head h2,
.page-hero h1,
.rank-copy h2,
.intro-panel h2 {
    margin: 0 0 10px;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.15;
    letter-spacing: -0.04em;
}

.section-head p,
.page-hero p,
.rank-copy p,
.intro-panel p {
    margin: 0;
    color: var(--muted);
}

.text-link {
    color: var(--accent);
    font-weight: 800;
}

.intro-panel {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 34px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid #e5e7eb;
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
}

.channel-pills {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.channel-pills a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    font-weight: 800;
}

.channel-pills span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.movie-grid {
    display: grid;
    gap: 22px;
}

.movie-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.movie-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: white;
    border: 1px solid rgba(229, 231, 235, 0.95);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(37, 99, 235, 0.28);
    box-shadow: var(--shadow);
}

.movie-card.is-hidden {
    display: none;
}

.movie-card__poster {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 245px;
    padding: 18px;
    color: white;
    background:
        radial-gradient(circle at 72% 18%, rgba(255, 255, 255, 0.30), transparent 28%),
        linear-gradient(140deg, var(--poster-a), var(--poster-b));
    overflow: hidden;
}

.movie-card__poster::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 20%, rgba(0, 0, 0, 0.62) 100%);
}

.movie-card__poster strong,
.movie-card__poster span {
    position: relative;
    z-index: 2;
}

.movie-card__poster strong {
    font-size: 22px;
    line-height: 1.18;
    letter-spacing: -0.03em;
}

.movie-card__badge,
.movie-card__type {
    position: absolute;
    top: 14px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    color: #111827;
    font-size: 12px;
    font-weight: 900;
}

.movie-card__badge {
    left: 14px;
}

.movie-card__type {
    right: 14px;
}

.movie-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 18px;
}

.movie-card__meta,
.detail-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
}

.movie-card h3 {
    margin: 10px 0 8px;
    font-size: 19px;
    line-height: 1.25;
}

.movie-card p {
    flex: 1;
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 14px;
}

.movie-card__tags,
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.movie-card__tags span,
.tag {
    padding: 5px 9px;
    color: #475569;
    background: #f1f5f9;
    border-radius: 999px;
    font-size: 12px;
}

.section--rank {
    color: white;
    background:
        radial-gradient(circle at 18% 0%, rgba(37, 99, 235, 0.30), transparent 34%),
        linear-gradient(135deg, #111827, #1f2937);
}

.rank-layout {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 38px;
    align-items: start;
}

.rank-copy .eyebrow,
.page-hero--dark .eyebrow {
    color: rgba(255, 255, 255, 0.70);
}

.rank-copy p {
    color: rgba(255, 255, 255, 0.74);
    margin-bottom: 24px;
}

.rank-list {
    display: grid;
    gap: 10px;
}

.rank-row {
    display: grid;
    grid-template-columns: 54px 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 14px;
    color: #111827;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: 18px;
    transition: transform 0.2s ease, background 0.2s ease;
}

.rank-row:hover {
    transform: translateX(4px);
    background: white;
}

.rank-row__num {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    color: white;
    background: linear-gradient(135deg, var(--dark), var(--accent));
    border-radius: 14px;
    font-weight: 900;
}

.rank-row__main {
    display: grid;
    min-width: 0;
}

.rank-row__main strong {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank-row__main em {
    overflow: hidden;
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank-row__score {
    display: grid;
    justify-items: end;
    color: var(--muted);
    font-size: 12px;
}

.rank-row__score b {
    color: var(--accent);
    font-size: 18px;
}

.rank-list--full .rank-row,
.rank-list--compact .rank-row {
    color: #111827;
    background: white;
    border-color: #e5e7eb;
}

.rank-list--compact .rank-row {
    grid-template-columns: 42px 1fr;
}

.rank-list--compact .rank-row__score {
    display: none;
}

.rank-list--compact .rank-row__num {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    font-size: 12px;
}

.page-hero {
    padding: 80px 0 58px;
    background:
        radial-gradient(circle at 76% 16%, rgba(37, 99, 235, 0.12), transparent 32%),
        linear-gradient(180deg, #ffffff, #f8fafc);
    border-bottom: 1px solid #e5e7eb;
}

.page-hero--dark {
    color: white;
    background:
        radial-gradient(circle at 78% 20%, rgba(124, 58, 237, 0.34), transparent 32%),
        linear-gradient(135deg, #111827, #1f2937);
}

.page-hero--dark p {
    color: rgba(255, 255, 255, 0.75);
}

.year-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.year-strip span {
    padding: 7px 11px;
    color: #475569;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    font-size: 13px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.category-card {
    display: grid;
    gap: 20px;
    padding: 28px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
}

.category-card h2 {
    margin: 0 0 8px;
    font-size: 28px;
}

.category-card p {
    margin: 0;
    color: var(--muted);
}

.category-card__links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.category-card__links a,
.side-link {
    display: inline-flex;
    padding: 8px 12px;
    color: #475569;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    font-size: 13px;
}

.filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    padding: 14px 18px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    box-shadow: var(--shadow-soft);
}

.filter-bar input {
    width: min(520px, 100%);
}

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

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
    padding-top: 36px;
    padding-bottom: 58px;
}

.player-panel,
.detail-sidebar {
    display: grid;
    gap: 22px;
    align-content: start;
}

.player {
    position: relative;
    overflow: hidden;
    background: #05070b;
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.player__video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #05070b;
}

.player__overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 12px;
    color: white;
    background:
        radial-gradient(circle at 50% 35%, rgba(37, 99, 235, 0.22), transparent 28%),
        linear-gradient(180deg, rgba(5, 7, 11, 0.22), rgba(5, 7, 11, 0.74));
    border: 0;
    cursor: pointer;
    text-align: center;
}

.player.is-playing .player__overlay {
    opacity: 0;
    pointer-events: none;
}

.play-icon {
    display: grid;
    place-items: center;
    width: 72px;
    height: 72px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 50%;
    backdrop-filter: blur(12px);
}

.player__overlay strong {
    font-size: 22px;
}

.player__overlay em {
    color: rgba(255, 255, 255, 0.72);
    font-style: normal;
}

.player__message {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 14px;
    margin: 0;
    color: #fecaca;
    text-align: center;
    font-size: 14px;
}

.detail-title {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 18px;
}

.detail-title h1 {
    margin: 0;
    font-size: clamp(30px, 5vw, 52px);
    line-height: 1.1;
    letter-spacing: -0.05em;
}

.detail-stats span {
    padding: 7px 11px;
    background: #f1f5f9;
    border-radius: 999px;
}

.content-card {
    padding: 24px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
}

.content-card h2 {
    margin: 0 0 14px;
    font-size: 22px;
}

.content-card p {
    margin: 0 0 14px;
    color: #374151;
}

.content-card p:last-child {
    margin-bottom: 0;
}

.side-link {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    border-radius: 14px;
}

.site-footer {
    padding: 44px 0;
    color: #cbd5e1;
    background: #0f172a;
}

.site-footer__inner {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 20px;
    align-items: start;
}

.site-footer p {
    margin: 8px 0 0;
    color: #94a3b8;
}

.site-footer__links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.site-footer__links a {
    color: #e2e8f0;
}

.site-footer small {
    grid-column: 1 / -1;
    color: #64748b;
}

@media (max-width: 980px) {
    .site-header__inner,
    .hero-slide__content,
    .intro-panel,
    .rank-layout,
    .detail-layout,
    .site-footer__inner {
        grid-template-columns: 1fr;
    }

    .quick-search {
        width: 100%;
    }

    .quick-search input {
        width: 100%;
    }

    .movie-grid--3,
    .movie-grid--4,
    .category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero-poster {
        min-height: 280px;
        transform: none;
    }
}

@media (max-width: 640px) {
    .container {
        width: min(100% - 22px, 1180px);
    }

    .site-header__inner {
        gap: 14px;
        padding: 12px 0;
    }

    .main-nav {
        overflow-x: auto;
    }

    .hero,
    .hero-slide,
    .hero-slide__content {
        min-height: auto;
    }

    .hero-slide__content {
        padding-top: 46px;
        padding-bottom: 70px;
    }

    .hero-copy h1 {
        font-size: 38px;
    }

    .section {
        padding: 48px 0;
    }

    .section-head,
    .detail-title,
    .filter-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .movie-grid--3,
    .movie-grid--4,
    .category-grid,
    .channel-pills {
        grid-template-columns: 1fr;
    }

    .rank-row {
        grid-template-columns: 42px 1fr;
    }

    .rank-row__score {
        grid-column: 2;
        justify-items: start;
    }
}
