* {
    box-sizing: border-box;
}

:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-card: #111827;
    --card-border: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --primary: #0ea5e9;
    --primary-dark: #0369a1;
    --accent: #f59e0b;
    --danger: #f43f5e;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
    --radius: 22px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(circle at top left, rgba(14, 165, 233, 0.16), transparent 32rem), var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(2, 6, 23, 0.86);
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    backdrop-filter: blur(18px);
}

.header-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-mark {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    box-shadow: 0 12px 24px rgba(14, 165, 233, 0.28);
}

.brand-text {
    font-size: 20px;
}

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

.nav-link,
.mobile-nav-link {
    color: #cbd5e1;
    padding: 10px 14px;
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover {
    color: white;
    background: rgba(14, 165, 233, 0.16);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.9);
    color: white;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: white;
    border-radius: 4px;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 12px;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.96);
}

.mobile-nav.is-open {
    display: grid;
    gap: 6px;
}

.hero {
    position: relative;
    height: min(740px, 72vh);
    min-height: 560px;
    overflow: hidden;
    background: #020617;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.7s ease;
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

.hero-slide > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.62;
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(15, 23, 42, 0.88) 42%, rgba(2, 6, 23, 0.24) 100%), linear-gradient(0deg, rgba(2, 6, 23, 0.95), transparent 42%);
}

.hero-copy {
    position: absolute;
    inset: 0;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    max-width: 1180px;
    padding-right: min(44vw, 560px);
}

.hero-badge,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    color: #bae6fd;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-badge {
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(14, 165, 233, 0.22);
    border: 1px solid rgba(125, 211, 252, 0.28);
}

.hero h1,
.hero h2,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    font-size: clamp(36px, 6vw, 74px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-desc,
.page-hero p,
.intro-panel p,
.section-heading p,
.detail-one-line {
    color: #cbd5e1;
    font-size: 18px;
}

.hero-desc {
    max-width: 700px;
    margin: 18px 0 0;
}

.hero-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 22px 0;
}

.hero-meta span,
.detail-meta span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 4px 10px;
    border-radius: 999px;
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.2);
    font-size: 13px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 14px;
    border: 1px solid transparent;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 16px 28px rgba(14, 165, 233, 0.22);
}

.btn-ghost {
    color: #e2e8f0;
    border-color: rgba(148, 163, 184, 0.26);
    background: rgba(15, 23, 42, 0.66);
}

.btn-small {
    min-height: 38px;
    padding: 0 16px;
    background: rgba(14, 165, 233, 0.18);
    color: #e0f2fe;
}

.hero-search,
.search-bar-large {
    display: flex;
    width: min(100%, 560px);
    margin-top: 26px;
    padding: 8px;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.22);
}

.hero-search input,
.search-bar-large input,
.filter-panel input,
.filter-panel select {
    flex: 1;
    min-width: 0;
    color: white;
    border: 0;
    outline: 0;
    border-radius: 12px;
    background: rgba(2, 6, 23, 0.72);
    padding: 12px 14px;
}

.hero-search button,
.search-bar-large button {
    border: 0;
    margin-left: 8px;
    padding: 0 20px;
    border-radius: 12px;
    color: white;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--accent));
}

.hero-controls {
    position: absolute;
    z-index: 5;
    left: 50%;
    bottom: 26px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.16);
}

.hero-arrow,
.hero-dot {
    border: 0;
    color: white;
    background: rgba(148, 163, 184, 0.18);
}

.hero-arrow {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 28px;
    line-height: 1;
}

.hero-dots {
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 9px;
    height: 9px;
    padding: 0;
    border-radius: 999px;
}

.hero-dot.is-active {
    width: 24px;
    background: var(--primary);
}

main,
.page-main {
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.3), #020617 260px);
}

.intro-panel,
.channel-section,
.content-section,
.page-hero,
.filter-panel,
.ranking-list,
.detail-hero,
.player-section,
.detail-content,
.breadcrumb {
    width: min(1180px, calc(100% - 32px));
    margin-left: auto;
    margin-right: auto;
}

.intro-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 34px;
    margin-top: -54px;
    position: relative;
    z-index: 8;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(8, 47, 73, 0.72));
    box-shadow: var(--shadow);
}

.intro-panel h2,
.section-heading h2,
.text-panel h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 40px);
    letter-spacing: -0.03em;
}

.channel-section,
.content-section {
    padding: 72px 0 0;
}

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

.section-heading p {
    max-width: 520px;
    margin: 0;
}

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

.channel-card {
    min-height: 172px;
    padding: 22px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 20px;
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.94), rgba(12, 74, 110, 0.38));
    transition: transform 0.22s ease, border 0.22s ease, background 0.22s ease;
}

.channel-card:hover {
    transform: translateY(-5px);
    border-color: rgba(56, 189, 248, 0.5);
    background: linear-gradient(145deg, rgba(14, 165, 233, 0.22), rgba(69, 26, 3, 0.36));
}

.channel-card span {
    color: #7dd3fc;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
}

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

.channel-card p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.78);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(14, 165, 233, 0.42);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.18), rgba(245, 158, 11, 0.16)), #0f172a;
}

.poster-link img,
.detail-poster img,
.rank-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.movie-card:hover .poster-link img {
    transform: scale(1.06);
}

.card-year,
.card-score {
    position: absolute;
    top: 10px;
    padding: 4px 8px;
    border-radius: 999px;
    color: white;
    font-size: 12px;
    font-weight: 800;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(10px);
}

