:root {
    --primary-50: #fef3e2;
    --primary-100: #fde8c2;
    --primary-500: #d89410;
    --primary-600: #b6790d;
    --accent-50: #fff5ed;
    --accent-500: #f95c16;
    --accent-600: #ea420c;
    --secondary-50: #f5f7fa;
    --secondary-100: #e7ebf2;
    --secondary-700: #3d486a;
    --secondary-800: #353d59;
    --secondary-900: #2f344c;
    --text-main: #182033;
    --text-muted: #667085;
    --line: #e5e7eb;
    --white: #ffffff;
    --shadow-soft: 0 18px 45px rgba(47, 52, 76, 0.12);
    --shadow-card: 0 14px 35px rgba(47, 52, 76, 0.10);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
    --max-width: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    color: var(--text-main);
    background: linear-gradient(180deg, var(--primary-50), #ffffff 360px, var(--secondary-50));
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(229, 231, 235, 0.9);
    box-shadow: 0 10px 24px rgba(47, 52, 76, 0.05);
}

.top-nav {
    max-width: var(--max-width);
    min-height: 68px;
    margin: 0 auto;
    padding: 0 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.brand-mark {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
    box-shadow: 0 12px 25px rgba(249, 92, 22, 0.25);
    transition: transform 0.2s ease;
}

.brand:hover .brand-mark {
    transform: scale(1.08) rotate(-2deg);
}

.brand-text {
    font-size: 20px;
    line-height: 1;
    background: linear-gradient(90deg, var(--primary-600), var(--accent-600));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 22px;
    font-weight: 650;
    color: #4b5563;
}

.nav-link {
    position: relative;
    padding: 22px 0;
    transition: color 0.2s ease;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 14px;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary-500), var(--accent-500));
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.2s ease;
}

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

.nav-link:hover::after,
.nav-link.is-active::after {
    transform: scaleX(1);
}

.menu-button {
    width: 42px;
    height: 42px;
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    border: 0;
    border-radius: 12px;
    background: var(--secondary-50);
    cursor: pointer;
}

.menu-button span {
    width: 20px;
    height: 2px;
    margin: 0 auto;
    background: var(--secondary-800);
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    padding: 12px 22px 18px;
    border-top: 1px solid var(--line);
    background: #ffffff;
}

.mobile-nav.is-open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.mobile-nav-link {
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--secondary-50);
    color: var(--secondary-800);
    font-weight: 650;
}

.hero-shell {
    position: relative;
    max-width: var(--max-width);
    min-height: 640px;
    margin: 28px auto 0;
    border-radius: 34px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    background: linear-gradient(135deg, var(--secondary-900), var(--secondary-800));
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.55fr);
    align-items: center;
    gap: 38px;
    padding: 70px;
    background-size: cover;
    background-position: center;
    opacity: 0;
    pointer-events: none;
    transform: scale(1.02);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

.hero-content {
    color: #ffffff;
    max-width: 680px;
}

.hero-kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-500);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-content h1 {
    margin: 16px 0 18px;
    font-size: clamp(42px, 7vw, 78px);
    line-height: 1.04;
    letter-spacing: -0.06em;
}

.hero-content p {
    max-width: 620px;
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
    line-height: 1.9;
}

.hero-tags,
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags {
    margin: 28px 0;
}

.hero-tags span,
.tag-list span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 6px 12px;
    border-radius: 999px;
    color: var(--primary-600);
    background: var(--primary-50);
    font-size: 13px;
    font-weight: 700;
}

.hero-tags span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.20);
    backdrop-filter: blur(10px);
}

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

.primary-button,
.ghost-button,
.section-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
    box-shadow: 0 14px 28px rgba(249, 92, 22, 0.28);
}

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

.primary-button:hover,
.ghost-button:hover,
.section-link:hover {
    transform: translateY(-2px);
}

.hero-poster {
    width: min(320px, 100%);
    justify-self: center;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
    transform: rotate(2deg);
    transition: transform 0.25s ease;
}

.hero-poster:hover {
    transform: rotate(0deg) translateY(-4px);
}

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

.hero-controls {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    z-index: 5;
}

.hero-arrow,
.hero-dot {
    border: 0;
    cursor: pointer;
}

.hero-arrow {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    font-size: 28px;
    line-height: 1;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.36);
    transition: width 0.2s ease, background 0.2s ease;
}

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

