:root {
    color-scheme: dark;
    --bg: #07080d;
    --panel: rgba(17, 20, 33, 0.88);
    --panel-strong: #121827;
    --text: #f6f7fb;
    --muted: #9ca3af;
    --line: rgba(255, 255, 255, 0.1);
    --accent: #f59e0b;
    --accent-2: #f97316;
    --accent-soft: rgba(245, 158, 11, 0.18);
    --radius: 22px;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, 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.16), transparent 32rem),
        radial-gradient(circle at 80% 10%, rgba(249, 115, 22, 0.14), transparent 28rem),
        linear-gradient(180deg, #05060a 0%, #0b1020 46%, #07080d 100%);
    color: var(--text);
}

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

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

.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 50;
    background: linear-gradient(180deg, rgba(5, 6, 10, 0.86), rgba(5, 6, 10, 0.35), transparent);
    backdrop-filter: blur(14px);
}

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

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

.brand-mark {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #111827;
    box-shadow: 0 14px 34px rgba(245, 158, 11, 0.35);
}

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

.site-nav a {
    padding: 10px 15px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.76);
    font-size: 15px;
    transition: 0.22s ease;
}

.site-nav a:hover,
.site-nav a.active {
    color: #111827;
    background: var(--accent);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
}

.nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    border-radius: 999px;
    background: #fff;
}

.hero {
    position: relative;
    min-height: 720px;
    overflow: hidden;
}

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

.hero-slide {
    opacity: 0;
    transform: scale(1.015);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.hero-slide.active {
    opacity: 1;
    transform: scale(1);
}

.hero-slide img {
    height: 100%;
    object-fit: cover;
    filter: saturate(1.06) contrast(1.04);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(5, 6, 10, 0.96) 0%, rgba(5, 6, 10, 0.75) 34%, rgba(5, 6, 10, 0.22) 100%),
        linear-gradient(0deg, #07080d 0%, rgba(7, 8, 13, 0.1) 42%);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: min(1180px, calc(100% - 32px));
    min-height: 720px;
    margin: 0 auto;
    padding-top: 76px;
}

.eyebrow {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
    max-width: 820px;
    margin: 0;
    font-size: clamp(42px, 8vw, 84px);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero-content p,
.page-hero p,
.detail-intro {
    max-width: 680px;
    margin: 24px 0 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 18px;
    line-height: 1.85;
}

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

.hero-tags {
    margin-top: 24px;
}

.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border: 1px solid rgba(245, 158, 11, 0.28);
    border-radius: 999px;
    background: var(--accent-soft);
    color: #fde68a;
    font-size: 13px;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-weight: 800;
    transition: 0.22s ease;
}

.btn.primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #111827;
    box-shadow: 0 18px 34px rgba(245, 158, 11, 0.24);
}

.btn.ghost {
    border-color: var(--line);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.btn:hover {
    transform: translateY(-2px);
}

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

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

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

.panel-wrap,
.content-section,
.page-main,
.detail-main {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.quick-search {
    margin-top: -58px;
    position: relative;
    z-index: 10;
}

.quick-search-inner,
.text-panel,
.player-card,
.category-overview-card,
.filter-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.quick-search-inner {
    display: grid;
    grid-template-columns: 1fr minmax(280px, 520px);
    align-items: center;
    gap: 24px;
    padding: 26px;
}

.quick-search h2,
.section-title h2,
.text-panel h2,
.category-overview-card h2 {
    margin: 0;
}

.home-search {
    display: flex;
    gap: 12px;
}

.home-search input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    outline: none;
}

.home-search input,
.filter-panel input {
    padding: 0 18px;
}

.filter-panel select {
    padding: 0 14px;
}

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

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

.section-title span {
    color: var(--accent);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.section-title h2 {
    font-size: clamp(28px, 4vw, 44px);
    letter-spacing: -0.04em;
}

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

.category-tile {
    position: relative;
    min-height: 220px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #111827;
}

.category-tile img {
    height: 100%;
    object-fit: cover;
    opacity: 0.58;
    transition: 0.3s ease;
}

.category-tile span,
.category-tile small {
    position: absolute;
    left: 18px;
    right: 18px;
    z-index: 2;
}

.category-tile span {
    bottom: 56px;
    font-size: 22px;
    font-weight: 900;
}

.category-tile small {
    bottom: 18px;
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.5;
}

.category-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 10%, rgba(5, 6, 10, 0.92) 100%);
}

.category-tile:hover img {
    transform: scale(1.07);
    opacity: 0.78;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.055);
    transition: 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(245, 158, 11, 0.46);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.3);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.16), rgba(255, 255, 255, 0.05));
}

.poster-link img {
    height: 100%;
    object-fit: cover;
    transition: 0.3s ease;
}

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

