:root {
    --page-bg: #020617;
    --panel-bg: #0f172a;
    --panel-soft: rgba(15, 23, 42, 0.82);
    --panel-strong: #111827;
    --text-main: #ffffff;
    --text-soft: #cbd5e1;
    --text-muted: #94a3b8;
    --line: rgba(148, 163, 184, 0.18);
    --brand: #f97316;
    --brand-strong: #ea580c;
    --brand-dark: #9a3412;
    --danger: #dc2626;
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 12px;
    --shadow-soft: 0 28px 70px rgba(0, 0, 0, 0.36);
    --shadow-card: 0 18px 40px rgba(0, 0, 0, 0.25);
    --max-width: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text-main);
    background: radial-gradient(circle at top left, rgba(249, 115, 22, 0.18), transparent 32rem), var(--page-bg);
    min-height: 100vh;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.98));
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--brand), var(--danger));
    color: #ffffff;
    font-weight: 900;
    box-shadow: 0 16px 28px rgba(249, 115, 22, 0.25);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-text strong,
.footer-brand {
    color: #ffffff;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.brand-text em {
    color: var(--text-muted);
    font-size: 12px;
    font-style: normal;
    margin-top: 4px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.desktop-nav a,
.mobile-nav a {
    color: var(--text-soft);
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.desktop-nav a.active,
.mobile-nav a.active {
    color: #ffffff;
    background: rgba(249, 115, 22, 0.95);
    transform: translateY(-1px);
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.8);
    color: #ffffff;
    padding: 10px;
}

.mobile-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    border-radius: 99px;
    background: #ffffff;
}

.mobile-nav {
    display: none;
    padding: 10px 22px 18px;
    border-top: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.98);
}

.mobile-nav.open {
    display: grid;
    gap: 8px;
}

.hero-slider {
    position: relative;
    min-height: 70vh;
    overflow: hidden;
    isolation: isolate;
}

.hero-slider h1 {
    position: absolute;
    left: -9999px;
}

.hero-track,
.hero-slide {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    background-size: cover;
    background-position: center;
    transition: opacity 1s ease, transform 1s ease;
    transform: scale(1.02);
}

.hero-slide.active {
    opacity: 1;
    transform: scale(1);
}

.hero-slide::after,
.page-hero::after,
.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(0deg, var(--page-bg), rgba(2, 6, 23, 0) 52%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: var(--max-width);
    margin: 0 auto;
    height: 100%;
    padding: 110px 22px 90px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.hero-kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    color: #fed7aa;
    background: rgba(249, 115, 22, 0.14);
    border: 1px solid rgba(249, 115, 22, 0.32);
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.hero-content h2 {
    max-width: 740px;
    margin: 20px 0 18px;
    color: #ffffff;
    font-size: clamp(42px, 7vw, 82px);
    line-height: 1.02;
    font-weight: 900;
    text-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}

.hero-content p {
    max-width: 640px;
    margin: 0 0 24px;
    color: #e2e8f0;
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.75;
    text-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}

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

.hero-tags span,
.detail-tags span,
.tag-row span,
.related-card div span {
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(15, 23, 42, 0.72);
    color: #e2e8f0;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 700;
}

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

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

.primary-button {
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--danger));
    box-shadow: 0 18px 34px rgba(249, 115, 22, 0.28);
}

.primary-button:hover,
.section-link:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 18px 44px rgba(249, 115, 22, 0.38);
}

.ghost-button {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(14px);
}

.ghost-button:hover {
    background: rgba(30, 41, 59, 0.9);
    transform: translateY(-2px);
}

.hero-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 34px;
    z-index: 2;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.hero-dot {
    width: 24px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.55);
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.active {
    width: 54px;
    background: var(--brand);
}

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

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

.section-heading h2,
.page-hero h1,
.detail-copy h1 {
    margin: 12px 0 0;
    color: #ffffff;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.12;
    font-weight: 900;
}

.section-heading p,
.page-hero p,
.site-footer p,
.detail-one-line {
    margin: 10px 0 0;
    color: var(--text-soft);
    line-height: 1.75;
}

