:root {
    --bg: #f8fafc;
    --panel: #ffffff;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --cyan: #0891b2;
    --cyan-dark: #0e7490;
    --blue: #2563eb;
    --teal: #0d9488;
    --shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
    --soft-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #eef6ff 46%, #f8fafc 100%);
}

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, var(--cyan), var(--blue));
    box-shadow: 0 8px 26px rgba(8, 145, 178, 0.24);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    color: #0891b2;
    background: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55);
}

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

.nav-link {
    color: rgba(255, 255, 255, 0.9);
    font-size: 15px;
    font-weight: 700;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #ffffff;
    transform: translateY(-1px);
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.16);
    cursor: pointer;
}

.mobile-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: #ffffff;
    border-radius: 99px;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 16px;
}

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

.mobile-nav-link {
    padding: 12px 14px;
    color: #ffffff;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
}

.hero-carousel {
    position: relative;
    height: min(70vh, 720px);
    min-height: 520px;
    overflow: hidden;
    background: #020617;
}

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

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.88), rgba(15, 23, 42, 0.58) 48%, rgba(15, 23, 42, 0.08));
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-text {
    max-width: 720px;
    color: #ffffff;
}

.hero-pills,
.hero-tags,
.detail-meta,
.tag-row,
.intro-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.hero-pills span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 6px 12px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(8, 145, 178, 0.9);
    font-size: 14px;
    font-weight: 800;
}

.hero-pills span:nth-child(2),
.detail-meta span:nth-child(2) {
    background: rgba(37, 99, 235, 0.92);
}

.hero-pills span:nth-child(3),
.detail-meta span:nth-child(3) {
    background: rgba(13, 148, 136, 0.92);
}

.hero-text h1 {
    margin: 22px 0 16px;
    font-size: clamp(42px, 7vw, 76px);
    line-height: 1.02;
    letter-spacing: -0.06em;
}

.hero-text p {
    max-width: 660px;
    margin: 0;
    color: #e2e8f0;
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.75;
}

.hero-tags {
    margin-top: 22px;
}

.hero-tags span,
.tag-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 11px;
    border-radius: 999px;
    color: #0e7490;
    background: #cffafe;
    font-size: 13px;
    font-weight: 700;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 30px;
}

.primary-button,
.ghost-button,
.intro-actions a,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 12px 22px;
    border-radius: 14px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
    color: #ffffff;
    background: var(--cyan);
    box-shadow: 0 14px 28px rgba(8, 145, 178, 0.3);
}

.primary-button:hover,
.intro-actions a:hover,
.section-more:hover {
    transform: translateY(-2px);
    background: var(--cyan-dark);
    box-shadow: var(--soft-shadow);
}

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

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(2, 6, 23, 0.52);
    cursor: pointer;
    transform: translateY(-50%);
    transition: background 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(2, 6, 23, 0.78);
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

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

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

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

.home-intro {
    margin-top: -54px;
    position: relative;
    z-index: 5;
    padding: 30px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.home-intro h1,
.page-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(30px, 4vw, 46px);
    letter-spacing: -0.04em;
}

.home-intro p,
.page-hero p {
    max-width: 780px;
    margin: 0;
    color: var(--muted);
    line-height: 1.8;
}

.intro-actions {
    margin-top: 22px;
}

.intro-actions a,
.section-more {
    color: #ffffff;
    background: linear-gradient(90deg, var(--cyan), var(--blue));
}

.section-block {
    padding: 56px 0;
}

.section-strip {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.6), rgba(226, 232, 240, 0.52));
}

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

.section-heading h2 {
    display: inline-flex;
    align-items: center;
    margin: 0;
    font-size: clamp(26px, 3vw, 36px);
    letter-spacing: -0.04em;
}

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

.section-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-right: 10px;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.search-panel {
    margin: 0 0 24px;
    padding: 18px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: var(--soft-shadow);
}

