:root {
    --color-primary: #2563eb;
    --color-primary-dark: #1e40af;
    --color-sky: #38bdf8;
    --color-text: #111827;
    --color-muted: #6b7280;
    --color-border: #e5e7eb;
    --color-bg: #f8fafc;
    --color-card: #ffffff;
    --shadow-card: 0 20px 45px rgba(15, 23, 42, 0.12);
    --shadow-soft: 0 10px 25px rgba(15, 23, 42, 0.08);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 12px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--color-text);
    background: var(--color-bg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    color: #ffffff;
    background: linear-gradient(90deg, #2563eb, #1e40af 60%, #1e3a8a);
    box-shadow: 0 12px 30px rgba(30, 64, 175, 0.18);
}

.nav-shell {
    width: min(1200px, calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 28px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
    font-weight: 800;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: var(--color-primary);
    background: #ffffff;
    font-size: 22px;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.18);
}

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

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

.nav-link,
.mobile-link {
    position: relative;
    font-weight: 650;
    opacity: 0.9;
    transition: opacity 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
    opacity: 1;
    color: #dbeafe;
}

.nav-link.is-active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -8px;
    height: 3px;
    border-radius: 999px;
    background: #ffffff;
}

.nav-search {
    display: flex;
    align-items: center;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(10px);
}

.nav-search input,
.mobile-search input {
    width: 180px;
    border: 0;
    outline: 0;
    color: #ffffff;
    background: transparent;
    padding: 10px 14px;
}

.nav-search input::placeholder,
.mobile-search input::placeholder {
    color: rgba(255, 255, 255, 0.72);
}

.nav-search button,
.mobile-search button,
.large-search button,
.filter-panel button {
    border: 0;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.nav-search button:hover,
.mobile-search button:hover,
.large-search button:hover {
    background: rgba(255, 255, 255, 0.28);
}

.menu-toggle {
    display: none;
    margin-left: auto;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.14);
    cursor: pointer;
}

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

.mobile-nav {
    display: none;
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 12px;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.22);
    backdrop-filter: blur(14px);
}

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

.mobile-search {
    display: flex;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
}

main {
    min-height: 70vh;
}

.hero-carousel {
    position: relative;
    min-height: 680px;
    margin-top: 0;
    overflow: hidden;
    color: #ffffff;
    background: #0f172a;
}

.hero-slides,
.hero-slide {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.7s ease, transform 0.7s ease;
    transform: scale(1.02);
}

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

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.05);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 78% 35%, rgba(37, 99, 235, 0.36), transparent 34%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.9), rgba(15, 23, 42, 0.58) 48%, rgba(15, 23, 42, 0.15));
}

.hero-content {
    position: absolute;
    left: max(32px, calc((100% - 1200px) / 2));
    top: 50%;
    width: min(620px, calc(100% - 64px));
    transform: translateY(-42%);
    z-index: 2;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border-radius: 999px;
    padding: 8px 14px;
    color: #ffffff;
    background: rgba(37, 99, 235, 0.92);
    font-size: 14px;
    font-weight: 750;
    letter-spacing: 0.08em;
}

.eyebrow.dark {
    color: var(--color-primary);
    background: #dbeafe;
}

.hero-content h1,
.hero-content h2 {
    margin: 20px 0 16px;
    font-size: clamp(42px, 7vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-content p {
    max-width: 620px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
}

.hero-tags,
.detail-meta,
.movie-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.hero-tags span,
.detail-meta span,
.movie-meta span {
    border-radius: 999px;
    padding: 6px 10px;
    color: #e0f2fe;
    background: rgba(15, 23, 42, 0.46);
    font-size: 13px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.primary-button,
.ghost-button,
.section-action,
.watch-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
    color: #ffffff;
    background: var(--color-primary);
    padding: 13px 22px;
    box-shadow: 0 18px 34px rgba(37, 99, 235, 0.32);
}

.primary-button:hover,
.watch-link:hover {
    transform: translateY(-2px);
    background: var(--color-primary-dark);
}

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

.ghost-button:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.2);
}

.ghost-button.dark {
    color: var(--color-primary);
    border-color: #bfdbfe;
    background: #eff6ff;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    font-size: 32px;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(255, 255, 255, 0.28);
    transform: translateY(-2px);
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

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

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

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

.hero-floating {
    position: absolute;
    right: max(24px, calc((100% - 1200px) / 2));
    bottom: 78px;
    z-index: 5;
    width: min(430px, calc(100% - 48px));
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius-xl);
    background: rgba(15, 23, 42, 0.38);
    box-shadow: 0 25px 80px rgba(2, 6, 23, 0.36);
    backdrop-filter: blur(18px);
}

