:root {
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-card: rgba(15, 23, 42, 0.82);
    --bg-card-solid: #111827;
    --border: rgba(148, 163, 184, 0.16);
    --border-strong: rgba(245, 158, 11, 0.35);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --accent: #f59e0b;
    --accent-dark: #d97706;
    --danger: #ef4444;
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 10px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
    --max: 1240px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.12), transparent 32%), linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: rgba(2, 6, 23, 0.92);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(18px);
}

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

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

.brand-icon {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    color: white;
    background: linear-gradient(135deg, var(--accent), #fb7185);
    box-shadow: 0 12px 32px rgba(245, 158, 11, 0.35);
}

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

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

.nav-link,
.mobile-nav-link {
    color: var(--muted-strong);
    border-radius: 12px;
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link {
    padding: 10px 16px;
}

.nav-link:hover,
.nav-link.active,
.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: var(--accent);
    background: rgba(245, 158, 11, 0.1);
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.86);
    color: var(--text);
    cursor: pointer;
}

.mobile-menu-button span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    border-radius: 10px;
    background: currentColor;
}

.mobile-nav {
    display: none;
    width: min(100% - 32px, var(--max));
    margin: 0 auto 14px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.96);
}

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

.mobile-nav-link {
    padding: 12px 14px;
}

.page-shell {
    width: min(100% - 32px, var(--max));
    margin: 0 auto;
}

.home-page {
    width: 100%;
    margin: 0;
}

.hero-carousel {
    position: relative;
    min-height: 660px;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
    background: #020617;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.65s ease;
}

.hero-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.hero-media {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(245, 158, 11, 0.22), transparent 36%), linear-gradient(135deg, #020617, #111827 46%, #0f172a);
}

.hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.48;
    filter: saturate(1.15) contrast(1.05);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.78) 38%, rgba(2, 6, 23, 0.35) 100%), linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.12) 45%, rgba(2, 6, 23, 0.78) 100%);
}

.hero-content {
    position: relative;
    z-index: 3;
    width: min(100% - 32px, var(--max));
    margin: 0 auto;
    padding-top: 140px;
    max-width: 760px;
}

.eyebrow,
.hero-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 6px 12px;
    border-radius: 999px;
    color: var(--accent);
    background: rgba(245, 158, 11, 0.13);
    border: 1px solid rgba(245, 158, 11, 0.2);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.hero-content h1 {
    max-width: 780px;
    margin: 18px 0 18px;
    font-size: clamp(42px, 7vw, 78px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.hero-content p {
    max-width: 680px;
    margin: 0 0 26px;
    color: var(--muted-strong);
    font-size: clamp(17px, 2vw, 22px);
}

.hero-tags,
.tag-row,
.movie-meta-line,
.related-category-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.hero-tags span,
.tag-row span,
.movie-meta-line span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 9px;
    color: var(--muted-strong);
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.16);
    font-size: 12px;
}

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

.primary-button,
.ghost-button,
.text-button,
.section-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-button {
    min-height: 48px;
    padding: 0 24px;
    color: white;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    box-shadow: 0 16px 36px rgba(245, 158, 11, 0.28);
}

.ghost-button {
    min-height: 48px;
    padding: 0 22px;
    color: var(--text);
    background: rgba(15, 23, 42, 0.62);
    border: 1px solid var(--border);
}

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

.hero-panel {
    position: relative;
    z-index: 4;
    width: min(100% - 32px, var(--max));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 22px;
    transform: translateY(430px);
}

.hero-search-card,
.hero-ranking-card,
.side-rail,
.text-panel,
.category-overview-card,
.detail-article {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.72));
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.hero-search-card,
.hero-ranking-card {
    padding: 24px;
}

.hero-search-card h2,
.side-rail h2,
.section-heading h2,
.page-hero h1,
.detail-copy h1,
.detail-article h2 {
    margin: 12px 0 10px;
    line-height: 1.15;
}

.hero-search-card p,
.section-heading p,
.page-hero p,
.category-overview-card p,
.detail-one-line,
.detail-article p,
.ranking-copy p,
.footer-brand p {
    color: var(--muted);
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.7);
}

.search-box span {
    color: var(--accent);
    padding-left: 16px;
}

