* {
    box-sizing: border-box;
}

:root {
    --emerald: #059669;
    --teal: #0d9488;
    --cyan: #0891b2;
    --amber: #f59e0b;
    --slate-950: #020617;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748b;
    --slate-100: #f1f5f9;
    --slate-50: #f8fafc;
    --white: #ffffff;
    --shadow: 0 24px 60px rgba(15, 23, 42, 0.16);
    --soft-shadow: 0 14px 34px rgba(15, 23, 42, 0.10);
    --radius: 22px;
}

body {
    margin: 0;
    color: var(--slate-800);
    background: var(--white);
    font-family: "Inter", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.65;
}

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    color: var(--white);
    background: linear-gradient(90deg, var(--emerald), var(--teal), var(--cyan));
    box-shadow: 0 16px 38px rgba(8, 145, 178, 0.28);
}

.header-inner {
    min-height: 76px;
    display: flex;
    align-items: center;
    gap: 22px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.logo-mark {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--emerald);
    background: var(--white);
    border-radius: 999px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
    transition: transform 0.3s ease;
}

.logo:hover .logo-mark,
.footer-brand:hover .logo-mark {
    transform: scale(1.08) rotate(8deg);
}

.logo-copy strong {
    display: block;
    font-size: 22px;
    line-height: 1.1;
    letter-spacing: 0.02em;
}

.logo-copy small {
    display: block;
    color: rgba(255, 255, 255, 0.78);
    font-size: 12px;
    margin-top: 4px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.nav-link,
.mobile-link {
    padding: 10px 14px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.86);
    transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

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

.header-search,
.mobile-search,
.page-filter {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search {
    padding: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
}

.header-search input,
.mobile-search input,
.page-filter input {
    min-width: 220px;
    border: 0;
    outline: 0;
    color: var(--white);
    background: transparent;
    padding: 8px 10px;
}

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

.header-search button,
.mobile-search button,
.page-filter button {
    border: 0;
    cursor: pointer;
    border-radius: 999px;
    padding: 8px 16px;
    color: var(--emerald);
    background: var(--white);
    font-weight: 700;
}

.mobile-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.14);
    cursor: pointer;
}

.mobile-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: var(--white);
    border-radius: 10px;
}

.mobile-nav {
    display: none;
    padding: 0 16px 18px;
}

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

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

.mobile-search {
    background: rgba(255, 255, 255, 0.16);
    border-radius: 16px;
    padding: 8px;
}

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

.hero {
    position: relative;
    height: 620px;
    overflow: hidden;
    background: var(--slate-950);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.9s ease, visibility 0.9s ease;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
}

.hero-slide > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.05);
    transition: transform 6s ease;
}

.hero-slide.is-active > img {
    transform: scale(1.0);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.86), rgba(15, 23, 42, 0.56), rgba(15, 23, 42, 0.10));
}

.hero-copy {
    color: var(--white);
    max-width: 760px;
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    color: var(--white);
    background: linear-gradient(90deg, var(--emerald), var(--teal));
    border-radius: 999px;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.hero-copy h1 {
    margin: 22px 0 18px;
    font-size: clamp(42px, 7vw, 74px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

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

.hero-tags,
.detail-meta,
.movie-meta,
.tag-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags a,
.hero-tags span,
.detail-meta span,
.movie-meta span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 10px;
    color: var(--slate-700);
    background: var(--slate-100);
    font-size: 12px;
    font-weight: 700;
}

.hero-tags a,
.hero-tags span {
    color: var(--white);
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
}

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

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border-radius: 14px;
    padding: 0 22px;
    border: 0;
    cursor: pointer;
    font-weight: 800;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

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

.button-primary {
    color: var(--white);
    background: linear-gradient(90deg, var(--emerald), var(--teal));
    box-shadow: 0 14px 28px rgba(5, 150, 105, 0.28);
}

.button-ghost {
    color: var(--white);
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(10px);
}

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

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

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

.section {
    padding: 76px 0;
}

.section-white {
    background: var(--white);
}

.section-soft {
    background: linear-gradient(180deg, var(--white), var(--slate-50));
}

.section-dark {
    color: var(--white);
    background: linear-gradient(180deg, var(--slate-800), var(--slate-950));
}

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

.section-head h2 {
    margin: 12px 0 6px;
    color: inherit;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.15;
}

.section-head p {
    max-width: 680px;
    margin: 0;
    color: var(--slate-600);
}

.section-dark .section-head p {
    color: rgba(255, 255, 255, 0.72);
}

.section-more {
    flex-shrink: 0;
    color: var(--emerald);
    font-weight: 800;
}

.section-dark .section-more {
    color: #6ee7b7;
}

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

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--soft-shadow);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: linear-gradient(135deg, var(--slate-800), var(--slate-950));
}

