:root {
    --bg: #f8fafc;
    --ink: #0f172a;
    --muted: #64748b;
    --deep: #020617;
    --panel: #0f172a;
    --panel-soft: #1e293b;
    --gold: #f59e0b;
    --gold-soft: #fbbf24;
    --line: rgba(148, 163, 184, 0.22);
    --shadow: 0 24px 70px rgba(15, 23, 42, 0.16);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background: radial-gradient(circle at 20% 0%, rgba(251, 191, 36, 0.14), transparent 30%), var(--bg);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #ffffff;
    background: rgba(2, 6, 23, 0.94);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: 0 16px 50px rgba(2, 6, 23, 0.22);
}

.topbar {
    max-width: 1240px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 22px;
}

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

.brand-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: #111827;
    background: linear-gradient(135deg, var(--gold), var(--gold-soft));
    box-shadow: 0 12px 30px rgba(245, 158, 11, 0.34);
}

.brand-name {
    white-space: nowrap;
    font-size: 20px;
}

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

.desktop-nav a,
.mobile-panel a,
.quick-cats a,
.footer-links a {
    color: rgba(255, 255, 255, 0.76);
    transition: color 0.25s ease, transform 0.25s ease;
}

.desktop-nav a:hover,
.mobile-panel a:hover,
.quick-cats a:hover,
.footer-links a:hover {
    color: var(--gold-soft);
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 300px;
}

.header-search input,
.mobile-panel input,
.wide-search input,
.filter-bar input,
.filter-bar select {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 999px;
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.header-search input,
.mobile-panel input {
    color: #ffffff;
    background: rgba(15, 23, 42, 0.78);
    padding: 11px 15px;
}

.header-search button,
.mobile-panel button,
.wide-search button,
.primary-btn,
.ghost-btn {
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 800;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.header-search button,
.mobile-panel button,
.wide-search button,
.primary-btn {
    color: #111827;
    background: linear-gradient(135deg, var(--gold), var(--gold-soft));
    box-shadow: 0 14px 34px rgba(245, 158, 11, 0.28);
}

.header-search button,
.mobile-panel button {
    padding: 11px 18px;
}

.header-search button:hover,
.mobile-panel button:hover,
.wide-search button:hover,
.primary-btn:hover,
.ghost-btn:hover {
    transform: translateY(-2px);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
}

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

.mobile-panel {
    display: none;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px 16px;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.mobile-panel form {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.quick-cats {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px 12px;
    display: flex;
    gap: 14px;
    overflow-x: auto;
    white-space: nowrap;
}

.quick-cats a {
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
}

.hero-slider {
    position: relative;
    min-height: 660px;
    overflow: hidden;
    background: var(--deep);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 380px;
    gap: 48px;
    align-items: center;
    padding: 76px max(24px, calc((100vw - 1240px) / 2)) 96px;
    background-position: center;
    background-size: cover;
    transition: opacity 0.7s ease, visibility 0.7s ease;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
    position: relative;
}

.hero-copy {
    color: #ffffff;
    max-width: 780px;
}

.hero-kicker,
.page-hero span,
.section-heading span,
.search-card span,
.detail-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--gold-soft);
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.hero-copy h1 {
    margin: 18px 0 8px;
    font-size: clamp(34px, 6vw, 72px);
    line-height: 0.95;
    font-weight: 950;
    letter-spacing: -0.06em;
}

.hero-copy h2 {
    margin: 0 0 20px;
    font-size: clamp(26px, 4vw, 46px);
    line-height: 1.05;
    font-weight: 900;
}

.hero-copy p,
.page-hero p,
.search-card p,
.section-heading p {
    color: rgba(255, 255, 255, 0.76);
    font-size: 17px;
    line-height: 1.9;
}

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

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

.hero-tags span,
.tag-row span {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    color: #92400e;
    background: rgba(251, 191, 36, 0.18);
    font-size: 12px;
    font-weight: 800;
}

.hero-actions,
.center-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.primary-btn,
.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 20px;
}

.ghost-btn {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-poster {
    display: block;
    border-radius: 32px;
    overflow: hidden;
    box-shadow: 0 35px 90px rgba(0, 0, 0, 0.45);
    transform: rotate(2deg);
}

.hero-poster img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

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

.hero-dot {
    width: 36px;
    height: 7px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.34);
}

.hero-dot.is-active {
    background: var(--gold-soft);
}

.content-section {
    max-width: 1240px;
    margin: 0 auto;
    padding: 64px 20px;
}

.section-heading {
    margin-bottom: 26px;
}

.section-heading h2,
.search-card h2,
.page-hero h1,
.detail-info h1,
.text-panel h2 {
    margin: 8px 0 0;
    font-weight: 950;
    letter-spacing: -0.045em;
}

.section-heading h2,
.search-card h2 {
    font-size: clamp(28px, 4vw, 46px);
}

.section-heading p {
    max-width: 760px;
    margin-top: 12px;
    color: var(--muted);
}

.search-card {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 28px;
    align-items: center;
    padding: 30px;
    border-radius: var(--radius);
    color: #ffffff;
    background: linear-gradient(135deg, #0f172a, #1e293b);
    box-shadow: var(--shadow);
}

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

.wide-search input,
.filter-bar input,
.filter-bar select {
    color: var(--ink);
    background: #ffffff;
    padding: 14px 18px;
}

.wide-search button {
    padding: 0 24px;
    white-space: nowrap;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.20);
    box-shadow: 0 16px 48px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(245, 158, 11, 0.40);
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.16);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: #0f172a;
}

.poster-link img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.35s ease, filter 0.35s ease;
}

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

