:root {
    color-scheme: light;
    --teal: #0d9488;
    --cyan: #0891b2;
    --blue: #2563eb;
    --ink: #101828;
    --muted: #667085;
    --line: #e5e7eb;
    --soft: #f3f7fa;
    --white: #ffffff;
    --radius: 22px;
    --shadow: 0 24px 70px rgba(15, 23, 42, 0.16);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #ffffff;
    background: linear-gradient(90deg, #0d9488, #0891b2, #2563eb);
    box-shadow: 0 14px 40px rgba(8, 145, 178, 0.25);
}

.site-nav {
    min-height: 76px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 20px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

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

.nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 22px;
    font-weight: 650;
}

.nav-links a,
.nav-search button,
.btn-ghost {
    transition: transform 0.25s ease, opacity 0.25s ease, background 0.25s ease;
}

.nav-links a:hover,
.nav-search button:hover,
.btn-ghost:hover {
    transform: translateY(-1px);
    opacity: 0.86;
}

.nav-search,
.wide-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(12px);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.nav-search input,
.wide-search input,
.filter-panel input {
    min-width: 220px;
    border: 0;
    outline: 0;
    color: #ffffff;
    background: transparent;
    padding: 8px 12px;
}

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

.nav-search button,
.wide-search button,
.btn-primary {
    border: 0;
    color: #ffffff;
    cursor: pointer;
    border-radius: 999px;
    background: linear-gradient(90deg, #14b8a6, #2563eb);
    padding: 10px 18px;
    font-weight: 800;
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.25);
}

.nav-toggle {
    display: none;
    color: #ffffff;
    border: 0;
    background: rgba(255, 255, 255, 0.16);
    border-radius: 12px;
    padding: 8px 12px;
}

.hero-slider {
    position: relative;
    min-height: 650px;
    overflow: hidden;
    color: #ffffff;
    background: #0f172a;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.55s ease;
}

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

.hero-backdrop,
.detail-hero::before {
    position: absolute;
    inset: 0;
    content: "";
    background-image: linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.72), rgba(20, 184, 166, 0.18)), var(--hero-image);
    background-size: cover;
    background-position: center;
    transform: scale(1.03);
    filter: saturate(1.08);
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 560px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 52px;
    align-items: center;
}

.hero-copy h1 {
    margin: 18px 0;
    font-size: clamp(42px, 6vw, 76px);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.hero-copy p {
    max-width: 740px;
    margin: 0 0 24px;
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.88);
}

.eyebrow {
    display: inline-flex;
    border-radius: 999px;
    padding: 8px 14px;
    font-weight: 800;
    color: #dffcf8;
    background: rgba(20, 184, 166, 0.22);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.hero-tags,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.tag-row span {
    display: inline-flex;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 13px;
    font-weight: 700;
    color: #0f766e;
    background: #e0f7f4;
}

.hero-tags span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
}

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

.btn-primary,
.btn-ghost,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-ghost {
    border-radius: 999px;
    padding: 10px 18px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
    font-weight: 800;
}

.btn-ghost.dark {
    color: var(--teal);
    background: #ecfeff;
    box-shadow: inset 0 0 0 1px #bae6fd;
}

.btn-primary.full {
    width: 100%;
    margin-top: 18px;
}

.hero-poster {
    position: relative;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transform: rotate(2deg);
}

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

.hero-rail {
    position: relative;
    z-index: 3;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    padding-bottom: 28px;
}

.hero-thumb {
    display: grid;
    grid-template-columns: 58px 1fr;
    align-items: center;
    gap: 10px;
    text-align: left;
    color: #ffffff;
    cursor: pointer;
    border: 0;
    border-radius: 18px;
    padding: 9px;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(12px);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.hero-thumb.is-active {
    background: rgba(20, 184, 166, 0.4);
}

.hero-thumb img {
    width: 58px;
    height: 72px;
    object-fit: cover;
    border-radius: 12px;
}

.content-section {
    padding: 42px 0;
}

.intro-panel {
    margin-top: -34px;
    position: relative;
    z-index: 4;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 24px;
    align-items: center;
    padding: 28px;
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--shadow);
}

