:root {
    --slate-950: #020617;
    --slate-900: #0f172a;
    --slate-850: #142033;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;
    --teal-700: #0f766e;
    --teal-600: #0d9488;
    --teal-500: #14b8a6;
    --teal-300: #5eead4;
    --amber-500: #f59e0b;
    --amber-400: #fbbf24;
    --rose-600: #e11d48;
    --text: #101827;
    --muted: #64748b;
    --line: rgba(148, 163, 184, 0.25);
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 46%, #f1f5f9 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #ffffff;
    background: linear-gradient(90deg, #134e4a 0%, #0f172a 100%);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.18);
}

.header-inner {
    width: min(1240px, calc(100% - 32px));
    height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: max-content;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    color: #0f172a;
    background: linear-gradient(135deg, var(--amber-400), #fde68a);
    font-weight: 900;
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.32);
}

.brand-text {
    display: grid;
    line-height: 1.15;
}

.brand-text strong {
    font-size: 20px;
    letter-spacing: 0.06em;
}

.brand-text em {
    margin-top: 4px;
    color: var(--teal-300);
    font-size: 12px;
    font-style: normal;
}

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

.nav-link {
    color: rgba(255, 255, 255, 0.82);
    font-weight: 600;
    transition: color 0.2s ease, transform 0.2s ease;
}

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

.header-search,
.mobile-search {
    position: relative;
    display: flex;
    align-items: center;
    width: 330px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
}

.header-search input,
.mobile-search input {
    width: 100%;
    min-width: 0;
    padding: 11px 10px 11px 16px;
    color: #ffffff;
    border: 0;
    outline: 0;
    background: transparent;
}

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

.header-search button,
.mobile-search button {
    margin-right: 6px;
    padding: 7px 12px;
    border: 0;
    border-radius: 10px;
    color: #0f172a;
    background: var(--teal-300);
    font-weight: 700;
}

.search-results {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    display: none;
    max-height: 420px;
    overflow: auto;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    background: #ffffff;
    color: var(--text);
    box-shadow: var(--shadow);
}

.search-results.is-open {
    display: block;
}

.search-results a,
.search-empty {
    display: block;
    padding: 12px 14px;
    border-bottom: 1px solid #f1f5f9;
}

.search-results a:hover {
    background: #f0fdfa;
}

.search-results strong {
    display: block;
    color: #0f172a;
}

.search-results span {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 13px;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.mobile-panel {
    display: none;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
}

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

.mobile-panel nav {
    display: grid;
    gap: 8px;
    margin-top: 14px;
}

.mobile-panel nav a {
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
}

.page-main {
    min-height: 70vh;
}

.hero {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    color: #ffffff;
    background: linear-gradient(90deg, var(--slate-900), var(--slate-800));
}

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

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

.hero-bg {
    position: absolute;
    inset: -18px;
    background-size: cover;
    background-position: center;
    filter: blur(8px);
    transform: scale(1.08);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 82% 35%, rgba(20, 184, 166, 0.28), transparent 34%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.74) 46%, rgba(2, 6, 23, 0.18) 100%);
}

.hero-inner {
    position: relative;
    width: min(1240px, calc(100% - 32px));
    min-height: 620px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 420px;
    align-items: center;
    gap: 48px;
}

.hero-kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    padding: 8px 14px;
    border-radius: 999px;
    color: #111827;
    background: var(--amber-400);
    font-size: 14px;
    font-weight: 800;
}

.hero h1 {
    max-width: 720px;
    margin: 18px 0 14px;
    font-size: clamp(40px, 6vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero p {
    max-width: 720px;
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.84);
    font-size: clamp(17px, 2vw, 22px);
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0 0 30px;
    color: rgba(255, 255, 255, 0.78);
}

.hero-meta span {
    padding: 7px 11px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
}

.hero-actions,
.section-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    border: 0;
    border-radius: 14px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    color: #ffffff;
    background: var(--teal-600);
    box-shadow: 0 12px 28px rgba(13, 148, 136, 0.28);
}