.search-panel label {
    display: grid;
    gap: 9px;
    color: var(--ink);
    font-weight: 800;
}

.search-panel input {
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    outline: 0;
    color: var(--ink);
    background: #ffffff;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.search-panel input:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.12);
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.78);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--soft-shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
    border-color: rgba(8, 145, 178, 0.4);
    box-shadow: var(--shadow);
    transform: translateY(-5px);
}

.movie-cover {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #0f172a;
}

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

.movie-card:hover .movie-cover img {
    transform: scale(1.08);
}

.cover-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.06), rgba(15, 23, 42, 0.72));
    opacity: 0;
    transition: opacity 0.25s ease;
}

.movie-card:hover .cover-shade {
    opacity: 1;
}

.play-mark {
    position: absolute;
    left: 50%;
    top: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border-radius: 999px;
    color: #ffffff;
    background: var(--cyan);
    box-shadow: 0 16px 32px rgba(8, 145, 178, 0.28);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.74);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-mark {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 9px;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, #f97316, #ef4444);
    font-weight: 900;
}

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

.movie-meta-line,
.card-bottom,
.rank-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.movie-meta-line {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

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

.movie-card h3 a:hover,
.rank-info h3 a:hover,
.side-card a:hover {
    color: var(--cyan-dark);
}

.movie-card p {
    min-height: 54px;
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
}

.card-bottom {
    justify-content: space-between;
}

.score {
    flex: 0 0 auto;
    color: #ca8a04;
    font-weight: 900;
}

.card-compact .movie-card-body {
    padding: 14px;
}

.card-compact h3 {
    font-size: 17px;
}

.card-compact p {
    min-height: 48px;
    font-size: 13px;
}

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

.channel-card,
.category-summary a {
    position: relative;
    overflow: hidden;
    display: flex;
    min-height: 180px;
    border-radius: var(--radius);
    color: #ffffff;
    box-shadow: var(--soft-shadow);
}

.channel-card img,
.category-summary img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

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

.channel-card span,
.category-summary span {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.82));
}

.channel-card strong,
.channel-card em,
.category-summary div {
    position: relative;
    z-index: 1;
}

.channel-card {
    flex-direction: column;
    justify-content: end;
    padding: 18px;
}

.channel-card strong {
    font-size: 22px;
}

.channel-card em,
.category-summary p {
    margin-top: 8px;
    color: #dbeafe;
    font-size: 13px;
    line-height: 1.55;
    font-style: normal;
}

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

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

.rank-row {
    display: grid;
    grid-template-columns: 64px 140px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    padding: 14px;
}

.rank-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border-radius: 18px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    font-size: 19px;
    font-weight: 900;
}

.rank-thumb {
    display: block;
    overflow: hidden;
    border-radius: 14px;
    aspect-ratio: 16 / 9;
    background: #0f172a;
}

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

.rank-info h3 {
    margin: 0 0 8px;
    font-size: 20px;
}

.rank-info p {
    min-height: 0;
    margin: 0 0 10px;
}

.rank-tags span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: linear-gradient(135deg, #0f172a, #0e7490 48%, #2563eb);
}

.compact-hero {
    padding: 72px 0;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
}

.breadcrumb a:hover {
    color: #ffffff;
}

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

.category-summary a {
    min-height: 260px;
    padding: 28px;
    align-items: end;
}

.category-summary h2 {
    margin: 0 0 8px;
    font-size: 30px;
}

.category-summary em {
    display: inline-flex;
    margin-top: 16px;
    color: #ffffff;
    font-style: normal;
    font-weight: 800;
}

.detail-hero {
    min-height: 560px;
}

.detail-backdrop,
.detail-shade {
    position: absolute;
    inset: 0;
}

.detail-backdrop {
    background-position: center;
    background-size: cover;
    filter: blur(5px) saturate(1.08);
    transform: scale(1.04);
}

