:root {
    --site-bg: #0f0f0f;
    --site-panel: #1a1513;
    --site-panel-soft: rgba(35, 28, 24, 0.82);
    --site-border: rgba(141, 90, 45, 0.32);
    --site-text: #d7ccc8;
    --site-muted: rgba(215, 204, 200, 0.68);
    --site-warm: #d97706;
    --site-gold: #fbbf24;
    --site-dark: #080808;
    --site-shadow: 0 22px 60px rgba(0, 0, 0, 0.38);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at 20% 0%, rgba(217, 119, 6, 0.16), transparent 32rem),
        radial-gradient(circle at 90% 20%, rgba(251, 191, 36, 0.08), transparent 28rem),
        var(--site-bg);
    color: var(--site-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

img {
    max-width: 100%;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--site-border);
    background: rgba(15, 15, 15, 0.94);
    backdrop-filter: blur(16px);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 178px;
    color: inherit;
    text-decoration: none;
}

.brand-icon {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #111;
    background: linear-gradient(135deg, var(--site-gold), var(--site-warm));
    box-shadow: 0 10px 28px rgba(217, 119, 6, 0.3);
}

.brand-text strong,
.footer-brand {
    display: block;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: transparent;
    background: linear-gradient(135deg, #fff7ed, var(--site-gold), var(--site-warm));
    -webkit-background-clip: text;
    background-clip: text;
}

.brand-text small {
    display: block;
    margin-top: 2px;
    color: var(--site-muted);
    font-size: 12px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: auto;
}

.desktop-nav a,
.mobile-nav a {
    color: var(--site-text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.2s ease;
}

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

.header-search {
    display: flex;
    align-items: center;
    width: min(320px, 28vw);
    border: 1px solid var(--site-border);
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
}

.header-search input,
.large-search input,
.filter-bar input {
    width: 100%;
    border: 0;
    outline: 0;
    color: var(--site-text);
    background: transparent;
}

.header-search input {
    padding: 10px 14px;
    font-size: 13px;
}

.header-search button,
.large-search button {
    border: 0;
    color: #111;
    background: linear-gradient(135deg, var(--site-gold), var(--site-warm));
    font-weight: 800;
    cursor: pointer;
}

.header-search button {
    padding: 10px 16px;
}

.mobile-menu-button {
    display: none;
    margin-left: auto;
    width: 42px;
    height: 42px;
    border: 1px solid var(--site-border);
    border-radius: 12px;
    color: var(--site-text);
    background: rgba(255, 255, 255, 0.06);
}

.mobile-nav {
    display: none;
    border-top: 1px solid var(--site-border);
    padding: 10px 16px 16px;
}

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

.hero-section {
    padding: 32px 0 18px;
}

.hero-carousel {
    position: relative;
    min-height: 500px;
    overflow: hidden;
    border: 1px solid var(--site-border);
    border-radius: 28px;
    background: #000;
    box-shadow: var(--site-shadow);
}

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    min-height: 500px;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.78)),
        linear-gradient(0deg, rgba(0, 0, 0, 0.75), transparent 55%);
}

.hero-content {
    position: absolute;
    left: clamp(22px, 6vw, 72px);
    bottom: clamp(24px, 7vw, 78px);
    max-width: 720px;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--site-gold);
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(34px, 5vw, 64px);
    line-height: 1.08;
    font-weight: 900;
}

.hero-summary {
    max-width: 620px;
    margin: 18px 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: 18px;
    line-height: 1.7;
}

.hero-meta,
.detail-meta,
.latest-item__meta,
.ranking-item__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.hero-meta span,
.detail-meta span,
.latest-item__meta span,
.ranking-item__meta span,
.latest-item__meta a {
    padding: 6px 10px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.78);
    background: rgba(0, 0, 0, 0.25);
    text-decoration: none;
    font-size: 13px;
}

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

.primary-button,
.ghost-button,
.section-more,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.primary-button {
    color: #111;
    background: linear-gradient(135deg, var(--site-gold), var(--site-warm));
}

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

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

.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    color: #fff;
    background: rgba(0, 0, 0, 0.45);
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
}

.hero-arrow--prev {
    left: 18px;
}

.hero-arrow--next {
    right: 18px;
}

.hero-dots {
    position: absolute;
    right: 28px;
    bottom: 26px;
    display: flex;
    gap: 8px;
}