.btn-primary:hover {
    background: var(--teal-700);
}

.btn-ghost {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.14);
}

.btn-light {
    color: #0f172a;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

.hero-poster {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 30px;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.4);
}

.hero-poster img {
    width: 100%;
    height: 520px;
    object-fit: cover;
}

.hero-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(2, 6, 23, 0.75));
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 28px;
    z-index: 4;
    width: min(1240px, calc(100% - 32px));
    display: flex;
    justify-content: space-between;
    transform: translateX(-50%);
    pointer-events: none;
}

.hero-controls button {
    pointer-events: auto;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.48);
    backdrop-filter: blur(8px);
}

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

.hero-dots button {
    width: 28px;
    height: 5px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.38);
}

.hero-dots button.is-active {
    background: var(--teal-300);
}

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

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

.section-header h2,
.page-title h1,
.detail-copy h1 {
    margin: 0;
    color: #0f172a;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.18;
    letter-spacing: -0.03em;
}

.section-header p,
.page-title p {
    max-width: 760px;
    margin: 8px 0 0;
    color: var(--muted);
}

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

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

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

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(20, 184, 166, 0.36);
    box-shadow: var(--shadow);
}

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

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: #0f172a;
}

.poster-link img,
.compact-card img,
.rank-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.poster-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.76);
    font-size: 12px;
    font-weight: 700;
}

.card-body {
    padding: 16px;
}

.card-title {
    display: -webkit-box;
    min-height: 52px;
    overflow: hidden;
    color: #0f172a;
    font-size: 18px;
    font-weight: 850;
    line-height: 1.42;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-title:hover,
.rank-title:hover {
    color: var(--teal-700);
}

.card-line {
    display: -webkit-box;
    min-height: 67px;
    margin: 8px 0 12px;
    overflow: hidden;
    color: var(--muted);
    font-size: 14px;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.card-meta,
.rank-copy div,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
}

.card-meta span,
.rank-copy div span,
.detail-meta span {
    padding: 5px 9px;
    border-radius: 999px;
    background: #f1f5f9;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.tag-row span,
.detail-tags span {
    padding: 4px 8px;
    border-radius: 999px;
    color: var(--teal-700);
    background: #ccfbf1;
    font-size: 12px;
    font-weight: 700;
}

.compact-card a {
    position: relative;
    display: block;
    height: 180px;
    overflow: hidden;
    background: #0f172a;
}

.compact-card span {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 36px 12px 12px;
    color: #ffffff;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.86));
    font-weight: 800;
}

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

.category-card {
    position: relative;
    min-height: 220px;
    overflow: hidden;
    padding: 24px;
    border-radius: 26px;
    color: #ffffff;
    background: linear-gradient(135deg, #0f766e, #0f172a);
    box-shadow: var(--shadow);
}

.category-card::after {
    content: "";
    position: absolute;
    right: -48px;
    bottom: -58px;
    width: 180px;
    height: 180px;
    border-radius: 999px;
    background: rgba(251, 191, 36, 0.22);
}

.category-card h3 {
    position: relative;
    margin: 0 0 10px;
    font-size: 24px;
}

.category-card p {
    position: relative;
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.82);
}

.category-card a {
    position: relative;
    display: inline-flex;
    padding: 9px 14px;
    border-radius: 12px;
    color: #0f172a;
    background: #ffffff;
    font-weight: 800;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 52px 92px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 12px;
}

.rank-no {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: #0f172a;
    background: linear-gradient(135deg, var(--amber-400), #fde68a);
    font-weight: 900;
}

.rank-cover {
    overflow: hidden;
    width: 92px;
    height: 124px;
    border-radius: 16px;
    background: #0f172a;
}

.rank-title {
    display: block;
    margin-bottom: 6px;
    color: #0f172a;
    font-size: 17px;
    font-weight: 850;
}

.rank-copy p {
    display: -webkit-box;
    margin: 0 0 10px;
    overflow: hidden;
    color: var(--muted);
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.page-hero {
    padding: 72px 0;
    color: #ffffff;
    background:
        radial-gradient(circle at 18% 0%, rgba(20, 184, 166, 0.36), transparent 32%),
        linear-gradient(135deg, #0f172a, #134e4a 70%, #0f172a);
}

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

.page-title h1,
.page-title p {
    color: #ffffff;
}

.page-title p {
    color: rgba(255, 255, 255, 0.78);
}

.filter-panel {
    width: min(1240px, calc(100% - 32px));
    margin: 26px auto 0;
    padding: 18px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px 180px;
    gap: 12px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    outline: 0;
    background: #f8fafc;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--teal-500);
    background: #ffffff;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: var(--slate-900);
}

.detail-hero-bg {
    position: absolute;
    inset: -20px;
    background-size: cover;
    background-position: center;
    filter: blur(10px);
    transform: scale(1.08);
    opacity: 0.58;
}

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.48));
}

.detail-inner {
    position: relative;
    z-index: 1;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 54px 0;
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 36px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border-radius: 28px;
    box-shadow: 0 26px 68px rgba(0, 0, 0, 0.38);
}

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

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

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

.detail-copy h1 {
    color: #ffffff;
}

.detail-copy .lead {
    max-width: 840px;
    margin: 16px 0 18px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 19px;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.player-section {
    width: min(1240px, calc(100% - 32px));
    margin: 42px auto 0;
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(300px, 0.8fr);
    gap: 24px;
    align-items: start;
}

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

.player-frame video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.62));
    transition: opacity 0.2s ease;
}

