:root {
    --night-950: #0a1929;
    --night-900: #102a43;
    --night-800: #243b53;
    --night-700: #334e68;
    --night-600: #486581;
    --harbor-500: #1a9995;
    --harbor-400: #26b3af;
    --harbor-300: #4dc4c1;
    --amber-400: #ffca28;
    --white: #ffffff;
    --muted: #9aa8b6;
    --card: rgba(36, 59, 83, 0.54);
    --line: rgba(51, 78, 104, 0.62);
    --shadow: 0 26px 70px rgba(0, 0, 0, 0.36);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--white);
    background:
        radial-gradient(circle at top left, rgba(38, 179, 175, 0.18), transparent 32rem),
        linear-gradient(180deg, var(--night-900), var(--night-950) 38rem, var(--night-900));
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(51, 78, 104, 0.5);
    background: rgba(16, 42, 67, 0.92);
    backdrop-filter: blur(18px);
}

.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    min-height: 72px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 22px;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: max-content;
    color: var(--white);
    font-weight: 800;
    letter-spacing: 0.02em;
}

.logo-mark {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--harbor-400), #126b67);
    box-shadow: 0 14px 30px rgba(38, 179, 175, 0.23);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.main-nav a,
.mobile-menu a {
    color: #d1d5db;
    font-size: 15px;
    transition: color 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active,
.mobile-menu a:hover,
.mobile-menu a.active {
    color: var(--harbor-300);
}

.header-search,
.mobile-search {
    display: flex;
    align-items: center;
    border: 1px solid rgba(72, 101, 129, 0.72);
    border-radius: 999px;
    overflow: hidden;
    background: rgba(10, 25, 41, 0.72);
}

.header-search input,
.mobile-search input,
.large-search input,
.filter-panel input,
.filter-panel select,
.search-page-form input {
    border: 0;
    color: var(--white);
    outline: 0;
    background: transparent;
}

.header-search input,
.mobile-search input {
    width: 180px;
    padding: 10px 12px 10px 16px;
}

.header-search button,
.mobile-search button,
.large-search button {
    border: 0;
    color: var(--white);
    cursor: pointer;
    padding: 10px 16px;
    background: var(--harbor-500);
    transition: background 0.2s ease, transform 0.2s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.large-search button:hover,
.primary-btn:hover {
    background: var(--harbor-400);
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--white);
    width: 42px;
    height: 42px;
    cursor: pointer;
    background: rgba(36, 59, 83, 0.6);
}

.mobile-menu {
    display: none;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px 22px;
}

.mobile-menu.is-open {
    display: block;
}

.mobile-menu nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 16px;
}

.hero {
    position: relative;
    min-height: 72vh;
    overflow: hidden;
    background: var(--night-950);
}

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

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

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.03);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(10, 25, 41, 0.96), rgba(10, 25, 41, 0.62), rgba(10, 25, 41, 0.25)),
        linear-gradient(0deg, var(--night-950), rgba(10, 25, 41, 0.2) 45%, transparent);
}

.hero-content {
    position: absolute;
    left: 50%;
    bottom: 72px;
    width: min(1180px, calc(100% - 40px));
    transform: translateX(-50%);
    max-width: 1180px;
}

.hero-content > * {
    max-width: 720px;
}

.hero-kicker,
.section-heading span,
.detail-meta,
.page-hero span {
    color: var(--harbor-300);
    font-weight: 700;
    letter-spacing: 0.04em;
}

.hero h1 {
    margin: 10px 0 16px;
    font-size: clamp(42px, 7vw, 86px);
    line-height: 1;
    font-weight: 900;
    text-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.hero p,
.page-hero p,
.detail-hero-content p {
    margin: 0;
    color: #d9e2ec;
    font-size: clamp(16px, 2vw, 21px);
    line-height: 1.8;
}

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

.hero-tags span,
.tag-row span {
    border: 1px solid rgba(38, 179, 175, 0.35);
    border-radius: 999px;
    color: #c7fffb;
    padding: 5px 10px;
    background: rgba(6, 49, 45, 0.45);
    font-size: 13px;
}

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

.primary-btn,
.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 12px 22px;
    font-weight: 800;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.primary-btn {
    background: var(--harbor-500);
    color: var(--white);
    box-shadow: 0 18px 38px rgba(26, 153, 149, 0.26);
}

.ghost-btn {
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.08);
}

.ghost-btn:hover {
    transform: translateY(-1px);
    border-color: var(--harbor-300);
    background: rgba(38, 179, 175, 0.12);
}

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

.hero-dots button {
    width: 38px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.28);
}

.hero-dots button.is-active {
    background: var(--harbor-400);
}

.section {
    width: min(1280px, calc(100% - 40px));
    margin: 0 auto;
    padding: 64px 0 0;
}

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

.section-heading h2 {
    margin: 5px 0 0;
    font-size: clamp(26px, 4vw, 42px);
    line-height: 1.15;
}