.search-box input {
    width: 100%;
    min-height: 50px;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
    font: inherit;
}

.hero-search-box {
    margin: 18px 0;
}

.hero-category-pills,
.related-category-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.hero-category-pills a,
.related-category-row a {
    padding: 7px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--muted-strong);
    background: rgba(15, 23, 42, 0.72);
    font-size: 13px;
    transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.hero-category-pills a:hover,
.related-category-row a:hover {
    color: var(--accent);
    border-color: var(--border-strong);
    transform: translateY(-2px);
}

.rank-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
}

.rank-title-row a,
.section-link,
.text-button {
    color: var(--accent);
}

.hero-rank-list {
    display: grid;
    gap: 10px;
}

.hero-rank-list a {
    display: grid;
    grid-template-columns: 36px 1fr;
    gap: 8px 12px;
    align-items: center;
    padding: 10px;
    border-radius: 14px;
    background: rgba(2, 6, 23, 0.4);
    border: 1px solid rgba(148, 163, 184, 0.1);
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-rank-list a:hover {
    background: rgba(245, 158, 11, 0.1);
    transform: translateX(4px);
}

.hero-rank-list span {
    grid-row: span 2;
    color: var(--accent);
    font-weight: 900;
}

.hero-rank-list strong {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.hero-rank-list small {
    color: var(--muted);
}

.hero-dots {
    position: absolute;
    z-index: 5;
    left: 50%;
    bottom: 32px;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 34px;
    height: 5px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
    cursor: pointer;
}

.hero-dot.active {
    background: var(--accent);
}

.content-section {
    width: min(100% - 32px, var(--max));
    margin: 0 auto;
    padding: 78px 0 0;
}

.page-shell > .content-section {
    width: 100%;
}

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

.section-heading h2 {
    font-size: clamp(28px, 4vw, 42px);
}

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

.small-grid,
.category-page-grid,
.library-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.movie-card {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.22);
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-7px);
    border-color: var(--border-strong);
    background: rgba(15, 23, 42, 0.94);
}

.poster-wrap {
    position: relative;
    overflow: hidden;
    display: block;
    aspect-ratio: 2 / 3;
    background: radial-gradient(circle at top, rgba(245, 158, 11, 0.28), transparent 40%), linear-gradient(135deg, #1e293b, #020617);
}

.poster-wrap img,
.compact-card img,
.ranking-poster img,
.detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease;
}

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

.poster-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 8px;
    border-radius: 9px;
    color: white;
    background: rgba(2, 6, 23, 0.7);
    backdrop-filter: blur(8px);
    font-size: 12px;
    font-weight: 800;
}

.poster-play {
    position: absolute;
    right: 10px;
    bottom: 10px;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: white;
    background: rgba(245, 158, 11, 0.88);
    box-shadow: 0 12px 28px rgba(245, 158, 11, 0.3);
}

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

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

.movie-card h3 a:hover,
.ranking-copy h2 a:hover {
    color: var(--accent);
}

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

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

.side-rail {
    position: sticky;
    top: 92px;
    padding: 24px;
}

.side-list {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.compact-card {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.44);
    border: 1px solid rgba(148, 163, 184, 0.12);
    transition: background 0.2s ease, transform 0.2s ease;
}

.compact-card:hover {
    background: rgba(245, 158, 11, 0.1);
    transform: translateX(4px);
}

.compact-card img {
    aspect-ratio: 2 / 3;
    border-radius: 12px;
    background: #111827;
}

.compact-card-info {
    min-width: 0;
}

.compact-card-info strong,
.compact-card-info small {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.compact-card-info small {
    color: var(--muted);
}

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

.category-card,
.category-overview-card {
    min-height: 180px;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: radial-gradient(circle at top right, rgba(245, 158, 11, 0.2), transparent 40%), rgba(15, 23, 42, 0.78);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover,
.category-overview-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-strong);
}

.category-card span,
.category-cover strong {
    color: var(--accent);
    font-size: 14px;
    font-weight: 900;
}

.category-card strong,
.category-cover span {
    display: block;
    margin: 12px 0;
    font-size: 22px;
    line-height: 1.25;
}

.category-card p,
.category-samples span {
    color: var(--muted);
    font-size: 14px;
}