.poster-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

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

.poster-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    border-radius: 999px;
    padding: 5px 10px;
    color: var(--white);
    background: rgba(5, 150, 105, 0.92);
    font-size: 12px;
    font-weight: 800;
}

.poster-play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 58px;
    height: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--emerald);
    background: rgba(255, 255, 255, 0.92);
    border-radius: 999px;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.88);
    transition: opacity 0.28s ease, transform 0.28s ease;
}

.movie-card:hover .poster-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

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

.movie-card h2,
.rank-copy h2 {
    margin: 0 0 8px;
    color: var(--slate-800);
    font-size: 18px;
    line-height: 1.35;
}

.movie-card h2 a,
.rank-copy h2 a {
    transition: color 0.25s ease;
}

.movie-card:hover h2 a,
.rank-copy h2 a:hover {
    color: var(--emerald);
}

.movie-card p,
.rank-copy p {
    margin: 0 0 14px;
    color: var(--slate-600);
    font-size: 14px;
}

.movie-meta {
    margin-bottom: 12px;
}

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

.category-card,
.category-overview-card {
    min-height: 230px;
    border-radius: var(--radius);
    background: linear-gradient(145deg, var(--white), var(--slate-50));
    box-shadow: var(--soft-shadow);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

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

.category-card a,
.category-overview-card a {
    display: flex;
    min-height: inherit;
    flex-direction: column;
    padding: 24px;
}

.category-icon {
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    background: linear-gradient(135deg, var(--emerald), var(--cyan));
    border-radius: 16px;
    margin-bottom: 18px;
}

.category-card h2,
.category-overview-card h2 {
    margin: 0 0 10px;
    font-size: 21px;
}

.category-card p,
.category-overview-card p {
    margin: 0 0 16px;
    color: var(--slate-600);
    font-size: 14px;
}

.category-overview-card strong {
    color: var(--emerald);
    margin-bottom: 10px;
}

.category-samples {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}

.category-samples a {
    display: inline-flex;
    min-height: auto;
    padding: 4px 8px;
    border-radius: 999px;
    color: var(--slate-600);
    background: var(--slate-100);
    font-size: 12px;
}

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

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

.rank-item {
    display: grid;
    grid-template-columns: auto 92px 1fr;
    align-items: center;
    gap: 16px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
}

.ranking-page .rank-item {
    grid-template-columns: auto 120px 1fr;
}

.rank-number {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--slate-950);
    background: linear-gradient(135deg, #fef3c7, var(--amber));
    border-radius: 14px;
    font-weight: 900;
}

.rank-poster {
    overflow: hidden;
    display: block;
    border-radius: 14px;
    aspect-ratio: 3 / 4;
    background: var(--slate-900);
}

.rank-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rank-copy h2,
.section-dark .rank-copy h2 {
    color: var(--white);
}

.rank-copy p,
.section-dark .rank-copy p {
    color: rgba(255, 255, 255, 0.74);
}

.page-hero {
    color: var(--white);
    background: radial-gradient(circle at top left, rgba(16, 185, 129, 0.42), transparent 32%), linear-gradient(135deg, var(--slate-900), var(--slate-950));
}

.small-hero {
    padding: 70px 0 56px;
}

.page-hero h1 {
    margin: 18px 0 12px;
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.08;
}

.page-hero p {
    max-width: 720px;
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 18px;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    color: rgba(255, 255, 255, 0.76);
    font-size: 14px;
}

.breadcrumbs a::after {
    content: "/";
    margin-left: 8px;
    color: rgba(255, 255, 255, 0.45);
}

.page-filter {
    width: min(620px, 100%);
    margin-top: 28px;
    padding: 8px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(12px);
}

.page-filter input {
    width: 100%;
    min-width: 0;
}

.search-page-form .button {
    min-height: 42px;
}

.empty-state {
    display: none;
    margin-top: 28px;
    padding: 28px;
    text-align: center;
    color: var(--slate-600);
    background: var(--slate-50);
    border-radius: 18px;
}

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

.detail-hero {
    padding: 38px 0 58px;
    color: var(--white);
    background: radial-gradient(circle at 20% 0%, rgba(16, 185, 129, 0.36), transparent 30%), linear-gradient(135deg, var(--slate-900), var(--slate-950));
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.55fr);
    gap: 28px;
    margin-top: 28px;
    align-items: stretch;
}