.hero-dots button {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.is-active {
    width: 34px;
    background: var(--site-gold);
}

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

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

.section-heading h2 {
    margin: 0 0 8px;
    color: var(--site-gold);
    font-size: clamp(24px, 3vw, 34px);
    font-weight: 900;
}

.section-heading p {
    margin: 0;
    color: var(--site-muted);
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--site-border);
    border-radius: 20px;
    background: var(--site-panel-soft);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(251, 191, 36, 0.58);
    box-shadow: 0 20px 46px rgba(0, 0, 0, 0.36);
}

.movie-card__poster {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, #20140f, #050505);
}

.movie-card__poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.movie-card:hover .movie-card__poster img {
    transform: scale(1.08);
    opacity: 0.78;
}

.movie-card__play {
    position: absolute;
    left: 14px;
    bottom: 14px;
    padding: 8px 12px;
    border-radius: 999px;
    color: #111;
    background: var(--site-gold);
    font-size: 12px;
    font-weight: 900;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .movie-card__play {
    opacity: 1;
    transform: translateY(0);
}

.movie-card__body {
    padding: 14px;
}

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

.movie-card__body h3 a,
.latest-item h3 a,
.ranking-item h3 a,
.category-overview-card h2 a {
    color: #fff;
    text-decoration: none;
}

.movie-card__body h3 a:hover,
.latest-item h3 a:hover,
.ranking-item h3 a:hover,
.category-overview-card h2 a:hover {
    color: var(--site-gold);
}

.movie-card__meta,
.movie-card__line {
    margin: 0;
    color: var(--site-muted);
    font-size: 13px;
}

.movie-card__line {
    display: -webkit-box;
    min-height: 42px;
    margin-top: 9px;
    overflow: hidden;
    line-height: 1.6;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 12px;
}

.tag-row span,
.panel-tags a,
.quick-filters button {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 9px;
    border: 1px solid var(--site-border);
    border-radius: 999px;
    color: var(--site-gold);
    background: rgba(217, 119, 6, 0.08);
    font-size: 12px;
    text-decoration: none;
}

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

.category-card,
.category-overview-card,
.latest-item,
.ranking-item,
.site-panel,
.detail-card,
.story-card {
    border: 1px solid var(--site-border);
    border-radius: 22px;
    background: var(--site-panel-soft);
    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.22);
}

.category-card {
    position: relative;
    min-height: 220px;
    overflow: hidden;
    display: flex;
    align-items: end;
    padding: 20px;
    text-decoration: none;
}

.category-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.45;
    transition: transform 0.3s ease;
}

.category-card:hover img {
    transform: scale(1.06);
}

.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.18));
}

.category-card div {
    position: relative;
    z-index: 1;
}

.category-card h3,
.category-overview-card h2,
.site-panel h2,
.story-card h2 {
    margin: 0 0 10px;
    color: #fff;
    font-size: 23px;
    font-weight: 900;
}

.category-card p,
.category-overview-card p,
.site-panel p,
.story-card p {
    color: var(--site-muted);
    line-height: 1.8;
}

.category-card span,
.category-overview-card span {
    color: var(--site-gold);
    font-weight: 800;
}

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

.site-panel {
    position: sticky;
    top: 96px;
    padding: 26px;
}

.large-search {
    display: flex;
    margin: 20px 0;
    overflow: hidden;
    border: 1px solid var(--site-border);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
}

.large-search input {
    padding: 14px 16px;
}

.large-search button {
    padding: 0 20px;
}

.panel-tags,
.quick-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

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

.latest-item,
.ranking-item {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 18px;
    padding: 14px;
    align-items: center;
}

.latest-item__img,
.ranking-item__poster {
    display: block;
    overflow: hidden;
    border-radius: 16px;
    background: #050505;
}

.latest-item__img {
    aspect-ratio: 16 / 10;
}

.latest-item__img img,
.ranking-item__poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.latest-item h3,
.ranking-item h3 {
    margin: 0 0 8px;
    font-size: 20px;
}

.latest-item p,
.ranking-item p {
    margin: 0 0 12px;
    color: var(--site-muted);
    line-height: 1.7;
}

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

.compact-ranking .ranking-item__poster {
    display: none;
}

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

.ranking-item__rank {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: #111;
    background: linear-gradient(135deg, var(--site-gold), var(--site-warm));
    text-decoration: none;
    font-weight: 900;
}

