:root {
    --ink: #1f2937;
    --muted: #6b7280;
    --line: rgba(255, 255, 255, 0.18);
    --card: rgba(255, 255, 255, 0.92);
    --soft: #fff7ed;
    --orange: #f97316;
    --orange-dark: #ea580c;
    --pink: #ec4899;
    --yellow: #eab308;
    --shadow: 0 24px 60px rgba(17, 24, 39, 0.16);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at 8% 0%, rgba(251, 146, 60, 0.22), transparent 32rem),
        radial-gradient(circle at 90% 16%, rgba(236, 72, 153, 0.18), transparent 30rem),
        linear-gradient(135deg, #fff7ed 0%, #fdf2f8 52%, #fefce8 100%);
    min-height: 100vh;
}

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

img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(251, 146, 60, 0.16);
    backdrop-filter: blur(16px);
    box-shadow: 0 12px 34px rgba(17, 24, 39, 0.08);
}

.nav-shell {
    max-width: 1240px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.brand-mark {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #fff;
    font-weight: 900;
    font-size: 22px;
    background: linear-gradient(135deg, var(--orange), var(--pink));
    box-shadow: 0 12px 28px rgba(236, 72, 153, 0.28);
}

.brand-text {
    display: grid;
    gap: 2px;
}

.brand-text strong {
    font-size: 22px;
    line-height: 1;
    letter-spacing: -0.02em;
    background: linear-gradient(90deg, var(--orange), var(--pink), var(--yellow));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-text small {
    color: var(--muted);
    font-size: 12px;
}

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

.site-nav a,
.site-nav button {
    border: 0;
    background: transparent;
    color: #4b5563;
    padding: 10px 14px;
    border-radius: 14px;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover,
.site-nav button:hover,
.site-nav .is-active {
    color: var(--orange-dark);
    background: rgba(255, 237, 213, 0.95);
}

.nav-dropdown {
    position: relative;
}

.dropdown-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 180px;
    padding: 8px;
    display: grid;
    gap: 4px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(251, 146, 60, 0.16);
    border-radius: 18px;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: 0.2s ease;
}

.nav-dropdown:hover .dropdown-panel,
.nav-dropdown:focus-within .dropdown-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-panel a {
    display: block;
    padding: 10px 12px;
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: rgba(255, 237, 213, 0.85);
    padding: 10px;
}

.nav-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    border-radius: 2px;
    background: var(--orange-dark);
}

.hero {
    position: relative;
    min-height: 74vh;
    overflow: hidden;
    background: #111827;
}

.hero-slides {
    position: absolute;
    inset: 0;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    background-size: cover;
    background-position: center;
    transition: opacity 0.75s ease, visibility 0.75s ease;
}

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

.hero-inner {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 90px 0 70px;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.62fr);
    gap: 42px;
    align-items: center;
    color: #fff;
}

.hero-copy {
    max-width: 720px;
}

.hero-kicker,
.section-kicker,
.page-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: #fed7aa;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero h1 {
    margin: 0;
    font-size: clamp(42px, 7vw, 82px);
    line-height: 0.98;
    letter-spacing: -0.06em;
    text-shadow: 0 18px 46px rgba(0, 0, 0, 0.4);
}

.hero p {
    max-width: 660px;
    margin: 22px 0 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 18px;
    line-height: 1.85;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.hero-meta span,
.tag-cloud span,
.detail-tags span {
    display: inline-flex;
    padding: 7px 11px;
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(6px);
}

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

.btn-primary,
.btn-secondary,
.section-more,
.hero-control,
.play-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary,
.play-button {
    color: #fff;
    background: linear-gradient(135deg, var(--orange), var(--pink));
    box-shadow: 0 16px 34px rgba(236, 72, 153, 0.3);
}

.btn-secondary {
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.24);
    backdrop-filter: blur(8px);
}

.btn-primary:hover,
.btn-secondary:hover,
.section-more:hover,
.play-button:hover {
    transform: translateY(-2px);
}

.hero-poster {
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 32px;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    box-shadow: 0 34px 80px rgba(0, 0, 0, 0.42);
    transform: rotate(2deg);
}

.hero-controls {
    position: absolute;
    z-index: 5;
    left: 50%;
    bottom: 34px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 14px;
}

.hero-control {
    min-width: 44px;
    padding: 0 15px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: rgba(0, 0, 0, 0.28);
    cursor: pointer;
}

.hero-dots {
    display: flex;
    gap: 8px;
}

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

.hero-dot.is-active {
    width: 30px;
    background: #fff;
}

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

.main-shell {
    padding: 42px 0 74px;
}

.content-section {
    margin-top: 58px;
}

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

.section-heading h2,
.page-heading h1 {
    margin: 0;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.section-heading p,
.page-heading p {
    max-width: 720px;
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.8;
}

.section-more {
    color: var(--orange-dark);
    background: rgba(255, 237, 213, 0.94);
    border: 1px solid rgba(251, 146, 60, 0.25);
}

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

.movie-card {
    overflow: hidden;
    border-radius: 24px;
    background: var(--card);
    border: 1px solid rgba(255, 255, 255, 0.74);
    box-shadow: 0 18px 44px rgba(17, 24, 39, 0.1);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 28px 62px rgba(17, 24, 39, 0.18);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    background: linear-gradient(135deg, #fed7aa, #fbcfe8);
    overflow: hidden;
}

.poster-gradient {
    position: absolute;
    inset: auto 0 0 0;
    height: 44%;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent);
}

.year-badge,
.score-badge,
.rank-badge {
    position: absolute;
    top: 12px;
    padding: 7px 10px;
    border-radius: 999px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    background: rgba(0, 0, 0, 0.52);
    backdrop-filter: blur(8px);
}

.year-badge {
    left: 12px;
}

.score-badge {
    right: 12px;
    background: linear-gradient(135deg, var(--orange), var(--pink));
}

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

.movie-card-title {
    display: block;
    margin-bottom: 8px;
    font-weight: 900;
    font-size: 18px;
    line-height: 1.35;
}

.movie-card-title:hover {
    color: var(--orange-dark);
}

.movie-card p {
    min-height: 3.2em;
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.62;
}

.movie-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
    color: #9ca3af;
    font-size: 13px;
}

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

