:root {
    --page-bg: #f8fafc;
    --text-main: #111827;
    --text-muted: #6b7280;
    --line: #e5e7eb;
    --panel: #ffffff;
    --accent: #d97706;
    --accent-dark: #b45309;
    --accent-soft: #fff7ed;
    --shadow-sm: 0 10px 25px rgba(17, 24, 39, 0.08);
    --shadow-md: 0 18px 45px rgba(17, 24, 39, 0.12);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--page-bg);
    color: var(--text-main);
    font-family: Inter, "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

.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(229, 231, 235, 0.85);
    backdrop-filter: blur(18px);
}

.nav-wrap {
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 22px;
}

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

.brand-mark {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent), #f97316);
    border-radius: 11px;
    box-shadow: 0 10px 25px rgba(217, 119, 6, 0.35);
}

.brand-name {
    font-size: 22px;
}

.desktop-nav {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
}

.desktop-nav a {
    color: #374151;
    font-weight: 700;
    font-size: 15px;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.desktop-nav a:hover,
.desktop-nav a.is-active {
    color: var(--accent);
}

.header-search,
.mobile-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search input,
.mobile-search input,
.filter-panel input,
.search-hero input,
.filter-panel select {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 11px 15px;
    outline: none;
    background: #ffffff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-panel input:focus,
.search-hero input:focus,
.filter-panel select:focus {
    border-color: rgba(217, 119, 6, 0.65);
    box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.12);
}

.header-search button,
.mobile-search button,
.search-hero button,
.filter-chip,
.primary-btn,
.secondary-btn {
    border: 0;
    border-radius: 999px;
    padding: 11px 18px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search button,
.mobile-search button,
.search-hero button,
.primary-btn {
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent), #f97316);
    box-shadow: 0 12px 25px rgba(217, 119, 6, 0.25);
}

.secondary-btn {
    color: var(--accent-dark);
    background: #ffffff;
}

.header-search button:hover,
.mobile-search button:hover,
.search-hero button:hover,
.filter-chip:hover,
.primary-btn:hover,
.secondary-btn:hover {
    transform: translateY(-1px);
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.mobile-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    margin: 5px auto;
    background: #111827;
    border-radius: 999px;
}

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

.mobile-panel nav {
    display: grid;
    gap: 10px;
    padding: 16px 0;
}

.mobile-panel a {
    font-weight: 700;
    color: #374151;
}

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

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

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

.hero-image-bg {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(90deg, rgba(17, 24, 39, 0.93), rgba(17, 24, 39, 0.66), rgba(217, 119, 6, 0.28)), var(--hero-image);
    background-size: cover;
    background-position: center;
    transform: scale(1.02);
}

.hero-image-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 78% 18%, rgba(251, 191, 36, 0.34), transparent 34%), linear-gradient(0deg, rgba(17, 24, 39, 0.72), transparent 55%);
}

.hero-inner {
    position: relative;
    z-index: 1;
    min-height: 620px;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) 420px;
    gap: 48px;
    align-items: center;
    padding: 72px 0;
}

.hero-kicker,
.section-kicker,
.page-kicker {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 8px;
    color: #92400e;
    background: #fffbeb;
    border: 1px solid rgba(245, 158, 11, 0.26);
    border-radius: 999px;
    padding: 7px 13px;
    font-weight: 800;
    font-size: 13px;
}

.hero-kicker {
    color: #fef3c7;
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(12px);
}

.hero h1 {
    margin: 22px 0 18px;
    color: #ffffff;
    font-size: clamp(36px, 6vw, 68px);
    line-height: 1.04;
    letter-spacing: -0.05em;
}

.hero p {
    margin: 0;
    max-width: 720px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 19px;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 24px 0 30px;
}

.hero-meta span,
.detail-meta span,
.card-meta span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.88);
    padding: 7px 11px;
    font-weight: 700;
    font-size: 13px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hero-poster-card {
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(16px);
}

.hero-poster-card img {
    width: 100%;
    height: 520px;
    object-fit: cover;
}