.section-heading a {
    color: var(--harbor-300);
    font-weight: 700;
}

.quick-search-panel {
    padding-top: 42px;
}

.large-search {
    display: flex;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: 10px;
    background: rgba(16, 42, 67, 0.72);
    box-shadow: var(--shadow);
}

.large-search input {
    flex: 1;
    min-width: 0;
    padding: 16px 18px;
    font-size: 17px;
}

.large-search button {
    border-radius: 20px;
    padding: 0 26px;
    font-weight: 800;
}

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

.category-tile {
    position: relative;
    min-height: 210px;
    overflow: hidden;
    border: 1px solid rgba(51, 78, 104, 0.55);
    border-radius: 26px;
    background: var(--night-800);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
}

.category-tile img {
    width: 100%;
    height: 100%;
    min-height: 210px;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.category-tile:hover img {
    transform: scale(1.08);
}

.category-tile-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(10, 25, 41, 0.96), rgba(10, 25, 41, 0.26));
}

.category-tile strong,
.category-tile em {
    position: absolute;
    left: 20px;
    right: 20px;
    z-index: 2;
}

.category-tile strong {
    bottom: 58px;
    font-size: 24px;
}

.category-tile em {
    bottom: 22px;
    color: #cbd5e1;
    font-size: 14px;
    font-style: normal;
    line-height: 1.5;
}

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(51, 78, 104, 0.55);
    border-radius: 24px;
    background: rgba(36, 59, 83, 0.48);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.22);
    transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(38, 179, 175, 0.58);
    background: rgba(36, 59, 83, 0.72);
}

.movie-poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: var(--night-800);
}

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

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

.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #0a1929;
    background: var(--amber-400);
    font-weight: 900;
}

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

.movie-meta-line {
    color: var(--harbor-300);
    font-size: 13px;
    font-weight: 700;
}

.movie-card h3 {
    margin: 8px 0 8px;
    color: var(--white);
    font-size: 19px;
    line-height: 1.35;
}

.movie-card p {
    display: -webkit-box;
    margin: 0;
    min-height: 46px;
    overflow: hidden;
    color: #aebfce;
    font-size: 14px;
    line-height: 1.65;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

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

.movie-rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(180px, 220px);
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 12px;
    scroll-snap-type: x proximity;
}

.movie-rail .movie-card {
    scroll-snap-align: start;
}

.ranking-panel {
    position: sticky;
    top: 94px;
    border: 1px solid rgba(51, 78, 104, 0.55);
    border-radius: 28px;
    padding: 22px;
    background: rgba(16, 42, 67, 0.72);
    box-shadow: var(--shadow);
}

.compact-heading h2 {
    font-size: 28px;
}

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

.ranking-item {
    display: grid;
    grid-template-columns: 34px 56px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    border-radius: 18px;
    padding: 10px;
    background: rgba(36, 59, 83, 0.44);
    transition: background 0.2s ease, transform 0.2s ease;
}

.ranking-item:hover {
    transform: translateX(3px);
    background: rgba(36, 59, 83, 0.78);
}

.ranking-item span {
    color: var(--amber-400);
    font-size: 20px;
    font-weight: 900;
    text-align: center;
}

.ranking-item img {
    width: 56px;
    height: 76px;
    border-radius: 12px;
    object-fit: cover;
}

.ranking-item strong,
.ranking-item em {
    grid-column: 3;
    min-width: 0;
}

.ranking-item strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ranking-item em {
    color: var(--muted);
    font-style: normal;
    font-size: 13px;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at top right, rgba(38, 179, 175, 0.18), transparent 26rem), linear-gradient(135deg, var(--night-900), var(--night-950));
}

.page-hero {
    padding: 94px 20px 72px;
}

.page-hero > div {
    width: min(1180px, 100%);
    margin: 0 auto;
}

.page-hero h1 {
    max-width: 880px;
    margin: 8px 0 14px;
    font-size: clamp(36px, 6vw, 64px);
    line-height: 1.05;
}

.page-hero p {
    max-width: 760px;
}

.filter-panel {
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: 22px;
    background: rgba(16, 42, 67, 0.74);
    box-shadow: var(--shadow);
}

.filter-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px 180px;
    gap: 12px;
}

.filter-row input,
.filter-row select {
    border: 1px solid rgba(72, 101, 129, 0.72);
    border-radius: 16px;
    color: var(--white);
    padding: 13px 14px;
    background: rgba(10, 25, 41, 0.72);
}

