:root {
    --slate-950: #020617;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-100: #f1f5f9;
    --slate-50: #f8fafc;
    --orange-600: #ea580c;
    --orange-500: #f97316;
    --orange-400: #fb923c;
    --amber-500: #f59e0b;
    --yellow-400: #facc15;
    --text: #111827;
    --muted: #64748b;
    --line: #e2e8f0;
    --white: #ffffff;
    --shadow: 0 16px 35px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background: linear-gradient(135deg, #f8fafc 0%, #fff7ed 45%, #fffbeb 100%);
    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: 50;
    color: var(--white);
    background: linear-gradient(90deg, var(--slate-900), var(--slate-800), var(--slate-900));
    box-shadow: 0 12px 28px rgba(2, 6, 23, 0.25);
}

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

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

.brand-icon {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, var(--orange-500), var(--amber-500));
    box-shadow: 0 10px 25px rgba(249, 115, 22, 0.35);
}

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

.brand strong {
    font-size: 21px;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, #fb923c, #fbbf24);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand em {
    font-size: 12px;
    color: #cbd5e1;
    font-style: normal;
}

.header-search {
    position: relative;
    display: flex;
    flex: 1 1 auto;
    max-width: 460px;
    margin-left: auto;
}

.header-search input,
.mobile-search input,
.search-box-large input,
.tool-bar input,
.tool-bar select {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.35);
    outline: none;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    color: var(--white);
    padding: 11px 120px 11px 18px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.search-box-large input:focus,
.tool-bar input:focus,
.tool-bar select:focus {
    border-color: rgba(251, 146, 60, 0.9);
    box-shadow: 0 0 0 3px rgba(251, 146, 60, 0.22);
}

.header-search button,
.mobile-search button,
.search-box-large button {
    position: absolute;
    right: 3px;
    top: 3px;
    bottom: 3px;
    border: 0;
    border-radius: 999px;
    color: var(--white);
    cursor: pointer;
    padding: 0 20px;
    background: linear-gradient(90deg, var(--orange-500), var(--amber-500));
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    font-weight: 600;
    white-space: nowrap;
}

.desktop-nav a,
.strip-inner a,
.mobile-panel a {
    transition: color 0.2s ease;
}

.desktop-nav a:hover,
.strip-inner a:hover,
.mobile-panel a:hover {
    color: var(--orange-400);
}

.menu-toggle {
    display: none;
    border: 0;
    border-radius: 10px;
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    padding: 8px 11px;
    cursor: pointer;
}

.mobile-panel {
    display: none;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    padding: 14px 16px 18px;
    background: var(--slate-900);
}

.mobile-panel.is-open {
    display: grid;
    gap: 13px;
}

.mobile-search {
    position: relative;
}

.category-strip {
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(15, 23, 42, 0.72);
}

.strip-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    overflow-x: auto;
    padding: 11px 0;
    scrollbar-width: none;
}

.strip-inner::-webkit-scrollbar {
    display: none;
}

.strip-inner a {
    flex: 0 0 auto;
    font-size: 14px;
    color: #e2e8f0;
}

.hero {
    position: relative;
    height: 70vh;
    min-height: 560px;
    overflow: hidden;
    background: var(--slate-950);
}

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

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

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.18));
}

.hero-content {
    position: relative;
    height: 100%;
    display: flex;
    align-items: flex-end;
    padding-bottom: 86px;
}

.hero-copy {
    width: min(680px, 100%);
    color: #fff;
}

.hero-kicker,
.page-hero span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(90deg, var(--orange-500), var(--amber-500));
    padding: 6px 16px;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.hero-copy h1 {
    margin: 18px 0 16px;
    font-size: clamp(38px, 7vw, 68px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-copy p {
    margin: 0 0 22px;
    font-size: 19px;
    color: #e2e8f0;
    max-width: 620px;
}

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

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border-radius: 999px;
    padding: 0 22px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    color: #fff;
    background: linear-gradient(90deg, var(--orange-500), var(--amber-500));
    box-shadow: 0 18px 32px rgba(249, 115, 22, 0.32);
}

.btn-ghost {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
}

.btn-small {
    min-height: 36px;
    padding: 0 18px;
    color: #fff;
    background: linear-gradient(90deg, var(--orange-500), var(--amber-500));
}

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

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

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

.main-content {
    padding: 58px 0 24px;
}

.content-section {
    margin-bottom: 62px;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
}

.section-head > div {
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-head h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 34px);
    line-height: 1.2;
}

