:root {
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-card: rgba(15, 23, 42, 0.82);
    --bg-card-hover: rgba(30, 41, 59, 0.95);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-2: #64748b;
    --line: rgba(148, 163, 184, 0.18);
    --accent: #f59e0b;
    --accent-2: #f97316;
    --accent-soft: rgba(245, 158, 11, 0.16);
    --radius: 22px;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 15% 10%, rgba(245, 158, 11, 0.13), transparent 24rem),
        radial-gradient(circle at 85% 5%, rgba(249, 115, 22, 0.12), transparent 26rem),
        linear-gradient(180deg, #020617 0%, #0f172a 58%, #020617 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(15, 23, 42, 0.92);
    border-bottom: 1px solid rgba(245, 158, 11, 0.22);
    backdrop-filter: blur(16px);
}

.site-header-inner {
    width: min(1280px, calc(100% - 32px));
    height: 76px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: max-content;
}

.brand-icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 12px 34px rgba(245, 158, 11, 0.28);
    font-size: 18px;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.12;
}

.brand-text strong,
.footer-brand strong {
    font-size: 24px;
    background: linear-gradient(90deg, #fbbf24, #fb923c);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-text small {
    color: var(--muted);
    font-size: 12px;
    margin-top: 4px;
}

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

.nav-link,
.mobile-nav-link {
    color: #cbd5e1;
    font-weight: 600;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: var(--accent);
}

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

.header-search input,
.mobile-search input,
.filter-bar input,
.filter-bar select {
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.86);
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 999px;
    outline: none;
}

.header-search input {
    width: 260px;
    padding: 11px 16px;
}

.header-search button,
.mobile-search button,
.filter-bar button,
.primary-button,
.secondary-button,
.card-actions a,
.player-actions a {
    border: 0;
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border-radius: 999px;
    padding: 11px 18px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 12px 30px rgba(245, 158, 11, 0.18);
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.filter-bar button:hover,
.primary-button:hover,
.secondary-button:hover,
.card-actions a:hover,
.player-actions a:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 36px rgba(245, 158, 11, 0.26);
}

.secondary-button {
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(245, 158, 11, 0.36);
}

.mobile-menu-button {
    display: none;
    margin-left: auto;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(245, 158, 11, 0.22);
    border-radius: 12px;
    color: var(--accent);
    background: rgba(15, 23, 42, 0.76);
    font-size: 22px;
}

.mobile-panel {
    display: none;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(15, 23, 42, 0.98);
}

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

.mobile-panel nav,
.mobile-search {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
}

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

.mobile-nav-link {
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.6);
}

.mobile-search {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    padding: 0 0 18px;
}

.mobile-search input {
    padding: 12px 14px;
}

main {
    min-height: 60vh;
}

.container,
.page-hero-inner,
.footer-grid,
.footer-bottom {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
}

.hero {
    position: relative;
    min-height: 68vh;
    overflow: hidden;
    border-bottom: 1px solid rgba(245, 158, 11, 0.12);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 900ms ease;
}

.hero-slide.active {
    opacity: 1;
}

.hero-slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.05) contrast(1.05);
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.76) 44%, rgba(2, 6, 23, 0.2) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.08) 42%, rgba(2, 6, 23, 0.16) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 68vh;
    display: flex;
    align-items: center;
    padding: 64px 0;
}

.hero-copy {
    width: min(720px, 100%);
}

.kicker,
.section-kicker,
.tag,
.rank-number {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #fde68a;
    background: rgba(245, 158, 11, 0.16);
    border: 1px solid rgba(245, 158, 11, 0.32);
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 13px;
    font-weight: 800;
}

.hero h1,
.hero h2 {
    margin: 20px 0 18px;
    font-size: clamp(36px, 6vw, 74px);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.hero p {
    width: min(680px, 100%);
    color: #cbd5e1;
    font-size: clamp(16px, 1.8vw, 21px);
    line-height: 1.75;
}

.hero-meta,
.detail-meta,
.meta-line,
.breadcrumb,
.rank-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    color: var(--muted);
}

.hero-meta {
    margin-bottom: 16px;
}

.hero-actions,
.player-actions,
.card-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 26px;
}

.hero-dots {
    position: absolute;
    z-index: 4;
    right: max(24px, calc((100vw - 1280px) / 2));
    bottom: 36px;
    display: flex;
    gap: 10px;
}

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

.hero-dot.active {
    width: 34px;
    background: var(--accent);
}

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

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

.section-heading h2,
.page-hero h1,
.detail-title h1 {
    margin: 10px 0 0;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.12;
}

.section-heading p,
.page-hero p,
.category-summary,
.detail-copy p,
.static-content p,
.support-card p {
    color: var(--muted);
    line-height: 1.75;
}

.section-more {
    color: var(--accent);
    font-weight: 800;
}

