:root {
    --teal: #0f766e;
    --teal-bright: #14b8a6;
    --cyan: #0891b2;
    --blue: #2563eb;
    --ink: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --paper: #ffffff;
    --soft: #f8fafc;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(90deg, var(--teal), var(--cyan), var(--blue));
    color: #ffffff;
    box-shadow: 0 10px 30px rgba(15, 118, 110, 0.25);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    min-height: 72px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 800;
    white-space: nowrap;
}

.brand-icon {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(10px);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    flex: 1;
    overflow: hidden;
}

.nav-link {
    font-weight: 700;
    opacity: 0.92;
    white-space: nowrap;
    transition: opacity 0.2s ease, color 0.2s ease;
}

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

.header-search,
.mobile-search,
.large-search,
.search-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search {
    padding: 7px 8px 7px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(12px);
}

.header-search input,
.mobile-search input,
.large-search input,
.search-toolbar input,
.filter-bar input,
.filter-bar select,
.search-toolbar select {
    border: 0;
    outline: 0;
    font: inherit;
}

.header-search input {
    width: 190px;
    color: #ffffff;
    background: transparent;
}

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

.header-search button,
.mobile-search button,
.large-search button,
.search-toolbar button {
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(17, 24, 39, 0.22);
    padding: 8px 14px;
    font-weight: 800;
    cursor: pointer;
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.mobile-toggle span {
    width: 26px;
    height: 3px;
    border-radius: 99px;
    background: #ffffff;
}

.mobile-nav {
    display: none;
    padding: 0 16px 18px;
    background: rgba(15, 118, 110, 0.96);
}

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

.mobile-nav a {
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
}

.mobile-search input {
    flex: 1;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    padding: 11px 14px;
}

.hero-carousel {
    position: relative;
    height: 600px;
    overflow: hidden;
    background: linear-gradient(120deg, var(--teal-bright), var(--cyan), var(--blue));
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
    background-image:
        linear-gradient(90deg, rgba(2, 6, 23, 0.88), rgba(15, 23, 42, 0.52), rgba(15, 23, 42, 0.2)),
        var(--hero-image);
    background-size: cover;
    background-position: center;
}

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

.hero-backdrop {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 15% 20%, rgba(20, 184, 166, 0.45), transparent 35%),
        radial-gradient(circle at 80% 10%, rgba(37, 99, 235, 0.35), transparent 32%);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) 360px;
    align-items: center;
    gap: 54px;
    height: 100%;
    color: #ffffff;
}

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

.hero-kicker,
.eyebrow {
    margin: 0 0 14px;
    color: #99f6e4;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-intro h1 {
    margin: 0;
    font-size: clamp(36px, 6vw, 72px);
    line-height: 1.02;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero-line {
    margin: 22px 0 0;
    max-width: 680px;
    font-size: clamp(18px, 2.2vw, 24px);
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.9);
}

.hero-tags,
.tag-row,
.pill-list,
.detail-meta-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

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

.hero-tags span,
.tag-row span,
.pill-list span,
.detail-meta-pills span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 13px;
    font-weight: 800;
}

.hero-tags span,
.detail-meta-pills span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
}

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

.primary-button,
.ghost-button,
.text-link,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 900;
}

.primary-button {
    color: #ffffff;
    background: linear-gradient(90deg, var(--teal-bright), var(--blue));
    padding: 14px 24px;
    box-shadow: 0 16px 40px rgba(20, 184, 166, 0.35);
}

.ghost-button {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.14);
    padding: 13px 22px;
    backdrop-filter: blur(10px);
}

.hero-poster {
    border-radius: 30px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.16);
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.35);
    transform: rotate(2deg);
    transition: transform 0.3s ease;
}

.hero-poster:hover {
    transform: translateY(-8px) rotate(0deg);
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 22px;
    background: linear-gradient(135deg, #0f766e, #2563eb);
}

.image-error {
    opacity: 0;
}

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

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

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

.stat-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: -42px;
    position: relative;
    z-index: 5;
}

.stat-strip div {
    padding: 24px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
}

.stat-strip strong {
    display: block;
    color: var(--teal);
    font-size: 30px;
    line-height: 1;
}

.stat-strip span {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-weight: 800;
}

.page-section {
    padding: 72px 0;
}

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

.section-heading h2,
.highlight-layout h2,
.panel-title,
.content-card h2,
.side-card h2,
.info-card h2 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(28px, 3vw, 42px);
    font-weight: 900;
    letter-spacing: -0.03em;
}

.section-heading p,
.highlight-layout p,
.category-card p,
.category-overview-card p,
.info-card p {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.75;
}

.section-more,
.text-link {
    color: var(--teal);
}

.category-grid,
.movie-grid,
.category-overview-grid,
.info-grid {
    display: grid;
    gap: 22px;
}

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

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

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

