:root {
    --bg: #f8fafc;
    --panel: #ffffff;
    --ink: #111827;
    --muted: #64748b;
    --line: #e2e8f0;
    --dark: #020617;
    --slate: #0f172a;
    --orange: #fb923c;
    --red: #ef4444;
    --gold: #facc15;
    --shadow: 0 24px 70px rgba(15, 23, 42, 0.18);
    --soft-shadow: 0 16px 40px rgba(15, 23, 42, 0.10);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.6;
}

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;
    color: #ffffff;
    background: linear-gradient(90deg, #020617, #111827 45%, #020617);
    box-shadow: 0 14px 35px rgba(2, 6, 23, 0.35);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(1200px, calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
}

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

.brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--orange), var(--red));
    box-shadow: 0 12px 28px rgba(239, 68, 68, 0.35);
    transition: transform 0.24s ease;
}

.brand:hover .brand-mark {
    transform: scale(1.05) rotate(-4deg);
}

.brand-text strong {
    display: block;
    font-size: 21px;
    line-height: 1.1;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, #fdba74, #f87171);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-text small {
    display: block;
    margin-top: 3px;
    color: #94a3b8;
    font-size: 12px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 30px;
    font-weight: 700;
}

.desktop-nav a,
.mobile-nav a,
.site-footer a {
    transition: color 0.22s ease, transform 0.22s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.site-footer a:hover {
    color: var(--orange);
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    padding: 9px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
}

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

.mobile-nav {
    display: none;
    flex-direction: column;
    gap: 12px;
    padding: 16px 24px 22px;
    background: #0f172a;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
}

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

.page-main {
    min-height: 60vh;
}

.hero-carousel {
    position: relative;
    min-height: 680px;
    overflow: hidden;
    color: #ffffff;
    background: #020617;
}

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

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

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

.hero-overlay,
.detail-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 78% 18%, rgba(251, 146, 60, 0.28), transparent 28%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.78) 48%, rgba(15, 23, 42, 0.38)),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.2) 38%, transparent 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 56px;
    align-items: center;
    width: min(1200px, calc(100% - 32px));
    min-height: 680px;
    margin: 0 auto;
    padding: 82px 0 96px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-bottom: 16px;
    padding: 7px 12px;
    border: 1px solid rgba(251, 146, 60, 0.38);
    border-radius: 999px;
    color: #fed7aa;
    background: rgba(251, 146, 60, 0.12);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.hero-copy h1,
.detail-info h1,
.page-hero h1 {
    margin: 0;
    font-size: clamp(42px, 8vw, 78px);
    line-height: 0.98;
    letter-spacing: -0.05em;
}

.hero-copy p,
.detail-info p,
.page-hero p {
    max-width: 760px;
    margin: 24px 0 0;
    color: #dbeafe;
    font-size: clamp(17px, 2vw, 22px);
}

.hero-tags,
.meta-pills,
.tag-row,
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags,
.meta-pills {
    margin-top: 26px;
}

.hero-tags span,
.meta-pills span,
.tag-row span,
.tag-cloud span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #fff7ed;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 12px;
    font-weight: 700;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
}

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

.primary-button,
.card-action {
    color: #ffffff;
    background: linear-gradient(135deg, var(--orange), var(--red));
    box-shadow: 0 18px 38px rgba(239, 68, 68, 0.32);
}

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

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

.hero-poster,
.detail-poster {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    background: #111827;
    box-shadow: var(--shadow);
}

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

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

.hero-prev,
.hero-next,
.hero-dots button {
    border: 0;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    cursor: pointer;
}

.hero-prev,
.hero-next {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    font-size: 34px;
    line-height: 1;
}

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

.hero-dots button {
    width: 26px;
    height: 8px;
    padding: 0;
    border-radius: 999px;
    transition: width 0.22s ease, background 0.22s ease;
}

.hero-dots button.is-active {
    width: 46px;
    background: var(--orange);
}

