:root {
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-soft: #f1f5f9;
    --text: #0f172a;
    --muted: #64748b;
    --border: #e2e8f0;
    --primary: #f59e0b;
    --primary-dark: #d97706;
    --accent: #2563eb;
    --dark: #020617;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 20px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: 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;
    max-width: 100%;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    backdrop-filter: blur(18px);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.brand-mark {
    display: inline-grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), #ef4444);
    box-shadow: 0 12px 30px rgba(245, 158, 11, 0.35);
}

.brand-text {
    font-size: 1.18rem;
}

.primary-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link {
    padding: 10px 14px;
    border-radius: 999px;
    color: #334155;
    font-weight: 700;
    transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #ffffff;
    background: var(--primary);
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #ffffff;
}

.header-search input,
.mobile-search input,
.filter-input,
.filter-select {
    width: 100%;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
    font: inherit;
}

.header-search input {
    width: 230px;
    padding: 8px 8px 8px 14px;
}

.header-search button,
.mobile-search button,
.hero-search button,
.primary-button,
.small-button,
.play-button,
.filter-reset {
    border: 0;
    cursor: pointer;
    color: #ffffff;
    background: var(--primary);
    font-weight: 800;
    border-radius: 999px;
    transition: 0.2s ease;
}

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

.header-search button:hover,
.mobile-search button:hover,
.hero-search button:hover,
.primary-button:hover,
.small-button:hover,
.play-button:hover,
.filter-reset:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.mobile-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    background: var(--surface-soft);
}

.mobile-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    background: var(--text);
    border-radius: 999px;
}

.mobile-panel {
    display: none;
    border-top: 1px solid var(--border);
    padding: 16px;
    background: #ffffff;
}

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

.mobile-search {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 16px;
}

.mobile-search input {
    padding: 10px;
}

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

.mobile-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.mobile-links a {
    padding: 12px;
    border-radius: 14px;
    background: var(--surface-soft);
    font-weight: 800;
}

.hero {
    position: relative;
    min-height: 78vh;
    overflow: hidden;
    background: var(--dark);
}

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

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

.hero-slide img,
.page-hero-media img,
.poster img,
.compact-cover img,
.ranking-cover img,
.detail-poster img,
.category-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: linear-gradient(135deg, #1e293b, #0f172a);
}

.hero-slide img {
    min-height: 78vh;
    opacity: 0.86;
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.55), rgba(2, 6, 23, 0.18));
}

.hero-content {
    position: absolute;
    inset: auto 0 0 0;
    z-index: 2;
    padding: 0 0 96px;
}

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

.hero-badge,
.movie-tags span,
.poster-score,
.tag-pill,
.breadcrumb a,
.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    font-weight: 800;
}

.hero-badge {
    padding: 8px 16px;
    margin-bottom: 18px;
    background: var(--primary);
    box-shadow: 0 12px 35px rgba(245, 158, 11, 0.35);
}

.hero h1 {
    margin: 0 0 18px;
    font-size: clamp(2.4rem, 6vw, 5.6rem);
    line-height: 1.02;
    letter-spacing: -0.06em;
}

.hero p {
    max-width: 680px;
    margin: 0 0 28px;
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(1rem, 2vw, 1.25rem);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}

.primary-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    box-shadow: 0 12px 28px rgba(245, 158, 11, 0.3);
}

.secondary-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 22px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    color: #ffffff;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(14px);
    transition: 0.2s ease;
}

.secondary-button:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: translateY(-1px);
}

.hero-search {
    display: flex;
    width: min(540px, 100%);
    gap: 10px;
    padding: 9px;
    margin-top: 28px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow);
}

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

.hero-search button {
    padding: 12px 20px;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(14px);
    cursor: pointer;
    transition: 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(255, 255, 255, 0.32);
}

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

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

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

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

.hero-dot.active {
    width: 34px;
    background: #ffffff;
}

.main-section {
    padding: 58px 0;
}

