:root {
    --primary-50: #f0f9ff;
    --primary-100: #e0f2fe;
    --primary-200: #bae6fd;
    --primary-500: #0ea5e9;
    --primary-600: #0284c7;
    --primary-700: #0369a1;
    --secondary-50: #f8fafc;
    --secondary-100: #f1f5f9;
    --secondary-200: #e2e8f0;
    --secondary-300: #cbd5e1;
    --secondary-500: #64748b;
    --secondary-600: #475569;
    --secondary-700: #334155;
    --secondary-800: #1e293b;
    --secondary-900: #0f172a;
    --accent-50: #ecfdf5;
    --accent-600: #059669;
    --white: #ffffff;
    --shadow-soft: 0 14px 35px rgba(15, 23, 42, 0.08);
    --shadow-medium: 0 22px 60px rgba(15, 23, 42, 0.14);
    --radius-lg: 18px;
    --radius-xl: 28px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
    color: var(--secondary-800);
    background: var(--secondary-50);
    line-height: 1.65;
}

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

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

button,
input {
    font: inherit;
}

.visually-hidden {
    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.94);
    border-bottom: 1px solid var(--secondary-200);
    backdrop-filter: blur(16px);
    box-shadow: 0 4px 22px rgba(15, 23, 42, 0.04);
}

.header-inner {
    max-width: 1240px;
    height: 68px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 28px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: var(--secondary-900);
    white-space: nowrap;
}

.brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-600), var(--accent-600));
    box-shadow: 0 12px 24px rgba(2, 132, 199, 0.24);
}

.brand-name {
    font-size: 21px;
    letter-spacing: 0.02em;
}

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

.nav-link,
.mobile-link {
    color: var(--secondary-600);
    font-weight: 650;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
    color: var(--primary-600);
}

.header-search {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search input,
.mobile-search input,
.search-page-form input,
.filter-bar input {
    border: 1px solid var(--secondary-300);
    border-radius: 12px;
    background: var(--white);
    color: var(--secondary-800);
    outline: none;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
    width: 248px;
    padding: 10px 14px;
}

.header-search input:focus,
.mobile-search input:focus,
.search-page-form input:focus,
.filter-bar input:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.14);
}

.header-search button,
.mobile-search button,
.search-page-form button {
    border: 0;
    border-radius: 12px;
    padding: 10px 16px;
    color: var(--white);
    background: var(--primary-600);
    cursor: pointer;
    font-weight: 700;
    transition: background 0.2s ease, transform 0.2s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.search-page-form button:hover {
    background: var(--primary-700);
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    margin-left: auto;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: var(--secondary-100);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    background: var(--secondary-700);
}

.mobile-nav {
    display: none;
    border-top: 1px solid var(--secondary-200);
    padding: 14px 24px 20px;
    background: var(--white);
}

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

.mobile-link {
    display: block;
    padding: 11px 0;
}

.mobile-search {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.mobile-search input {
    min-width: 0;
    flex: 1;
    padding: 10px 12px;
}

.hero-spotlight {
    color: var(--white);
    background:
        radial-gradient(circle at 12% 18%, rgba(14, 165, 233, 0.42), transparent 30%),
        radial-gradient(circle at 70% 8%, rgba(5, 150, 105, 0.28), transparent 26%),
        linear-gradient(135deg, #0284c7 0%, #0369a1 46%, #0f172a 100%);
    overflow: hidden;
}

.hero-inner {
    max-width: 1240px;
    min-height: 620px;
    margin: 0 auto;
    padding: 78px 24px;
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(340px, 1.1fr);
    gap: 54px;
    align-items: center;
}

.hero-copy h1 {
    margin: 14px 0 22px;
    font-size: clamp(36px, 5vw, 62px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.hero-copy p,
.page-hero p,
.detail-copy p {
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
    max-width: 660px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-100);
    font-weight: 800;
    letter-spacing: 0.05em;
}

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

.hero-actions {
    margin-top: 30px;
}

.primary-btn,
.ghost-btn,
.hero-play {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    padding: 13px 22px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn,
.hero-play {
    color: var(--primary-700);
    background: var(--white);
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.18);
}

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

.primary-btn:hover,
.ghost-btn:hover,
.hero-play:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 48px rgba(15, 23, 42, 0.22);
}

.hero-chips {
    margin-top: 26px;
}

.hero-chips a {
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    padding: 8px 14px;
    color: rgba(255, 255, 255, 0.88);
    background: rgba(255, 255, 255, 0.08);
}

.hero-carousel {
    position: relative;
    min-height: 468px;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 38px 90px rgba(15, 23, 42, 0.38);
    transform: perspective(1200px) rotateY(-4deg);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transform: scale(1.04);
    transition: opacity 0.65s ease, transform 0.65s ease, visibility 0.65s ease;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

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

.hero-slide-shade,
.channel-card-shade,
.category-shade,
.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.34), transparent);
}

.hero-slide-content {
    position: absolute;
    left: 32px;
    right: 32px;
    bottom: 32px;
    color: var(--white);
}

.hero-slide-content h2 {
    margin: 8px 0 10px;
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.18;
}

.hero-slide-content p {
    max-width: 560px;
    color: rgba(255, 255, 255, 0.82);
}

.hero-dots {
    position: absolute;
    right: 24px;
    top: 24px;
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.48);
    cursor: pointer;
}

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