.category-tile {
    position: relative;
    min-height: 180px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    border-radius: 26px;
    color: #fff;
    background: linear-gradient(135deg, var(--orange), var(--pink));
    box-shadow: 0 20px 46px rgba(236, 72, 153, 0.18);
}

.category-tile:nth-child(3n + 2) {
    background: linear-gradient(135deg, #f59e0b, #fb7185);
}

.category-tile:nth-child(3n) {
    background: linear-gradient(135deg, #fb923c, #a855f7);
}

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

.category-tile p {
    margin: 12px 0 0;
    color: rgba(255, 255, 255, 0.86);
    line-height: 1.7;
}

.filter-panel {
    margin: 28px 0;
    padding: 18px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 190px;
    gap: 14px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.76);
    border-radius: 24px;
    box-shadow: 0 14px 38px rgba(17, 24, 39, 0.08);
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    height: 48px;
    border: 1px solid rgba(251, 146, 60, 0.22);
    border-radius: 16px;
    padding: 0 15px;
    outline: none;
    background: #fff;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

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

.rank-item {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    min-height: 126px;
    padding: 14px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 14px 34px rgba(17, 24, 39, 0.1);
}

.rank-poster {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    aspect-ratio: 3 / 4;
}

.rank-badge {
    left: 10px;
    top: 10px;
    background: linear-gradient(135deg, var(--orange), var(--pink));
}

.rank-body strong {
    display: block;
    font-size: 18px;
    line-height: 1.35;
}

.rank-body p {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.6;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    background: #111827;
}

.detail-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: blur(10px) saturate(1.05);
    transform: scale(1.06);
    opacity: 0.5;
}

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(17, 24, 39, 0.96), rgba(17, 24, 39, 0.72), rgba(17, 24, 39, 0.95));
}

.detail-shell {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 58px 0;
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 38px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border-radius: 30px;
    aspect-ratio: 3 / 4;
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.45);
}

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

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

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

.detail-summary {
    max-width: 760px;
    margin-top: 18px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 17px;
    line-height: 1.85;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 20px;
}

.detail-main {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 44px 0 78px;
}

.player-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #030712;
    box-shadow: 0 30px 74px rgba(17, 24, 39, 0.2);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #fff;
    background-size: cover;
    background-position: center;
    cursor: pointer;
}

.player-overlay::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.72));
}

.player-overlay.is-hidden {
    display: none;
}

.play-button {
    position: relative;
    min-height: 58px;
    padding: 0 26px;
    font-size: 18px;
}

.info-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 28px;
    margin-top: 34px;
}

.detail-panel,
.aside-panel {
    padding: 26px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 18px 44px rgba(17, 24, 39, 0.1);
}

.detail-panel h2,
.aside-panel h2 {
    margin: 0 0 16px;
    font-size: 26px;
}

.detail-panel p {
    margin: 0 0 18px;
    color: #374151;
    line-height: 1.95;
}

.meta-list {
    display: grid;
    gap: 12px;
    color: #4b5563;
}

.meta-list div {
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(249, 115, 22, 0.12);
}

.meta-list strong {
    display: block;
    color: #111827;
    margin-bottom: 5px;
}

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

.related-grid .movie-card p {
    min-height: auto;
}

.no-results {
    display: none;
    padding: 34px;
    text-align: center;
    color: var(--muted);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.82);
}

.no-results.is-visible {
    display: block;
}

.site-footer {
    color: #fff;
    background: linear-gradient(90deg, var(--orange-dark), var(--pink), var(--yellow));
    margin-top: 50px;
}

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

.footer-logo {
    font-size: 24px;
    font-weight: 900;
    margin-bottom: 12px;
}

.site-footer p {
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.8;
}

.site-footer h3 {
    margin: 0 0 14px;
}

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

.footer-links a {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
}

.footer-bottom {
    padding: 18px 20px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.78);
}

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

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

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

    .site-nav {
        position: absolute;
        left: 20px;
        right: 20px;
        top: 74px;
        display: none;
        padding: 12px;
        flex-direction: column;
        align-items: stretch;
        background: rgba(255, 255, 255, 0.98);
        border-radius: 22px;
        box-shadow: var(--shadow);
    }

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

    .nav-dropdown {
        display: none;
    }

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

    .hero-poster {
        display: none;
    }

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

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

@media (max-width: 560px) {
    .brand-text strong {
        font-size: 18px;
    }

    .main-shell,
    .page-shell,
    .detail-main,
    .detail-shell,
    .hero-inner {
        width: min(100% - 28px, 1240px);
    }

    .hero {
        min-height: 68vh;
    }

    .movie-grid,
    .category-grid,
    .rank-list,
    .related-grid {
        grid-template-columns: 1fr;
    }

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

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