:root {
    color-scheme: dark;
    --bg: #0c0a09;
    --panel: #1c1917;
    --panel-soft: #292524;
    --panel-strong: #11100f;
    --line: #44403c;
    --muted: #a8a29e;
    --text: #f5f5f4;
    --subtle: #d6d3d1;
    --amber: #d97706;
    --amber-light: #f59e0b;
    --amber-soft: rgba(217, 119, 6, 0.16);
    --orange: #f97316;
    --blue: #3b82f6;
    --shadow: 0 22px 70px rgba(0, 0, 0, 0.42);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

* {
    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 35%), var(--bg);
    color: var(--text);
    min-height: 100vh;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(28, 25, 23, 0.92);
    border-bottom: 1px solid rgba(68, 64, 60, 0.75);
    backdrop-filter: blur(18px);
}

.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    min-height: 72px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: var(--text);
}

.brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--amber-light), var(--orange));
    box-shadow: 0 12px 26px rgba(217, 119, 6, 0.35);
}

.brand-mark span {
    width: 0;
    height: 0;
    margin-left: 3px;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 12px solid white;
}

.brand-text {
    font-size: 20px;
    letter-spacing: 0.02em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-link {
    color: var(--subtle);
    font-weight: 600;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
    color: var(--amber-light);
}

.menu-toggle {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: var(--panel-soft);
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
}

.mobile-menu {
    display: none;
    padding: 12px 24px 20px;
    border-top: 1px solid var(--line);
    background: var(--panel);
}

.mobile-menu.is-open {
    display: grid;
    gap: 10px;
}

.mobile-link {
    color: var(--subtle);
    padding: 10px 0;
    font-weight: 600;
}

.hero-carousel {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, #1c1917 0%, #0c0a09 100%);
}

.hero-bg {
    position: absolute;
    inset: -25% -12% auto auto;
    width: 55vw;
    height: 55vw;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.22), transparent 62%);
    pointer-events: none;
}

.hero-inner {
    position: relative;
    max-width: 1280px;
    margin: 0 auto;
    padding: 70px 24px 48px;
}

.hero-heading {
    text-align: center;
    max-width: 880px;
    margin: 0 auto 42px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--amber-light);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-heading h1,
.page-hero h1 {
    margin: 14px 0 16px;
    font-size: clamp(38px, 7vw, 68px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-heading p,
.page-hero p {
    margin: 0;
    color: var(--subtle);
    font-size: 19px;
    line-height: 1.7;
}

.hero-stage {
    position: relative;
    min-height: 500px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.72fr);
    gap: 38px;
    align-items: center;
    padding: 36px;
    border: 1px solid rgba(68, 64, 60, 0.82);
    border-radius: 32px;
    background: linear-gradient(135deg, rgba(41, 37, 36, 0.96), rgba(12, 10, 9, 0.98));
    box-shadow: var(--shadow);
    transform: translateY(16px) scale(0.98);
    transition: opacity 0.45s ease, transform 0.45s ease;
}

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

.hero-copy h2 {
    margin: 14px 0;
    font-size: clamp(34px, 5vw, 62px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.hero-copy p {
    color: var(--subtle);
    font-size: 18px;
    line-height: 1.8;
    max-width: 700px;
}

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

.hero-tags span,
.detail-tags span,
.tag-row span {
    border-radius: 999px;
    padding: 6px 10px;
    background: rgba(68, 64, 60, 0.85);
    color: var(--subtle);
    font-size: 12px;
}

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

.primary-btn,
.ghost-btn,
.hero-search button {
    border: 0;
    border-radius: 12px;
    padding: 14px 22px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-btn,
.hero-search button {
    background: var(--amber);
    color: white;
    box-shadow: 0 14px 30px rgba(217, 119, 6, 0.32);
}

.primary-btn:hover,
.hero-search button:hover {
    background: var(--amber-light);
    transform: translateY(-2px);
}

.ghost-btn {
    background: rgba(68, 64, 60, 0.35);
    color: var(--text);
    border: 1px solid rgba(168, 162, 158, 0.28);
}

.ghost-btn:hover {
    border-color: var(--amber-light);
    transform: translateY(-2px);
}

.hero-poster {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 26px;
    min-height: 420px;
    background: var(--panel-soft);
}

.hero-poster img {
    width: 100%;
    height: 100%;
    min-height: 420px;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.hero-poster:hover img {
    transform: scale(1.06);
}

.hero-play,
.play-icon {
    position: absolute;
    display: grid;
    place-items: center;
    color: white;
    background: rgba(0, 0, 0, 0.56);
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.hero-play {
    width: 74px;
    height: 74px;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
    border-radius: 999px;
    font-size: 28px;
}

.hero-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 22px;
}

.hero-dots button {
    width: 38px;
    height: 7px;
    border: 0;
    border-radius: 999px;
    background: #57534e;
    cursor: pointer;
}

.hero-dots button.is-active {
    background: var(--amber-light);
}

.hero-search {
    margin: 32px auto 0;
    max-width: 800px;
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: center;
}

.hero-search form {
    flex: 1;
    display: flex;
    background: rgba(41, 37, 36, 0.86);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 8px;
}

.hero-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    color: var(--text);
    padding: 0 14px;
    outline: none;
}

.hero-search a,
.section-more {
    color: var(--amber-light);
    font-weight: 800;
}

.category-strip,
.content-section,
.ranking-block,
.page-shell,
.detail-shell {
    max-width: 1280px;
    margin: 0 auto;
    padding: 56px 24px 0;
}

.page-shell {
    padding-top: 42px;
}

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

.section-title h2,
.filter-head h2,
.info-card h2,
.site-footer h2 {
    margin: 0;
    color: var(--text);
}

.section-title h2 {
    font-size: clamp(26px, 4vw, 36px);
}

.section-title p {
    margin: 8px 0 0;
    color: var(--muted);
}

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

.category-pill,
.category-card,
.info-card,
.filter-panel,
.rank-row a,
.player-card {
    border: 1px solid rgba(68, 64, 60, 0.8);
    background: rgba(28, 25, 23, 0.86);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
}

.category-pill,
.category-card {
    border-radius: 20px;
    padding: 20px;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.category-pill:hover,
.category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(245, 158, 11, 0.65);
    background: rgba(41, 37, 36, 0.95);
}

.category-pill strong,
.category-card strong {
    display: block;
    font-size: 18px;
    margin-bottom: 8px;
}

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

.category-covers {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-bottom: 16px;
}

.category-covers img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 12px;
    background: var(--panel-soft);
}

.category-card em {
    display: inline-block;
    margin-top: 10px;
    color: var(--amber-light);
    font-style: normal;
    font-weight: 800;
}

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

.movie-card,
.compact-card,
.rank-row {
    min-width: 0;
}

.card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    border-radius: 18px;
    background: var(--panel-soft);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.card-link:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: var(--shadow);
}

.poster-frame {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    background: var(--panel);
}

.poster-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.card-link:hover img {
    transform: scale(1.08);
}

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 42%, rgba(0, 0, 0, 0.74));
}