.quality-badge,
.heat-badge {
    position: absolute;
    top: 10px;
    display: inline-flex;
    align-items: center;
    height: 26px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.quality-badge {
    left: 10px;
    background: var(--accent);
    color: #111827;
}

.heat-badge {
    right: 10px;
    background: rgba(0, 0, 0, 0.58);
    color: #fff;
}

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

.movie-meta-line {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

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

.movie-card p {
    display: -webkit-box;
    min-height: 58px;
    margin: 0 0 12px;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.tag-row.large span {
    min-height: 34px;
    font-size: 14px;
}

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

.ranking-item {
    display: grid;
    grid-template-columns: 64px 88px 1fr 90px;
    align-items: center;
    gap: 18px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.055);
    transition: 0.22s ease;
}

.ranking-item:hover {
    border-color: rgba(245, 158, 11, 0.46);
    background: rgba(255, 255, 255, 0.085);
}

.rank-number {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 18px;
    background: var(--accent-soft);
    color: #fde68a;
    font-weight: 900;
}

.rank-poster {
    overflow: hidden;
    border-radius: 16px;
    aspect-ratio: 2 / 3;
}

.rank-poster img {
    height: 100%;
    object-fit: cover;
}

.rank-content h2 {
    margin: 0 0 8px;
    font-size: 20px;
}

.rank-content p {
    margin: 0 0 8px;
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.55;
}

.rank-score {
    text-align: center;
}

.rank-score span {
    display: block;
    color: var(--accent);
    font-size: 28px;
    font-weight: 900;
}

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

.section-more {
    display: flex;
    justify-content: center;
    margin-top: 28px;
}

.page-main,
.detail-main {
    padding-top: 108px;
}

.page-hero {
    display: flex;
    align-items: end;
    justify-content: space-between;
    min-height: 310px;
    gap: 28px;
    padding: 46px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 30px;
    background:
        linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(255, 255, 255, 0.06)),
        radial-gradient(circle at 80% 20%, rgba(249, 115, 22, 0.24), transparent 26rem),
        var(--panel-strong);
    box-shadow: var(--shadow);
}

.compact-hero h1,
.channel-hero h1 {
    font-size: clamp(40px, 7vw, 72px);
}

.filter-panel {
    display: grid;
    grid-template-columns: 1.4fr repeat(3, minmax(150px, 0.7fr));
    gap: 12px;
    margin-bottom: 24px;
    padding: 14px;
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 20px;
    padding: 16px;
}

.category-cover {
    overflow: hidden;
    border-radius: 18px;
    aspect-ratio: 4 / 5;
}

.category-cover img {
    height: 100%;
    object-fit: cover;
}

.category-overview-card p {
    color: rgba(255, 255, 255, 0.74);
    line-height: 1.7;
}

.mini-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mini-links a {
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.78);
    font-size: 13px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 20px;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumb a {
    color: #fde68a;
}

.detail-hero {
    display: grid;
    grid-template-columns: 310px 1fr;
    gap: 34px;
    align-items: end;
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: 32px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(245, 158, 11, 0.1)),
        var(--panel-strong);
    box-shadow: var(--shadow);
}

.detail-poster {
    overflow: hidden;
    border-radius: 24px;
    aspect-ratio: 2 / 3;
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 26px 60px rgba(0, 0, 0, 0.42);
}

.detail-poster img {
    height: 100%;
    object-fit: cover;
}

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

.detail-meta span {
    padding: 8px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.82);
}

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

.player-card {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.movie-player {
    width: 100%;
    height: 100%;
    background: #000;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.24), rgba(0, 0, 0, 0.64));
    color: #111827;
    cursor: pointer;
    transition: 0.22s ease;
}

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

.play-pulse {
    position: absolute;
    width: 118px;
    height: 118px;
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.22);
    animation: pulse 1.6s infinite;
}

.play-symbol {
    position: relative;
    display: grid;
    place-items: center;
    width: 78px;
    height: 78px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    font-size: 32px;
    box-shadow: 0 22px 48px rgba(245, 158, 11, 0.38);
}

@keyframes pulse {
    0% {
        transform: scale(0.82);
        opacity: 0.75;
    }
    70% {
        transform: scale(1.22);
        opacity: 0;
    }
    100% {
        transform: scale(1.22);
        opacity: 0;
    }
}

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

.text-panel {
    padding: 24px;
}

.text-panel p {
    color: rgba(255, 255, 255, 0.76);
    font-size: 16px;
    line-height: 1.9;
}

.site-footer {
    margin-top: 84px;
    padding: 48px 0 30px;
    border-top: 1px solid var(--line);
    background: rgba(0, 0, 0, 0.26);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 34px;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.footer-grid p,
.copyright {
    color: var(--muted);
    line-height: 1.7;
}

.footer-grid h2 {
    margin: 0 0 12px;
    font-size: 17px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.footer-links a {
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    color: rgba(255, 255, 255, 0.74);
}

.copyright {
    width: min(1180px, calc(100% - 32px));
    margin: 30px auto 0;
    font-size: 14px;
}

[hidden] {
    display: none !important;
}

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

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

@media (max-width: 820px) {
    .header-inner {
        height: 68px;
    }

    .nav-toggle {
        display: block;
    }

    .site-nav {
        position: absolute;
        top: 68px;
        left: 16px;
        right: 16px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        border: 1px solid var(--line);
        border-radius: 18px;
        background: rgba(5, 6, 10, 0.94);
    }

    .site-nav.open {
        display: flex;
    }

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

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

    .home-search,
    .page-hero {
        flex-direction: column;
        align-items: stretch;
    }

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

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

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

    .ranking-item {
        grid-template-columns: 44px 72px 1fr;
    }

    .rank-score {
        grid-column: 2 / -1;
        display: flex;
        align-items: baseline;
        gap: 8px;
        text-align: left;
    }

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

@media (max-width: 520px) {
    .brand,
    .footer-brand {
        font-size: 18px;
    }

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

    .hero-content p,
    .page-hero p,
    .detail-intro {
        font-size: 16px;
    }

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

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

    .ranking-item {
        grid-template-columns: 42px 1fr;
    }

    .rank-poster {
        display: none;
    }
}
