:root {
    --color-bg: #fafafa;
    --color-surface: #ffffff;
    --color-soft: #f7f2ea;
    --color-line: #e5e7eb;
    --color-text: #111827;
    --color-muted: #6b7280;
    --color-faint: #9ca3af;
    --color-accent: #d97706;
    --color-accent-dark: #b45309;
    --color-accent-soft: #fef3c7;
    --color-footer: #111827;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 12px 30px rgba(15, 23, 42, 0.10);
    --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.20);
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 12px;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    min-width: 320px;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.86));
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(229, 231, 235, 0.78);
    transition: box-shadow 0.25s ease, background 0.25s ease;
}

.site-header.is-scrolled {
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow-sm);
}

.site-header-inner {
    max-width: 1280px;
    height: 76px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 28px;
}

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

.brand-mark {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #fff;
    font-weight: 900;
    background: linear-gradient(135deg, #f59e0b, #b45309);
    box-shadow: 0 12px 28px rgba(217, 119, 6, 0.28);
}

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

.brand-text span {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

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

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

.desktop-nav a,
.mobile-panel nav a {
    color: #374151;
    font-weight: 650;
    transition: color 0.2s ease;
}

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

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

.header-search input,
.mobile-search input,
.search-box input {
    border: 1px solid #d1d5db;
    background: rgba(255, 255, 255, 0.92);
    color: var(--color-text);
    outline: none;
    border-radius: 999px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
    width: 220px;
    padding: 10px 16px;
}

.header-search button,
.mobile-search button,
.search-box button {
    border: 0;
    border-radius: 999px;
    padding: 10px 16px;
    color: #fff;
    background: var(--color-accent);
    cursor: pointer;
    font-weight: 700;
    transition: background 0.2s ease, transform 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.search-box input:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.16);
}

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

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: #f3f4f6;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: #374151;
    border-radius: 999px;
}

.mobile-panel {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px 18px;
    border-top: 1px solid #e5e7eb;
}

.mobile-panel nav {
    display: grid;
    gap: 12px;
    padding-top: 14px;
}

.mobile-search {
    padding-top: 14px;
}

.mobile-search input {
    min-width: 0;
    flex: 1;
    padding: 10px 16px;
}

.section,
.page-hero,
.hero,
.detail-wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
}

.hero {
    position: relative;
    padding-top: 36px;
    padding-bottom: 36px;
}

.hero-stage {
    position: relative;
    min-height: 610px;
    overflow: hidden;
    border-radius: 32px;
    background: #111827;
    box-shadow: var(--shadow-lg);
}

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

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

.hero-slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.03);
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(17, 24, 39, 0.92) 0%, rgba(17, 24, 39, 0.68) 42%, rgba(17, 24, 39, 0.28) 100%), linear-gradient(0deg, rgba(17, 24, 39, 0.72), rgba(17, 24, 39, 0.04) 48%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(680px, 100%);
    padding: 90px 64px;
    color: #fff;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    margin-bottom: 18px;
    border-radius: 999px;
    background: rgba(217, 119, 6, 0.92);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
}

.hero h1 {
    margin: 0 0 18px;
    font-size: clamp(34px, 5vw, 64px);
    line-height: 1.06;
    letter-spacing: -0.04em;
}

.hero-desc {
    margin: 0 0 24px;
    color: #e5e7eb;
    font-size: clamp(16px, 2vw, 20px);
    max-width: 620px;
}

.hero-meta,
.detail-meta,
.movie-meta {
    color: var(--color-muted);
    font-size: 14px;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    color: #d1d5db;
    margin-bottom: 30px;
}

.hero-actions,
.page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.btn-primary,
.btn-secondary,
.btn-light {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    padding: 13px 22px;
    font-weight: 800;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
    color: #fff;
    background: var(--color-accent);
    box-shadow: 0 14px 28px rgba(217, 119, 6, 0.25);
}

