:root {
    color-scheme: dark;
    --bg: #050712;
    --bg-soft: #0b1020;
    --panel: rgba(15, 23, 42, 0.72);
    --panel-strong: rgba(15, 23, 42, 0.92);
    --border: rgba(148, 163, 184, 0.16);
    --text: #f8fafc;
    --muted: #a7b1c2;
    --muted-strong: #cbd5e1;
    --accent: #f59e0b;
    --accent-deep: #d97706;
    --accent-soft: rgba(245, 158, 11, 0.16);
    --danger: #ef4444;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.14), transparent 34rem),
        radial-gradient(circle at 80% 10%, rgba(239, 68, 68, 0.11), transparent 34rem),
        linear-gradient(180deg, #050712 0%, #080b16 42%, #03050d 100%);
    color: var(--text);
}

body::before {
    position: fixed;
    inset: 0;
    z-index: -1;
    content: "";
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(to bottom, black, transparent 82%);
}

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(5, 7, 18, 0.78);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(20px);
}

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

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

.brand-mark {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--accent), #ef4444);
    color: white;
    box-shadow: 0 12px 28px rgba(245, 158, 11, 0.24);
}

.brand-name {
    font-size: 1.2rem;
}

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

.nav-link,
.mobile-nav-link {
    color: var(--muted);
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease;
}

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

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover,
.mobile-nav-link.is-active {
    color: var(--text);
    background: rgba(148, 163, 184, 0.12);
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: rgba(148, 163, 184, 0.12);
}

.mobile-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    background: var(--text);
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    width: min(1180px, calc(100% - 32px));
    padding: 0 0 16px;
    margin-inline: auto;
}

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

.mobile-nav-link {
    padding: 12px;
    text-align: center;
    background: rgba(148, 163, 184, 0.08);
}

.hero {
    position: relative;
    min-height: clamp(540px, 74vh, 820px);
    overflow: hidden;
    background: #02040c;
}

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

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 1s ease;
}

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

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-mask {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.94) 0%, rgba(0, 0, 0, 0.72) 42%, rgba(0, 0, 0, 0.2) 100%),
        linear-gradient(0deg, #050712 0%, transparent 35%);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    min-height: clamp(540px, 74vh, 820px);
}

.hero-copy {
    width: min(680px, 100%);
    padding-top: 56px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    color: var(--accent);
    font-size: 0.86rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.watch-info h1 {
    margin: 0;
    font-size: clamp(2.4rem, 6vw, 5.8rem);
    font-weight: 950;
    line-height: 0.95;
    letter-spacing: -0.06em;
}

.hero p,
.page-hero p,
.detail-one-line {
    max-width: 680px;
    margin: 22px 0 0;
    color: var(--muted-strong);
    font-size: clamp(1rem, 1.5vw, 1.24rem);
    line-height: 1.8;
}

.hero-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}

.hero-tags span,
.detail-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 6px 12px;
    border: 1px solid rgba(245, 158, 11, 0.24);
    border-radius: 999px;
    background: var(--accent-soft);
    color: #fde68a;
    font-size: 0.86rem;
}

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

.primary-btn,
.ghost-btn,
.search-box button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border: 0;
    border-radius: 15px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn,
.search-box button {
    background: linear-gradient(135deg, var(--accent), var(--accent-deep));
    color: white;
    box-shadow: 0 16px 34px rgba(245, 158, 11, 0.24);
}

.ghost-btn {
    border: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.58);
    color: var(--text);
    backdrop-filter: blur(12px);
}

.primary-btn:hover,
.ghost-btn:hover,
.search-box button:hover {
    transform: translateY(-2px);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.42);
    color: white;
    font-size: 2.1rem;
    line-height: 1;
    transform: translateY(-50%);
    backdrop-filter: blur(12px);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

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

.hero-dot.is-active {
    width: 48px;
    background: var(--accent);
}

.quick-search-panel {
    position: relative;
    z-index: 5;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    padding: 20px;
    margin-top: -44px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: rgba(15, 23, 42, 0.78);
    box-shadow: var(--shadow);
    backdrop-filter: blur(20px);
}

.search-box {
    display: flex;
    gap: 10px;
}

.search-box input,
.local-search input {
    width: 100%;
    min-height: 52px;
    padding: 0 18px;
    border: 1px solid var(--border);
    border-radius: 15px;
    outline: none;
    background: rgba(2, 6, 23, 0.82);
    color: var(--text);
}