.section-link {
    min-height: 42px;
    color: #ffffff;
    background: rgba(249, 115, 22, 0.16);
    border: 1px solid rgba(249, 115, 22, 0.36);
}

.search-panel {
    margin-bottom: 34px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.64));
    box-shadow: var(--shadow-card);
}

.search-box {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 54px;
    padding: 0 16px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.45);
}

.search-box span {
    width: 30px;
    height: 30px;
    display: inline-grid;
    place-items: center;
    border-radius: 10px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--danger));
    font-weight: 900;
}

.search-box input {
    width: 100%;
    border: 0;
    outline: 0;
    color: #ffffff;
    background: transparent;
}

.filter-row {
    margin-top: 14px;
}

.filter-chip {
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 999px;
    color: var(--text-soft);
    background: rgba(15, 23, 42, 0.72);
    padding: 8px 13px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 800;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.filter-chip:hover,
.filter-chip.active {
    color: #ffffff;
    background: rgba(249, 115, 22, 0.92);
    border-color: rgba(249, 115, 22, 0.92);
}

.featured-grid,
.movie-grid,
.category-grid,
.category-overview-grid,
.related-grid {
    display: grid;
    gap: 22px;
}

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

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

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

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

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

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

.movie-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.92));
    box-shadow: var(--shadow-card);
    transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.movie-card:hover {
    transform: translateY(-7px) scale(1.01);
    border-color: rgba(249, 115, 22, 0.55);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.45);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #0f172a;
}

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

.movie-card:hover .poster-link img {
    transform: scale(1.07);
    filter: saturate(1.05) contrast(1.06);
}

.poster-shadow {
    position: absolute;
    inset: auto 0 0;
    height: 45%;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.86), transparent);
}

.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    min-width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--danger));
    font-weight: 900;
    box-shadow: 0 12px 26px rgba(249, 115, 22, 0.32);
}

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

.movie-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 750;
}

.movie-meta-line span:not(:last-child)::after {
    content: "·";
    margin-left: 7px;
    color: #64748b;
}

.movie-card h3 {
    margin: 10px 0 8px;
    color: #ffffff;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 900;
}

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

.movie-card p {
    margin: 0;
    color: var(--text-soft);
    font-size: 14px;
    line-height: 1.65;
}

.tag-row {
    padding: 12px 16px 16px;
    margin-top: auto;
}

.movie-card-compact .movie-card-body {
    padding-bottom: 0;
}

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

.movie-card-compact p {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.category-card,
.category-overview-card a {
    display: block;
    min-height: 100%;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.88));
    box-shadow: var(--shadow-card);
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-card:hover,
.category-overview-card a:hover {
    transform: translateY(-5px);
    border-color: rgba(249, 115, 22, 0.55);
}

.category-thumbs,
.category-collage {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
    margin-bottom: 18px;
}

.category-thumbs img,
.category-collage img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 12px;
    background: #0f172a;
}

.category-card strong,
.category-overview-card h2 {
    display: block;
    margin: 0 0 8px;
    color: #ffffff;
    font-size: 20px;
    font-weight: 900;
}

.category-card span,
.category-overview-card p,
.category-overview-card span {
    color: var(--text-soft);
    line-height: 1.65;
}

.category-overview-card span {
    display: inline-flex;
    margin-top: 16px;
    color: #fed7aa;
    font-weight: 850;
}

.page-hero {
    position: relative;
    overflow: hidden;
    min-height: 360px;
    display: flex;
    align-items: center;
    background: radial-gradient(circle at 70% 20%, rgba(249, 115, 22, 0.22), transparent 34rem), linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(2, 6, 23, 1));
}

.page-hero > div {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 90px 22px 70px;
    width: 100%;
}

.compact-hero {
    min-height: 300px;
}

.rank-hero {
    background: radial-gradient(circle at 12% 18%, rgba(220, 38, 38, 0.2), transparent 26rem), linear-gradient(135deg, rgba(15, 23, 42, 1), rgba(2, 6, 23, 1));
}