.page-hero {
    margin-top: 42px;
    padding: 54px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: radial-gradient(circle at top right, rgba(245, 158, 11, 0.18), transparent 38%), linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.8));
    box-shadow: var(--shadow);
}

.compact-hero h1 {
    margin: 16px 0;
    font-size: clamp(34px, 6vw, 58px);
    letter-spacing: -0.04em;
}

.page-search-box {
    max-width: 560px;
    margin-top: 24px;
}

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

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

.detail-hero {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
    margin-top: 28px;
    padding: 34px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(2, 6, 23, 0.82));
    box-shadow: var(--shadow);
}

.detail-poster {
    border-radius: 24px;
    border: 1px solid var(--border);
}

.detail-copy h1 {
    font-size: clamp(34px, 5vw, 58px);
    letter-spacing: -0.04em;
}

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

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

.detail-meta-grid span {
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    color: var(--muted-strong);
    background: rgba(2, 6, 23, 0.35);
}

.detail-meta-grid strong {
    display: block;
    color: var(--accent);
    font-size: 12px;
}

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

.video-frame {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-strong);
    background: radial-gradient(circle at center, rgba(245, 158, 11, 0.18), transparent 38%), #020617;
    box-shadow: var(--shadow);
}

.movie-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #020617;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: white;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.55));
    cursor: pointer;
    z-index: 3;
}

.play-overlay span {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    box-shadow: 0 20px 60px rgba(245, 158, 11, 0.34);
    font-size: 30px;
}

.video-frame.playing .play-overlay {
    opacity: 0;
    pointer-events: none;
}

.detail-content-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin-top: 34px;
}

.detail-article {
    padding: 28px;
}

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

.ranking-item {
    display: grid;
    grid-template-columns: 94px 70px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: rgba(15, 23, 42, 0.72);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.ranking-item:hover {
    transform: translateY(-4px);
    border-color: var(--border-strong);
}

.ranking-poster {
    overflow: hidden;
    aspect-ratio: 2 / 3;
    border-radius: 14px;
    background: #111827;
}

.ranking-number {
    color: var(--accent);
    font-size: 30px;
    font-weight: 900;
}

.ranking-copy h2 {
    margin: 0 0 8px;
}

.category-samples {
    display: grid;
    gap: 6px;
    min-height: 98px;
    margin: 14px 0;
}

.text-panel {
    padding: 34px;
}

.site-footer {
    margin-top: 90px;
    border-top: 1px solid var(--border);
    background: rgba(2, 6, 23, 0.92);
}

.footer-inner {
    width: min(100% - 32px, var(--max));
    margin: 0 auto;
    padding: 42px 0;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 28px;
}

.footer-column {
    display: grid;
    align-content: start;
    gap: 8px;
}

.footer-column h3 {
    margin: 0 0 10px;
}

.footer-column a {
    color: var(--muted);
}

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

.copyright {
    color: #64748b;
    font-size: 13px;
}

.cover-fallback::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(245, 158, 11, 0.32), transparent 42%), linear-gradient(145deg, #1f2937, #020617);
}

[data-movie-card].hidden {
    display: none;
}

@media (max-width: 1180px) {
    .movie-grid,
    .small-grid,
    .category-page-grid,
    .library-grid,
    .category-grid,
    .category-overview-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .hero-panel,
    .split-section {
        grid-template-columns: 1fr;
        transform: translateY(390px);
    }

    .hero-carousel {
        min-height: 960px;
    }

    .side-rail {
        position: static;
    }
}

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

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

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

    .hero-panel {
        transform: translateY(430px);
    }

    .hero-carousel {
        min-height: 1050px;
    }

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

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

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

    .ranking-item {
        grid-template-columns: 74px 52px minmax(0, 1fr);
    }

    .page-hero {
        padding: 34px;
    }
}

@media (max-width: 560px) {
    .page-shell,
    .content-section,
    .header-inner,
    .footer-inner {
        width: min(100% - 24px, var(--max));
    }

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

    .hero-carousel {
        min-height: 1120px;
    }

    .hero-content h1 {
        font-size: 40px;
    }

    .hero-panel {
        width: min(100% - 24px, var(--max));
        transform: translateY(440px);
    }

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

    .detail-hero,
    .page-hero {
        padding: 24px;
    }

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