.section-icon {
    font-size: 26px;
}

.more-link {
    color: var(--orange-600);
    font-weight: 800;
    white-space: nowrap;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.poster-link {
    position: relative;
    display: block;
    height: 245px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--slate-800), var(--slate-950));
}

.movie-card-horizontal {
    display: grid;
    grid-template-columns: 42% 1fr;
}

.movie-card-horizontal .poster-link {
    height: 180px;
}

.movie-card-large .poster-link {
    height: 330px;
}

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

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

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

.badge-hot {
    top: 12px;
    left: 12px;
    background: linear-gradient(90deg, var(--orange-500), var(--amber-500));
}

.duration {
    right: 12px;
    bottom: 12px;
    background: rgba(0, 0, 0, 0.7);
}

.card-body {
    padding: 16px;
}

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

.card-body h3 a:hover,
.rank-detail h2 a:hover,
.detail-side a:hover {
    color: var(--orange-600);
}

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

.card-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    color: var(--muted);
    font-size: 13px;
}

.score-panel {
    margin-bottom: 58px;
    border-radius: 26px;
    color: #fff;
    background: linear-gradient(90deg, var(--slate-800), var(--slate-900));
    padding: clamp(24px, 4vw, 42px);
    box-shadow: var(--shadow);
}

.score-head .more-link {
    color: #fed7aa;
}

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

.rank-mini {
    display: flex;
    gap: 14px;
    align-items: center;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.1);
    padding: 12px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.rank-mini:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-3px);
}

.rank-mini img {
    width: 76px;
    height: 76px;
    border-radius: 14px;
    object-fit: cover;
}

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

.rank-mini em {
    color: #cbd5e1;
    font-style: normal;
    font-size: 13px;
    margin-top: 5px;
}

.page-hero {
    color: #fff;
    background: linear-gradient(90deg, var(--slate-800), var(--slate-900));
    padding: 72px 0;
    margin-bottom: 42px;
}

.page-hero.compact {
    padding: 54px 0;
}

.page-hero h1 {
    margin: 18px 0 12px;
    font-size: clamp(34px, 5vw, 52px);
    line-height: 1.08;
}

.page-hero p {
    margin: 0;
    width: min(780px, 100%);
    color: #cbd5e1;
    font-size: 18px;
}

.category-overview,
.listing-page,
.ranking-list,
.search-area {
    padding-bottom: 66px;
}

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

.category-card {
    overflow: hidden;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.09);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-mosaic {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    height: 150px;
    background: var(--slate-800);
}

.category-mosaic img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.category-info {
    padding: 22px;
}

.category-info h2 {
    margin: 0 0 10px;
    font-size: 25px;
}

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

.category-info span {
    color: var(--orange-600);
    font-weight: 800;
}

.tool-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 16px;
    align-items: end;
    margin-bottom: 26px;
    padding: 18px;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.tool-bar label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-weight: 700;
    font-size: 14px;
}

.tool-bar input,
.tool-bar select {
    border-radius: 14px;
    color: var(--text);
    background: #fff;
    padding: 12px 14px;
}

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

.ranking-list {
    display: grid;
    gap: 16px;
}

.rank-row {
    display: grid;
    grid-template-columns: 72px 124px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    border-radius: 22px;
    background: #fff;
    padding: 16px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.rank-num {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 18px;
    color: #fff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--orange-500), var(--amber-500));
}

.rank-cover img {
    width: 124px;
    height: 86px;
    border-radius: 16px;
    object-fit: cover;
}

.rank-detail h2 {
    margin: 0 0 6px;
    font-size: 21px;
}

.rank-detail p {
    margin: 0 0 10px;
    color: var(--muted);
}

.search-box-large {
    position: relative;
    max-width: 760px;
    margin: 0 auto 30px;
}

.search-box-large input {
    border-radius: 24px;
    color: var(--text);
    background: #fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    padding: 18px 130px 18px 22px;
}

.search-box-large button {
    border-radius: 20px;
    right: 5px;
    top: 5px;
    bottom: 5px;
}

.detail-shell {
    padding: 34px 0 70px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    color: var(--muted);
    margin-bottom: 20px;
    font-size: 14px;
}

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

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

.player-panel {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: #000;
    box-shadow: 0 24px 50px rgba(2, 6, 23, 0.28);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 12px;
    border: 0;
    color: #fff;
    cursor: pointer;
    background: radial-gradient(circle at center, rgba(249, 115, 22, 0.28), rgba(0, 0, 0, 0.45));
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-overlay span {
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--orange-500), var(--amber-500));
    box-shadow: 0 18px 34px rgba(249, 115, 22, 0.38);
    font-size: 32px;
    text-indent: 4px;
}