.card-year {
    left: 10px;
}

.card-score {
    right: 10px;
    color: #fde68a;
}

.card-body {
    padding: 14px;
}

.card-body h3 {
    margin: 0 0 8px;
    font-size: 16px;
    line-height: 1.35;
}

.card-body h3 a:hover,
.rank-content h2 a:hover {
    color: #7dd3fc;
}

.card-meta,
.card-desc {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.card-desc {
    margin-top: 8px;
    min-height: 42px;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.page-hero {
    padding: 70px 34px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 0 0 28px 28px;
    background: radial-gradient(circle at top right, rgba(14, 165, 233, 0.24), transparent 28rem), linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(2, 6, 23, 0.98));
}

.compact-hero {
    margin-top: 0;
}

.category-hero .hero-actions,
.detail-copy .hero-actions {
    margin-top: 22px;
}

.filter-panel {
    display: flex;
    gap: 14px;
    margin-top: 28px;
    padding: 18px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.72);
}

.empty-result {
    display: none;
    padding: 28px;
    text-align: center;
    color: var(--muted);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.7);
}

.empty-result.is-visible {
    display: block;
}

.ranking-list {
    display: grid;
    gap: 16px;
    padding: 42px 0 80px;
}

.rank-item {
    display: grid;
    grid-template-columns: 56px 96px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 16px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.82);
}

.rank-index {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #fff;
    font-size: 20px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary), var(--accent));
}

.rank-cover {
    display: block;
    width: 96px;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 14px;
    background: #0f172a;
}

.rank-content h2 {
    margin: 0 0 8px;
    font-size: 22px;
}

.rank-content p {
    margin: 0;
    color: #cbd5e1;
}

.breadcrumb {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 22px 0;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumb a:hover {
    color: #7dd3fc;
}

.detail-hero {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
    padding: 34px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 28px;
    background: radial-gradient(circle at top right, rgba(245, 158, 11, 0.18), transparent 22rem), rgba(15, 23, 42, 0.82);
}

.detail-poster {
    overflow: hidden;
    border-radius: 24px;
    aspect-ratio: 2 / 3;
    background: #0f172a;
    box-shadow: var(--shadow);
}

.detail-copy h1 {
    font-size: clamp(34px, 5vw, 62px);
}

.detail-one-line {
    max-width: 780px;
    margin: 16px 0 0;
}

.player-section {
    padding-top: 34px;
}

.video-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000;
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

.video-shell video {
    width: 100%;
    height: 100%;
    background: #000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 12px;
    color: white;
    border: 0;
    background: radial-gradient(circle, rgba(2, 6, 23, 0.25), rgba(2, 6, 23, 0.72));
    font-size: 18px;
    font-weight: 900;
    cursor: pointer;
}

.play-overlay.is-hidden {
    opacity: 0;
    pointer-events: none;
}

.play-circle {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 18px 42px rgba(14, 165, 233, 0.32);
    font-size: 34px;
}

.detail-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 22px;
    padding-top: 34px;
}

.text-panel {
    padding: 28px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.76);
}

.text-panel p {
    color: #cbd5e1;
    margin: 16px 0 0;
}

.related-section {
    padding-bottom: 80px;
}

.search-bar-large {
    margin-top: 24px;
}

.site-footer {
    margin-top: 84px;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(2, 6, 23, 0.88);
}

.footer-grid {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 32px;
    padding: 42px 0;
}

.footer-grid p,
.footer-bottom {
    color: var(--muted);
}

.footer-grid h2 {
    margin: 0 0 14px;
    font-size: 16px;
}

.footer-links {
    display: grid;
    gap: 8px;
}

.footer-links a {
    color: #cbd5e1;
}

.footer-links a:hover {
    color: #7dd3fc;
}

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 28px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    font-size: 14px;
}

.is-missing {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.18), rgba(245, 158, 11, 0.16)), #0f172a;
}

@media (max-width: 1080px) {
    .channel-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

    .hero-copy {
        padding-right: 24vw;
    }
}

@media (max-width: 780px) {
    .desktop-nav {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .hero {
        height: auto;
        min-height: 680px;
    }

    .hero-copy {
        padding: 90px 0 100px;
        justify-content: flex-end;
    }

    .hero-slide > img {
        opacity: 0.42;
    }

    .hero-search,
    .search-bar-large,
    .filter-panel {
        flex-direction: column;
    }

    .hero-search button,
    .search-bar-large button {
        min-height: 44px;
        margin-left: 0;
    }

    .intro-panel,
    .section-heading,
    .detail-hero,
    .detail-content,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .intro-panel,
    .section-heading {
        flex-direction: column;
        align-items: flex-start;
    }

    .detail-hero {
        display: grid;
    }

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

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

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

    .rank-item {
        grid-template-columns: 44px 76px minmax(0, 1fr);
    }

    .rank-item .btn {
        grid-column: 2 / 4;
    }

    .rank-cover {
        width: 76px;
    }
}

@media (max-width: 520px) {
    .header-inner,
    .intro-panel,
    .page-hero,
    .detail-hero,
    .text-panel {
        padding-left: 18px;
        padding-right: 18px;
    }

    .brand-text {
        font-size: 18px;
    }

    .hero h1,
    .hero h2,
    .page-hero h1,
    .detail-copy h1 {
        font-size: 34px;
    }

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

    .card-desc {
        display: none;
    }
}
