:root {
    --bg: #f8fafc;
    --panel: #ffffff;
    --ink: #0f172a;
    --muted: #64748b;
    --soft: #e2e8f0;
    --accent: #10b981;
    --accent-dark: #059669;
    --teal: #0d9488;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(226, 232, 240, 0.92);
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(14px);
}

.header-inner {
    max-width: 1280px;
    height: 66px;
    margin: 0 auto;
    padding: 0 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
}

.brand-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent), var(--teal));
    box-shadow: 0 10px 22px rgba(16, 185, 129, 0.28);
    position: relative;
    flex: 0 0 auto;
}

.brand-icon::after {
    content: "";
    width: 0;
    height: 0;
    margin-left: 3px;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 13px solid #fff;
}

.brand-name {
    font-size: 20px;
    background: linear-gradient(90deg, #059669, #0d9488);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 26px;
}

.nav-link {
    color: #334155;
    font-weight: 650;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--accent-dark);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    padding: 9px;
    border: 0;
    border-radius: 12px;
    background: #f1f5f9;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: #0f172a;
    border-radius: 99px;
}

.mobile-panel {
    display: none;
    border-top: 1px solid var(--soft);
    background: #fff;
}

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

.mobile-nav {
    max-width: 1280px;
    margin: 0 auto;
    padding: 12px 22px 20px;
    display: grid;
    gap: 8px;
}

.mobile-nav a {
    padding: 10px 12px;
    border-radius: 12px;
    color: #334155;
    font-weight: 650;
}

.mobile-nav a:hover {
    background: #ecfdf5;
    color: var(--accent-dark);
}

.hero-slider {
    position: relative;
    height: min(72vh, 620px);
    min-height: 500px;
    overflow: hidden;
    background: #020617;
}

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.44) 45%, rgba(2, 6, 23, 0.24));
}

.hero-content {
    position: absolute;
    left: max(24px, calc((100vw - 1280px) / 2 + 24px));
    right: 24px;
    bottom: 74px;
    max-width: 760px;
    color: #fff;
}

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

.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.92);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}

.hero-content h1 {
    margin: 18px 0 12px;
    font-size: clamp(36px, 7vw, 66px);
    line-height: 1.05;
    letter-spacing: -0.04em;
    text-shadow: 0 12px 28px rgba(0, 0, 0, 0.5);
}

.hero-content p {
    margin: 0 0 20px;
    max-width: 720px;
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(16px, 2vw, 20px);
}

.hero-meta,
.detail-meta,
.meta-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.82);
    font-weight: 650;
}

.hero-meta span,
.detail-meta span {
    position: relative;
}

.hero-meta span + span::before,
.detail-meta span + span::before {
    content: "";
    position: absolute;
    left: -8px;
    top: 50%;
    width: 4px;
    height: 4px;
    border-radius: 999px;
    background: currentColor;
    transform: translateY(-50%);
    opacity: 0.55;
}

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

.primary-btn,
.ghost-btn,
.primary-small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 22px;
    border-radius: 13px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn,
.primary-small {
    color: #fff;
    background: var(--accent);
    box-shadow: 0 15px 28px rgba(16, 185, 129, 0.32);
}

.primary-btn:hover,
.primary-small:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
}

.ghost-btn {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(10px);
}

.ghost-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-1px);
}

.primary-small {
    min-height: 38px;
    padding: 0 16px;
    border-radius: 11px;
    font-size: 14px;
}

.hero-dots {
    position: absolute;
    right: max(24px, calc((100vw - 1280px) / 2 + 24px));
    bottom: 36px;
    display: flex;
    align-items: center;
    gap: 9px;
}

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

.hero-dot.is-active {
    width: 34px;
    background: var(--accent);
}

.page-container {
    max-width: 1280px;
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
}

.page-stack {
    padding-top: 46px;
    padding-bottom: 72px;
    display: grid;
    gap: 58px;
}

.inner-page {
    min-height: 60vh;
}

.search-band {
    margin-top: -42px;
    position: relative;
    z-index: 3;
    padding: 0 24px;
}

.search-card {
    max-width: 1120px;
    margin: 0 auto;
    padding: 26px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow);
    display: grid;
    grid-template-columns: minmax(260px, 0.8fr) minmax(320px, 1.2fr);
    align-items: center;
    gap: 22px;
}

.search-card h2 {
    margin: 0;
    font-size: clamp(22px, 3vw, 32px);
    letter-spacing: -0.03em;
}

.search-form {
    display: flex;
    gap: 12px;
}

.search-form input,
.filter-toolbar input {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--soft);
    border-radius: 14px;
    padding: 0 16px;
    color: var(--ink);
    background: #fff;
    outline: none;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.search-form input:focus,
.filter-toolbar input:focus {
    border-color: rgba(16, 185, 129, 0.65);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.14);
}

