:root {
    color-scheme: light;
    --page-bg: #f8fafc;
    --text: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --card: #ffffff;
    --cyan: #06b6d4;
    --blue: #2563eb;
    --indigo: #4f46e5;
    --red: #ef4444;
    --amber: #f59e0b;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --soft-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background: linear-gradient(135deg, #f8fafc 0%, #ecfeff 45%, #eef2ff 100%);
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.86);
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    min-height: 72px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.logo-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: #ffffff;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.26);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 22px;
    font-weight: 650;
    color: #334155;
}

.nav-links a {
    transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.is-active {
    color: var(--cyan);
}

.site-search {
    display: flex;
    align-items: center;
    min-width: 260px;
    padding: 4px;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.site-search input {
    width: 100%;
    border: 0;
    outline: 0;
    padding: 9px 12px 9px 16px;
    color: #0f172a;
    background: transparent;
}

.site-search button,
.primary-button,
.secondary-button,
.icon-button {
    border: 0;
    cursor: pointer;
}

.site-search button {
    padding: 9px 15px;
    color: #ffffff;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.menu-button {
    display: none;
    width: 44px;
    height: 44px;
    color: #0f172a;
    border: 1px solid #dbeafe;
    border-radius: 14px;
    background: #ffffff;
}

.mobile-nav {
    display: none;
    padding: 0 0 18px;
}

.mobile-nav.is-open {
    display: block;
}

.mobile-nav a,
.mobile-nav form {
    margin-top: 12px;
}

.hero {
    position: relative;
    overflow: hidden;
    min-height: 620px;
    color: #ffffff;
    background: #020617;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 15% 20%, rgba(6, 182, 212, 0.32), transparent 30%),
        radial-gradient(circle at 80% 10%, rgba(37, 99, 235, 0.35), transparent 28%),
        linear-gradient(180deg, rgba(2, 6, 23, 0.05), rgba(2, 6, 23, 0.95));
    z-index: 2;
    pointer-events: none;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: center;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.7s ease, transform 0.9s ease;
    pointer-events: none;
}

.hero-slide.is-active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.hero-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 3;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 360px;
    gap: 34px;
    align-items: center;
    padding: 88px 0 78px;
}

.hero-copy {
    max-width: 760px;
}

.kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 7px 12px;
    color: #fde68a;
    font-weight: 750;
    border: 1px solid rgba(253, 230, 138, 0.35);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.38);
    backdrop-filter: blur(12px);
}

.hero h1,
.page-hero h1 {
    margin: 0 0 18px;
    font-size: clamp(34px, 6vw, 64px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.hero p {
    margin: 0 0 26px;
    max-width: 720px;
    color: #e2e8f0;
    font-size: clamp(17px, 2vw, 21px);
    line-height: 1.8;
}

.hero-actions,
.card-actions,
.section-head,
.meta-row,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.primary-button,
.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 20px;
    font-weight: 780;
    border-radius: 999px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 16px 34px rgba(37, 99, 235, 0.28);
}

.secondary-button {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
}

.primary-button:hover,
.secondary-button:hover,
.movie-card:hover {
    transform: translateY(-3px);
}

.hero-panel {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 30px;
    background: rgba(15, 23, 42, 0.5);
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.33);
    backdrop-filter: blur(16px);
}

.hero-panel img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.hero-panel-body {
    padding: 18px;
}

.hero-panel-title {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 800;
}

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

.hero-dot {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.48);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
    width: 34px;
    background: #ffffff;
}

.section {
    padding: 54px 0;
}

.section-alt {
    background: rgba(255, 255, 255, 0.52);
}

.section-head {
    justify-content: space-between;
    margin-bottom: 24px;
}

.section-title {
    margin: 0;
    font-size: clamp(25px, 3vw, 34px);
    letter-spacing: -0.03em;
}

.section-subtitle {
    margin: 7px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

.channel-pills,
.category-grid,
.movie-grid,
.related-grid {
    display: grid;
    gap: 18px;
}

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

.channel-pill {
    padding: 18px;
    color: #334155;
    border: 1px solid rgba(203, 213, 225, 0.78);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: var(--soft-shadow);
    transition: transform 0.2s ease, color 0.2s ease, border 0.2s ease;
}

.channel-pill:hover {
    color: #ffffff;
    border-color: transparent;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    transform: translateY(-3px);
}

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.85);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: var(--soft-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
    box-shadow: var(--shadow);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a, #164e63);
}

.poster-link img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.35s ease, opacity 0.25s ease;
}

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

.poster-badge,
.rank-badge,
.score-badge {
    position: absolute;
    z-index: 2;
    padding: 6px 10px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--red), var(--amber));
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.24);
}

.poster-badge {
    top: 12px;
    left: 12px;
}