.detail-shade {
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.9), rgba(15, 23, 42, 0.68) 52%, rgba(15, 23, 42, 0.18));
}

.detail-hero-inner {
    position: relative;
    z-index: 1;
    padding: 64px 0;
}

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

.detail-poster {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border: 6px solid rgba(255, 255, 255, 0.24);
    border-radius: 22px;
    box-shadow: var(--shadow);
}

.detail-copy h1 {
    margin: 0 0 16px;
    font-size: clamp(36px, 5vw, 64px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.detail-copy p {
    max-width: 760px;
    margin: 0 0 22px;
    color: #e2e8f0;
    font-size: 18px;
    line-height: 1.8;
}

.detail-tags {
    margin-top: 20px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
    padding: 42px 0 20px;
}

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

.hls-video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.video-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle, rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.5));
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.video-overlay span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 82px;
    height: 82px;
    border-radius: 999px;
    background: var(--cyan);
    box-shadow: 0 20px 40px rgba(8, 145, 178, 0.28);
    font-size: 32px;
}

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

.content-card,
.side-card {
    margin-top: 24px;
    padding: 26px;
    border: 1px solid rgba(226, 232, 240, 0.82);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--soft-shadow);
}

.content-card h2,
.side-card h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

.content-card p {
    margin: 0 0 22px;
    color: #334155;
    line-height: 1.95;
}

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

.detail-side {
    position: relative;
}

.side-card {
    position: sticky;
    top: 96px;
    margin-top: 0;
}

.side-card dl {
    margin: 0;
}

.side-card div {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
    padding: 13px 0;
    border-bottom: 1px solid #e2e8f0;
}

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

.side-card dt {
    color: var(--muted);
    font-weight: 800;
}

.side-card dd {
    margin: 0;
    color: var(--ink);
}

.site-footer {
    margin-top: 60px;
    color: #ffffff;
    background: linear-gradient(180deg, #1e293b, #0f172a);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 34px;
    padding: 52px 0 30px;
}

.footer-brand {
    font-size: 22px;
    margin-bottom: 16px;
}

.site-footer p {
    color: #cbd5e1;
    line-height: 1.7;
}

.site-footer h2 {
    margin: 0 0 16px;
    color: #67e8f9;
    font-size: 18px;
}

.site-footer a:not(.footer-brand) {
    display: block;
    margin: 9px 0;
    color: #cbd5e1;
}

.site-footer a:hover {
    color: #67e8f9;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 0;
    border-top: 1px solid rgba(148, 163, 184, 0.28);
}

.hidden-by-search {
    display: none !important;
}

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

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

    .side-card {
        position: static;
    }
}

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

    .mobile-toggle {
        display: block;
    }

    .brand {
        font-size: 21px;
    }

    .hero-carousel {
        height: 620px;
        min-height: 620px;
    }

    .hero-overlay {
        background: linear-gradient(180deg, rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.82));
    }

    .hero-arrow {
        display: none;
    }

    .home-intro {
        margin-top: 0;
        border-radius: 0;
    }

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

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

    .rank-row {
        grid-template-columns: 48px 96px minmax(0, 1fr);
        gap: 12px;
    }

    .rank-number {
        width: 44px;
        height: 44px;
        border-radius: 14px;
        font-size: 16px;
    }

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

    .footer-grid,
    .footer-bottom {
        grid-template-columns: 1fr;
        flex-direction: column;
    }
}

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

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

    .hero-carousel {
        min-height: 560px;
        height: 560px;
    }

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

    .movie-grid,
    .category-grid,
    .channel-grid,
    .category-summary-grid,
    .rank-grid {
        grid-template-columns: 1fr;
    }

    .compact-hero {
        padding: 54px 0;
    }

    .rank-row {
        grid-template-columns: 44px 88px minmax(0, 1fr);
        padding: 12px;
    }

    .detail-hero-inner {
        padding: 46px 0;
    }

    .detail-layout {
        padding-top: 28px;
    }
}
