:root {
    --bg: #020617;
    --panel: #0f172a;
    --panel-soft: #111827;
    --line: #1e293b;
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --accent: #f59e0b;
    --accent-deep: #d97706;
    --blue: #38bdf8;
    --radius: 22px;
    --shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}

* {
    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 28rem), var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: linear-gradient(135deg, #111827, #334155);
}

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(18px);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #ffffff;
}

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    color: #111827;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    box-shadow: 0 0 24px rgba(245, 158, 11, 0.35);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    color: var(--muted-strong);
    font-size: 15px;
}

.desktop-nav a,
.mobile-nav a,
.footer-links a {
    transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.footer-links a:hover {
    color: var(--accent);
}

.menu-button {
    display: none;
    border: 0;
    color: #ffffff;
    background: #1e293b;
    border-radius: 12px;
    padding: 9px 12px;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    flex-direction: column;
    gap: 12px;
    padding: 0 16px 18px;
    color: var(--muted-strong);
}

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

.hero {
    position: relative;
    min-height: 590px;
    overflow: hidden;
    background: #020617;
}

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

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

.hero-backdrop {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.05);
    filter: blur(12px);
    opacity: 0.3;
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 25% 25%, rgba(245, 158, 11, 0.30), transparent 24rem),
        radial-gradient(circle at 80% 75%, rgba(56, 189, 248, 0.18), transparent 26rem),
        linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.84) 46%, rgba(15, 23, 42, 0.52) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 590px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    align-items: center;
    gap: 56px;
    padding: 58px 0 78px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: max-content;
    padding: 7px 12px;
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 999px;
    color: #fde68a;
    background: rgba(245, 158, 11, 0.10);
    font-size: 14px;
    font-weight: 700;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
    margin: 22px 0 18px;
    font-size: clamp(38px, 7vw, 76px);
    line-height: 1.05;
    letter-spacing: -0.06em;
}

.hero-copy p,
.page-hero p,
.detail-one-line {
    max-width: 680px;
    color: var(--muted-strong);
    font-size: clamp(17px, 2vw, 22px);
}

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

.hero-tags span,
.tag-row span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 4px 10px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    color: #dbeafe;
    background: rgba(15, 23, 42, 0.72);
    font-size: 13px;
}

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

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

.primary-button,
.home-search button {
    border: 0;
    color: #111827;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    padding: 12px 22px;
    box-shadow: 0 16px 36px rgba(245, 158, 11, 0.25);
}

.ghost-button {
    border: 1px solid rgba(148, 163, 184, 0.28);
    color: #ffffff;
    background: rgba(15, 23, 42, 0.55);
    padding: 11px 21px;
}

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

.hero-poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 30px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.hero-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 45%, rgba(2, 6, 23, 0.68));
}

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

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

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

.quick-search-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    gap: 28px;
    align-items: center;
    margin-top: -34px;
    padding: 24px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.86);
    box-shadow: var(--shadow);
    position: relative;
    z-index: 5;
}

.quick-search-panel h2,
.section-head h2,
.player-section h2,
.detail-content h2,
.footer-grid h2 {
    margin: 0 0 8px;
    color: #ffffff;
    line-height: 1.2;
}

.quick-search-panel p,
.section-head p,
.movie-card-body p,
.rank-item p,
.category-card p,
.site-footer p,
.detail-content p,
.detail-side a,
.movie-meta {
    color: var(--muted);
}

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

.home-search input,
.filter-bar input,
.filter-bar select {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 16px;
    color: #ffffff;
    background: rgba(2, 6, 23, 0.78);
    padding: 13px 15px;
    outline: none;
}

.home-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
    border-color: rgba(245, 158, 11, 0.72);
}

.category-pills {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-pills a {
    padding: 9px 13px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 999px;
    color: var(--muted-strong);
    background: rgba(2, 6, 23, 0.46);
}

.category-pills a:hover {
    color: #111827;
    background: var(--accent);
}

.content-section,
.split-section,
.page-main {
    padding: 58px 0;
}

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

.section-head h2 {
    font-size: clamp(25px, 3vw, 34px);
}

.section-link,
.text-button {
    color: #f8fafc;
    border: 1px solid rgba(245, 158, 11, 0.42);
    background: rgba(245, 158, 11, 0.08);
    padding: 9px 15px;
}

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.74));
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.22);
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(245, 158, 11, 0.45);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.32);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
}

.poster-link img {
    transition: transform 0.32s ease;
}

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

.poster-badge,
.poster-year {
    position: absolute;
    top: 12px;
    z-index: 2;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(10px);
}

.poster-badge {
    left: 12px;
    color: #fde68a;
}

.poster-year {
    right: 12px;
    color: #bfdbfe;
}

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

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

.movie-card-body h3 a:hover,
.rank-item h3 a:hover,
.category-card h2 a:hover {
    color: var(--accent);
}

.movie-card-body p {
    min-height: 48px;
    margin: 0 0 10px;
    font-size: 14px;
}

.movie-meta {
    margin-bottom: 10px;
    font-size: 13px;
}