.score-badge {
    right: 12px;
    bottom: 12px;
    background: linear-gradient(135deg, #0f172a, #2563eb);
}

.movie-card-body {
    padding: 16px;
}

.movie-title {
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: 820;
    line-height: 1.35;
}

.movie-title a:hover {
    color: var(--cyan);
}

.movie-desc {
    margin: 0 0 14px;
    min-height: 58px;
    color: var(--muted);
    line-height: 1.65;
}

.meta-row {
    color: #64748b;
    font-size: 14px;
}

.tag-row {
    margin-top: 12px;
}

.tag {
    display: inline-flex;
    padding: 5px 9px;
    color: #0e7490;
    font-size: 12px;
    font-weight: 750;
    border-radius: 999px;
    background: #cffafe;
}

.horizontal-list {
    display: grid;
    gap: 16px;
}

.horizontal-card {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    gap: 16px;
    align-items: stretch;
}

.horizontal-card .poster-link img {
    height: 100%;
    aspect-ratio: auto;
}

.page-hero {
    padding: 64px 0 42px;
    color: #ffffff;
    background:
        radial-gradient(circle at 15% 20%, rgba(6, 182, 212, 0.45), transparent 32%),
        linear-gradient(135deg, #0f172a, #164e63 45%, #1d4ed8);
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: #dbeafe;
    font-size: 18px;
    line-height: 1.8;
}

.toolbar {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 160px 160px 120px;
    gap: 12px;
    margin: 26px 0;
    padding: 16px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.85);
    box-shadow: var(--soft-shadow);
}

.toolbar input,
.toolbar select {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    outline: 0;
    padding: 12px 13px;
    color: #0f172a;
    background: #ffffff;
}

.toolbar button {
    color: #ffffff;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    cursor: pointer;
}

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

.category-card {
    min-height: 190px;
    padding: 24px;
    border-radius: 26px;
    color: #ffffff;
    background:
        radial-gradient(circle at 85% 10%, rgba(255, 255, 255, 0.28), transparent 24%),
        linear-gradient(135deg, #0891b2, #2563eb);
    box-shadow: var(--shadow);
}

.category-card h2 {
    margin: 0 0 12px;
    font-size: 26px;
}

.category-card p {
    margin: 0 0 18px;
    color: #e0f2fe;
    line-height: 1.75;
}

.ranking-list {
    display: grid;
    gap: 16px;
    counter-reset: rank;
}

.ranking-item {
    counter-increment: rank;
    display: grid;
    grid-template-columns: 86px 120px minmax(0, 1fr) 120px;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: var(--soft-shadow);
}

.ranking-item::before {
    content: counter(rank);
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    color: #ffffff;
    font-size: 22px;
    font-weight: 900;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--red), var(--amber));
}

.ranking-item img {
    width: 120px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 14px;
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 24px 0 0;
    color: #dbeafe;
    font-size: 14px;
}

.detail-card,
.sidebar-card {
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--soft-shadow);
}

.detail-card {
    overflow: hidden;
}

.detail-body {
    padding: 26px;
}

.detail-body h1 {
    margin: 0 0 16px;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.12;
}

.detail-section {
    margin-top: 26px;
}

.detail-section h2,
.sidebar-card h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

.detail-section p {
    margin: 0 0 14px;
    color: #334155;
    font-size: 17px;
    line-height: 1.9;
}

.player-shell {
    position: relative;
    overflow: hidden;
    background: #020617;
}

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

.play-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 12px;
    color: #ffffff;
    border: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.25), rgba(2, 6, 23, 0.75));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-circle {
    display: grid;
    place-items: center;
    width: 84px;
    height: 84px;
    padding-left: 5px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 34px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 20px 45px rgba(37, 99, 235, 0.35);
}

.player-shell.is-ready .play-cover {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.sidebar {
    position: sticky;
    top: 96px;
    display: grid;
    gap: 18px;
}

.sidebar-card {
    padding: 20px;
}

.mini-card {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #e2e8f0;
}

.mini-card:last-child {
    border-bottom: 0;
}

.mini-card img {
    width: 82px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 12px;
}

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

.index-links {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.index-links a {
    padding: 12px 14px;
    overflow: hidden;
    color: #334155;
    text-overflow: ellipsis;
    white-space: nowrap;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #ffffff;
}

.index-links a:hover {
    color: var(--cyan);
    border-color: #67e8f9;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 24px;
}

.footer-grid h2,
.footer-grid h3 {
    color: #ffffff;
    margin: 0 0 14px;
}

.footer-grid p,
.footer-grid a {
    color: #cbd5e1;
    line-height: 1.8;
}

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

.back-top {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 80;
    display: none;
    width: 46px;
    height: 46px;
    color: #ffffff;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: var(--shadow);
    cursor: pointer;
}

.back-top.is-visible {
    display: block;
}

[hidden] {
    display: none !important;
}

@media (max-width: 1024px) {
    .nav-links,
    .header-inner > .site-search {
        display: none;
    }

    .menu-button {
        display: inline-grid;
        place-items: center;
    }

    .hero-content {
        grid-template-columns: 1fr;
        padding-top: 74px;
    }

    .hero-panel {
        max-width: 360px;
    }

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

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

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

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

    .sidebar {
        position: static;
    }
}

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

    .header-inner {
        min-height: 64px;
    }

    .logo {
        font-size: 19px;
    }

    .hero {
        min-height: 720px;
    }

    .hero h1,
    .page-hero h1 {
        font-size: 36px;
    }

    .hero-panel {
        max-width: 100%;
    }

    .section {
        padding: 40px 0;
    }

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

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

    .horizontal-card,
    .ranking-item {
        grid-template-columns: 1fr;
    }

    .ranking-item img {
        width: 100%;
        max-width: 160px;
    }

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

@media (max-width: 520px) {
    .channel-pills,
    .movie-grid,
    .category-grid,
    .index-links {
        grid-template-columns: 1fr;
    }

    .movie-desc {
        min-height: auto;
    }

    .detail-body {
        padding: 20px;
    }
}