.intro-panel h2,
.section-head h2,
.rank-panel h2,
.story-block h2,
.detail-side h2,
.table-section h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 38px);
    letter-spacing: -0.03em;
}

.intro-panel p,
.section-head p,
.rank-panel p,
.category-card p,
.category-tile p,
.story-block p,
.detail-side p {
    color: var(--muted);
    line-height: 1.8;
}

.intro-panel .wide-search,
.search-page-form {
    background: linear-gradient(90deg, #0d9488, #2563eb);
}

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

.section-head a,
.text-link {
    color: var(--teal);
    font-weight: 800;
}

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

.category-tile,
.category-card,
.rank-panel,
.detail-side,
.story-block,
.filter-panel,
.rank-table {
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.16);
}

.category-tile {
    padding: 20px;
    min-height: 150px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover,
.movie-card:hover,
.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.14);
}

.category-tile span {
    display: block;
    margin-bottom: 10px;
    font-size: 21px;
    font-weight: 900;
}

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

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 16px 44px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card-large {
    grid-column: span 1;
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, #cffafe, #dbeafe);
}

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

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

.poster-shade {
    position: absolute;
    inset: auto 0 0;
    height: 45%;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.58), transparent);
}

.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    display: inline-grid;
    place-items: center;
    min-width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #ffffff;
    background: linear-gradient(135deg, #14b8a6, #2563eb);
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.32);
}

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

.movie-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--teal);
    font-size: 13px;
    font-weight: 800;
}

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

.movie-card p {
    display: -webkit-box;
    min-height: 48px;
    margin: 0 0 12px;
    overflow: hidden;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

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

.rank-panel {
    position: sticky;
    top: 96px;
    padding: 24px;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 40px 1fr;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border-radius: 16px;
    background: #f8fafc;
}

.rank-row b {
    color: var(--teal);
    font-size: 20px;
}

.rank-row span {
    font-weight: 850;
}

.rank-row em {
    grid-column: 2;
    color: var(--muted);
    font-style: normal;
    font-size: 13px;
}

.page-hero {
    color: #ffffff;
    padding: 76px 0;
    background: linear-gradient(120deg, #0f766e 0%, #0891b2 46%, #2563eb 100%);
}

.page-hero h1 {
    max-width: 800px;
    margin: 12px 0;
    font-size: clamp(40px, 5vw, 66px);
    line-height: 1.08;
}

.page-hero p {
    max-width: 780px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 19px;
    line-height: 1.8;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    align-items: center;
    color: rgba(255, 255, 255, 0.78);
}

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

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

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

.category-cover-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    overflow: hidden;
    border-radius: 18px;
}

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

.filter-panel {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
    align-items: center;
    margin-bottom: 24px;
    padding: 16px;
}

.filter-panel input {
    width: 100%;
    color: var(--ink);
    border-radius: 999px;
    background: #f8fafc;
    box-shadow: inset 0 0 0 1px #e2e8f0;
}

.filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.filter-actions button {
    cursor: pointer;
    border: 0;
    border-radius: 999px;
    color: var(--teal);
    background: #ecfeff;
    padding: 9px 12px;
    font-weight: 800;
}

.empty-state {
    display: none;
    padding: 42px;
    text-align: center;
    color: var(--muted);
    border-radius: var(--radius);
    background: #ffffff;
}

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

.rank-table {
    overflow: hidden;
}

.table-row-link {
    display: grid;
    grid-template-columns: 60px 1fr 90px 120px 100px;
    gap: 14px;
    padding: 14px 18px;
    align-items: center;
    border-bottom: 1px solid #edf2f7;
}

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

.table-row-link span {
    color: var(--teal);
    font-weight: 900;
}

.table-row-link em {
    color: var(--muted);
    font-style: normal;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: #0f172a;
}

.detail-hero::before {
    background-image: linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.76), rgba(8, 145, 178, 0.24)), var(--detail-image);
}

.detail-overlay {
    position: absolute;
    inset: 0;
    backdrop-filter: blur(2px);
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    padding: 44px 0 54px;
}

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