.play-dot {
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    color: #111827;
    background: var(--gold-soft);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.32);
}

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    min-width: 38px;
    height: 30px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #111827;
    background: linear-gradient(135deg, var(--gold), var(--gold-soft));
    font-size: 13px;
    font-weight: 950;
}

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

.movie-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.movie-card h3 {
    margin: 9px 0 8px;
    font-size: 17px;
    line-height: 1.35;
    font-weight: 900;
}

.movie-card h3 a:hover {
    color: #d97706;
}

.movie-card p {
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.65;
}

.dark-panel {
    max-width: none;
    padding-left: max(20px, calc((100vw - 1240px) / 2));
    padding-right: max(20px, calc((100vw - 1240px) / 2));
    color: #ffffff;
    background: radial-gradient(circle at 10% 0%, rgba(245, 158, 11, 0.20), transparent 30%), #020617;
}

.dark-panel .section-heading p {
    color: rgba(255, 255, 255, 0.68);
}

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

.movie-card-compact {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    min-height: 168px;
}

.movie-card-compact .poster-link img {
    height: 100%;
}

.movie-card-compact .movie-card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.center-actions {
    justify-content: center;
}

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

.category-tile,
.category-cover {
    min-height: 180px;
    border-radius: 24px;
    padding: 22px;
    color: #ffffff;
    background-position: center;
    background-size: cover;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    box-shadow: 0 18px 55px rgba(15, 23, 42, 0.14);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover,
.category-cover:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 75px rgba(15, 23, 42, 0.22);
}

.category-tile span,
.category-cover span {
    font-size: 23px;
    font-weight: 950;
}

.category-tile strong {
    margin-top: 10px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
    line-height: 1.7;
}

.page-hero,
.detail-hero {
    color: #ffffff;
    background: radial-gradient(circle at 10% 10%, rgba(245, 158, 11, 0.24), transparent 28%), #020617;
}

.page-hero {
    min-height: 360px;
    display: flex;
    align-items: center;
    padding: 72px max(24px, calc((100vw - 1240px) / 2));
    background-position: center;
    background-size: cover;
}

.compact-hero {
    min-height: 320px;
}

.page-hero > div {
    max-width: 800px;
}

.page-hero h1 {
    font-size: clamp(34px, 6vw, 64px);
}

.page-hero p {
    max-width: 680px;
    margin-top: 16px;
}

.category-overview-card {
    padding: 14px;
    border-radius: 26px;
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.20);
    box-shadow: var(--shadow);
}

.category-overview-card p {
    min-height: 70px;
    margin: 14px 4px;
    color: var(--muted);
    line-height: 1.7;
}

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

.mini-links a {
    padding: 6px 10px;
    border-radius: 999px;
    color: #92400e;
    background: rgba(251, 191, 36, 0.18);
    font-size: 12px;
    font-weight: 800;
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 180px 180px;
    gap: 12px;
    align-items: center;
    margin-bottom: 26px;
    padding: 16px;
    border-radius: 22px;
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: 0 16px 48px rgba(15, 23, 42, 0.08);
}