.hero-search {
    position: absolute;
    left: 50%;
    bottom: 84px;
    z-index: 6;
    width: min(620px, calc(100% - 48px));
    display: flex;
    padding: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.18);
    transform: translateX(-50%);
}

.hero-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: none;
    background: transparent;
    padding: 0 18px;
    color: var(--text-main);
}

.hero-search button {
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
    padding: 0 22px;
    font-weight: 800;
    cursor: pointer;
}

.content-section {
    max-width: var(--max-width);
    margin: 54px auto;
    padding: 0 22px;
}

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

.section-heading h2 {
    margin: 8px 0 8px;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.section-heading p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.8;
}

.section-link {
    color: var(--primary-600);
    background: var(--primary-50);
}

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

.category-card,
.overview-card {
    border: 1px solid rgba(229, 231, 235, 0.9);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-card);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card {
    display: grid;
    gap: 10px;
    min-height: 172px;
    padding: 22px;
}

.category-card:hover,
.overview-card:hover,
.movie-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 45px rgba(47, 52, 76, 0.16);
}

.category-card span {
    color: var(--accent-600);
    font-size: 14px;
    font-weight: 800;
}

.category-card strong {
    font-size: 22px;
}

.category-card em {
    color: var(--text-muted);
    font-style: normal;
    line-height: 1.7;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 180px 180px;
    gap: 14px;
    margin: 0 0 24px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-card);
}

.filter-panel label {
    display: grid;
    gap: 8px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 800;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 14px;
    outline: none;
    padding: 0 14px;
    color: var(--text-main);
    background: #ffffff;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 4px rgba(216, 148, 16, 0.14);
}

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(229, 231, 235, 0.9);
    border-radius: 26px;
    background: #ffffff;
    box-shadow: var(--shadow-card);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-cover {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, var(--secondary-900), var(--secondary-700));
}

.movie-cover img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.28s ease;
}

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

.movie-score,
.rank-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 900;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
}

.movie-score {
    right: 12px;
    bottom: 12px;
    min-width: 48px;
    height: 32px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
}

.rank-badge {
    top: 12px;
    left: 12px;
    width: 40px;
    height: 40px;
    border-radius: 14px;
    background: rgba(47, 52, 76, 0.86);
    backdrop-filter: blur(8px);
}

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

.movie-meta-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 750;
}

.movie-meta-line a {
    color: var(--primary-600);
}

.movie-card h3 {
    margin: 12px 0 8px;
    font-size: 21px;
    line-height: 1.25;
}

.movie-card h3 a:hover {
    color: var(--accent-600);
}

.movie-card p {
    display: -webkit-box;
    min-height: 52px;
    margin: 0 0 16px;
    color: var(--text-muted);
    line-height: 1.75;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

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

.movie-card.is-compact h3 {
    font-size: 18px;
}

.page-hero,
.detail-hero {
    max-width: var(--max-width);
    margin: 28px auto 0;
    padding: 56px;
    border-radius: 34px;
    overflow: hidden;
    color: #ffffff;
    background: radial-gradient(circle at top right, rgba(249, 92, 22, 0.40), transparent 34%), linear-gradient(135deg, var(--secondary-900), var(--secondary-800));
    box-shadow: var(--shadow-soft);
}

.compact-hero,
.rank-hero {
    min-height: 330px;
    display: flex;
    align-items: center;
}

.page-hero h1,
.detail-info h1 {
    margin: 14px 0;
    font-size: clamp(38px, 6vw, 64px);
    line-height: 1.08;
    letter-spacing: -0.05em;
}

.page-hero p,
.detail-one-line {
    max-width: 760px;
    margin: 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: 18px;
    line-height: 1.9;
}

.slim-actions {
    margin-top: 24px;
}

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

.overview-card {
    padding: 24px;
}

.overview-main span {
    color: var(--accent-600);
    font-weight: 850;
}

.overview-main h2 {
    margin: 10px 0;
    font-size: 28px;
}

.overview-main p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.8;
}

.overview-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 20px;
}

.overview-links a {
    padding: 10px 12px;
    border-radius: 12px;
    color: var(--secondary-800);
    background: var(--secondary-50);
    font-weight: 700;
}

.breadcrumb {
    max-width: var(--max-width);
    margin: 24px auto 0;
    padding: 0 22px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    color: var(--text-muted);
    font-weight: 700;
}

.breadcrumb a:hover {
    color: var(--primary-600);
}