.search-form button,
.filter-toolbar button {
    min-width: 96px;
    min-height: 48px;
    border: 0;
    border-radius: 14px;
    color: #fff;
    background: var(--accent);
    font-weight: 800;
    cursor: pointer;
}

.search-form button:hover,
.filter-toolbar button:hover {
    background: var(--accent-dark);
}

.search-form-large {
    margin-bottom: 30px;
}

.content-section {
    display: grid;
    gap: 24px;
}

.section-heading {
    display: flex;
    align-items: center;
    gap: 14px;
}

.section-heading span {
    color: var(--accent-dark);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.section-heading h2,
.category-panel h2,
.side-card h2,
.detail-section h2,
.compact-hero h1 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.18;
    letter-spacing: -0.03em;
}

.section-heading p,
.category-panel p,
.compact-hero p {
    margin: 5px 0 0;
    color: var(--muted);
}

.section-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--accent), var(--teal));
    box-shadow: 0 12px 24px rgba(16, 185, 129, 0.25);
    position: relative;
    flex: 0 0 auto;
}

.section-icon::after {
    content: "";
    position: absolute;
    left: 18px;
    top: 13px;
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-left: 14px solid #fff;
}

.split-heading,
.category-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.more-link {
    color: var(--accent-dark);
    font-weight: 800;
    white-space: nowrap;
}

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

.movie-card {
    min-width: 0;
}

.card-link,
.wide-link {
    display: block;
    height: 100%;
    overflow: hidden;
    border-radius: 16px;
    background: var(--panel);
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.07);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.card-link:hover,
.wide-link:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 35px rgba(15, 23, 42, 0.15);
}

.poster-wrap,
.wide-cover {
    position: relative;
    margin: 0;
    overflow: hidden;
    background: #0f172a;
}

.poster-wrap {
    aspect-ratio: 3 / 4;
}

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

.card-link:hover img,
.wide-link:hover img {
    transform: scale(1.08);
}

.poster-wrap::after,
.wide-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.32);
    opacity: 0;
    transition: opacity 0.22s ease;
}

.card-link:hover .poster-wrap::after,
.wide-link:hover .wide-cover::after {
    opacity: 1;
}

