:root {
    --bg: #0a0a0a;
    --bg-light: #141414;
    --bg-lighter: #1a1a1a;
    --surface: #1f1f1f;
    --surface-soft: rgba(31, 31, 31, 0.78);
    --border: #333333;
    --text: #ffffff;
    --muted: #a3a3a3;
    --muted-strong: #d4d4d4;
    --accent: #f97316;
    --accent-dark: #ea580c;
    --accent-soft: rgba(249, 115, 22, 0.18);
    --primary: #0f172a;
    --shadow: 0 22px 70px rgba(0, 0, 0, 0.45);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at 10% 0%, rgba(249, 115, 22, 0.16), transparent 32rem),
        radial-gradient(circle at 82% 8%, rgba(30, 64, 175, 0.16), transparent 28rem),
        var(--bg);
    color: var(--text);
    line-height: 1.65;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(10, 10, 10, 0.82);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(18px);
}

.header-inner,
.footer-inner,
.content-section,
.page-main,
.hero {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.header-inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.logo-mark {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    box-shadow: 0 12px 28px rgba(249, 115, 22, 0.26);
}

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

.nav-links a {
    padding: 9px 14px;
    color: var(--muted-strong);
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text);
    background: var(--accent-soft);
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    background: var(--surface);
}

.hero {
    position: relative;
    min-height: 610px;
    margin-top: 28px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.10);
    box-shadow: var(--shadow);
    background: var(--surface);
}

.hero-track,
.hero-slide {
    min-height: 610px;
}

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

.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.08) contrast(1.02);
}

.hero-layer {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.68) 42%, rgba(0, 0, 0, 0.20) 100%),
        linear-gradient(0deg, rgba(10, 10, 10, 0.90) 0%, transparent 45%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 720px;
    padding: 82px 60px 120px;
}

.hero-eyebrow,
.section-kicker {
    margin: 0 0 12px;
    color: var(--accent);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero h1,
.hero h2,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    font-size: clamp(34px, 5.2vw, 70px);
    line-height: 1.04;
    letter-spacing: -0.06em;
}

.hero h2 {
    margin-top: 14px;
    color: #fed7aa;
}

.hero-text {
    max-width: 650px;
    margin: 24px 0 0;
    color: var(--muted-strong);
    font-size: 18px;
}

.hero-meta,
.meta-line,
.tag-row,
.hero-actions,
.footer-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-meta {
    margin-top: 24px;
}

.hero-meta span,
.tag-row span,
.meta-line span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 999px;
    color: var(--muted-strong);
    background: rgba(255, 255, 255, 0.06);
    font-size: 13px;
}

.hero-actions {
    margin-top: 30px;
}

.primary-button,
.ghost-button,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-button {
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    box-shadow: 0 12px 26px rgba(249, 115, 22, 0.28);
}

.ghost-button,
.section-more {
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
}

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

.hero-dots {
    position: absolute;
    left: 60px;
    bottom: 76px;
    z-index: 5;
    display: flex;
    gap: 10px;
}

.hero-dots button {
    width: 34px;
    height: 6px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
}

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

.hero-category-bar {
    position: absolute;
    left: 32px;
    right: 32px;
    bottom: 24px;
    z-index: 4;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 10px;
}

.hero-category-bar a {
    display: flex;
    justify-content: center;
    padding: 12px 8px;
    color: var(--muted-strong);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 14px;
    background: rgba(20, 20, 20, 0.76);
    backdrop-filter: blur(12px);
}

.hero-category-bar a:hover {
    color: #fff;
    border-color: rgba(249, 115, 22, 0.55);
}

.content-section {
    padding: 54px 0 0;
}

.intro-section {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    gap: 18px;
    align-items: stretch;
}

.intro-card,
.search-panel,
.page-hero,
.detail-copy,
.watch-section {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface-soft);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.20);
}

.intro-card,
.page-hero,
.detail-copy,
.watch-section {
    padding: 28px;
}

.intro-card h2,
.section-heading h2,
.detail-copy h2 {
    margin: 0;
    font-size: clamp(24px, 3vw, 36px);
    line-height: 1.16;
    letter-spacing: -0.04em;
}

.intro-card p:last-child,
.page-hero p,
.detail-copy p {
    margin: 12px 0 0;
    color: var(--muted-strong);
}

.search-panel {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px;
}

.search-panel input {
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 999px;
    outline: none;
    background: rgba(10, 10, 10, 0.72);
}

.search-panel input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.14);
}

.search-panel span {
    padding: 12px 16px;
    border-radius: 999px;
    color: #fff;
    background: var(--accent-dark);
    font-weight: 800;
}

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(31, 31, 31, 0.98), rgba(20, 20, 20, 0.98));
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(249, 115, 22, 0.55);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
}

.poster-link,
.poster-wrap {
    display: block;
}

.poster-wrap {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.16), rgba(255, 255, 255, 0.04));
}

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

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

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

.rank-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 3;
    min-width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #fff;
    background: var(--accent-dark);
    font-weight: 900;
}

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

.meta-line {
    gap: 6px;
    margin-bottom: 10px;
}

.meta-line span {
    min-height: 24px;
    padding: 2px 8px;
    font-size: 12px;
}

.movie-card h3 {
    margin: 0;
    font-size: 17px;
    line-height: 1.35;
}

.movie-card h3 a:hover {
    color: #fed7aa;
}

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

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

