:root {
    --bg: #f8fafc;
    --text: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --white: #ffffff;
    --dark: #111827;
    --orange: #ea580c;
    --amber: #f59e0b;
    --blue: #2563eb;
    --teal: #0f766e;
    --rose: #e11d48;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

body.menu-open {
    overflow: hidden;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(229, 231, 235, 0.9);
    box-shadow: 0 8px 26px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(16px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}

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

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--orange), var(--amber));
    box-shadow: 0 10px 22px rgba(234, 88, 12, 0.25);
}

.brand-text {
    font-size: 26px;
    letter-spacing: -0.04em;
    color: transparent;
    background: linear-gradient(90deg, var(--orange), var(--amber));
    -webkit-background-clip: text;
    background-clip: text;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    color: #374151;
    font-weight: 700;
    font-size: 15px;
}

.main-nav a {
    transition: color 0.2s ease;
}

.main-nav a:hover {
    color: var(--orange);
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: #f3f4f6;
    color: #374151;
    cursor: pointer;
}

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

.mobile-nav a {
    display: block;
    padding: 12px 4px;
    font-weight: 700;
    color: #374151;
}

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

.hero-carousel {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    background: #111827;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.7s ease, transform 0.7s ease;
    transform: scale(1.03);
}

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

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.15);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 78% 18%, rgba(245, 158, 11, 0.46), transparent 28%),
        linear-gradient(100deg, rgba(17, 24, 39, 0.96), rgba(17, 24, 39, 0.72) 47%, rgba(17, 24, 39, 0.25)),
        linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.84));
}

.hero-content {
    position: relative;
    z-index: 1;
    min-height: 620px;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) 360px;
    align-items: center;
    gap: 50px;
    color: #ffffff;
}

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

.hero-kicker,
.kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fbbf24;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero-copy h1 {
    margin: 12px 0 16px;
    font-size: clamp(42px, 7vw, 76px);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero-subtitle {
    margin: 0 0 14px;
    font-size: clamp(18px, 2.5vw, 25px);
    color: rgba(255, 255, 255, 0.9);
}

.hero-meta {
    margin: 0 0 18px;
    color: rgba(255, 255, 255, 0.76);
    font-weight: 700;
}

.hero-chips,
.card-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-chips span,
.card-tags span,
.detail-tags span,
.detail-tags a {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-weight: 800;
}

.hero-chips span {
    padding: 8px 12px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(10px);
}

.hero-actions,
.inline-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 28px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--orange), var(--amber));
    box-shadow: 0 16px 30px rgba(234, 88, 12, 0.28);
}

.btn-glass {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(14px);
}

.btn-ghost {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.45);
}

.btn.full {
    width: 100%;
}

.hero-poster {
    position: relative;
    display: block;
    height: 455px;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.36);
    transform: rotate(1.5deg);
}

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

.hero-poster span {
    position: absolute;
    left: 50%;
    top: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 78px;
    height: 78px;
    border-radius: 50%;
    color: var(--orange);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
    transform: translate(-50%, -50%);
}

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

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

.hero-arrow {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    font-size: 30px;
    line-height: 1;
    backdrop-filter: blur(12px);
}

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

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

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

.search-band {
    background: #ffffff;
    border-bottom: 1px solid var(--line);
}

.search-band-inner {
    display: grid;
    grid-template-columns: 1fr minmax(280px, 520px);
    gap: 28px;
    align-items: center;
    padding: 28px 0;
}

.search-band h2 {
    margin: 5px 0 0;
    font-size: clamp(24px, 4vw, 36px);
    letter-spacing: -0.04em;
}

.search-form,
.toolbar-controls {
    display: flex;
    gap: 10px;
}

.search-form input,
.toolbar input,
.toolbar select {
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 0 16px;
    background: #ffffff;
    color: var(--text);
    outline: none;
}

.search-form input,
.toolbar input {
    flex: 1;
}

.search-form input:focus,
.toolbar input:focus,
.toolbar select:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 4px rgba(234, 88, 12, 0.12);
}

.search-form button {
    border: 0;
    border-radius: 16px;
    padding: 0 22px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--orange), var(--amber));
    font-weight: 900;
    cursor: pointer;
}

.section {
    padding: 72px 0;
}

.section-white {
    background: #ffffff;
}

