:root {
    --page-bg: #f8fafc;
    --surface: #ffffff;
    --surface-soft: #fffbeb;
    --text: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --accent: #d97706;
    --accent-strong: #b45309;
    --accent-soft: #fef3c7;
    --dark: #111827;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --shadow-soft: 0 8px 28px rgba(15, 23, 42, 0.08);
    --radius: 18px;
    --radius-sm: 12px;
    --max: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--page-bg);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(229, 231, 235, 0.9);
    backdrop-filter: blur(16px);
}

.header-inner {
    width: min(var(--max), calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: -0.03em;
    color: var(--text);
}

.brand {
    font-size: 24px;
}

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

.brand-mark {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    border-radius: 12px;
    background: linear-gradient(135deg, #f59e0b, #b45309);
    box-shadow: 0 12px 24px rgba(217, 119, 6, 0.25);
}

.desktop-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
    font-size: 15px;
    font-weight: 700;
    color: #374151;
}

.nav-link {
    position: relative;
    padding: 8px 0;
    transition: color 0.2s ease;
}

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

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 3px;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.2s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    padding: 9px;
    border: 0;
    border-radius: 12px;
    color: #374151;
    background: var(--surface-soft);
}

.menu-button span {
    display: block;
    width: 100%;
    height: 2px;
    margin: 5px 0;
    background: currentColor;
    border-radius: 99px;
}

.mobile-nav {
    display: none;
    width: min(var(--max), calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow-soft);
}

.mobile-nav a {
    display: block;
    padding: 10px 8px;
    color: #374151;
    font-weight: 700;
    border-radius: 10px;
}

.mobile-nav a:hover {
    color: var(--accent);
    background: var(--surface-soft);
}

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

.main {
    width: min(var(--max), calc(100% - 32px));
    margin: 0 auto;
}

.hero {
    position: relative;
    margin: 24px auto 40px;
    min-height: 560px;
    overflow: hidden;
    border-radius: 30px;
    background: #111827;
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 34px;
    align-items: center;
    padding: 58px;
    opacity: 0;
    transform: scale(1.02);
    pointer-events: none;
    transition: opacity 0.6s ease, transform 0.8s ease;
}

.hero-slide.is-active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, rgba(17, 24, 39, 0.94), rgba(17, 24, 39, 0.78) 48%, rgba(17, 24, 39, 0.22));
    z-index: 1;
}

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

.hero-content,
.hero-poster {
    position: relative;
    z-index: 2;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 8px 13px;
    color: #fef3c7;
    background: rgba(217, 119, 6, 0.22);
    border: 1px solid rgba(245, 158, 11, 0.45);
    border-radius: 999px;
    font-weight: 800;
}

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

.hero p {
    max-width: 620px;
    margin: 0 0 26px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 18px;
}

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

.button-primary,
.button-secondary,
.button-light {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 11px 18px;
    border-radius: 999px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button-primary {
    color: #ffffff;
    background: linear-gradient(135deg, #f59e0b, #b45309);
    box-shadow: 0 14px 30px rgba(217, 119, 6, 0.32);
}

.button-secondary {
    color: var(--accent-strong);
    background: var(--accent-soft);
}

.button-light {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.26);
}

.button-primary:hover,
.button-secondary:hover,
.button-light:hover {
    transform: translateY(-2px);
}

.hero-poster {
    align-self: stretch;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-poster a {
    position: relative;
    width: min(360px, 100%);
    overflow: hidden;
    border: 8px solid rgba(255, 255, 255, 0.14);
    border-radius: 28px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.48);
    transform: rotate(2deg);
}

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

.hero-poster span {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 16px;
    padding: 12px 16px;
    color: #ffffff;
    background: rgba(17, 24, 39, 0.78);
    border-radius: 16px;
    font-weight: 900;
    backdrop-filter: blur(10px);
}

.hero-controls {
    position: absolute;
    left: 58px;
    bottom: 34px;
    z-index: 5;
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 38px;
    height: 6px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
}

.hero-dot.is-active {
    background: #f59e0b;
}

.section {
    margin: 44px 0;
}

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

.section-title {
    margin: 0;
    font-size: clamp(26px, 4vw, 42px);
    line-height: 1.15;
    letter-spacing: -0.04em;
}

.section-desc {
    margin: 8px 0 0;
    color: var(--muted);
    max-width: 680px;
}

.filter-panel {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 12px;
    padding: 16px;
    margin: 20px 0 26px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow-soft);
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    color: var(--text);
    background: #f9fafb;
    border: 1px solid var(--line);
    border-radius: 13px;
    outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16);
}

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

.movie-card {
    overflow: hidden;
    background: var(--surface);
    border: 1px solid rgba(229, 231, 235, 0.9);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

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

.movie-card.is-hidden,
.rank-row.is-hidden {
    display: none;
}

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

.poster-link img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.poster-link::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 48%, rgba(17, 24, 39, 0.88));
}