.content-section,
.catalog-layout,
.detail-content {
    max-width: 1240px;
    margin: 0 auto;
    padding: 54px 24px;
}

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

.section-head h2 {
    margin: 0;
    color: var(--secondary-900);
    font-size: clamp(24px, 3vw, 32px);
}

.section-more {
    color: var(--primary-600);
    font-weight: 800;
}

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

.channel-card,
.category-overview-card {
    position: relative;
    min-height: 210px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--secondary-100);
    box-shadow: var(--shadow-soft);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.channel-card:hover,
.category-overview-card:hover,
.movie-card:hover,
.rank-row:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-medium);
}

.channel-card img,
.category-overview-card img {
    width: 100%;
    height: 100%;
    min-height: inherit;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.channel-card:hover img,
.category-overview-card:hover img,
.movie-card:hover img {
    transform: scale(1.08);
}

.channel-card-body,
.category-copy {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    color: var(--white);
}

.channel-card-body strong,
.category-copy strong {
    display: block;
    font-size: 20px;
}

.channel-card-body small,
.category-copy small {
    display: block;
    margin-top: 5px;
    color: rgba(255, 255, 255, 0.78);
}

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

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

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

.movie-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-soft);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.poster-wrap {
    position: relative;
    height: 230px;
    overflow: hidden;
    background: var(--secondary-100);
}

.poster-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.poster-year,
.poster-channel {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    padding: 5px 10px;
    color: var(--white);
    font-size: 12px;
    font-weight: 800;
}

.poster-year {
    top: 12px;
    right: 12px;
    background: rgba(15, 23, 42, 0.72);
}

.poster-channel {
    left: 12px;
    bottom: 12px;
    background: var(--primary-600);
}

.movie-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 18px;
}

.movie-body strong {
    color: var(--secondary-900);
    font-size: 18px;
    line-height: 1.35;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-meta,
.movie-desc,
.rank-info span {
    color: var(--secondary-600);
    font-size: 14px;
}

.movie-desc {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.tag-row span {
    display: inline-flex;
    border-radius: 999px;
    padding: 5px 9px;
    color: var(--primary-700);
    background: var(--primary-50);
    font-size: 12px;
    font-weight: 700;
}

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

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

.rank-row {
    display: grid;
    grid-template-columns: 46px 72px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    border-radius: 18px;
    padding: 12px;
    background: var(--white);
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-600), var(--accent-600));
    font-weight: 900;
}

.rank-thumb {
    width: 72px;
    height: 86px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--secondary-100);
}

.rank-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rank-info {
    min-width: 0;
}

.rank-info strong {
    display: block;
    overflow: hidden;
    color: var(--secondary-900);
    font-size: 17px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank-action {
    border-radius: 999px;
    padding: 7px 12px;
    color: var(--primary-700);
    background: var(--primary-50);
    font-weight: 800;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-600), var(--secondary-900));
}

.page-hero-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 68px 24px;
}

.slim-hero .page-hero-inner {
    padding: 56px 24px;
}

.page-hero h1 {
    margin: 12px 0 12px;
    font-size: clamp(32px, 4vw, 48px);
    line-height: 1.12;
}

.catalog-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.catalog-side {
    position: sticky;
    top: 92px;
    border-radius: var(--radius-lg);
    padding: 22px;
    background: var(--white);
    box-shadow: var(--shadow-soft);
}

.catalog-side h2 {
    margin: 0 0 14px;
    font-size: 20px;
}

.side-link {
    display: block;
    border-radius: 12px;
    padding: 10px 12px;
    color: var(--secondary-600);
    font-weight: 700;
}

.side-link:hover,
.side-link.is-active {
    color: var(--primary-700);
    background: var(--primary-50);
}

.filter-bar {
    margin-bottom: 24px;
}

.filter-bar.wide {
    max-width: 680px;
}

.filter-bar input {
    width: 100%;
    padding: 14px 16px;
}