.section-soft {
    background: linear-gradient(135deg, #eff6ff, #eef2ff);
}

.section-warm {
    background: linear-gradient(135deg, #fff7ed, #fffbeb);
}

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

.section-heading h2 {
    margin: 6px 0 0;
    font-size: clamp(28px, 4.2vw, 42px);
    line-height: 1.1;
    letter-spacing: -0.05em;
}

.section-heading p {
    max-width: 680px;
    margin: 10px 0 0;
    color: var(--muted);
}

.section-link {
    color: var(--blue);
    font-weight: 900;
    white-space: nowrap;
}

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

.category-card,
.category-overview-card {
    display: block;
    min-height: 186px;
    padding: 24px;
    border: 1px solid rgba(229, 231, 235, 0.9);
    border-radius: var(--radius);
    background: linear-gradient(135deg, #f0fdfa, #ecfeff);
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-icon,
.category-overview-head span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    margin-bottom: 14px;
    border-radius: 50%;
    color: #ffffff;
    background: linear-gradient(135deg, var(--teal), #06b6d4);
    font-size: 24px;
    font-weight: 900;
}

.category-card strong,
.category-overview-head strong {
    display: block;
    font-size: 21px;
    margin-bottom: 8px;
}

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

.category-overview-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.category-overview-head span {
    margin: 0;
}

.category-mini-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.category-mini-list span {
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(15, 118, 110, 0.08);
    color: var(--teal);
    font-size: 12px;
    font-weight: 800;
}

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

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

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

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

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

.card-link {
    display: block;
    height: 100%;
    border-radius: 22px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.1);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.card-link:hover {
    transform: translateY(-7px);
    box-shadow: 0 22px 52px rgba(15, 23, 42, 0.18);
}

.card-poster {
    position: relative;
    height: 238px;
    overflow: hidden;
    background: linear-gradient(135deg, #111827, #374151);
}

.featured-grid .card-poster {
    height: 250px;
}

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.74));
}

.poster-category {
    position: absolute;
    left: 12px;
    bottom: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(37, 99, 235, 0.9);
    font-size: 12px;
    font-weight: 900;
}

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #ffffff;
    background: linear-gradient(135deg, var(--rose), var(--orange));
    font-weight: 900;
    z-index: 2;
}

.play-hover {
    position: absolute;
    left: 50%;
    top: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 62px;
    height: 62px;
    border-radius: 50%;
    color: var(--blue);
    background: rgba(255, 255, 255, 0.9);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.88);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

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

.card-body {
    padding: 18px;
}

.card-tags span {
    padding: 4px 8px;
    color: var(--teal);
    background: #ecfeff;
    font-size: 12px;
}

.card-body h3 {
    display: -webkit-box;
    margin: 10px 0 8px;
    overflow: hidden;
    color: #1f2937;
    font-size: 18px;
    line-height: 1.25;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-body p {
    display: -webkit-box;
    min-height: 44px;
    margin: 0 0 14px;
    overflow: hidden;
    color: var(--muted);
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    color: #6b7280;
    font-size: 13px;
    font-weight: 700;
}

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

.movie-card-list .card-link {
    display: grid;
    grid-template-columns: 245px 1fr;
    align-items: stretch;
}

.movie-card-list .card-poster {
    height: 172px;
}

.movie-card-list .card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.movie-card-list .card-body p {
    min-height: auto;
}

.page-hero {
    position: relative;
    padding: 96px 0;
    overflow: hidden;
    color: #ffffff;
    background:
        radial-gradient(circle at 18% 15%, rgba(255, 255, 255, 0.18), transparent 28%),
        linear-gradient(135deg, var(--orange), var(--amber));
}

.page-hero::after {
    content: "";
    position: absolute;
    right: -90px;
    bottom: -130px;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
}

.page-hero .container {
    position: relative;
    z-index: 1;
}

.page-hero h1 {
    max-width: 920px;
    margin: 10px 0 12px;
    font-size: clamp(38px, 6vw, 68px);
    line-height: 1.04;
    letter-spacing: -0.06em;
}

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

.compact-hero,
.category-hero,
.ranking-hero,
.search-hero {
    min-height: 310px;
}

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

.toolbar-title {
    font-size: 18px;
    font-weight: 900;
}

.toolbar-controls {
    flex: 1;
    justify-content: flex-end;
}

.toolbar select {
    min-width: 130px;
}

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

.detail-shell {
    padding: 30px 0 72px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 22px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

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

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 28px;
    align-items: start;
}

.player-card,
.detail-card,
.side-card {
    overflow: hidden;
    border-radius: 26px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.player-card {
    margin-bottom: 24px;
    background: #000000;
}

.video-frame {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background: #000000;
}

.movie-player,
.player-cover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.movie-player {
    background: #000000;
}

.player-cover {
    border: 0;
    padding: 0;
    cursor: pointer;
    overflow: hidden;
    background: #000000;
    z-index: 2;
}

.player-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.72;
}

.player-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at center, rgba(0, 0, 0, 0.1), transparent 28%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.72));
}