.main-section.soft {
    background: linear-gradient(135deg, #f1f5f9, #ffffff);
}

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

.section-kicker {
    display: inline-grid;
    width: 42px;
    height: 42px;
    place-items: center;
    margin-bottom: 12px;
    border-radius: 14px;
    color: #ffffff;
    background: var(--primary);
    box-shadow: 0 10px 24px rgba(245, 158, 11, 0.25);
}

.section-heading h2 {
    margin: 0;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    letter-spacing: -0.03em;
}

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

.section-more {
    flex: none;
    color: var(--primary-dark);
    font-weight: 900;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.82);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
    transition: 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
}

.poster {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, #1e293b, #020617);
}

.poster img {
    transition: transform 0.65s ease;
}

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

.poster-gradient {
    position: absolute;
    inset: auto 0 0 0;
    height: 55%;
    background: linear-gradient(to top, rgba(2, 6, 23, 0.85), transparent);
}

.poster-play {
    position: absolute;
    top: 50%;
    left: 50%;
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(245, 158, 11, 0.92);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.84);
    transition: 0.25s ease;
}

.movie-card:hover .poster-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.poster-score {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 5px 10px;
    color: #ffffff;
    background: rgba(2, 6, 23, 0.76);
    backdrop-filter: blur(10px);
}

.movie-body {
    padding: 16px;
}

.movie-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.movie-tags span {
    padding: 5px 9px;
    color: var(--primary-dark);
    background: #fff7ed;
    font-size: 0.76rem;
}

.movie-title {
    display: -webkit-box;
    overflow: hidden;
    min-height: 2.8em;
    color: var(--text);
    font-weight: 900;
    line-height: 1.4;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: 0.2s ease;
}

.movie-title:hover {
    color: var(--primary-dark);
}

.movie-body p,
.compact-body p,
.ranking-body p {
    display: -webkit-box;
    overflow: hidden;
    margin: 8px 0 12px;
    color: var(--muted);
    font-size: 0.92rem;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: #64748b;
    font-size: 0.82rem;
}

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

.category-tile {
    position: relative;
    overflow: hidden;
    min-height: 220px;
    padding: 24px;
    border-radius: 24px;
    color: #ffffff;
    background: linear-gradient(135deg, #0f172a, #334155);
    box-shadow: var(--shadow);
}

.category-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(245, 158, 11, 0.45), transparent 38%);
}

.category-tile h3,
.category-tile p,
.category-tile a,
.category-tile span {
    position: relative;
    z-index: 1;
}

.category-tile h3 {
    margin: 0 0 10px;
    font-size: 1.5rem;
}

.category-tile p {
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.78);
}

.category-tile a {
    display: inline-flex;
    padding: 10px 16px;
    border-radius: 999px;
    color: #0f172a;
    background: #ffffff;
    font-weight: 900;
}

.two-column {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    gap: 26px;
}

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

.movie-card.compact,
.ranking-item {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 12px;
}

.compact-cover,
.ranking-cover {
    position: relative;
    flex: 0 0 150px;
    height: 88px;
    overflow: hidden;
    border-radius: 14px;
    background: #0f172a;
}

.play-badge {
    position: absolute;
    inset: 50% auto auto 50%;
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    color: #ffffff;
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.92);
    transform: translate(-50%, -50%);
}

.compact-body,
.ranking-body {
    flex: 1;
    min-width: 0;
}

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 78px 0;
    color: #ffffff;
    background: #0f172a;
}

.page-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.35), transparent 34%),
        linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(2, 6, 23, 0.82));
}

.page-hero .container {
    position: relative;
    z-index: 1;
}

.page-hero h1 {
    max-width: 820px;
    margin: 0 0 14px;
    font-size: clamp(2.1rem, 5vw, 4rem);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 1.08rem;
}

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

.category-card {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 26px;
    background: #ffffff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.category-card-body {
    padding: 24px;
}

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

.category-card p {
    color: var(--muted);
}

.category-previews {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 0 24px 24px;
}

.category-preview {
    overflow: hidden;
    aspect-ratio: 16 / 10;
    border-radius: 14px;
    background: #0f172a;
}