.category-hero {
    background: radial-gradient(circle at 80% 10%, rgba(249, 115, 22, 0.22), transparent 30rem), linear-gradient(135deg, rgba(15, 23, 42, 1), rgba(2, 6, 23, 1));
}

.detail-hero {
    position: relative;
    min-height: 640px;
    overflow: hidden;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: saturate(1.02);
}

.detail-inner {
    position: relative;
    z-index: 1;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 38px 22px 70px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    color: var(--text-soft);
    font-size: 14px;
    margin: 22px 0 38px;
}

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

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

.detail-poster {
    border-radius: 26px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: var(--shadow-soft);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 20px;
}

.detail-copy h1 {
    margin-top: 18px;
    font-size: clamp(38px, 6vw, 72px);
}

.detail-one-line {
    max-width: 720px;
    font-size: 18px;
}

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

.detail-facts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 24px 0 30px;
}

.detail-facts div {
    min-height: 88px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(14px);
}

.detail-facts span {
    display: block;
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 7px;
}

.detail-facts strong {
    color: #ffffff;
    line-height: 1.45;
}

.detail-section {
    padding-top: 24px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000000;
    border: 1px solid rgba(255, 255, 255, 0.13);
    box-shadow: var(--shadow-soft);
    aspect-ratio: 16 / 9;
}

.movie-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #000000;
    object-fit: contain;
}

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 14px;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle, rgba(15, 23, 42, 0.18), rgba(2, 6, 23, 0.76));
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-icon {
    width: 92px;
    height: 92px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--brand), var(--danger));
    font-size: 38px;
    box-shadow: 0 24px 50px rgba(249, 115, 22, 0.35);
    padding-left: 6px;
}

.play-overlay strong {
    font-size: 18px;
    letter-spacing: 0.06em;
}

.player-shell.is-started .play-overlay {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.detail-text {
    padding-top: 10px;
}

.article-panel {
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.9));
    box-shadow: var(--shadow-card);
}

.article-panel h2 {
    color: #ffffff;
    font-size: 26px;
    margin: 0 0 14px;
}

.article-panel h2 + p {
    margin-bottom: 28px;
}

.article-panel p {
    color: var(--text-soft);
    line-height: 1.9;
    margin: 0;
}

.related-card {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 18px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.9);
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.related-card:hover {
    transform: translateY(-5px);
    border-color: rgba(249, 115, 22, 0.55);
}

.related-card img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    background: #0f172a;
}

.related-card strong,
.related-card span {
    display: block;
    padding: 0 12px;
}

.related-card strong {
    margin-top: 12px;
    color: #ffffff;
    line-height: 1.45;
}

.related-card a > span {
    margin-top: 6px;
    color: var(--text-muted);
    font-size: 13px;
}

.related-card div {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    padding: 12px;
}

.site-footer {
    margin-top: 34px;
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.9), rgba(2, 6, 23, 1));
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 38px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

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

.footer-inner p {
    max-width: 640px;
    margin-top: 10px;
}

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

.footer-links a {
    color: var(--text-soft);
    padding: 8px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
}

.footer-links a:hover {
    color: #ffffff;
    background: rgba(249, 115, 22, 0.16);
}

.hidden-by-search {
    display: none !important;
}

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

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

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

    .detail-layout {
        grid-template-columns: 260px minmax(0, 1fr);
    }

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

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

    .mobile-toggle {
        display: block;
    }

    .hero-slider {
        min-height: 76vh;
    }

    .hero-content {
        padding-top: 94px;
    }

    .hero-content h2 {
        font-size: 42px;
    }

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

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

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

    .detail-poster {
        max-width: 260px;
    }

    .detail-hero {
        min-height: auto;
    }

    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 520px) {
    .nav-shell {
        padding-inline: 16px;
    }

    .brand-text strong {
        font-size: 17px;
    }

    .brand-text em {
        font-size: 11px;
    }

    .main-section,
    .page-hero > div,
    .detail-inner {
        padding-left: 16px;
        padding-right: 16px;
    }

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

    .hero-content h2 {
        font-size: 36px;
    }

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

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

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

    .play-icon {
        width: 72px;
        height: 72px;
        font-size: 30px;
    }
}