.btn-primary:hover {
    background: var(--color-accent-dark);
}

.btn-secondary {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.12);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.22);
}

.btn-light {
    color: var(--color-accent-dark);
    background: var(--color-accent-soft);
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 44px;
    height: 44px;
    transform: translateY(-50%);
    border: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: 50%;
    color: #fff;
    background: rgba(17, 24, 39, 0.44);
    cursor: pointer;
    font-size: 26px;
}

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

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

.hero-dots {
    position: absolute;
    left: 64px;
    bottom: 42px;
    z-index: 3;
    display: flex;
    gap: 9px;
}

.hero-dot {
    width: 28px;
    height: 4px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.34);
    cursor: pointer;
}

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

.section {
    padding-top: 48px;
    padding-bottom: 48px;
}

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

.section-heading h2,
.page-hero h1,
.detail-title h1 {
    margin: 0;
    color: var(--color-text);
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.section-heading p,
.page-hero p,
.detail-title p {
    margin: 8px 0 0;
    color: var(--color-muted);
}

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

.movie-card {
    min-width: 0;
}

.movie-card-link {
    display: flex;
    height: 100%;
    flex-direction: column;
    overflow: hidden;
    border-radius: var(--radius-md);
    background: var(--color-surface);
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.movie-cover-wrap,
.wide-cover {
    position: relative;
    display: block;
    overflow: hidden;
    background: #111827;
}

.movie-cover-wrap {
    aspect-ratio: 16 / 9;
}

.movie-cover-wrap img,
.wide-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.movie-card-link:hover img,
.wide-card a:hover img,
.category-card:hover img {
    transform: scale(1.08);
}

.cover-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(17, 24, 39, 0.72), rgba(17, 24, 39, 0.04) 55%);
}

.duration-badge,
.rank-badge,
.list-rank {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.duration-badge {
    right: 10px;
    bottom: 10px;
    padding: 4px 8px;
    background: rgba(17, 24, 39, 0.78);
}

.rank-badge {
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    background: var(--color-accent);
}

.movie-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 8px;
    padding: 17px;
}

.movie-card-body strong,
.wide-body strong {
    color: var(--color-text);
    font-size: 18px;
    line-height: 1.35;
}

.movie-card-link:hover strong,
.wide-card a:hover strong {
    color: var(--color-accent-dark);
}

.movie-desc {
    color: #4b5563;
    font-size: 14px;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto;
}

.tag-row span,
.info-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: var(--color-accent-soft);
    color: var(--color-accent-dark);
    font-size: 12px;
    font-weight: 700;
    padding: 4px 8px;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 190px;
    border-radius: var(--radius-md);
    background: #111827;
    color: #fff;
    box-shadow: var(--shadow-sm);
}

.category-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.54;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.category-card:hover img {
    opacity: 0.64;
}

.category-card span {
    position: relative;
    z-index: 2;
    display: flex;
    min-height: 190px;
    flex-direction: column;
    justify-content: end;
    padding: 24px;
    background: linear-gradient(0deg, rgba(17, 24, 39, 0.92), rgba(17, 24, 39, 0.04));
}

.category-card strong {
    font-size: 24px;
}

.category-card em {
    color: #e5e7eb;
    font-style: normal;
    margin-top: 8px;
}

.ranking-list,
.search-results {
    display: grid;
    gap: 18px;
}