.detail-hero {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    align-items: center;
    gap: 42px;
}

.detail-cover {
    border-radius: 28px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--secondary-900), var(--secondary-700));
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.30);
}

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

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 22px 0;
}

.detail-meta span {
    padding: 8px 12px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    font-weight: 800;
}

.detail-tags {
    margin-bottom: 28px;
}

.watch-section {
    max-width: var(--max-width);
    margin: 36px auto 0;
    padding: 0 22px;
}

.player-card {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    background: #000000;
    box-shadow: 0 28px 65px rgba(47, 52, 76, 0.28);
}

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

.player-layer {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.58));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-height: 58px;
    border: 0;
    border-radius: 999px;
    padding: 0 26px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
    box-shadow: 0 16px 35px rgba(249, 92, 22, 0.34);
    font-weight: 900;
    cursor: pointer;
}

.play-icon {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    font-size: 14px;
}

.detail-layout {
    max-width: var(--max-width);
    margin: 42px auto 0;
    padding: 0 22px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 28px;
}

.detail-article,
.detail-side {
    border: 1px solid var(--line);
    border-radius: 28px;
    background: #ffffff;
    box-shadow: var(--shadow-card);
}

.detail-article {
    padding: 32px;
}

.detail-article h2,
.detail-side h2 {
    margin: 0 0 16px;
    font-size: 28px;
}

.detail-article p {
    margin: 0 0 26px;
    color: #475467;
    font-size: 17px;
    line-height: 2;
}

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

.detail-facts div {
    display: grid;
    gap: 6px;
    padding: 16px;
    border-radius: 18px;
    background: var(--secondary-50);
}

.detail-facts strong {
    color: var(--text-main);
}

.detail-facts span {
    color: var(--text-muted);
    line-height: 1.7;
}

.detail-side {
    align-self: start;
    display: grid;
    gap: 12px;
    padding: 24px;
}

.detail-side a {
    padding: 14px 16px;
    border-radius: 16px;
    background: var(--primary-50);
    color: var(--primary-600);
    font-weight: 800;
}

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

.site-footer {
    margin-top: 72px;
    color: #d9deea;
    background: linear-gradient(135deg, var(--secondary-900), var(--secondary-800));
}

.footer-grid {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 48px 22px;
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(180px, 0.7fr) minmax(180px, 0.7fr);
    gap: 36px;
}

.footer-brand-block p {
    max-width: 560px;
    margin: 18px 0 0;
    color: #c2c9d6;
    line-height: 1.9;
}

.site-footer h3 {
    margin: 0 0 16px;
    color: #f8fafc;
}

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

.site-footer a:hover {
    color: var(--accent-500);
}

.footer-bottom {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 20px 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.10);
    color: #aab2c3;
}

@media (max-width: 1100px) {
    .nav-links {
        gap: 14px;
        font-size: 14px;
    }

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

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

    .menu-button {
        display: flex;
    }

    .hero-shell {
        min-height: 760px;
        margin: 16px 14px 0;
        border-radius: 28px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        align-content: start;
        gap: 28px;
        padding: 46px 24px 150px;
    }

    .hero-poster {
        width: 210px;
        justify-self: start;
    }

    .hero-search {
        bottom: 82px;
        flex-direction: column;
        border-radius: 24px;
        gap: 8px;
    }

    .hero-search input,
    .hero-search button {
        min-height: 46px;
        width: 100%;
    }

    .hero-search button {
        border-radius: 18px;
    }

    .section-heading,
    .detail-layout,
    .footer-grid {
        grid-template-columns: 1fr;
        display: grid;
    }

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

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

    .page-hero,
    .detail-hero {
        margin: 16px 14px 0;
        padding: 38px 24px;
        border-radius: 28px;
    }

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

    .detail-cover {
        width: min(270px, 100%);
    }

    .detail-side {
        order: -1;
    }
}

@media (max-width: 560px) {
    .brand-text {
        max-width: 190px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .mobile-nav.is-open,
    .category-grid,
    .movie-grid,
    .movie-grid-featured,
    .related-grid,
    .overview-grid,
    .overview-links,
    .detail-facts {
        grid-template-columns: 1fr;
    }

    .hero-content h1,
    .page-hero h1,
    .detail-info h1 {
        font-size: 38px;
    }

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

    .primary-button,
    .ghost-button {
        width: 100%;
    }

    .content-section {
        margin: 40px auto;
    }
}
