:root {
    --bg: #f5f7fb;
    --card: #ffffff;
    --ink: #14213d;
    --muted: #667085;
    --line: #e5edf3;
    --teal: #0f766e;
    --teal-dark: #115e59;
    --teal-deep: #0b3f3b;
    --gold: #f59e0b;
    --red: #ef4444;
    --shadow: 0 20px 45px rgba(15, 35, 55, 0.12);
    --soft-shadow: 0 12px 30px rgba(15, 35, 55, 0.08);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(20, 184, 166, 0.16), transparent 32rem),
        linear-gradient(180deg, #f8fbff 0%, var(--bg) 45%, #eef4f7 100%);
}

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

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

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, var(--teal), var(--teal-deep));
    color: #ffffff;
    box-shadow: 0 14px 35px rgba(15, 118, 110, 0.25);
}

.nav-shell,
.footer-shell,
.content-section,
.search-panel,
.page-hero,
.detail-hero,
.player-section,
.detail-layout {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.nav-shell {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.logo-mark {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
    font-size: 15px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    padding: 10px 16px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.86);
    font-weight: 650;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

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

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.14);
}

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

.hero-carousel {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    background: linear-gradient(135deg, #0b3f3b 0%, #115e59 44%, #0f172a 100%);
    color: #ffffff;
}

.hero-stage {
    position: relative;
    min-height: 620px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 42%);
    align-items: center;
    gap: 38px;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    left: 50%;
    transform: translateX(-50%) scale(1.02);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 70px auto 54px -120px;
    width: 420px;
    border-radius: 999px;
    background: rgba(45, 212, 191, 0.18);
    filter: blur(70px);
}

.hero-image {
    order: 2;
    position: relative;
    min-height: 450px;
    border-radius: 34px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.45), rgba(15, 23, 42, 0.95));
    box-shadow: 0 35px 90px rgba(0, 0, 0, 0.38);
}

.hero-image img {
    width: 100%;
    height: 100%;
    min-height: 450px;
    object-fit: cover;
}

.hero-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.58), transparent 55%);
}

.hero-copy {
    position: relative;
    z-index: 2;
    max-width: 660px;
    padding: 72px 0;
}

.hero-tags,
.movie-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.movie-tags span,
.detail-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 11px;
    border-radius: 999px;
    background: rgba(15, 118, 110, 0.11);
    color: var(--teal-dark);
    font-size: 13px;
    font-weight: 700;
}

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

.hero-copy h1 {
    margin: 20px 0 18px;
    font-size: clamp(38px, 7vw, 72px);
    line-height: 0.96;
    letter-spacing: -0.05em;
}

.hero-copy p {
    max-width: 620px;
    margin: 0 0 30px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
    line-height: 1.8;
}

.hero-actions,
.page-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.primary-button,
.ghost-button,
.text-button,
.section-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
    color: #ffffff;
    background: linear-gradient(135deg, #14b8a6, #0f766e);
    box-shadow: 0 14px 28px rgba(20, 184, 166, 0.28);
}

.primary-button:hover,
.ghost-button:hover,
.text-button:hover,
.section-link:hover {
    transform: translateY(-2px);
}

.ghost-button {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

.ghost-button.dark {
    color: var(--teal-dark);
    background: rgba(15, 118, 110, 0.1);
    box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.2);
}

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

.hero-dots button {
    width: 34px;
    height: 7px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.32);
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dots button.is-active {
    width: 58px;
    background: #ffffff;
}

.search-panel {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr minmax(280px, 460px);
    align-items: center;
    gap: 24px;
    margin-top: -48px;
    padding: 28px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
    box-shadow: var(--shadow);
}

.search-panel span,
.section-heading > span,
.page-hero > span {
    display: inline-flex;
    margin-bottom: 8px;
    color: var(--teal);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.search-panel h2,
.section-heading h2,
.page-hero h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.15;
    letter-spacing: -0.035em;
}

.search-form,
.filter-bar label {
    display: flex;
    gap: 10px;
}

.search-form input,
.filter-bar input {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0 18px;
    outline: none;
    background: #ffffff;
    color: var(--ink);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-form input:focus,
.filter-bar input:focus {
    border-color: rgba(20, 184, 166, 0.65);
    box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.12);
}

.search-form button {
    min-height: 48px;
    border: 0;
    border-radius: 999px;
    padding: 0 22px;
    color: #ffffff;
    background: var(--teal);
    font-weight: 800;
}

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

.section-heading {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 20px;
    margin-bottom: 24px;
}

.section-heading p {
    margin: 8px 0 0;
    max-width: 720px;
    color: var(--muted);
    line-height: 1.75;
}

.section-link,
.text-button {
    color: var(--teal-dark);
    background: rgba(15, 118, 110, 0.1);
}

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

.category-tile,
.category-overview-card,
.movie-card,
.detail-block,
.detail-side-card {
    background: var(--card);
    border: 1px solid rgba(229, 237, 243, 0.78);
    border-radius: var(--radius);
    box-shadow: var(--soft-shadow);
}

.category-tile {
    padding: 18px;
    overflow: hidden;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-tile:hover,
.movie-card:hover,
.category-overview-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.category-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    min-height: 110px;
    margin-bottom: 16px;
}

.category-strip img,
.category-overview-cover img {
    width: 100%;
    height: 100%;
    min-height: 110px;
    border-radius: 16px;
    object-fit: cover;
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.3), rgba(15, 23, 42, 0.18));
}

.category-tile h2,
.category-overview-card h2 {
    margin: 0 0 8px;
    font-size: 20px;
}