.poster-play {
    position: absolute;
    right: 14px;
    bottom: 14px;
    z-index: 2;
    padding: 7px 12px;
    color: #ffffff;
    background: var(--accent);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 900;
    box-shadow: 0 10px 22px rgba(217, 119, 6, 0.32);
}

.rank-number {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 3;
    min-width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: rgba(180, 83, 9, 0.94);
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.22);
}

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

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 9px;
    color: var(--accent-strong);
    font-size: 13px;
    font-weight: 800;
}

.card-meta span {
    padding: 4px 8px;
    background: var(--surface-soft);
    border-radius: 999px;
}

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

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

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

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

.tag-row span {
    padding: 4px 8px;
    color: #475569;
    background: #f1f5f9;
    border-radius: 999px;
    font-size: 12px;
}

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

.category-card {
    min-height: 160px;
    padding: 22px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: rgba(245, 158, 11, 0.45);
}

.category-card strong {
    display: block;
    margin-bottom: 10px;
    font-size: 22px;
}

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

.page-hero {
    margin: 24px 0 34px;
    padding: clamp(26px, 6vw, 58px);
    overflow: hidden;
    color: #ffffff;
    background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.38), transparent 28%), linear-gradient(135deg, #111827, #1f2937 55%, #92400e);
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.page-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(32px, 5vw, 56px);
    line-height: 1.08;
    letter-spacing: -0.05em;
}

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

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

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

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

.player-shell,
.detail-panel,
.sidebar-panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
}

.player-shell {
    overflow: hidden;
    background: #000000;
}

.video-wrap {
    position: relative;
    background: #000000;
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle at center, rgba(17, 24, 39, 0.2), rgba(17, 24, 39, 0.62));
    cursor: pointer;
}

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

.play-overlay span {
    width: 76px;
    height: 76px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-left: 5px;
    color: #ffffff;
    background: linear-gradient(135deg, #f59e0b, #b45309);
    border-radius: 999px;
    font-size: 30px;
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.32);
}

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

.detail-panel h1 {
    margin: 0 0 14px;
    font-size: clamp(30px, 5vw, 48px);
    line-height: 1.12;
    letter-spacing: -0.05em;
}

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

.detail-meta span {
    padding: 7px 11px;
    color: var(--accent-strong);
    background: var(--surface-soft);
    border-radius: 999px;
    font-weight: 800;
}

.detail-panel h2,
.sidebar-panel h2 {
    margin: 0 0 14px;
    font-size: 22px;
}

.detail-panel p {
    margin: 0 0 18px;
    color: #374151;
}

.sidebar-panel {
    padding: 18px;
}

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

.side-card {
    display: grid;
    grid-template-columns: 78px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 14px;
    background: #f9fafb;
    transition: background 0.2s ease;
}

.side-card:hover {
    background: var(--surface-soft);
}

.side-card img {
    width: 78px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 10px;
}

.side-card strong {
    display: block;
    margin-bottom: 5px;
    line-height: 1.35;
}

.side-card span {
    color: var(--muted);
    font-size: 13px;
}

.rank-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.rank-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow-soft);
}

.rank-main {
    min-width: 0;
    display: grid;
    grid-template-columns: 46px 54px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.rank-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    color: #ffffff;
    background: var(--accent);
    border-radius: 12px;
    font-weight: 900;
}

.rank-main img {
    width: 54px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 10px;
}

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

.rank-text strong,
.rank-text em {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.rank-score {
    color: var(--accent-strong);
    font-weight: 900;
}

.site-footer {
    margin-top: 64px;
    color: #cbd5e1;
    background: #111827;
}

.footer-inner {
    width: min(var(--max), calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 1fr 0.8fr;
    gap: 36px;
    padding: 42px 0;
}

.footer-inner p {
    max-width: 520px;
    margin: 0;
    color: #94a3b8;
}

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

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

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

.footer-bottom {
    width: min(var(--max), calc(100% - 32px));
    margin: 0 auto;
    padding: 22px 0 28px;
    color: #64748b;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    text-align: center;
}

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

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

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

    .menu-button {
        display: block;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        padding: 42px;
    }

    .hero-poster {
        display: none;
    }

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

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

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

@media (max-width: 760px) {
    .header-inner,
    .main,
    .mobile-nav,
    .footer-inner,
    .footer-bottom {
        width: min(100% - 24px, var(--max));
    }

    .brand {
        font-size: 20px;
    }

    .hero {
        min-height: 520px;
        border-radius: 22px;
    }

    .hero-slide {
        padding: 30px 22px;
    }

    .hero-controls {
        left: 22px;
        bottom: 22px;
    }

    .hero p,
    .page-hero p {
        font-size: 16px;
    }

    .section-head {
        display: block;
    }

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

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

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

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

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

    .rank-row {
        align-items: flex-start;
    }

    .rank-main {
        grid-template-columns: 38px 50px minmax(0, 1fr);
    }

    .rank-score {
        display: none;
    }
}

@media (max-width: 440px) {
    .movie-grid {
        grid-template-columns: 1fr;
    }

    .hero-actions {
        display: grid;
    }

    .button-primary,
    .button-secondary,
    .button-light {
        width: 100%;
    }
}