.no-results {
    display: none;
    padding: 28px;
    border-radius: var(--radius-lg);
    color: var(--secondary-600);
    background: var(--white);
    text-align: center;
    box-shadow: var(--shadow-soft);
}

.no-results.is-visible {
    display: block;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    opacity: 0.22;
    filter: blur(5px);
}

.detail-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.58));
}

.detail-inner {
    position: relative;
    z-index: 1;
    max-width: 1240px;
    margin: 0 auto;
    padding: 34px 24px 58px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
    color: rgba(255, 255, 255, 0.76);
    font-size: 14px;
}

.breadcrumb a:hover {
    color: var(--white);
}

.detail-grid {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
}

.detail-poster {
    border-radius: 24px;
    overflow: hidden;
    background: var(--secondary-100);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.detail-copy h1 {
    margin: 10px 0 16px;
    font-size: clamp(32px, 4vw, 54px);
    line-height: 1.12;
}

.detail-meta {
    margin: 22px 0;
}

.detail-meta span {
    border-radius: 12px;
    padding: 8px 12px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.12);
}

.detail-tags {
    margin-bottom: 26px;
}

.detail-content {
    display: grid;
    gap: 28px;
}

.player-panel {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    background: #020617;
    box-shadow: var(--shadow-medium);
}

.player-panel video {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: block;
    background: #020617;
    object-fit: cover;
    cursor: pointer;
}

.player-overlay {
    position: absolute;
    inset: 0;
    border: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: var(--white);
    background: radial-gradient(circle, rgba(2, 132, 199, 0.34), rgba(2, 6, 23, 0.72));
    cursor: pointer;
    z-index: 2;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 82px;
    height: 82px;
    border-radius: 50%;
    color: var(--primary-700);
    background: rgba(255, 255, 255, 0.94);
    font-size: 34px;
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.32);
}

.story-card {
    border-radius: 24px;
    padding: 30px;
    background: var(--white);
    box-shadow: var(--shadow-soft);
}

.story-card h2 {
    margin: 0 0 12px;
    color: var(--secondary-900);
}

.story-card p {
    color: var(--secondary-700);
}

.lead-text {
    font-weight: 750;
}

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

.detail-pager a {
    border-radius: 16px;
    padding: 14px 16px;
    color: var(--primary-700);
    background: var(--white);
    box-shadow: var(--shadow-soft);
    font-weight: 800;
}

.search-page-form {
    display: flex;
    max-width: 760px;
    gap: 10px;
    margin-top: 26px;
}

.search-page-form input {
    flex: 1;
    min-width: 0;
    padding: 14px 16px;
}

.site-footer {
    margin-top: 44px;
    color: var(--secondary-300);
    background: var(--secondary-900);
}

.footer-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 44px 24px;
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(180px, 0.7fr) minmax(180px, 0.7fr);
    gap: 36px;
}

.footer-logo .brand-name {
    color: var(--white);
}

.footer-brand p {
    max-width: 540px;
    color: var(--secondary-300);
}

.footer-links h2 {
    margin: 0 0 14px;
    color: var(--white);
    font-size: 18px;
}

.footer-links a {
    display: block;
    margin: 8px 0;
    color: var(--secondary-300);
}

.footer-links a:hover {
    color: var(--primary-200);
}

.copyright {
    max-width: 1240px;
    margin: 0 auto;
    padding: 18px 24px 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--secondary-500);
    text-align: center;
}

@media (max-width: 1100px) {
    .channel-grid,
    .category-overview-grid,
    .movie-grid.four-cols {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .movie-grid.three-cols,
    .rank-list.compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .desktop-nav,
    .header-search {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .hero-inner,
    .detail-grid,
    .catalog-layout,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .hero-carousel {
        min-height: 410px;
        transform: none;
    }

    .catalog-side {
        position: static;
    }

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

@media (max-width: 640px) {
    .header-inner {
        padding: 0 16px;
    }

    .hero-inner,
    .page-hero-inner,
    .detail-inner,
    .content-section,
    .catalog-layout,
    .detail-content {
        padding-left: 16px;
        padding-right: 16px;
    }

    .hero-inner {
        min-height: auto;
        padding-top: 48px;
        padding-bottom: 44px;
    }

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

    .channel-grid,
    .category-overview-grid,
    .movie-grid.four-cols,
    .movie-grid.three-cols,
    .rank-list.compact {
        grid-template-columns: 1fr;
    }

    .rank-row {
        grid-template-columns: 38px 64px minmax(0, 1fr);
    }

    .rank-action {
        display: none;
    }

    .search-page-form,
    .detail-pager {
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .story-card {
        padding: 22px;
    }
}