.player-cover.is-hidden {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.big-play {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 94px;
    height: 94px;
    border-radius: 50%;
    color: var(--orange);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 24px 54px rgba(0, 0, 0, 0.32);
    font-size: 34px;
    transform: translate(-50%, -50%);
}

.detail-card {
    padding: 28px;
    margin-bottom: 24px;
}

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

.detail-tags span,
.detail-tags a {
    padding: 7px 11px;
    color: var(--orange);
    background: #fff7ed;
    font-size: 13px;
}

.detail-card h1 {
    margin: 0 0 12px;
    font-size: clamp(30px, 5vw, 48px);
    line-height: 1.08;
    letter-spacing: -0.05em;
}

.detail-one-line {
    margin: 0 0 22px;
    color: #4b5563;
    font-size: 18px;
}

.detail-meta-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 24px 0;
    padding: 16px;
    border-radius: 20px;
    background: linear-gradient(135deg, #eff6ff, #eef2ff);
}

.detail-meta-grid div {
    text-align: center;
}

.detail-meta-grid span {
    display: block;
    color: var(--muted);
    font-size: 13px;
}

.detail-meta-grid strong {
    display: block;
    margin-top: 3px;
    color: #111827;
    font-size: 15px;
}

.story-block + .story-block {
    margin-top: 24px;
}

.story-block h2 {
    margin: 0 0 10px;
    font-size: 22px;
}

.story-block p {
    margin: 0;
    color: #374151;
    line-height: 1.88;
}

.detail-side {
    position: sticky;
    top: 92px;
    display: grid;
    gap: 18px;
}

.poster-card {
    padding: 16px;
}

.poster-card img {
    width: 100%;
    height: 360px;
    object-fit: cover;
    border-radius: 20px;
    margin-bottom: 16px;
}

.side-links {
    padding: 20px;
}

.side-links h2 {
    margin: 0 0 12px;
    font-size: 22px;
}

.side-links a {
    display: block;
    padding: 12px 0;
    border-top: 1px solid var(--line);
    color: #374151;
    font-weight: 800;
}

.side-links a:hover {
    color: var(--orange);
}

.site-footer {
    color: #d1d5db;
    background: #111827;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
    gap: 32px;
    padding: 52px 0 34px;
}

.footer-brand {
    margin-bottom: 12px;
    color: #ffffff;
    font-size: 21px;
}

.site-footer p {
    margin: 0;
    color: #9ca3af;
}

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

.site-footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-footer li + li {
    margin-top: 8px;
}

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

.footer-bottom {
    padding: 18px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #9ca3af;
    text-align: center;
}

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

    .hero-content {
        grid-template-columns: 1fr 300px;
    }

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

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

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

    .mobile-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .hero-carousel,
    .hero-content {
        min-height: 680px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        align-content: center;
        gap: 26px;
        padding-top: 40px;
        padding-bottom: 80px;
    }

    .hero-poster {
        display: none;
    }

    .search-band-inner,
    .detail-layout,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .section-heading,
    .toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .toolbar-controls,
    .search-form {
        flex-direction: column;
    }

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

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

    .movie-card-list .card-link {
        grid-template-columns: 1fr;
    }

    .detail-side {
        position: static;
    }

    .detail-meta-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

    .brand-text {
        font-size: 22px;
    }

    .hero-carousel,
    .hero-content {
        min-height: 640px;
    }

    .hero-copy h1 {
        font-size: 42px;
    }

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

    .btn {
        width: 100%;
    }

    .section {
        padding: 48px 0;
    }

    .movie-grid,
    .featured-grid,
    .library-grid,
    .related-grid,
    .category-grid,
    .category-overview-grid {
        grid-template-columns: 1fr;
    }

    .card-poster {
        height: 260px;
    }

    .page-hero {
        padding: 70px 0;
    }

    .detail-card {
        padding: 20px;
    }

    .detail-meta-grid {
        grid-template-columns: 1fr;
        text-align: left;
    }

    .detail-meta-grid div {
        text-align: left;
    }
}