.play-mark,
.big-play {
    position: absolute;
    z-index: 2;
    left: 50%;
    top: 50%;
    width: 48px;
    height: 48px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    transform: translate(-50%, -50%) scale(0.88);
    opacity: 0;
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.play-mark::after,
.big-play::after {
    content: "";
    position: absolute;
    left: 19px;
    top: 14px;
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-left: 15px solid var(--accent-dark);
}

.card-link:hover .play-mark,
.wide-link:hover .play-mark {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.year-badge,
.rank-badge {
    position: absolute;
    z-index: 3;
    top: 10px;
    border-radius: 999px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
}

.year-badge {
    right: 10px;
    padding: 6px 9px;
    background: var(--accent);
}

.rank-badge {
    left: 10px;
    min-width: 30px;
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.card-body {
    padding: 13px;
}

.card-body h3,
.wide-body h3 {
    margin: 0 0 7px;
    color: var(--ink);
    font-size: 15px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-body p,
.wide-body p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.card-link:hover h3,
.wide-link:hover h3 {
    color: var(--accent-dark);
}

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

.wide-link {
    display: flex;
    gap: 16px;
    padding: 0;
}

.wide-cover {
    width: 190px;
    aspect-ratio: 16 / 10;
    flex: 0 0 auto;
}

.wide-body {
    min-width: 0;
    padding: 16px 16px 16px 0;
    align-self: center;
}

.wide-body h3 {
    font-size: 18px;
    -webkit-line-clamp: 1;
}

.wide-body p:not(.meta-line) {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.meta-line {
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 13px;
}

.page-hero {
    overflow: hidden;
    border-radius: 26px;
    background: radial-gradient(circle at 20% 20%, rgba(16, 185, 129, 0.18), transparent 26%), linear-gradient(135deg, #ecfdf5, #fff);
    box-shadow: 0 12px 38px rgba(15, 23, 42, 0.08);
}

.compact-hero {
    padding: clamp(28px, 5vw, 54px);
}

.compact-hero span {
    display: inline-flex;
    margin-bottom: 10px;
    color: var(--accent-dark);
    font-weight: 900;
    letter-spacing: 0.12em;
}

.compact-hero p {
    max-width: 820px;
    font-size: 17px;
}

.category-panel {
    padding: 24px;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.07);
    display: grid;
    gap: 22px;
}

.filter-toolbar {
    display: flex;
    max-width: 680px;
    gap: 12px;
}

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

.search-results:empty::before {
    content: "输入关键词后显示匹配影片";
    color: var(--muted);
}

.site-footer {
    color: #cbd5e1;
    background: #0f172a;
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 54px 24px 34px;
    display: grid;
    grid-template-columns: 1.7fr 1fr 1fr;
    gap: 38px;
}

.footer-brand {
    color: #fff;
    font-size: 20px;
    margin-bottom: 16px;
}

.footer-about p {
    max-width: 560px;
    color: #94a3b8;
    margin: 0;
}

.site-footer h3 {
    margin: 0 0 14px;
    color: #fff;
    font-size: 16px;
}

.site-footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 7px;
}

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

.site-footer a:hover {
    color: #34d399;
}

.footer-bottom {
    border-top: 1px solid #1e293b;
    padding: 18px 24px;
    text-align: center;
    color: #94a3b8;
    font-size: 14px;
}

.detail-page {
    background: var(--bg);
}

.detail-hero {
    min-height: 520px;
    background-size: cover;
    background-position: center;
    color: #fff;
}

.detail-hero-inner {
    min-height: 520px;
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 36px;
    align-items: end;
    padding-top: 60px;
    padding-bottom: 54px;
}

.detail-poster {
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.34);
}

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

.detail-copy h1 {
    margin: 12px 0 14px;
    font-size: clamp(36px, 6vw, 64px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
}

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

.detail-one-line {
    max-width: 820px;
    margin: 0 0 18px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 19px;
}

.detail-copy .tag-row {
    margin: 20px 0 28px;
}

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

.player-area,
.detail-content,
.side-card {
    min-width: 0;
}

.player-area {
    grid-column: 1 / 2;
}

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

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

.player-cover {
    position: absolute;
    inset: 0;
    border: 0;
    padding: 24px;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.3));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    text-align: center;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.player-cover .big-play {
    position: relative;
    left: auto;
    top: auto;
    width: 76px;
    height: 76px;
    transform: none;
    opacity: 1;
    background: #fff;
}

.player-cover .big-play::after {
    left: 31px;
    top: 23px;
    border-top-width: 15px;
    border-bottom-width: 15px;
    border-left-width: 22px;
}

.player-cover strong {
    font-size: 22px;
    text-shadow: 0 8px 18px rgba(0, 0, 0, 0.42);
}

.player-loading,
.player-message {
    position: absolute;
    left: 50%;
    bottom: 18px;
    z-index: 3;
    padding: 7px 12px;
    border-radius: 999px;
    color: #fff;
    background: rgba(15, 23, 42, 0.82);
    font-size: 13px;
    transform: translateX(-50%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.player-loading.is-visible,
.player-message.is-visible {
    opacity: 1;
}

.side-card,
.detail-section {
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.07);
}

.side-card {
    grid-column: 2 / 3;
    grid-row: 1 / span 2;
    padding: 24px;
    align-self: start;
    position: sticky;
    top: 90px;
}

.side-card dl {
    margin: 18px 0 0;
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 10px 14px;
}

.side-card dt {
    color: var(--muted);
}

.side-card dd {
    margin: 0;
    font-weight: 700;
}

.detail-content {
    grid-column: 1 / 2;
    display: grid;
    gap: 24px;
}

.detail-section {
    padding: 26px;
}

.detail-section p {
    margin: 14px 0 0;
    color: #334155;
    font-size: 17px;
}

.detail-tags {
    margin-top: 14px;
}

.related-grid {
    margin-top: 18px;
}

@media (max-width: 1100px) {
    .movie-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

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

    .side-card,
    .detail-content,
    .player-area {
        grid-column: auto;
        grid-row: auto;
    }

    .side-card {
        position: static;
    }
}

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

    .menu-toggle {
        display: block;
    }

    .hero-slider {
        min-height: 540px;
        height: 68vh;
    }

    .hero-content {
        left: 20px;
        bottom: 86px;
    }

    .hero-dots {
        left: 20px;
        right: auto;
        bottom: 34px;
    }

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

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

    .wide-list {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        grid-template-columns: 1fr;
    }

    .detail-hero-inner {
        grid-template-columns: 150px minmax(0, 1fr);
        align-items: center;
        min-height: 460px;
    }
}

@media (max-width: 620px) {
    .header-inner,
    .page-container {
        padding-left: 16px;
        padding-right: 16px;
    }

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

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

    .hero-content h1 {
        font-size: 38px;
    }

    .hero-actions,
    .search-form,
    .filter-toolbar,
    .split-heading,
    .category-panel-head {
        align-items: stretch;
        flex-direction: column;
    }

    .search-form button,
    .filter-toolbar button {
        width: 100%;
    }

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

    .wide-link {
        gap: 12px;
    }

    .wide-cover {
        width: 132px;
    }

    .wide-body {
        padding: 12px 12px 12px 0;
    }

    .detail-hero {
        min-height: auto;
    }

    .detail-hero-inner {
        grid-template-columns: 1fr;
        padding-top: 36px;
        padding-bottom: 38px;
    }

    .detail-poster {
        width: min(220px, 62vw);
    }

    .detail-copy h1 {
        font-size: 38px;
    }

    .detail-section,
    .side-card,
    .category-panel {
        padding: 20px;
    }
}