.category-card,
.movie-card,
.category-overview-card,
.content-card,
.side-card,
.info-card,
.ranking-panel,
.ranking-table {
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.category-card {
    min-height: 180px;
    padding: 24px;
    background:
        linear-gradient(135deg, rgba(20, 184, 166, 0.1), rgba(37, 99, 235, 0.1)),
        #ffffff;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover,
.movie-card:hover,
.category-overview-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 48px rgba(15, 23, 42, 0.16);
}

.category-card h3,
.category-overview-card h2,
.movie-title {
    margin: 14px 0 0;
    color: var(--ink);
    font-size: 22px;
    font-weight: 900;
}

.category-count {
    display: inline-flex;
    padding: 7px 11px;
    color: #0f766e;
    border-radius: 999px;
    background: #ccfbf1;
    font-weight: 900;
}

.movie-card {
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.poster {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, #0f766e, #1d4ed8);
}

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

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

.poster-type,
.rank-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    border-radius: 999px;
    padding: 6px 9px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.62);
    font-size: 12px;
    font-weight: 900;
}

.rank-badge {
    left: 12px;
    right: auto;
    background: linear-gradient(90deg, #f97316, #ef4444);
}

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

.movie-title {
    display: -webkit-box;
    overflow: hidden;
    min-height: 54px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.22;
    transition: color 0.2s ease;
}

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

.movie-desc {
    display: -webkit-box;
    overflow: hidden;
    min-height: 48px;
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.6;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0;
    color: #64748b;
    font-size: 13px;
}

.movie-meta span::after {
    content: "·";
    margin-left: 8px;
}

.movie-meta span:last-child::after {
    content: "";
    margin: 0;
}

.tag-row span,
.pill-list span {
    color: #0f766e;
    background: #ccfbf1;
}

.highlight-band {
    margin: 48px 0;
    padding: 64px 0;
    color: #ffffff;
    background:
        radial-gradient(circle at 20% 20%, rgba(20, 184, 166, 0.42), transparent 28%),
        linear-gradient(90deg, #0f172a, #0f766e 48%, #1d4ed8);
}

.highlight-layout {
    display: grid;
    grid-template-columns: 1fr minmax(300px, 460px);
    align-items: center;
    gap: 36px;
}

.highlight-layout h2,
.highlight-layout p {
    color: #ffffff;
}

.large-search {
    padding: 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
}

.large-search input {
    flex: 1;
    min-width: 0;
    color: #0f172a;
    background: #ffffff;
    border-radius: 999px;
    padding: 16px 18px;
}

.large-search button {
    padding: 16px 22px;
    background: #0f172a;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 32px;
    align-items: start;
}

.ranking-panel {
    position: sticky;
    top: 96px;
    padding: 22px;
}

.panel-title {
    margin-bottom: 14px;
    font-size: 24px;
}

.ranking-row {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 8px 12px;
    padding: 12px 0;
    border-top: 1px solid var(--line);
}

.ranking-number {
    grid-row: span 2;
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    color: #ffffff;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--teal-bright), var(--blue));
    font-weight: 900;
}

.ranking-title {
    font-weight: 900;
}

.ranking-meta {
    color: var(--muted);
    font-size: 13px;
}

.page-hero {
    padding: 72px 0;
    color: #ffffff;
    background:
        radial-gradient(circle at 15% 30%, rgba(20, 184, 166, 0.42), transparent 35%),
        linear-gradient(90deg, #0f766e, #0891b2, #2563eb);
}

.page-hero p {
    max-width: 820px;
    margin: 18px 0 0;
    color: rgba(255, 255, 255, 0.92);
    font-size: 18px;
    line-height: 1.8;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.78);
    font-weight: 800;
}

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

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

.category-overview-card {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 22px;
    padding: 18px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-cover {
    overflow: hidden;
    border-radius: 18px;
    background: linear-gradient(135deg, #0f766e, #2563eb);
}

.category-cover img {
    width: 100%;
    height: 100%;
    min-height: 220px;
    object-fit: cover;
}

.filter-bar,
.search-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
    padding: 16px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.filter-bar input,
.filter-bar select,
.search-toolbar input,
.search-toolbar select {
    min-height: 46px;
    border-radius: 999px;
    padding: 0 16px;
    background: #f1f5f9;
}

.filter-bar input,
.search-toolbar input {
    flex: 1;
    min-width: 240px;
}

.filter-count,
.search-summary {
    color: var(--muted);
    font-weight: 800;
}

.detail-hero {
    position: relative;
    min-height: 560px;
    color: #ffffff;
    background-image:
        linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.32)),
        var(--detail-image);
    background-size: cover;
    background-position: center;
}

.detail-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 20%, rgba(20, 184, 166, 0.36), transparent 35%),
        linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.6));
}

.detail-hero-content {
    position: relative;
    z-index: 2;
    padding: 56px 0;
}

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

.detail-poster {
    overflow: hidden;
    border: 10px solid rgba(255, 255, 255, 0.16);
    border-radius: 28px;
    background: linear-gradient(135deg, #0f766e, #2563eb);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
}

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

.detail-meta-pills {
    margin: 24px 0;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 32px;
    align-items: start;
}

.detail-main,
.detail-side {
    display: grid;
    gap: 24px;
}

.player-card,
.content-card,
.side-card,
.info-card {
    padding: 24px;
}

.player-card {
    border-radius: var(--radius);
    background: #0f172a;
    box-shadow: var(--shadow);
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    background: #000000;
    aspect-ratio: 16 / 9;
}

.player-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000000;
}