.play-overlay span {
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    padding-left: 6px;
    border-radius: 999px;
    background: rgba(20, 184, 166, 0.88);
    font-size: 34px;
    box-shadow: 0 18px 48px rgba(20, 184, 166, 0.32);
}

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

.detail-panel,
.copy-panel {
    padding: 24px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.detail-panel h2,
.copy-panel h2 {
    margin: 0 0 14px;
    color: #0f172a;
}

.copy-panel {
    width: min(1240px, calc(100% - 32px));
    margin: 28px auto 0;
}

.copy-panel p,
.detail-panel p {
    margin: 0 0 12px;
    color: #334155;
}

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

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

.site-footer {
    margin-top: 76px;
    color: #cbd5e1;
    background: linear-gradient(135deg, #0f172a, #111827);
}

.footer-inner {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 40px 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr);
    gap: 32px;
}

.footer-brand strong {
    color: #ffffff;
}

.footer-inner p {
    max-width: 640px;
    margin: 14px 0 0;
}

.footer-inner nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.footer-inner nav a {
    padding: 8px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
}

.footer-inner nav a:hover {
    color: var(--teal-300);
}

.back-top {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 40;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 16px;
    color: #ffffff;
    background: var(--teal-600);
    box-shadow: 0 12px 30px rgba(13, 148, 136, 0.32);
}

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

    .menu-toggle {
        display: grid;
        place-items: center;
        margin-left: auto;
    }

    .mobile-search {
        width: 100%;
    }

    .hero-inner,
    .detail-inner,
    .player-section,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .hero-poster {
        display: none;
    }

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

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

@media (max-width: 760px) {
    .header-inner {
        height: 64px;
    }

    .brand-text em {
        display: none;
    }

    .hero,
    .hero-inner {
        min-height: 560px;
    }

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

    .hero-controls {
        display: none;
    }

    .section {
        padding-top: 44px;
    }

    .section-header {
        display: block;
    }

    .section-actions {
        margin-top: 16px;
    }

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

    .rank-item {
        grid-template-columns: 42px minmax(0, 1fr);
    }

    .rank-cover {
        display: none;
    }

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

    .detail-inner {
        padding: 36px 0;
    }

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

    .player-section {
        margin-top: 24px;
    }
}

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

    .compact-card a {
        height: 220px;
    }
}