.tag-row span {
    min-height: 26px;
    font-size: 12px;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 370px;
    gap: 30px;
}

.ranking-panel,
.rank-page-list,
.detail-side,
.player-section,
.detail-content article {
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.78);
    box-shadow: var(--shadow);
}

.ranking-panel {
    padding: 20px;
    align-self: start;
    position: sticky;
    top: 92px;
}

.section-head.simple {
    align-items: start;
    margin-bottom: 16px;
}

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

.rank-page-list {
    padding: 18px;
}

.rank-item {
    display: grid;
    grid-template-columns: 44px 72px minmax(0, 1fr);
    gap: 13px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.38);
}

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

.rank-cover {
    display: block;
    aspect-ratio: 2 / 3;
    border-radius: 12px;
    overflow: hidden;
}

.rank-item h3 {
    margin: 0 0 4px;
    font-size: 16px;
}

.rank-item p {
    margin: 0 0 4px;
    font-size: 13px;
}

.rank-item span {
    color: var(--muted-strong);
    font-size: 12px;
}

.page-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 26px;
    margin-bottom: 28px;
    padding: 34px;
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 30px;
    background:
        radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.20), transparent 24rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.78));
    box-shadow: var(--shadow);
}

.small-hero h1,
.category-hero h1 {
    font-size: clamp(34px, 5vw, 54px);
}

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

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

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

.category-card {
    display: grid;
    grid-template-columns: 145px minmax(0, 1fr);
    gap: 18px;
    padding: 18px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.76);
}

.category-image {
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 16px;
}

.category-card h2 {
    margin: 0 0 8px;
}

.category-card p {
    margin: 0 0 12px;
}

.category-samples {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.category-samples a {
    padding: 5px 8px;
    border-radius: 999px;
    color: var(--muted-strong);
    background: rgba(2, 6, 23, 0.55);
    font-size: 12px;
}

.filter-bar {
    margin-bottom: 24px;
    padding: 16px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.72);
}

.search-filter {
    position: sticky;
    top: 82px;
    z-index: 12;
}

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

.detail-main {
    padding-top: 26px;
}

.detail-hero {
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
    margin-bottom: 34px;
    padding: 28px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 30px;
    background:
        radial-gradient(circle at 16% 20%, rgba(245, 158, 11, 0.20), transparent 24rem),
        rgba(15, 23, 42, 0.78);
    box-shadow: var(--shadow);
}

.detail-poster {
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 24px;
    box-shadow: 0 22px 56px rgba(0, 0, 0, 0.36);
}

.detail-copy h1 {
    font-size: clamp(34px, 5vw, 64px);
}

.detail-meta {
    margin: 18px 0;
}

.detail-tags {
    margin-bottom: 26px;
}

.player-section {
    padding: 20px;
    margin-bottom: 34px;
}

.player-frame {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: #000000;
    aspect-ratio: 16 / 9;
}

.player-frame video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000000;
    pointer-events: auto;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #111827;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.68));
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.player-overlay span {
    display: grid;
    place-items: center;
    width: 82px;
    height: 82px;
    border-radius: 999px;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    font-size: 34px;
    box-shadow: 0 20px 50px rgba(245, 158, 11, 0.34);
}

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

.detail-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 26px;
    margin-bottom: 26px;
}

.detail-content article,
.detail-side {
    padding: 24px;
}

.detail-content p {
    font-size: 17px;
}

.article-tags {
    margin-top: 12px;
}

.side-links {
    display: grid;
    gap: 12px;
}

.side-links a {
    padding: 11px 12px;
    border-radius: 14px;
    background: rgba(2, 6, 23, 0.46);
}

.side-links a:hover {
    color: #ffffff;
    background: rgba(245, 158, 11, 0.16);
}

.site-footer {
    margin-top: 40px;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    background: #0f172a;
}

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

.footer-brand {
    margin-bottom: 14px;
}

.footer-links {
    display: grid;
    gap: 9px;
    color: var(--muted-strong);
}

.copyright {
    padding: 18px 0 28px;
    color: #64748b;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
    font-size: 14px;
}

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

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

    .ranking-panel {
        position: static;
    }
}

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

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

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

    .hero-content {
        gap: 28px;
        padding-top: 38px;
    }

    .hero-poster {
        max-width: 270px;
        margin: 0 auto;
    }

    .page-hero {
        align-items: flex-start;
        flex-direction: column;
    }

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

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

    .hero {
        min-height: 700px;
    }

    .hero-content {
        min-height: 700px;
    }

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

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

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

    .movie-card-body p {
        font-size: 12px;
        min-height: 38px;
    }

    .home-search,
    .filter-bar {
        flex-direction: column;
    }

    .page-hero,
    .detail-hero,
    .quick-search-panel {
        padding: 20px;
        border-radius: 22px;
    }

    .category-card {
        grid-template-columns: 96px minmax(0, 1fr);
        gap: 12px;
        padding: 12px;
    }

    .rank-item {
        grid-template-columns: 36px 58px minmax(0, 1fr);
        padding: 8px;
    }
}