.play-icon {
    width: 54px;
    height: 54px;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
    border-radius: 999px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.card-link:hover .play-icon {
    opacity: 1;
}

.type-badge {
    position: absolute;
    left: 12px;
    bottom: 12px;
    border-radius: 8px;
    padding: 5px 8px;
    background: var(--amber);
    color: white;
    font-size: 12px;
    font-weight: 800;
}

.card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 9px;
    padding: 14px;
}

.card-body strong {
    color: var(--text);
    font-size: 17px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    overflow: hidden;
}

.card-body small {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: #78716c;
    font-size: 12px;
}

.tag-row span {
    padding: 4px 7px;
    background: #44403c;
}

.ranking-mini-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    padding: 28px;
    border-radius: 26px;
    background: var(--panel);
}

.rank-mini {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 12px;
    align-items: center;
    padding: 14px;
    border-radius: 16px;
    background: rgba(41, 37, 36, 0.9);
    transition: background 0.2s ease, transform 0.2s ease;
}

.rank-mini:hover {
    background: #44403c;
    transform: translateY(-2px);
}

.rank-mini span {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    color: white;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    font-weight: 900;
}

.rank-mini strong {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rank-mini em {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
    margin-top: 3px;
}

.page-hero {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    padding: 50px;
    background: linear-gradient(135deg, rgba(41, 37, 36, 0.95), rgba(12, 10, 9, 0.98));
    border: 1px solid rgba(68, 64, 60, 0.9);
    box-shadow: var(--shadow);
}

.small-hero h1 {
    max-width: 880px;
}

.small-hero p {
    max-width: 760px;
}

.filter-panel {
    margin-top: 28px;
    border-radius: 24px;
    padding: 24px;
}

.filter-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.filter-head span {
    color: var(--muted);
}

.filter-controls {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) repeat(3, minmax(140px, 180px));
    gap: 12px;
    margin-bottom: 24px;
}

.filter-controls input,
.filter-controls select {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #0c0a09;
    color: var(--text);
    padding: 0 14px;
    outline: none;
}

.filter-controls input:focus,
.filter-controls select:focus {
    border-color: var(--amber-light);
}

.empty-state {
    display: none;
    padding: 34px;
    text-align: center;
    color: var(--muted);
}

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

.is-filtered-out {
    display: none !important;
}

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