.tag-row span {
    min-height: 24px;
    padding: 2px 8px;
    color: #fed7aa;
    border-color: rgba(249, 115, 22, 0.26);
    background: rgba(249, 115, 22, 0.10);
}

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

.category-tile,
.category-overview-card a {
    position: relative;
    min-height: 190px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 10px;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
}

.category-tile img,
.category-overview-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.category-tile:hover img,
.category-overview-card:hover img {
    transform: scale(1.08);
}

.category-tile-layer {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.20));
}

.category-tile strong,
.category-overview-card h2,
.category-tile em,
.category-overview-card p {
    position: relative;
    z-index: 2;
}

.category-tile strong,
.category-overview-card h2 {
    margin: 0;
    font-size: 24px;
    line-height: 1.15;
}

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

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

.compact-card {
    display: grid;
    grid-template-columns: 108px 1fr;
    min-height: 162px;
}

.compact-card .poster-wrap {
    height: 100%;
    aspect-ratio: auto;
}

.page-main {
    padding-top: 28px;
}

.page-hero {
    margin-top: 16px;
}

.slim-hero {
    min-height: 240px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background:
        linear-gradient(135deg, rgba(249, 115, 22, 0.18), rgba(15, 23, 42, 0.30)),
        var(--surface);
}

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumb a:hover {
    color: #fed7aa;
}

.category-hero {
    display: grid;
    grid-template-columns: 1fr 0.8fr;
    gap: 22px;
    align-items: center;
}

.category-hero .search-panel {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.detail-main {
    max-width: 1180px;
}

.detail-hero {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 28px;
    margin-top: 18px;
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background:
        radial-gradient(circle at 0 0, rgba(249, 115, 22, 0.16), transparent 32rem),
        var(--surface-soft);
    box-shadow: var(--shadow);
}

.detail-poster {
    overflow: hidden;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: var(--bg-light);
}

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

.detail-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}

.detail-one-line {
    max-width: 760px;
    margin: 18px 0 0;
    color: var(--muted-strong);
    font-size: 18px;
}

.detail-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
    max-width: 760px;
    margin: 24px 0 0;
}

.detail-meta div {
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: rgba(10, 10, 10, 0.42);
}

.detail-meta dt {
    color: var(--muted);
    font-size: 13px;
}

.detail-meta dd {
    margin: 4px 0 0;
    color: var(--text);
    font-weight: 700;
}

.detail-tags {
    margin: 22px 0;
}

.watch-section {
    margin-top: 28px;
}

.player-frame {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: #000;
    aspect-ratio: 16 / 9;
}

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

.movie-player-video {
    z-index: 1;
    background: #000;
}

.player-cover {
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 0;
    color: #fff;
    border: 0;
    background: #000;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover img {
    object-fit: cover;
    opacity: 0.42;
}

.player-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(249, 115, 22, 0.22), rgba(0, 0, 0, 0.72));
}

.player-cover strong,
.play-circle {
    position: relative;
    z-index: 3;
}

.play-circle {
    width: 82px;
    height: 82px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    box-shadow: 0 16px 36px rgba(249, 115, 22, 0.35);
    font-size: 28px;
    text-indent: 5px;
}

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

.detail-copy h2 + p {
    margin-bottom: 22px;
}

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

.site-footer {
    margin-top: 72px;
    border-top: 1px solid var(--border);
    background: rgba(10, 10, 10, 0.72);
}

.footer-inner {
    display: grid;
    grid-template-columns: 0.7fr 1.5fr 0.8fr;
    gap: 22px;
    align-items: center;
    padding: 32px 0;
    color: var(--muted-strong);
}

.footer-links {
    justify-content: flex-end;
}

.footer-links a:hover {
    color: #fed7aa;
}

.is-hidden-card {
    display: none !important;
}

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

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

    .hero-category-bar {
        grid-template-columns: repeat(4, 1fr);
    }

    .hero-content {
        padding-right: 42px;
        padding-left: 42px;
    }
}

@media (max-width: 760px) {
    .header-inner,
    .footer-inner,
    .content-section,
    .page-main,
    .hero {
        width: min(100% - 22px, 1180px);
    }

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

    .nav-links {
        position: absolute;
        left: 11px;
        right: 11px;
        top: 72px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        border: 1px solid var(--border);
        border-radius: 18px;
        background: rgba(20, 20, 20, 0.96);
    }

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

    .hero,
    .hero-track,
    .hero-slide {
        min-height: 690px;
    }

    .hero-content {
        padding: 48px 24px 230px;
    }

    .hero-dots {
        left: 24px;
        bottom: 176px;
    }

    .hero-category-bar {
        left: 16px;
        right: 16px;
        bottom: 16px;
        grid-template-columns: repeat(2, 1fr);
    }

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

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

    .compact-card {
        grid-template-columns: 88px 1fr;
        min-height: 132px;
    }

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

    .movie-card h3 {
        font-size: 15px;
    }

    .movie-card p {
        -webkit-line-clamp: 2;
    }

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

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

    .footer-links {
        justify-content: flex-start;
    }
}

@media (max-width: 460px) {
    .movie-grid,
    .ranking-grid,
    .category-grid,
    .category-overview-grid,
    .related-grid {
        grid-template-columns: 1fr;
    }

    .compact-card {
        grid-template-columns: 98px 1fr;
    }

    .hero h1,
    .hero h2,
    .page-hero h1,
    .detail-info h1 {
        font-size: 34px;
    }
}