.wide-card a {
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
    gap: 20px;
    padding: 16px;
    border-radius: var(--radius-md);
    background: var(--color-surface);
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.wide-card a:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.wide-cover {
    aspect-ratio: 16 / 9;
    border-radius: 14px;
}

.wide-body {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 10px;
}

.list-rank {
    top: 10px;
    left: 10px;
    display: inline-flex;
    min-width: 36px;
    justify-content: center;
    padding: 4px 10px;
    background: var(--color-accent);
}

.page-hero {
    padding-top: 54px;
    padding-bottom: 38px;
}

.page-hero-card {
    overflow: hidden;
    border-radius: 28px;
    background: linear-gradient(135deg, #78350f, #d97706);
    color: #fff;
    padding: 50px;
    box-shadow: var(--shadow-md);
}

.page-hero-card h1 {
    color: #fff;
}

.page-hero-card p {
    max-width: 760px;
    color: #fffbeb;
}

.search-box {
    display: flex;
    gap: 10px;
    max-width: 720px;
    margin-top: 24px;
}

.search-box input {
    min-width: 0;
    flex: 1;
    padding: 14px 18px;
}

.search-box button {
    padding: 14px 24px;
}

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

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

.detail-wrap {
    padding-bottom: 56px;
}

.detail-title {
    margin-bottom: 22px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000;
    box-shadow: var(--shadow-lg);
    aspect-ratio: 16 / 9;
}

.player-shell video {
    width: 100%;
    height: 100%;
    background: #000;
    object-fit: contain;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: #fff;
    cursor: pointer;
    background: rgba(17, 24, 39, 0.40);
}

.player-cover img {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.player-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(0deg, rgba(17, 24, 39, 0.76), rgba(17, 24, 39, 0.22));
}

.play-icon {
    width: 84px;
    height: 84px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(217, 119, 6, 0.94);
    box-shadow: 0 20px 44px rgba(0, 0, 0, 0.34);
}

.play-icon::before {
    content: "";
    margin-left: 6px;
    border-top: 16px solid transparent;
    border-bottom: 16px solid transparent;
    border-left: 24px solid #fff;
}

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

.detail-layout {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 30px;
    margin-top: 34px;
}

.detail-cover {
    overflow: hidden;
    border-radius: 24px;
    background: #111827;
    box-shadow: var(--shadow-md);
}

.detail-cover img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
}

.detail-content {
    display: grid;
    gap: 20px;
}

.content-card {
    border-radius: var(--radius-md);
    background: var(--color-surface);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.content-card h2 {
    margin: 0 0 12px;
    font-size: 24px;
}

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

.hidden-card {
    display: none;
}

.empty-state {
    display: none;
    border-radius: var(--radius-md);
    background: #fff;
    padding: 46px 24px;
    text-align: center;
    color: var(--color-muted);
    box-shadow: var(--shadow-sm);
}

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

.site-footer {
    margin-top: 48px;
    background: var(--color-footer);
    color: #d1d5db;
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 46px 24px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 32px;
}

.footer-brand .brand-mark {
    flex: 0 0 auto;
}

.footer-brand strong,
.footer-links h2 {
    display: block;
    color: #fff;
    font-size: 18px;
    margin: 0 0 10px;
}

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

.footer-links {
    display: grid;
    align-content: start;
    gap: 8px;
}

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 18px 24px;
    text-align: center;
    color: #9ca3af;
}

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

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

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

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

@media (max-width: 820px) {
    .site-header-inner {
        height: 66px;
        padding: 0 16px;
    }

    .brand-mark {
        width: 38px;
        height: 38px;
    }

    .brand-text span {
        font-size: 17px;
    }

    .section,
    .page-hero,
    .hero,
    .detail-wrap {
        padding-left: 16px;
        padding-right: 16px;
    }

    .hero-stage {
        min-height: 540px;
        border-radius: 24px;
    }

    .hero-content {
        padding: 72px 28px;
    }

    .hero-dots {
        left: 28px;
        bottom: 26px;
    }

    .hero-control {
        display: none;
    }

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

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

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

    .detail-cover {
        max-width: 420px;
    }

    .page-hero-card {
        padding: 34px 24px;
    }
}

@media (max-width: 520px) {
    .brand-text em {
        display: none;
    }

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

    .section-heading {
        display: block;
    }

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

    .hero-stage {
        min-height: 500px;
    }

    .hero h1 {
        font-size: 34px;
    }

    .hero-content {
        padding: 54px 22px;
    }

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