.rank-row a {
    display: grid;
    grid-template-columns: 58px 86px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 12px 16px;
    border-radius: 18px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-row a:hover {
    transform: translateX(5px);
    border-color: rgba(245, 158, 11, 0.6);
}

.rank-num {
    color: var(--amber-light);
    font-size: 22px;
    font-weight: 900;
}

.rank-row img {
    width: 86px;
    height: 58px;
    object-fit: cover;
    border-radius: 10px;
    background: var(--panel-soft);
}

.rank-info {
    min-width: 0;
}

.rank-info strong,
.rank-info em,
.rank-info small {
    display: block;
}

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

.rank-info em,
.rank-info small {
    color: var(--muted);
    font-style: normal;
    font-size: 13px;
    margin-top: 4px;
}

.rank-info small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-watch {
    color: var(--amber-light);
    font-weight: 800;
}

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

.breadcrumb a {
    color: var(--amber-light);
}

.player-section {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.9fr);
    gap: 30px;
    align-items: stretch;
}

.player-card {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    background: #000;
    aspect-ratio: 16 / 9;
}

.player-card video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.12), rgba(0, 0, 0, 0.58));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-cover span {
    display: grid;
    place-items: center;
    width: 88px;
    height: 88px;
    border-radius: 999px;
    color: white;
    font-size: 34px;
    background: rgba(217, 119, 6, 0.92);
    box-shadow: 0 22px 55px rgba(217, 119, 6, 0.42);
}

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

.detail-head {
    border-radius: 26px;
    padding: 34px;
    background: linear-gradient(135deg, rgba(41, 37, 36, 0.96), rgba(12, 10, 9, 0.96));
    border: 1px solid var(--line);
}

.detail-head h1 {
    margin: 12px 0;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.14;
}

.detail-head p {
    color: var(--subtle);
    line-height: 1.75;
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 28px;
    margin-top: 34px;
}

.detail-main,
.detail-aside {
    display: grid;
    gap: 24px;
    align-content: start;
}

.info-card {
    border-radius: 22px;
    padding: 24px;
}

.info-card p {
    margin: 14px 0 0;
    color: var(--subtle);
    line-height: 1.85;
}

.info-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 16px;
}

.info-list span {
    display: grid;
    gap: 4px;
    padding: 12px;
    border-radius: 14px;
    background: #0c0a09;
    color: var(--subtle);
}

.info-list strong {
    color: var(--amber-light);
    font-size: 12px;
}

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

.compact-list {
    display: grid;
    gap: 14px;
    margin-top: 16px;
}

.compact-link {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 12px;
    padding: 10px;
    border-radius: 14px;
    background: #0c0a09;
    transition: background 0.2s ease;
}

.compact-link:hover {
    background: #292524;
}

.compact-link img {
    width: 96px;
    height: 68px;
    object-fit: cover;
    border-radius: 10px;
    background: var(--panel-soft);
}

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

.compact-body strong {
    color: var(--text);
}

.compact-body em,
.compact-body small {
    color: var(--muted);
    font-style: normal;
    font-size: 12px;
    margin-top: 4px;
}

.site-footer {
    margin-top: 80px;
    padding-top: 44px;
    background: #1c1917;
    border-top: 1px solid var(--line);
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px 36px;
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 28px;
}

.site-footer p,
.site-footer a,
.site-footer li {
    color: var(--muted);
    line-height: 1.7;
    font-size: 14px;
}

.site-footer a:hover {
    color: var(--amber-light);
}

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

.footer-bottom {
    border-top: 1px solid var(--line);
    color: #78716c;
    text-align: center;
    padding: 22px;
    font-size: 13px;
}

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

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

    .hero-slide,
    .player-section,
    .detail-grid {
        grid-template-columns: 1fr;
    }

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

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

    .menu-toggle {
        display: inline-flex;
    }

    .hero-inner {
        padding-top: 46px;
    }

    .hero-slide {
        padding: 22px;
    }

    .hero-poster,
    .hero-poster img {
        min-height: 320px;
    }

    .hero-search,
    .hero-search form,
    .section-title,
    .filter-head {
        align-items: stretch;
        flex-direction: column;
    }

    .filter-controls {
        grid-template-columns: 1fr;
    }

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

    .rank-row a {
        grid-template-columns: 42px 72px minmax(0, 1fr);
    }

    .rank-watch {
        display: none;
    }
}

@media (max-width: 620px) {
    .header-inner,
    .hero-inner,
    .category-strip,
    .content-section,
    .ranking-block,
    .page-shell,
    .detail-shell {
        padding-left: 16px;
        padding-right: 16px;
    }

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

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

    .compact-grid,
    .category-pill-grid,
    .category-overview-grid,
    .ranking-mini-grid,
    .detail-aside,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .page-hero {
        padding: 30px 22px;
        border-radius: 24px;
    }

    .hero-copy h2 {
        font-size: 32px;
    }

    .hero-heading h1,
    .page-hero h1 {
        font-size: 36px;
    }

    .rank-info small {
        display: none;
    }
}