.filter-row select option {
    color: #0a1929;
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.filter-tags button {
    border: 1px solid rgba(38, 179, 175, 0.35);
    border-radius: 999px;
    color: #d9fbf9;
    cursor: pointer;
    padding: 9px 13px;
    background: rgba(6, 49, 45, 0.35);
}

.filter-tags button.is-active,
.filter-tags button:hover {
    background: var(--harbor-500);
}

.category-lines {
    display: grid;
    gap: 14px;
}

.category-line {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 18px;
    background: rgba(36, 59, 83, 0.4);
}

.category-line strong {
    color: var(--harbor-300);
}

.category-line span {
    overflow: hidden;
    color: #cbd5e1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ranking-grid .movie-card:nth-child(-n + 3) {
    border-color: rgba(255, 202, 40, 0.55);
}

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

.search-page-form {
    margin-bottom: 26px;
}

.search-empty {
    grid-column: 1 / -1;
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 38px;
    color: #cbd5e1;
    background: rgba(36, 59, 83, 0.44);
    text-align: center;
}

.detail-hero {
    min-height: 72vh;
}

.detail-hero > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.52;
}

.detail-hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(10, 25, 41, 0.98), rgba(10, 25, 41, 0.66), rgba(10, 25, 41, 0.22)),
        linear-gradient(0deg, var(--night-950), rgba(10, 25, 41, 0.18));
}

.detail-hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 40px));
    min-height: 72vh;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: end;
    padding: 88px 0 70px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: #cbd5e1;
    font-size: 14px;
}

.breadcrumb a {
    color: var(--harbor-300);
}

.detail-hero h1 {
    max-width: 920px;
    margin: 12px 0 16px;
    font-size: clamp(38px, 6vw, 76px);
    line-height: 1.05;
}

.detail-hero-content p {
    max-width: 820px;
}

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

.detail-poster-card {
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: 16px;
    background: rgba(16, 42, 67, 0.72);
    box-shadow: var(--shadow);
}

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

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

.detail-copy {
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: 32px;
    background: rgba(36, 59, 83, 0.42);
}

.detail-copy h2 {
    margin: 0 0 12px;
    color: var(--harbor-300);
    font-size: 26px;
}

.detail-copy p {
    margin: 0 0 28px;
    color: #d9e2ec;
    line-height: 2;
    font-size: 17px;
}

.detail-copy p:last-child {
    margin-bottom: 0;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(38, 179, 175, 0.35);
    border-radius: 30px;
    background: #000;
    box-shadow: 0 34px 86px rgba(0, 0, 0, 0.45);
    aspect-ratio: 16 / 9;
}

.player-shell video {
    width: 100%;
    height: 100%;
    background: #000;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: var(--white);
    cursor: pointer;
    background-size: cover;
    background-position: center;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-circle {
    width: 88px;
    height: 88px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #0a1929;
    background: var(--harbor-400);
    font-size: 32px;
    box-shadow: 0 18px 50px rgba(38, 179, 175, 0.32);
}

.player-cover strong {
    font-size: 28px;
}

.player-cover em {
    color: #d9e2ec;
    font-style: normal;
}

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

.footer-inner {
    width: min(1280px, calc(100% - 40px));
    margin: 72px auto 0;
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 34px;
    border-top: 1px solid var(--line);
    padding: 44px 0 28px;
}

.footer-inner p {
    max-width: 430px;
    color: var(--muted);
    line-height: 1.8;
}

.footer-inner h2 {
    margin: 0 0 14px;
    font-size: 18px;
}

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

.footer-links a {
    color: #cbd5e1;
}

.footer-links a:hover {
    color: var(--harbor-300);
}

.footer-bottom {
    border-top: 1px solid rgba(51, 78, 104, 0.4);
    color: #8396a8;
    padding: 22px;
    text-align: center;
}

@media (max-width: 1180px) {
    .header-search {
        display: none;
    }

    .main-nav {
        justify-content: flex-end;
    }

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

    .ranking-panel {
        position: static;
    }

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

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

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

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

    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

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

    .site-logo span:last-child {
        font-size: 15px;
    }

    .hero {
        min-height: 76vh;
    }

    .hero-content {
        bottom: 62px;
    }

    .section {
        width: min(100% - 28px, 1280px);
        padding-top: 46px;
    }

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

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

    .filter-row,
    .detail-layout,
    .footer-inner,
    .category-line {
        grid-template-columns: 1fr;
    }

    .detail-poster-card {
        max-width: 340px;
        margin: 0 auto;
    }

    .large-search {
        flex-direction: column;
        border-radius: 22px;
    }

    .large-search button {
        min-height: 48px;
    }
}

@media (max-width: 560px) {
    .header-inner {
        padding: 0 14px;
    }

    .mobile-menu {
        padding: 0 14px 18px;
    }

    .hero-content,
    .detail-hero-content,
    .section,
    .footer-inner {
        width: calc(100% - 24px);
    }

    .hero h1,
    .detail-hero h1,
    .page-hero h1 {
        font-size: 36px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

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

    .movie-rail {
        grid-auto-columns: minmax(170px, 76vw);
    }

    .player-cover strong {
        font-size: 22px;
    }

    .play-circle {
        width: 72px;
        height: 72px;
    }
}