.detail-hero {
    padding: 32px max(20px, calc((100vw - 1240px) / 2)) 54px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 24px;
    color: rgba(255, 255, 255, 0.70);
    font-size: 14px;
}

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

.breadcrumb em {
    color: #ffffff;
    font-style: normal;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
    align-items: start;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000000;
    box-shadow: 0 35px 90px rgba(0, 0, 0, 0.38);
}

.movie-video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.play-layer {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    gap: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, rgba(2, 6, 23, 0.32), rgba(2, 6, 23, 0.70));
    border: 0;
    cursor: pointer;
}

.play-layer span {
    display: grid;
    place-items: center;
    width: 82px;
    height: 82px;
    border-radius: 999px;
    color: #111827;
    background: linear-gradient(135deg, var(--gold), var(--gold-soft));
    box-shadow: 0 18px 50px rgba(245, 158, 11, 0.38);
    font-size: 30px;
}

.play-layer strong {
    font-size: 18px;
    letter-spacing: 0.12em;
}

.play-layer.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.detail-info {
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr);
    gap: 18px;
    padding: 18px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(14px);
}

.detail-info img {
    border-radius: 18px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.detail-info h1 {
    font-size: clamp(26px, 3vw, 40px);
}

.detail-info p {
    color: rgba(255, 255, 255, 0.74);
    line-height: 1.8;
}

.detail-content {
    padding-top: 42px;
}

.detail-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 22px;
}

.text-panel,
.info-table {
    padding: 26px;
    border-radius: 24px;
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: 0 16px 48px rgba(15, 23, 42, 0.08);
}

.text-panel + .text-panel {
    margin-top: 18px;
}

.text-panel h2 {
    font-size: 28px;
}

.text-panel p {
    margin-top: 14px;
    color: #334155;
    font-size: 16px;
    line-height: 2;
}

.info-table {
    align-self: start;
    display: grid;
    gap: 12px;
}

.info-table div {
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.info-table span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 4px;
}

.info-table strong {
    color: var(--ink);
    font-size: 15px;
}

.site-footer {
    color: rgba(255, 255, 255, 0.78);
    background: #020617;
    margin-top: 40px;
}

.footer-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 42px 20px;
    display: grid;
    gap: 22px;
}

.footer-brand {
    color: #ffffff;
    font-size: 22px;
}

.footer-inner p {
    max-width: 780px;
    line-height: 1.8;
}

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

.footer-links a {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
}

.copyright {
    color: rgba(255, 255, 255, 0.52);
}

.is-filter-hidden {
    display: none !important;
}

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

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

    .hero-slide,
    .detail-layout,
    .detail-main {
        grid-template-columns: 1fr;
    }

    .hero-poster {
        max-width: 300px;
    }
}

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

    .menu-toggle {
        display: block;
        margin-left: auto;
    }

    .mobile-panel.is-open {
        display: block;
    }

    .quick-cats {
        padding-bottom: 10px;
    }

    .hero-slider {
        min-height: 720px;
    }

    .hero-slide {
        padding-top: 52px;
        gap: 26px;
    }

    .search-card,
    .filter-bar {
        grid-template-columns: 1fr;
    }

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

    .wide-search button {
        min-height: 48px;
    }

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

    .rank-list,
    .category-grid,
    .category-overview-grid {
        grid-template-columns: 1fr;
    }

    .detail-info {
        grid-template-columns: 100px minmax(0, 1fr);
    }
}

@media (max-width: 640px) {
    .brand-name {
        font-size: 17px;
    }

    .topbar {
        padding: 12px 14px;
    }

    .content-section {
        padding: 42px 14px;
    }

    .hero-slider {
        min-height: 760px;
    }

    .hero-slide {
        padding-left: 16px;
        padding-right: 16px;
    }

    .hero-copy h1 {
        font-size: 38px;
    }

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

    .hero-poster {
        max-width: 210px;
    }

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

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

    .movie-card p {
        display: none;
    }

    .movie-card-compact {
        grid-template-columns: 92px minmax(0, 1fr);
        min-height: 140px;
    }

    .page-hero {
        min-height: 280px;
        padding: 44px 16px;
    }

    .detail-hero {
        padding: 24px 14px 42px;
    }

    .detail-info {
        grid-template-columns: 1fr;
    }

    .detail-info img {
        max-width: 150px;
    }

    .text-panel,
    .info-table {
        padding: 20px;
    }
}