.search-box input:focus,
.local-search input:focus {
    border-color: rgba(245, 158, 11, 0.5);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.08);
}

.quick-links,
.footer-links,
.side-links,
.text-link-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.quick-links a,
.footer-links a,
.side-links a,
.text-link-grid a {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--muted-strong);
    background: rgba(148, 163, 184, 0.08);
}

.quick-links a:hover,
.footer-links a:hover,
.side-links a:hover,
.text-link-grid a:hover {
    color: var(--text);
    border-color: rgba(245, 158, 11, 0.35);
}

.page-flow,
.page-shell {
    padding-block: 62px;
}

.content-section {
    margin-bottom: 64px;
}

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

.section-heading h2,
.side-panel h2,
.article-panel h2 {
    margin: 0;
    font-size: clamp(1.5rem, 2.5vw, 2.25rem);
    font-weight: 900;
    letter-spacing: -0.04em;
}

.section-heading a {
    color: var(--accent);
    font-weight: 800;
}

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

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

.poster-card,
.category-tile,
.category-overview-card a,
.wide-link,
.rank-link {
    position: relative;
    display: block;
    border-radius: var(--radius-md);
    color: inherit;
}

.poster-card {
    overflow: hidden;
    background: rgba(15, 23, 42, 0.58);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.poster-card:hover,
.category-tile:hover,
.category-overview-card a:hover,
.wide-link:hover,
.rank-link:hover {
    transform: translateY(-5px);
}

.poster-frame {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(239, 68, 68, 0.12));
}

.poster-frame img,
.category-tile img,
.category-cover img,
.wide-poster img,
.rank-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.poster-card:hover img,
.category-tile:hover img,
.category-overview-card a:hover img,
.wide-link:hover img,
.rank-link:hover img {
    transform: scale(1.06);
}

.poster-gradient,
.category-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.86), transparent 58%);
}

.poster-year {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.56);
    color: #fff;
    font-size: 0.76rem;
    font-weight: 800;
    backdrop-filter: blur(10px);
}

.poster-play {
    position: absolute;
    top: 50%;
    left: 50%;
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.92);
    color: white;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.72);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.poster-info {
    display: block;
    min-height: 86px;
    padding: 12px 12px 14px;
}

.poster-info strong,
.wide-body strong,
.rank-body strong,
.category-text strong,
.category-overview-body strong {
    display: -webkit-box;
    overflow: hidden;
    color: var(--text);
    font-weight: 900;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.poster-info span,
.wide-body span,
.rank-body span,
.category-overview-body span,
.category-overview-body small {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 0.88rem;
}

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

.category-tile {
    min-height: 220px;
    overflow: hidden;
    background: var(--panel);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.24);
    transition: transform 0.24s ease;
}

.category-tile img,
.category-shade,
.category-text {
    position: absolute;
    inset: 0;
}

.category-text {
    display: flex;
    flex-direction: column;
    justify-content: end;
    padding: 18px;
}

.category-text strong {
    font-size: 1.2rem;
}

.category-text small {
    margin-top: 7px;
    color: var(--muted-strong);
    line-height: 1.6;
}

.two-column-section,
.detail-content-grid,
.rank-page-layout,
.index-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
}

.wide-list,
.rank-list {
    display: grid;
    gap: 14px;
}

.wide-link,
.rank-link {
    display: grid;
    grid-template-columns: 116px minmax(0, 1fr);
    gap: 16px;
    padding: 14px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--panel);
    transition: transform 0.22s ease, background 0.22s ease;
}

.wide-poster,
.rank-poster,
.category-cover {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 12px;
    background: rgba(148, 163, 184, 0.12);
}

.wide-poster {
    aspect-ratio: 2 / 3;
}

.wide-body,
.rank-body {
    align-self: center;
    min-width: 0;
}

.wide-desc {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.rank-link {
    grid-template-columns: 42px 78px minmax(0, 1fr);
    align-items: center;
}

.rank-number {
    color: var(--accent);
    font-size: 1.35rem;
    font-weight: 950;
    text-align: center;
}

.rank-poster {
    aspect-ratio: 2 / 3;
}

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 42px;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background:
        linear-gradient(135deg, rgba(245, 158, 11, 0.14), transparent 34%),
        linear-gradient(145deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.56));
    box-shadow: var(--shadow);
}

.compact-hero h1 {
    max-width: 850px;
    font-size: clamp(2rem, 4vw, 4.2rem);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
    color: var(--muted);
    font-size: 0.92rem;
}

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