.detail-poster {
    width: 300px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.detail-copy h1 {
    margin: 18px 0;
    font-size: clamp(38px, 5vw, 68px);
    line-height: 1.08;
}

.one-line {
    max-width: 800px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 20px;
    line-height: 1.8;
}

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

.detail-meta div {
    padding: 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.detail-meta dt {
    color: rgba(255, 255, 255, 0.68);
    font-size: 13px;
}

.detail-meta dd {
    margin: 4px 0 0;
    font-weight: 850;
}

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

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

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

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

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 12px;
    cursor: pointer;
    color: #ffffff;
    border: 0;
    background: radial-gradient(circle, rgba(20, 184, 166, 0.2), rgba(2, 6, 23, 0.66));
}

.player-cover.is-hidden {
    display: none;
}

.play-symbol {
    display: grid;
    place-items: center;
    width: 82px;
    height: 82px;
    border-radius: 50%;
    background: linear-gradient(135deg, #14b8a6, #2563eb);
    box-shadow: 0 16px 44px rgba(37, 99, 235, 0.36);
    font-size: 34px;
}

.play-text {
    font-size: 18px;
    font-weight: 850;
}

.story-block {
    margin-top: 24px;
    padding: 26px;
}

.story-block p {
    margin-bottom: 0;
    font-size: 17px;
}

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

.side-link {
    display: inline-flex;
    margin: 16px 0;
    color: var(--teal);
    font-weight: 900;
}

.site-footer {
    margin-top: 42px;
    color: #ffffff;
    background: linear-gradient(90deg, #111827, #1f2937, #0f172a);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 36px;
    padding: 46px 0;
}

.footer-grid p {
    max-width: 520px;
    color: rgba(255, 255, 255, 0.68);
    line-height: 1.8;
}

.footer-grid a {
    display: block;
    margin-top: 10px;
    color: rgba(255, 255, 255, 0.75);
}

.footer-bottom {
    padding: 18px;
    text-align: center;
    color: rgba(255, 255, 255, 0.62);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.is-hidden-card {
    display: none;
}

@media (max-width: 1080px) {
    .site-nav {
        grid-template-columns: auto auto;
    }

    .nav-toggle {
        display: inline-flex;
        justify-self: end;
    }

    .nav-links,
    .nav-search {
        display: none;
    }

    .nav-links.is-open {
        grid-column: 1 / -1;
        display: grid;
        justify-content: stretch;
        gap: 0;
        padding-bottom: 12px;
    }

    .nav-links.is-open a {
        padding: 12px 0;
        border-top: 1px solid rgba(255, 255, 255, 0.16);
    }

    .hero-content,
    .detail-top,
    .detail-layout,
    .split-layout,
    .intro-panel {
        grid-template-columns: 1fr;
    }

    .hero-poster {
        display: none;
    }

    .hero-rail,
    .category-grid,
    .movie-grid,
    .compact-grid,
    .listing-grid,
    .ranking-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .category-card-grid {
        grid-template-columns: 1fr;
    }

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

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

@media (max-width: 720px) {
    .page-shell {
        width: min(100% - 22px, 1180px);
    }

    .hero-slider {
        min-height: 680px;
    }

    .hero-content {
        min-height: 510px;
    }

    .hero-rail,
    .category-grid,
    .movie-grid,
    .compact-grid,
    .listing-grid,
    .ranking-grid,
    .footer-grid,
    .detail-meta {
        grid-template-columns: 1fr;
    }

    .hero-thumb {
        grid-template-columns: 52px 1fr;
    }

    .section-head,
    .footer-grid {
        display: grid;
    }

    .category-card {
        grid-template-columns: 1fr;
    }

    .category-cover-strip img {
        height: 150px;
    }

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

    .table-row-link {
        grid-template-columns: 42px 1fr;
    }

    .table-row-link em {
        display: none;
    }

    .wide-search {
        display: grid;
        border-radius: 22px;
    }

    .wide-search input {
        min-width: 0;
        width: 100%;
    }
}