.ranking-item__poster {
    aspect-ratio: 3 / 4;
}

.page-hero {
    margin-top: 32px;
    padding: clamp(30px, 6vw, 64px);
    border: 1px solid var(--site-border);
    border-radius: 28px;
    background:
        linear-gradient(135deg, rgba(217, 119, 6, 0.16), transparent 48%),
        var(--site-panel-soft);
    box-shadow: var(--site-shadow);
}

.compact-page-hero h1 {
    font-size: clamp(32px, 4vw, 50px);
}

.compact-page-hero p {
    max-width: 780px;
    color: var(--site-muted);
    font-size: 17px;
    line-height: 1.8;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 18px;
    color: var(--site-muted);
    font-size: 14px;
}

.breadcrumb a {
    color: var(--site-gold);
    text-decoration: none;
}

.filter-bar {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    margin-bottom: 22px;
    padding: 14px;
    border: 1px solid var(--site-border);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
}

.filter-bar input {
    min-height: 42px;
    padding: 0 12px;
}

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

.category-overview-card img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 16px;
    background: #050505;
}

.detail-layout {
    padding: 30px 0 50px;
}

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

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--site-border);
    border-radius: 24px;
    background: #000;
    box-shadow: var(--site-shadow);
    aspect-ratio: 16 / 9;
}

.hls-player {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
}

.player-start {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    min-width: 150px;
    min-height: 52px;
    border: 0;
    border-radius: 999px;
    color: #111;
    background: linear-gradient(135deg, var(--site-gold), var(--site-warm));
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.36);
}

.player-start.is-hidden {
    display: none;
}

.player-message {
    position: absolute;
    left: 18px;
    bottom: 18px;
    max-width: calc(100% - 36px);
    padding: 10px 12px;
    border-radius: 12px;
    color: var(--site-text);
    background: rgba(0, 0, 0, 0.62);
    font-size: 14px;
}

.player-message:empty {
    display: none;
}

.detail-card {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 28px;
    margin-top: 28px;
    padding: 24px;
}

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

.detail-info h1 {
    font-size: clamp(30px, 4vw, 50px);
}

.detail-one-line,
.lead-text {
    color: #fff;
    font-size: 18px;
    line-height: 1.8;
}

.detail-tags {
    margin-top: 18px;
}

.story-card {
    margin-top: 22px;
    padding: 26px;
}

.story-card p {
    margin: 0;
}

.story-card p + p {
    margin-top: 14px;
}

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

.movie-card.compact .movie-card__line,
.movie-card.compact .tag-row {
    display: none;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 30px;
    padding: 42px 0;
}

.footer-grid p {
    max-width: 620px;
    color: var(--site-muted);
    line-height: 1.8;
}

.footer-grid h3 {
    margin: 0 0 16px;
    color: #fff;
}

.footer-links {
    display: grid;
    gap: 10px;
}

.footer-links a {
    color: var(--site-muted);
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--site-gold);
}

.footer-bottom {
    padding: 18px 0 28px;
    color: rgba(215, 204, 200, 0.45);
    font-size: 13px;
}

[hidden],
.is-filtered-out {
    display: none !important;
}

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

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

    .split-section {
        grid-template-columns: 1fr;
    }

    .site-panel {
        position: static;
    }
}

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

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

    .hero-carousel,
    .hero-slide img {
        min-height: 440px;
    }

    .hero-arrow {
        display: none;
    }

    .hero-content {
        right: 22px;
    }

    .hero-summary {
        font-size: 15px;
    }

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

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

    .latest-item,
    .ranking-item,
    .category-overview-card,
    .detail-card,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .latest-item__img {
        aspect-ratio: 16 / 9;
    }
}

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

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

    .hero-section {
        padding-top: 18px;
    }

    .hero-carousel,
    .hero-slide img {
        min-height: 420px;
        border-radius: 22px;
    }

    .hero-content h1,
    .page-hero h1 {
        font-size: 30px;
    }

    .hero-dots {
        left: 22px;
        right: auto;
    }

    .movie-grid,
    .category-movie-grid,
    .category-grid,
    .category-overview-grid,
    .related-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .movie-card__body {
        padding: 11px;
    }

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

    .movie-card__line {
        display: none;
    }

    .page-hero,
    .detail-card,
    .story-card {
        padding: 20px;
        border-radius: 20px;
    }

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

    .large-search button {
        min-height: 44px;
    }
}