.search-panel {
    display: grid;
    grid-template-columns: minmax(220px, 0.72fr) minmax(260px, 1fr);
    gap: 24px;
    align-items: center;
    width: min(1200px, calc(100% - 32px));
    margin: -38px auto 52px;
    padding: 24px;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--soft-shadow);
    backdrop-filter: blur(16px);
    position: relative;
    z-index: 10;
}

.search-panel h2 {
    margin: 0;
    font-size: clamp(26px, 4vw, 38px);
    letter-spacing: -0.03em;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 18px;
    color: #475569;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
}

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

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

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

.section-heading p,
.ranking-title p {
    margin: 0 0 4px;
    color: var(--orange);
    font-weight: 900;
}

.section-heading h2,
.ranking-title h2,
.site-footer h2,
.story-card h2 {
    margin: 0;
    font-size: clamp(26px, 4vw, 40px);
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.section-link {
    color: var(--orange);
    font-weight: 900;
}

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

.movie-card {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: var(--panel);
    box-shadow: var(--soft-shadow);
    transition: transform 0.26s ease, box-shadow 0.26s ease;
}

.movie-card:hover {
    transform: translateY(-7px);
    box-shadow: var(--shadow);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: #0f172a;
}

.poster-link img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

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

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

.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    display: grid;
    min-width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 13px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--gold), var(--red));
    font-style: normal;
    font-weight: 900;
    box-shadow: 0 12px 26px rgba(239, 68, 68, 0.34);
}

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

.movie-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 10px;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

.movie-card h2 {
    margin: 0;
    color: #0f172a;
    font-size: 18px;
    line-height: 1.3;
}

.movie-card h2 a:hover {
    color: var(--red);
}

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

.tag-row {
    margin-bottom: 16px;
}

.tag-row span,
.tag-cloud span {
    color: #b45309;
    background: #ffedd5;
    border-color: #fed7aa;
}

.card-action {
    min-height: 38px;
    width: 100%;
    border-radius: 12px;
    font-size: 14px;
}

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

.category-grid,
.category-overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.category-tile,
.category-overview-card,
.story-card,
.ranking-panel,
.about-section {
    border: 1px solid var(--line);
    border-radius: 26px;
    background: #ffffff;
    box-shadow: var(--soft-shadow);
}