.hero-floating strong {
    display: block;
    margin-bottom: 12px;
}

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

.compact-card {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 14px;
    aspect-ratio: 3 / 4;
    background: #1e293b;
}

.compact-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.28s ease;
}

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

.compact-card span {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 18px 8px 8px;
    color: #ffffff;
    background: linear-gradient(transparent, rgba(2, 6, 23, 0.88));
    font-size: 12px;
    font-weight: 700;
}

.search-panel,
.content-section,
.channel-preview,
.category-grid,
.filter-panel,
.rank-list,
.article-section,
.detail-pager {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
}

.search-panel {
    margin-top: -48px;
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 28px;
    border-radius: var(--radius-xl);
    background: #ffffff;
    box-shadow: var(--shadow-card);
}

.search-panel h2,
.section-heading h2,
.page-hero h1,
.detail-info h1,
.article-section h2 {
    margin: 10px 0 0;
    line-height: 1.18;
    letter-spacing: -0.03em;
}

.large-search {
    display: grid;
    grid-template-columns: 1fr auto;
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: 16px;
    background: #f8fafc;
}

.large-search input {
    border: 0;
    outline: 0;
    background: transparent;
    padding: 16px 18px;
}

.large-search button {
    background: var(--color-primary);
    padding: 0 24px;
}

.pill-row,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-pill,
.tag-row span {
    border-radius: 999px;
    color: #1d4ed8;
    background: #dbeafe;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 700;
}

.content-section,
.channel-preview {
    padding-top: 64px;
}

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

.section-heading h2 {
    font-size: clamp(26px, 4vw, 40px);
}

.section-heading.compact h2 {
    max-width: 780px;
    font-size: clamp(22px, 3vw, 30px);
}

.section-action {
    flex: 0 0 auto;
    color: var(--color-primary);
    background: #dbeafe;
    padding: 10px 16px;
}

.section-action:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: #ffffff;
    box-shadow: var(--shadow-soft);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-card);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: #dbeafe;
}

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

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

.poster-link::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0;
    background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.7));
    transition: opacity 0.24s ease;
}

.movie-card:hover .poster-link::after {
    opacity: 1;
}

.poster-year {
    position: absolute;
    left: 10px;
    top: 10px;
    z-index: 2;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.78);
    padding: 5px 9px;
    font-size: 12px;
    font-weight: 800;
}

.poster-play {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 999px;
    color: var(--color-primary);
    background: rgba(255, 255, 255, 0.92);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.85);
    transition: opacity 0.24s ease, transform 0.24s ease;
}

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

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

.movie-meta {
    margin-bottom: 8px;
}

.movie-meta span {
    color: var(--color-primary-dark);
    background: #eff6ff;
}

.movie-card h3,
.rank-body h2 {
    margin: 0 0 8px;
    line-height: 1.3;
}

.movie-card h3 {
    font-size: 18px;
}

.movie-card p,
.rank-body p,
.category-card p,
.article-section p,
.detail-info .lead,
.page-hero p,
.site-footer p {
    color: var(--color-muted);
}

.movie-card p {
    display: -webkit-box;
    min-height: 50px;
    margin: 0 0 12px;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tag-row span {
    padding: 5px 9px;
    font-size: 12px;
}

.tag-row.large span {
    padding: 8px 12px;
    font-size: 14px;
}

.page-main {
    padding-top: 100px;
    padding-bottom: 72px;
}

.page-hero {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto 34px;
    padding: 54px;
    border-radius: var(--radius-xl);
    color: #ffffff;
    background:
        radial-gradient(circle at 80% 10%, rgba(56, 189, 248, 0.32), transparent 32%),
        linear-gradient(135deg, #2563eb, #1e3a8a);
    box-shadow: var(--shadow-card);
}

.page-hero.slim {
    padding: 46px;
}

.page-hero.category-hero {
    min-height: 320px;
}

.page-hero p {
    max-width: 760px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
}

.page-hero h1 {
    font-size: clamp(34px, 6vw, 58px);
}

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

.category-card a {
    display: block;
    min-height: 260px;
    padding: 28px;
    border-radius: var(--radius-xl);
    background: #ffffff;
    box-shadow: var(--shadow-soft);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.category-card a:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-card);
}

.category-icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    color: #ffffff;
    background: var(--color-primary);
    font-weight: 900;
}

.category-card h2 {
    margin: 18px 0 8px;
}