.hero-card-caption {
    position: absolute;
    inset: auto 18px 18px;
    color: #ffffff;
    background: rgba(17, 24, 39, 0.62);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 18px;
    padding: 18px;
    backdrop-filter: blur(14px);
}

.hero-card-caption strong {
    display: block;
    font-size: 20px;
    margin-bottom: 4px;
}

.hero-card-caption em {
    color: rgba(255, 255, 255, 0.74);
    font-style: normal;
}

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

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

.hero-dots button.is-active {
    width: 32px;
    background: #ffffff;
}

.page-shell {
    padding: 46px 0 72px;
}

.section-block {
    margin: 64px 0;
}

.section-title {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 26px;
}

.section-title h2,
.page-title h1,
.detail-copy h1 {
    margin: 0;
    color: #111827;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.12;
    letter-spacing: -0.035em;
}

.section-title p,
.page-title p {
    margin: 0;
    max-width: 760px;
    color: var(--text-muted);
    font-size: 17px;
}

.gradient-panel,
.page-title {
    border-radius: 30px;
    padding: 38px;
    background: linear-gradient(135deg, #fff7ed, #ffffff 42%, #fffbeb);
    border: 1px solid rgba(245, 158, 11, 0.18);
    box-shadow: var(--shadow-sm);
}

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

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

.movie-card,
.category-card,
.info-card,
.detail-card,
.filter-panel,
.rank-panel {
    background: var(--panel);
    border: 1px solid rgba(229, 231, 235, 0.86);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.movie-card {
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(217, 119, 6, 0.3);
    box-shadow: var(--shadow-md);
}

.poster-wrap {
    position: relative;
    display: block;
    height: 300px;
    overflow: hidden;
    background: #111827;
}

.movie-card-wide .poster-wrap {
    height: 360px;
}

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(17, 24, 39, 0.70), transparent 52%);
    opacity: 0.78;
}

.type-badge,
.year-badge,
.play-float {
    position: absolute;
    z-index: 2;
}

.type-badge,
.year-badge {
    top: 12px;
    border-radius: 999px;
    padding: 6px 10px;
    color: #ffffff;
    font-weight: 800;
    font-size: 12px;
}

.type-badge {
    left: 12px;
    background: var(--accent);
}

.year-badge {
    right: 12px;
    background: rgba(17, 24, 39, 0.72);
}

.play-float {
    left: 50%;
    top: 50%;
    width: 54px;
    height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: rgba(217, 119, 6, 0.9);
    border-radius: 999px;
    transform: translate(-50%, -50%) scale(0.74);
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

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

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

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

.movie-card-body h3 a:hover {
    color: var(--accent);
}

.movie-card-body p {
    min-height: 44px;
    margin: 0 0 13px;
    color: var(--text-muted);
    font-size: 14px;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.card-meta span {
    color: #6b7280;
    background: #f3f4f6;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 13px;
}

.tag-row span {
    color: #92400e;
    background: var(--accent-soft);
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 12px;
    font-weight: 700;
}

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

.category-card {
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.category-cover-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    height: 148px;
    background: #111827;
}

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

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

.category-card-body h3 {
    margin: 0 0 7px;
    font-size: 20px;
}

.category-card-body p {
    margin: 0 0 14px;
    color: var(--text-muted);
    font-size: 14px;
}

.category-card-body span {
    color: var(--accent);
    font-weight: 800;
}

.rank-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 26px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 48px 70px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    padding: 12px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 16px;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
    transform: translateX(4px);
    border-color: rgba(217, 119, 6, 0.35);
    box-shadow: var(--shadow-sm);
}

.rank-item img {
    width: 70px;
    height: 88px;
    object-fit: cover;
    border-radius: 12px;
}

.rank-num {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent), #f97316);
    border-radius: 12px;
    font-weight: 900;
}

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

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