.category-tile {
    padding: 24px;
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.category-tile span {
    display: block;
    color: var(--orange);
    font-size: 22px;
    font-weight: 900;
}

.category-tile strong {
    display: block;
    min-height: 72px;
    margin-top: 10px;
    color: #334155;
    font-size: 15px;
}

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

.category-tile div a {
    padding: 6px 10px;
    border-radius: 999px;
    color: #475569;
    background: #f1f5f9;
    font-size: 12px;
    font-weight: 800;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 350px;
    gap: 28px;
    align-items: start;
}

.ranking-panel {
    position: sticky;
    top: 90px;
    padding: 24px;
}

.ranking-panel ol {
    display: grid;
    gap: 12px;
    margin: 22px 0;
    padding: 0;
    list-style: none;
}

.ranking-panel a {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px 12px;
    align-items: center;
    padding: 12px;
    border-radius: 16px;
    background: #f8fafc;
}

.ranking-panel a:hover {
    background: #fff7ed;
}

.ranking-panel li span {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 12px;
    color: #ffffff;
    background: #0f172a;
    font-weight: 900;
}

.ranking-panel strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ranking-panel em {
    grid-column: 2;
    color: #64748b;
    font-size: 12px;
    font-style: normal;
}

.full-button {
    width: 100%;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: #020617;
}

.page-hero {
    width: 100%;
    padding: 96px max(16px, calc((100% - 1200px) / 2)) 126px;
    background:
        radial-gradient(circle at 82% 20%, rgba(251, 146, 60, 0.32), transparent 30%),
        linear-gradient(135deg, #020617, #111827 55%, #7f1d1d);
}

.compact-hero h1,
.category-hero h1 {
    max-width: 900px;
}

.compact-hero p,
.category-hero p {
    color: #dbeafe;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 18px;
    color: #cbd5e1;
    font-size: 14px;
    font-weight: 800;
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    gap: 18px;
    overflow: hidden;
    padding: 16px;
}

.category-cover {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
}

.category-cover img {
    width: 100%;
    height: 100%;
    min-height: 198px;
    object-fit: cover;
}

.category-cover span {
    position: absolute;
    inset: auto 10px 10px;
    padding: 6px 10px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(2, 6, 23, 0.76);
    font-size: 13px;
    font-weight: 900;
}

.category-overview-card h2 {
    margin: 4px 0 8px;
    font-size: 22px;
}

.category-overview-card p {
    margin: 0 0 12px;
    color: #64748b;
    font-size: 14px;
}

.category-overview-card ul {
    display: grid;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.category-overview-card li a {
    color: #334155;
    font-size: 14px;
    font-weight: 800;
}

.detail-hero {
    min-height: 640px;
}

.detail-layout {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    gap: 56px;
    align-items: center;
    width: min(1200px, calc(100% - 32px));
    min-height: 640px;
    margin: 0 auto;
    padding: 72px 0 88px;
}

.detail-info h1 {
    max-width: 850px;
}

.player-section {
    width: min(1200px, calc(100% - 32px));
    margin: -80px auto 70px;
    position: relative;
    z-index: 8;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border: 10px solid #0f172a;
    border-radius: 30px;
    background: #020617;
    box-shadow: var(--shadow);
}

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

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 12px;
    border: 0;
    color: #ffffff;
    background: rgba(2, 6, 23, 0.58);
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-icon {
    display: grid;
    width: 82px;
    height: 82px;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--orange), var(--red));
    box-shadow: 0 18px 44px rgba(239, 68, 68, 0.42);
    font-size: 36px;
}

.player-cover strong {
    font-size: clamp(24px, 4vw, 44px);
    line-height: 1.1;
}

.player-cover em {
    font-style: normal;
    color: #fed7aa;
    font-weight: 900;
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

.story-card,
.about-section {
    padding: 26px;
}

.story-card p,
.about-section p {
    margin: 14px 0 0;
    color: #475569;
    font-size: 17px;
}

.related-grid {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.empty-state {
    display: none;
    margin: 26px 0 0;
    padding: 22px;
    border-radius: 18px;
    color: #64748b;
    background: #ffffff;
    text-align: center;
    font-weight: 800;
}

.empty-state.is-visible {
    display: block;
}

.is-filtered {
    display: none;
}

.site-footer {
    color: #cbd5e1;
    background: linear-gradient(180deg, #0f172a, #020617);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 0.8fr;
    gap: 34px;
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 58px 0 34px;
}

.footer-brand {
    display: inline-block;
    margin-bottom: 14px;
    color: #fdba74;
    font-size: 25px;
    font-weight: 900;
}

.site-footer p {
    max-width: 520px;
    margin: 0;
    color: #94a3b8;
}

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

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

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 22px 0;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    color: #94a3b8;
    font-size: 14px;
}

@media (max-width: 1024px) {
    .hero-content,
    .detail-layout,
    .split-section {
        grid-template-columns: 1fr;
    }

    .hero-poster,
    .detail-poster {
        width: min(360px, 80vw);
    }

    .ranking-panel {
        position: static;
    }
}

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

    .mobile-menu-button {
        display: block;
    }

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

    .hero-content,
    .detail-layout {
        gap: 28px;
        padding-top: 58px;
    }

    .search-panel {
        grid-template-columns: 1fr;
        margin-top: -28px;
    }

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

    .category-overview-card {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}

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

    .brand-text small {
        display: none;
    }

    .hero-copy h1,
    .detail-info h1,
    .page-hero h1 {
        font-size: 40px;
    }

    .hero-actions,
    .meta-pills,
    .hero-tags {
        gap: 8px;
    }

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

    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 14px;
    }

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

    .movie-card p {
        min-height: 42px;
        font-size: 13px;
    }

    .player-section {
        margin-top: -52px;
    }

    .player-shell {
        border-width: 5px;
        border-radius: 20px;
    }
}