.category-tile p,
.category-overview-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

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

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

.movie-cover {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.35), rgba(15, 23, 42, 0.85));
}

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

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

.type-badge,
.rank-badge {
    position: absolute;
    top: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 850;
}

.type-badge {
    right: 12px;
    padding: 0 11px;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(10px);
}

.rank-badge {
    left: 12px;
    width: 36px;
    background: var(--gold);
}

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

.movie-meta-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    color: var(--teal);
    font-size: 13px;
    font-weight: 800;
}

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

.movie-card h2 a:hover {
    color: var(--teal);
}

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

.page-hero {
    margin-top: 44px;
    padding: 54px;
    border-radius: 34px;
    color: #ffffff;
    background:
        radial-gradient(circle at top right, rgba(20, 184, 166, 0.45), transparent 28rem),
        linear-gradient(135deg, #0f766e 0%, #0f172a 100%);
    box-shadow: var(--shadow);
}

.page-hero p {
    max-width: 760px;
    margin: 16px 0 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 17px;
    line-height: 1.8;
}

.page-hero > span {
    color: #a7f3d0;
}

.page-hero-actions {
    margin-top: 26px;
}

.filter-bar {
    margin: 0 0 24px;
    padding: 18px;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: var(--soft-shadow);
}

.filter-bar label {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    align-items: center;
}

.filter-bar span {
    color: var(--teal-dark);
    font-weight: 850;
}

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

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

.category-overview-cover {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    min-height: 160px;
}

.category-overview-cover img {
    min-height: 76px;
}

.detail-hero {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 34px;
    align-items: stretch;
    margin-top: 44px;
    padding: 28px;
    border-radius: 34px;
    color: #ffffff;
    background:
        radial-gradient(circle at bottom left, rgba(20, 184, 166, 0.5), transparent 28rem),
        linear-gradient(135deg, #0f766e 0%, #111827 100%);
    box-shadow: var(--shadow);
}

.detail-poster {
    border-radius: 28px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.28);
}

.detail-poster img {
    width: 100%;
    height: 100%;
    min-height: 460px;
    object-fit: cover;
}

.detail-copy {
    padding: 20px 8px;
}

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

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

.detail-copy h1 {
    margin: 0 0 18px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.05;
    letter-spacing: -0.045em;
}

.detail-copy p {
    max-width: 780px;
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
    line-height: 1.8;
}

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

.detail-meta div {
    padding: 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.12);
}

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

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

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

.player-section {
    padding-top: 54px;
}

.compact-heading {
    margin-bottom: 16px;
}

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

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle at center, rgba(15, 118, 110, 0.32), rgba(2, 6, 23, 0.66));
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-icon {
    width: 74px;
    height: 74px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
    font-size: 28px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
    padding-top: 38px;
}

.detail-block,
.detail-side-card {
    padding: 26px;
}

.detail-block + .detail-block {
    margin-top: 22px;
}

.detail-block h2,
.detail-side-card h2,
.footer-links h2 {
    margin: 0 0 14px;
    font-size: 22px;
}

.detail-block p {
    margin: 0;
    color: #344054;
    font-size: 17px;
    line-height: 1.9;
}

.side-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.side-links a {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(15, 118, 110, 0.1);
    color: var(--teal-dark);
    font-weight: 800;
}

.related-section {
    padding-bottom: 72px;
}

.site-footer {
    margin-top: 76px;
    padding: 46px 0;
    color: rgba(255, 255, 255, 0.78);
    background: #0f172a;
}

.footer-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) 1fr 1fr;
    gap: 34px;
}

.footer-logo {
    margin-bottom: 16px;
    color: #ffffff;
}

.footer-brand p {
    max-width: 560px;
    margin: 0;
    line-height: 1.8;
}

.footer-links {
    display: grid;
    align-content: start;
    gap: 10px;
}

.footer-links h2 {
    color: #ffffff;
    font-size: 18px;
}

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

[data-movie-card].is-hidden {
    display: none;
}

.cover-empty {
    background:
        radial-gradient(circle at top right, rgba(20, 184, 166, 0.4), transparent 13rem),
        linear-gradient(135deg, #0f766e, #0f172a);
}

@media (max-width: 1024px) {
    .hero-slide,
    .detail-hero,
    .detail-layout,
    .search-panel {
        grid-template-columns: 1fr;
    }

    .hero-image {
        order: 0;
        min-height: 320px;
    }

    .hero-image img {
        min-height: 320px;
    }

    .hero-copy {
        padding: 24px 0 96px;
    }

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

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

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

@media (max-width: 760px) {
    .nav-shell {
        min-height: 64px;
    }

    .nav-toggle {
        display: block;
    }

    .nav-links {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 72px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        border-radius: 18px;
        background: #0f766e;
        box-shadow: var(--shadow);
    }

    .nav-links.is-open {
        display: flex;
    }

    .hero-carousel,
    .hero-stage {
        min-height: 720px;
    }

    .hero-slide {
        align-content: start;
        padding-top: 32px;
    }

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

    .search-panel,
    .page-hero,
    .detail-hero {
        padding: 24px;
        border-radius: 24px;
    }

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

    .section-heading {
        grid-template-columns: 1fr;
    }

    .filter-bar label,
    .category-overview-card,
    .footer-shell {
        grid-template-columns: 1fr;
    }

    .detail-poster img {
        min-height: 360px;
    }
}

@media (max-width: 520px) {
    .movie-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .site-logo {
        font-size: 19px;
    }

    .hero-carousel,
    .hero-stage {
        min-height: 760px;
    }

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