.rank-copy strong {
    font-size: 17px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rank-copy em {
    color: var(--text-muted);
    font-size: 13px;
    font-style: normal;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 180px auto;
    align-items: center;
    gap: 12px;
    margin: 24px 0 28px;
    padding: 16px;
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-chip {
    color: #92400e;
    background: #fffbeb;
    border: 1px solid rgba(217, 119, 6, 0.18);
    padding: 9px 13px;
}

.filter-chip.is-active {
    color: #ffffff;
    background: var(--accent);
}

.detail-hero {
    position: relative;
    overflow: hidden;
    background: #111827;
}

.detail-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(90deg, rgba(17, 24, 39, 0.95), rgba(17, 24, 39, 0.76), rgba(17, 24, 39, 0.55)), var(--detail-bg);
    background-size: cover;
    background-position: center;
    filter: blur(1px);
    transform: scale(1.03);
}

.detail-layout {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 38px;
    padding: 58px 0;
    align-items: end;
}

.detail-poster {
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.36);
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
    color: rgba(255, 255, 255, 0.76);
    font-size: 14px;
}

.breadcrumb a:hover {
    color: #fbbf24;
}

.detail-copy h1 {
    color: #ffffff;
    margin-bottom: 16px;
}

.detail-copy p {
    max-width: 820px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 18px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 18px;
}

.detail-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
    padding: 38px 0 72px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    margin-bottom: 24px;
    background: #000000;
    border-radius: 24px;
    box-shadow: var(--shadow-md);
}

.player-shell video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.player-start {
    position: absolute;
    left: 50%;
    top: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 142px;
    min-height: 54px;
    color: #ffffff;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent), #f97316);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
    cursor: pointer;
    transform: translate(-50%, -50%);
    font-weight: 900;
    z-index: 3;
}

.player-shell.is-playing .player-start {
    display: none;
}

.detail-card {
    padding: 26px;
    margin-bottom: 24px;
}

.detail-card h2,
.info-card h3 {
    margin: 0 0 14px;
    font-size: 24px;
}

.detail-card p {
    margin: 0;
    color: #374151;
}

.info-card {
    padding: 22px;
}

.info-list {
    display: grid;
    gap: 11px;
    margin: 0;
}

.info-list div {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
    border-bottom: 1px solid #f3f4f6;
    padding-bottom: 11px;
}

.info-list dt {
    color: var(--text-muted);
    font-weight: 800;
}

.info-list dd {
    margin: 0;
}

.search-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    margin-top: 24px;
}

.search-results {
    margin-top: 34px;
}

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

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

.site-footer {
    color: #d1d5db;
    background: #111827;
    padding: 48px 0 24px;
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) 1fr 1fr;
    gap: 36px;
}

.brand-footer .brand-name {
    color: #ffffff;
}

.footer-brand p {
    max-width: 520px;
    color: #9ca3af;
}

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

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

.site-footer a:hover {
    color: #fbbf24;
}

.footer-bottom {
    margin-top: 34px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #9ca3af;
    text-align: center;
}

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

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

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

    .header-search {
        display: none;
    }

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

    .hero-poster-card {
        max-width: 420px;
    }

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

    .rank-layout,
    .detail-content {
        grid-template-columns: minmax(0, 1fr);
    }
}

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

    .nav-wrap {
        min-height: 64px;
    }

    .brand-name {
        font-size: 18px;
    }

    .hero,
    .hero-inner {
        min-height: 720px;
    }

    .hero-inner {
        gap: 28px;
        padding: 42px 0 82px;
    }

    .hero-poster-card img {
        height: 340px;
    }

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

    .poster-wrap {
        height: 240px;
    }

    .filter-panel,
    .search-hero {
        grid-template-columns: minmax(0, 1fr);
    }

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

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

    .detail-poster img {
        height: 360px;
    }

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

@media (max-width: 520px) {
    .movie-grid,
    .movie-grid-three,
    .category-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .rank-item {
        grid-template-columns: 42px 62px minmax(0, 1fr);
    }

    .rank-item img {
        width: 62px;
        height: 78px;
    }

    .gradient-panel,
    .page-title,
    .detail-card,
    .info-card {
        padding: 22px;
        border-radius: 20px;
    }
}