.player-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    min-height: 320px;
    background: #000000;
    border-radius: 26px;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
}

.player-shell video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    background: #000000;
}

.play-layer {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: var(--white);
    cursor: pointer;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.22), rgba(2, 6, 23, 0.74));
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-pulse {
    width: 82px;
    height: 82px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--emerald);
    background: rgba(255, 255, 255, 0.94);
    border-radius: 999px;
    font-size: 30px;
    box-shadow: 0 0 0 12px rgba(255, 255, 255, 0.16);
}

.detail-panel {
    overflow: hidden;
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 18px;
    align-items: start;
    padding: 18px;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(14px);
}

.detail-panel > img {
    width: 120px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 18px;
    background: var(--slate-900);
}

.detail-info h1 {
    margin: 16px 0 10px;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.08;
}

.detail-info p {
    margin: 0 0 16px;
    color: rgba(255, 255, 255, 0.78);
}

.detail-meta span,
.detail-info .tag-row span {
    color: var(--white);
    background: rgba(255, 255, 255, 0.16);
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.story-card {
    padding: 30px;
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--soft-shadow);
}

.story-card h2 {
    margin: 14px 0 14px;
    font-size: 30px;
}

.story-card p {
    margin: 0;
    color: var(--slate-600);
    font-size: 16px;
}

.accent-card {
    background: linear-gradient(145deg, #ecfdf5, var(--white));
}

.search-title {
    margin-bottom: 24px;
    color: var(--slate-700);
    font-size: 20px;
    font-weight: 800;
}

.site-footer {
    color: rgba(255, 255, 255, 0.74);
    background: linear-gradient(180deg, var(--slate-800), var(--slate-950));
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 1fr;
    gap: 40px;
    padding: 56px 0;
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    color: var(--white);
    font-size: 22px;
}

.site-footer h2 {
    margin: 0 0 18px;
    color: var(--white);
    font-size: 18px;
}

.site-footer p {
    margin: 0;
    max-width: 420px;
}

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

.footer-links a {
    border-radius: 999px;
    padding: 7px 11px;
    background: rgba(255, 255, 255, 0.08);
    transition: background 0.25s ease, color 0.25s ease;
}

.footer-links a:hover {
    color: var(--white);
    background: rgba(16, 185, 129, 0.28);
}

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

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

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

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

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

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

    .mobile-toggle {
        display: block;
        margin-left: auto;
    }

    .hero {
        height: 560px;
    }

    .movie-grid,
    .featured-grid,
    .archive-grid,
    .category-grid,
    .category-overview-grid,
    .compact-ranking,
    .content-grid,
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

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

@media (max-width: 620px) {
    .container {
        width: min(100% - 24px, 1180px);
    }

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

    .logo-copy small {
        display: none;
    }

    .logo-copy strong {
        font-size: 18px;
    }

    .hero {
        height: 560px;
    }

    .hero-overlay {
        background: linear-gradient(180deg, rgba(2, 6, 23, 0.44), rgba(2, 6, 23, 0.86));
    }

    .hero-copy h1 {
        margin-top: 18px;
    }

    .movie-grid,
    .featured-grid,
    .archive-grid,
    .category-grid,
    .category-overview-grid,
    .compact-ranking,
    .content-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .rank-item,
    .ranking-page .rank-item {
        grid-template-columns: auto 82px 1fr;
        gap: 12px;
    }

    .rank-copy p {
        display: none;
    }

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

    .detail-panel > img {
        width: 92px;
    }

    .player-shell {
        min-height: 220px;
        border-radius: 18px;
    }

    .section {
        padding: 52px 0;
    }
}