.player-overlay strong {
    font-size: 18px;
}

.player-panel.is-playing .player-overlay {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.detail-card,
.side-card {
    margin-top: 22px;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.detail-card {
    padding: clamp(22px, 4vw, 34px);
}

.detail-card h1 {
    margin: 0 0 16px;
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.15;
}

.detail-card h2 {
    margin: 28px 0 10px;
    font-size: 23px;
}

.detail-card p {
    margin: 0;
    color: #334155;
    font-size: 16px;
}

.detail-meta {
    padding-bottom: 20px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 18px;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.tag-row span {
    border-radius: 999px;
    color: var(--orange-600);
    background: #ffedd5;
    padding: 7px 12px;
    font-size: 13px;
    font-weight: 800;
}

.detail-side {
    position: sticky;
    top: 104px;
}

.side-card {
    overflow: hidden;
    margin-top: 0;
}

.side-card img {
    width: 100%;
    height: 360px;
    object-fit: cover;
    background: var(--slate-900);
}

.side-card h2,
.side-card dl {
    margin-left: 20px;
    margin-right: 20px;
}

.side-card h2 {
    margin-top: 18px;
    margin-bottom: 16px;
}

.side-card dl {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 10px;
    margin-bottom: 22px;
    color: var(--muted);
}

.side-card dt {
    font-weight: 800;
    color: var(--text);
}

.related-section {
    margin-top: 46px;
}

.site-footer {
    color: #cbd5e1;
    background: linear-gradient(180deg, var(--slate-900), #000);
    margin-top: 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 36px;
    padding: 48px 0 34px;
}

.footer-brand {
    color: #fff;
    margin-bottom: 14px;
}

.footer-brand strong {
    font-size: 21px;
}

.site-footer p {
    margin: 0;
    color: #94a3b8;
}

.site-footer h3 {
    margin: 0 0 14px;
    color: #fff;
}

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

.footer-links a:hover {
    color: var(--orange-400);
}

.footer-bottom {
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    text-align: center;
    padding: 18px;
    color: #94a3b8;
}

.is-hidden {
    display: none !important;
}

.empty-state {
    grid-column: 1 / -1;
    border-radius: 22px;
    text-align: center;
    color: var(--muted);
    background: #fff;
    padding: 44px 20px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

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

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

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

    .horizontal-grid,
    .rank-mini-grid,
    .footer-grid,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .detail-side {
        position: static;
    }
}

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

    .hero {
        min-height: 620px;
        height: 72vh;
    }

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

    .hero-meta {
        gap: 10px;
        font-size: 14px;
    }

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

    .section-head,
    .score-head {
        align-items: flex-start;
        flex-direction: column;
    }

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

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

    .rank-row {
        grid-template-columns: 48px 88px minmax(0, 1fr);
    }

    .rank-row .btn {
        grid-column: 2 / -1;
        width: fit-content;
    }

    .rank-num {
        width: 44px;
        height: 44px;
        border-radius: 14px;
    }

    .rank-cover img {
        width: 88px;
        height: 72px;
    }

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

    .poster-link,
    .movie-card-horizontal .poster-link {
        height: 240px;
    }

    .category-mosaic {
        height: 120px;
    }

    .category-mosaic img {
        height: 120px;
    }

    .side-card img {
        height: 300px;
    }
}

@media (max-width: 460px) {
    .brand strong {
        font-size: 18px;
    }

    .brand em {
        font-size: 11px;
    }

    .hero-copy h1 {
        font-size: 38px;
    }

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

    .btn {
        width: 100%;
    }
}