.local-search {
    max-width: 520px;
    margin-top: 28px;
}

.category-overview-grid {
    margin-top: 28px;
}

.category-overview-card a {
    display: grid;
    grid-template-rows: auto 1fr;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--panel);
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-overview-card a:hover {
    border-color: rgba(245, 158, 11, 0.35);
}

.category-cover {
    aspect-ratio: 16 / 10;
    border-radius: 0;
}

.category-overview-body {
    display: block;
    padding: 18px;
}

.detail-top {
    display: grid;
    gap: 24px;
}

.watch-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.6fr);
    gap: 28px;
    align-items: stretch;
}

.watch-player {
    position: relative;
    overflow: hidden;
    min-height: 420px;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: #000;
    box-shadow: var(--shadow);
}

.movie-video {
    width: 100%;
    height: 100%;
    min-height: 420px;
    background: #000;
    object-fit: contain;
}

.video-play-button {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.16), rgba(0, 0, 0, 0.15));
    color: white;
    transition: opacity 0.2s ease;
}

.video-play-button span {
    display: grid;
    width: 92px;
    height: 92px;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent), var(--accent-deep));
    box-shadow: 0 24px 60px rgba(245, 158, 11, 0.32);
    font-size: 2.3rem;
    text-indent: 0.14em;
}

.video-play-button.is-hidden {
    opacity: 0;
    pointer-events: none;
}

.watch-info,
.article-panel,
.side-panel {
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: var(--panel);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(18px);
}

.watch-info {
    padding: 30px;
}

.watch-info h1 {
    font-size: clamp(2rem, 3vw, 3.6rem);
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.detail-meta span {
    display: inline-flex;
    min-height: 32px;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.12);
    color: var(--muted-strong);
}

.full-width-btn {
    width: 100%;
    margin-top: 28px;
}

.detail-content-grid {
    margin-top: 36px;
}

.article-panel,
.side-panel {
    padding: 28px;
}

.article-panel p {
    margin: 16px 0 0;
    color: var(--muted-strong);
    line-height: 1.95;
}

.article-panel h2 + p + h2 {
    margin-top: 32px;
}

.info-list {
    display: grid;
    gap: 16px;
    margin: 20px 0 0;
}

.info-list div {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

.info-list dt {
    color: var(--muted);
}

.info-list dd {
    margin: 0;
    color: var(--text);
    font-weight: 700;
}

.rank-page-layout {
    margin-top: 28px;
}

.rank-page-list {
    gap: 12px;
}

.side-panel {
    position: sticky;
    top: 96px;
    align-self: start;
}

.side-links {
    margin-top: 18px;
}

.index-layout {
    margin-top: 28px;
    grid-template-columns: 300px minmax(0, 1fr);
}

.text-link-grid {
    margin-top: 18px;
}

.dense-links {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: start;
}

.dense-links a {
    overflow: hidden;
    min-width: 0;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.site-footer {
    border-top: 1px solid var(--border);
    background: rgba(5, 7, 18, 0.84);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 30px 0;
}

.footer-brand {
    color: var(--text);
}

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

    .two-column-section,
    .detail-content-grid,
    .rank-page-layout,
    .index-layout {
        grid-template-columns: 1fr;
    }

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

    .side-panel {
        position: static;
    }
}

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

    .mobile-toggle {
        display: block;
    }

    .hero-arrow {
        display: none;
    }

    .quick-search-panel {
        grid-template-columns: 1fr;
        margin-top: 0;
        border-radius: 0;
        width: 100%;
    }

    .search-box {
        flex-direction: column;
    }

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

    .hero-copy {
        padding-top: 24px;
    }

    .hero h1,
    .page-hero h1,
    .watch-info h1 {
        letter-spacing: -0.04em;
    }

    .page-hero,
    .article-panel,
    .side-panel,
    .watch-info {
        padding: 24px;
        border-radius: 22px;
    }

    .watch-player,
    .movie-video {
        min-height: 260px;
    }

    .wide-link {
        grid-template-columns: 92px minmax(0, 1fr);
    }

    .rank-link {
        grid-template-columns: 34px 64px minmax(0, 1fr);
        gap: 12px;
    }

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

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

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

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

    .movie-grid,
    .movie-grid-six,
    .category-grid,
    .category-overview-grid {
        grid-template-columns: 1fr 1fr;
    }

    .poster-info {
        min-height: 76px;
        padding: 10px;
    }

    .poster-info span {
        font-size: 0.78rem;
    }

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

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