.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-grid.compact {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.movie-card,
.category-card,
.support-card,
.static-panel,
.detail-panel,
.rank-list,
.filter-panel {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.movie-card {
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.movie-card:hover,
.category-card:hover,
.support-card:hover {
    transform: translateY(-4px);
    background: var(--bg-card-hover);
    border-color: rgba(245, 158, 11, 0.36);
}

.movie-poster {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(15, 23, 42, 0.95));
}

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

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

.play-badge {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 54px;
    height: 54px;
    transform: translate(-50%, -50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.9);
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.year-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.68);
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 800;
}

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

.meta-line {
    justify-content: space-between;
    color: var(--muted-2);
    font-size: 13px;
    margin-bottom: 10px;
}

.movie-card h2,
.compact-card span {
    margin: 0 0 10px;
    color: #ffffff;
    font-size: 19px;
    line-height: 1.35;
    transition: color 0.2s ease;
}

.movie-card:hover h2,
.movie-card:hover h2 a,
.compact-card:hover span {
    color: var(--accent);
}

.movie-card p {
    display: -webkit-box;
    min-height: 48px;
    margin: 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.horizontal-card {
    display: grid;
    grid-template-columns: 220px 1fr;
}

.horizontal-card .movie-poster {
    height: 100%;
    min-height: 150px;
}

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

.category-card {
    display: block;
    padding: 24px;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.category-card strong {
    display: block;
    margin: 14px 0 8px;
    font-size: 24px;
}

.category-card p {
    min-height: 72px;
    color: var(--muted);
    line-height: 1.7;
}

.category-count {
    display: inline-flex;
    margin-top: 18px;
    color: #fde68a;
    font-weight: 800;
}

.page-hero {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.95), rgba(2, 6, 23, 0.2));
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.page-hero-inner {
    padding: 64px 0 48px;
}

.breadcrumb {
    margin-bottom: 16px;
    font-size: 14px;
}

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

.filter-panel {
    padding: 22px;
    margin-bottom: 26px;
}

.filter-bar {
    display: grid;
    grid-template-columns: 2fr repeat(3, minmax(130px, 1fr)) auto;
    gap: 12px;
}

.filter-bar input,
.filter-bar select {
    min-width: 0;
    padding: 12px 14px;
    border-radius: 14px;
}

.search-status {
    margin: 14px 0 0;
    color: var(--muted);
}

.rank-list {
    padding: 10px;
}

.rank-row {
    display: grid;
    grid-template-columns: 78px 92px 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border-radius: 16px;
    transition: background 0.2s ease;
}

.rank-row:hover {
    background: rgba(30, 41, 59, 0.76);
}

.rank-number {
    justify-content: center;
    width: 54px;
    height: 38px;
    padding: 0;
}

.rank-row img {
    width: 92px;
    height: 58px;
    object-fit: cover;
    border-radius: 12px;
}

.rank-title strong {
    display: block;
    margin-bottom: 6px;
    color: #ffffff;
    font-size: 17px;
}

.rank-row:hover .rank-title strong {
    color: var(--accent);
}

.rank-meta {
    font-size: 13px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(320px, 0.88fr);
    gap: 28px;
}

.player-box {
    position: relative;
    overflow: hidden;
    background: #000000;
    border: 1px solid rgba(245, 158, 11, 0.22);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

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

.player-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fde68a;
    pointer-events: none;
    background: linear-gradient(135deg, rgba(2, 6, 23, 0.8), rgba(15, 23, 42, 0.6));
}

.player-loading.hidden {
    display: none;
}

.detail-panel {
    padding: 28px;
    margin-top: 22px;
}

.detail-title h1 {
    margin-top: 12px;
}

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

.detail-meta span,
.tag-list span {
    display: inline-flex;
    color: #dbeafe;
    background: rgba(30, 41, 59, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 13px;
}

.detail-copy h2,
.related-panel h2,
.static-content h2 {
    margin: 28px 0 12px;
    font-size: 24px;
}

.detail-copy p {
    margin: 0 0 14px;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.related-panel {
    position: sticky;
    top: 102px;
    align-self: start;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 20px;
}

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

.compact-card a {
    display: grid;
    grid-template-columns: 104px 1fr;
    gap: 12px;
    align-items: center;
}

.compact-card img {
    width: 104px;
    height: 66px;
    object-fit: cover;
    border-radius: 12px;
}

.compact-card small {
    display: block;
    margin-left: 116px;
    color: var(--muted-2);
    font-size: 12px;
}

.static-content {
    width: min(900px, calc(100% - 32px));
    margin: 0 auto;
    padding: 52px 0 72px;
}

.static-panel,
.support-card {
    padding: 28px;
    margin-bottom: 22px;
}

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

.site-footer {
    border-top: 1px solid rgba(245, 158, 11, 0.16);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.85), #000000);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr repeat(3, 1fr);
    gap: 28px;
    padding: 46px 0 32px;
}

.footer-grid h2 {
    margin: 0 0 14px;
    color: #fbbf24;
    font-size: 18px;
}

.footer-grid p,
.footer-grid a,
.footer-bottom {
    color: var(--muted);
    line-height: 1.75;
}

.footer-grid a {
    display: block;
    margin-bottom: 8px;
}

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

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 0 28px;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    font-size: 13px;
}

.pagination-note {
    color: var(--muted);
    margin-top: 18px;
}

.no-results {
    display: none;
    padding: 42px;
    text-align: center;
    color: var(--muted);
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: 24px;
}

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

    .mobile-menu-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

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

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

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

    .related-panel {
        position: static;
    }

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

@media (max-width: 760px) {
    .site-header-inner {
        height: 66px;
    }

    .brand-text strong {
        font-size: 20px;
    }

    .brand-text small {
        display: none;
    }

    .hero,
    .hero-content {
        min-height: 72vh;
    }

    .hero-dots {
        left: 16px;
        right: auto;
        bottom: 24px;
    }

    .section-heading {
        display: block;
    }

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

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

    .horizontal-card {
        grid-template-columns: 1fr;
    }

    .rank-row {
        grid-template-columns: 50px 78px 1fr;
    }

    .rank-row .player-actions {
        grid-column: 1 / -1;
        margin-top: 0;
    }

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

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        display: block;
    }
}