.player-overlay-button {
    position: absolute;
    inset: 0;
    display: grid;
    gap: 12px;
    place-content: center;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle, rgba(15, 23, 42, 0.22), rgba(2, 6, 23, 0.68));
    font-size: 20px;
    font-weight: 900;
    cursor: pointer;
}

.player-overlay-button.is-hidden {
    display: none;
}

.play-icon {
    display: grid;
    width: 74px;
    height: 74px;
    place-items: center;
    margin: 0 auto;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--teal-bright), var(--blue));
    box-shadow: 0 20px 50px rgba(20, 184, 166, 0.35);
}

.player-status {
    position: absolute;
    left: 16px;
    bottom: 14px;
    z-index: 3;
    padding: 8px 12px;
    color: #ffffff;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.62);
    font-size: 13px;
}

.content-card p,
.info-card p {
    color: #334155;
    font-size: 17px;
    line-height: 1.9;
    white-space: pre-line;
}

.detail-list {
    display: grid;
    gap: 14px;
    margin: 0;
}

.detail-list div {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}

.detail-list dt {
    color: var(--muted);
    font-weight: 900;
}

.detail-list dd {
    margin: 0;
}

.detail-side {
    position: sticky;
    top: 96px;
}

.related-list {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.movie-card-horizontal {
    display: grid;
    grid-template-columns: 110px 1fr;
    border-radius: 18px;
}

.movie-card-horizontal .poster img {
    height: 100%;
    aspect-ratio: 2 / 3;
}

.movie-card-horizontal .movie-card-body {
    padding: 12px;
}

.movie-card-horizontal .movie-title {
    min-height: auto;
    font-size: 16px;
}

.movie-card-horizontal .movie-desc,
.movie-card-horizontal .tag-row {
    display: none;
}

.ranking-table {
    overflow: hidden;
}

.ranking-table-head,
.ranking-table-row {
    display: grid;
    grid-template-columns: 80px minmax(220px, 1fr) 140px 90px 120px 80px;
    gap: 16px;
    align-items: center;
    padding: 16px 20px;
}

.ranking-table-head {
    color: #ffffff;
    background: linear-gradient(90deg, var(--teal), var(--blue));
    font-weight: 900;
}

.ranking-table-row {
    border-top: 1px solid var(--line);
    color: #334155;
}

.ranking-table-row:hover {
    background: #f8fafc;
}

.ranking-table-index {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    color: #ffffff;
    border-radius: 14px;
    background: linear-gradient(135deg, #f97316, #ef4444);
    font-weight: 900;
}

.ranking-table-title {
    color: var(--ink);
    font-weight: 900;
}

.search-page .movie-grid:empty {
    display: none;
}

.search-summary {
    margin: 18px 0 26px;
}

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

.site-footer {
    color: #e5e7eb;
    background: linear-gradient(90deg, #0f172a, #1f2937, #0f172a);
    padding: 56px 0 24px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: 28px;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: #2dd4bf;
    font-size: 20px;
    font-weight: 900;
}

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

.site-footer a:hover {
    color: #5eead4;
}

.footer-bottom {
    width: min(1200px, calc(100% - 32px));
    margin: 34px auto 0;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: #94a3b8;
    text-align: center;
}

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

    .mobile-toggle {
        display: flex;
        margin-left: auto;
    }

    .hero-content,
    .highlight-layout,
    .split-section,
    .detail-layout,
    .detail-head-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero-poster {
        display: none;
    }

    .detail-side,
    .ranking-panel {
        position: static;
    }

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

    .category-overview-grid,
    .info-grid {
        grid-template-columns: 1fr;
    }

    .ranking-table-head,
    .ranking-table-row {
        grid-template-columns: 60px minmax(180px, 1fr) 100px;
    }

    .ranking-table-head span:nth-child(4),
    .ranking-table-head span:nth-child(5),
    .ranking-table-head span:nth-child(6),
    .ranking-table-row span:nth-child(4),
    .ranking-table-row span:nth-child(5),
    .ranking-table-row strong {
        display: none;
    }
}

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

    .brand {
        font-size: 20px;
    }

    .hero-carousel {
        height: 560px;
    }

    .hero-content {
        gap: 0;
    }

    .stat-strip,
    .compact-grid,
    .movie-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

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

    .category-overview-card,
    .movie-card-horizontal {
        grid-template-columns: 1fr;
    }

    .category-cover img {
        min-height: auto;
        aspect-ratio: 16 / 9;
    }

    .page-section {
        padding: 48px 0;
    }

    .detail-head-grid {
        gap: 24px;
    }

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

    .player-card,
    .content-card,
    .side-card,
    .info-card {
        padding: 18px;
    }

    .detail-list div {
        grid-template-columns: 1fr;
        gap: 6px;
    }
}