.filter-panel {
    display: grid;
    grid-template-columns: 1fr repeat(3, 180px) auto;
    gap: 12px;
    margin-bottom: 26px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.filter-input,
.filter-select {
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #f8fafc;
}

.filter-reset {
    min-height: 46px;
    padding: 0 18px;
}

.empty-state {
    display: none;
    padding: 44px;
    border: 1px dashed var(--border);
    border-radius: 22px;
    color: var(--muted);
    text-align: center;
    background: #ffffff;
}

.empty-state.show {
    display: block;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 24px auto;
    color: var(--muted);
    font-size: 0.95rem;
}

.breadcrumb a {
    padding: 5px 10px;
    color: var(--primary-dark);
    background: #fff7ed;
}

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

.player-card,
.detail-info-card,
.text-card,
.sidebar-card {
    border: 1px solid var(--border);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.player-card {
    overflow: hidden;
    background: #020617;
}

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

.player-wrap video {
    width: 100%;
    height: 100%;
    background: #020617;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: radial-gradient(circle, rgba(15, 23, 42, 0.22), rgba(2, 6, 23, 0.72));
    transition: 0.2s ease;
}

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

.play-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 28px;
    font-size: 1.05rem;
    box-shadow: 0 18px 40px rgba(245, 158, 11, 0.38);
}

.player-status {
    min-height: 28px;
    padding: 12px 18px;
    color: rgba(255, 255, 255, 0.76);
    background: #020617;
    font-size: 0.92rem;
}

.detail-info-card,
.text-card,
.sidebar-card {
    padding: 24px;
}

.detail-title {
    margin: 0 0 12px;
    font-size: clamp(2rem, 4vw, 3.8rem);
    line-height: 1.08;
    letter-spacing: -0.05em;
}

.detail-subtitle {
    color: var(--muted);
    font-size: 1.05rem;
}

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

.tag-pill {
    padding: 7px 12px;
    color: #334155;
    background: #f1f5f9;
    font-size: 0.9rem;
}

.detail-poster {
    overflow: hidden;
    aspect-ratio: 16 / 10;
    border-radius: 18px;
    background: #0f172a;
}

.text-card {
    margin-top: 24px;
}

.text-card h2,
.sidebar-card h3 {
    margin: 0 0 14px;
}

.text-card p {
    margin: 0 0 16px;
    color: #334155;
}

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

.ranking-number {
    display: grid;
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    place-items: center;
    border-radius: 16px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), #ef4444);
    font-weight: 900;
}

.small-button {
    display: inline-flex;
    flex: none;
    padding: 9px 15px;
}

.search-note {
    margin: -8px 0 24px;
    color: var(--muted);
}

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

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

.footer-brand {
    color: #ffffff;
}

.site-footer h3 {
    margin: 0 0 12px;
    color: #ffffff;
}

.site-footer p {
    max-width: 440px;
}

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

.footer-links a:hover {
    color: #ffffff;
}

@media (max-width: 1024px) {
    .header-search {
        display: none;
    }

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

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

    .two-column,
    .detail-layout {
        grid-template-columns: 1fr;
    }

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

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

    .header-inner {
        min-height: 64px;
    }

    .primary-nav {
        display: none;
    }

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

    .hero {
        min-height: 76vh;
    }

    .hero-slide img {
        min-height: 76vh;
    }

    .hero-content {
        padding-bottom: 78px;
    }

    .hero-arrow {
        display: none;
    }

    .hero-search {
        border-radius: 20px;
    }

    .hero-search button {
        padding: 12px 16px;
    }

    .section-heading {
        display: block;
    }

    .section-more {
        display: inline-block;
        margin-top: 10px;
    }

    .movie-grid,
    .movie-grid.dense,
    .category-strip,
    .category-overview,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .movie-card.compact,
    .ranking-item {
        align-items: flex-start;
    }

    .compact-cover,
    .ranking-cover {
        flex-basis: 118px;
        height: 78px;
    }

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

    .detail-info-card,
    .text-card,
    .sidebar-card {
        padding: 18px;
    }
}