.category-samples {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.category-samples span {
    border-radius: 999px;
    color: var(--color-primary);
    background: #eff6ff;
    padding: 6px 10px;
    font-size: 13px;
    font-weight: 700;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px 180px;
    gap: 12px;
    margin-bottom: 24px;
    padding: 16px;
    border-radius: var(--radius-lg);
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.filter-panel input,
.filter-panel select {
    min-width: 0;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    outline: 0;
    background: #f8fafc;
    padding: 12px 14px;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.empty-state {
    display: none;
    width: min(1200px, calc(100% - 32px));
    margin: 24px auto 0;
    padding: 30px;
    border-radius: var(--radius-lg);
    color: var(--color-muted);
    text-align: center;
    background: #ffffff;
}

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

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

.rank-card {
    display: grid;
    grid-template-columns: 76px 96px 1fr auto;
    align-items: center;
    gap: 18px;
    padding: 16px;
    border-radius: var(--radius-lg);
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.rank-index {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 18px;
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #38bdf8);
    font-size: 22px;
    font-weight: 900;
}

.rank-poster {
    overflow: hidden;
    border-radius: 14px;
    aspect-ratio: 3 / 4;
}

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

.watch-link {
    color: #ffffff;
    background: var(--color-primary);
    padding: 10px 16px;
}

.breadcrumb {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--color-muted);
    font-size: 14px;
}

.breadcrumb a {
    color: var(--color-primary);
    font-weight: 700;
}

.detail-hero {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto 34px;
    display: grid;
    grid-template-columns: minmax(240px, 360px) 1fr;
    gap: 34px;
    align-items: center;
    padding: 28px;
    border-radius: var(--radius-xl);
    background: #ffffff;
    box-shadow: var(--shadow-card);
}

.detail-cover {
    overflow: hidden;
    border-radius: var(--radius-lg);
    aspect-ratio: 3 / 4;
    background: #dbeafe;
}

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

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

.detail-info .lead {
    font-size: 18px;
}

.player-section {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto 36px;
}

.player-section h2 {
    margin: 0 0 16px;
}

.player-frame {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: #020617;
    box-shadow: var(--shadow-card);
    aspect-ratio: 16 / 9;
}

.movie-video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    background: #020617;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 14px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.72));
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-circle {
    display: grid;
    place-items: center;
    width: 82px;
    height: 82px;
    border-radius: 999px;
    color: var(--color-primary);
    background: rgba(255, 255, 255, 0.94);
    font-size: 30px;
    box-shadow: 0 20px 48px rgba(2, 6, 23, 0.38);
}

.article-section {
    display: grid;
    gap: 16px;
    padding: 32px;
    border-radius: var(--radius-xl);
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.article-section p {
    margin: 0;
    font-size: 17px;
}

.detail-related {
    padding-top: 42px;
}

.detail-pager {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    margin-top: 36px;
}

.detail-pager a {
    flex: 1;
    border-radius: 16px;
    color: var(--color-primary);
    background: #ffffff;
    padding: 16px;
    box-shadow: var(--shadow-soft);
    font-weight: 750;
}

.site-footer {
    margin-top: 70px;
    color: #d1d5db;
    background: linear-gradient(180deg, #111827, #020617);
}

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

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

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

.footer-links a:hover {
    color: #93c5fd;
}

.footer-bottom {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 22px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #9ca3af;
    font-size: 14px;
}

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

    .menu-toggle {
        display: block;
    }

    .hero-floating {
        display: none;
    }

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

@media (max-width: 820px) {
    .hero-carousel {
        min-height: 620px;
    }

    .hero-content {
        top: 52%;
    }

    .hero-arrow {
        display: none;
    }

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

    .movie-grid,
    .small-grid,
    .category-grid,
    .footer-grid,
    .detail-hero {
        grid-template-columns: 1fr 1fr;
    }

    .filter-panel {
        grid-template-columns: 1fr;
    }

    .rank-card {
        grid-template-columns: 54px 84px 1fr;
    }

    .rank-card .watch-link {
        grid-column: 2 / -1;
    }
}

@media (max-width: 560px) {
    .nav-shell {
        width: calc(100% - 24px);
    }

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

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

    .hero-content {
        left: 20px;
        width: calc(100% - 40px);
    }

    .hero-content p {
        font-size: 16px;
    }

    .search-panel,
    .page-hero,
    .detail-hero,
    .article-section {
        padding: 22px;
    }

    .movie-grid,
    .small-grid,
    .category-grid,
    .footer-grid,
    .detail-hero {
        grid-template-columns: 1fr;
    }

    .rank-card {
        grid-template-columns: 48px 72px 1fr;
        gap: 12px;
    }

    .rank-index {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }

    .page-main {
        padding-top: 88px;
    }
}
