:root {
    --blue-900: #0f275e;
    --blue-800: #1e40af;
    --blue-700: #1d4ed8;
    --blue-600: #2563eb;
    --blue-100: #dbeafe;
    --orange-600: #ea580c;
    --orange-500: #f97316;
    --orange-100: #ffedd5;
    --gray-950: #050816;
    --gray-900: #111827;
    --gray-800: #1f2937;
    --gray-700: #374151;
    --gray-600: #4b5563;
    --gray-500: #6b7280;
    --gray-200: #e5e7eb;
    --gray-100: #f3f4f6;
    --gray-50: #f9fafb;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 12px 30px rgba(15, 23, 42, 0.12);
    --shadow-lg: 0 22px 55px rgba(15, 23, 42, 0.18);
    --radius: 18px;
}

* {
    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(--gray-800);
    background: var(--gray-50);
    line-height: 1.6;
}

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

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

button,
input {
    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(--blue-600), var(--blue-900));
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.25);
}

.header-inner {
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 220px;
}

.brand-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: var(--orange-500);
    box-shadow: inset 0 -8px 18px rgba(154, 52, 18, 0.25);
    font-weight: 800;
}

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

.brand-copy strong {
    font-size: 20px;
    letter-spacing: 0.02em;
}

.brand-copy em {
    margin-top: 3px;
    color: var(--blue-100);
    font-style: normal;
    font-size: 12px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link,
.mobile-link {
    border-radius: 999px;
    padding: 9px 15px;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    color: var(--orange-500);
    background: rgba(255, 255, 255, 0.1);
}

.mobile-menu-button {
    display: none;
    border: 0;
    color: var(--white);
    background: rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 8px 11px;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    padding: 10px 16px 16px;
}

.mobile-nav.open {
    display: grid;
    gap: 6px;
}

.hero-carousel {
    position: relative;
    height: clamp(520px, 72vh, 760px);
    overflow: hidden;
    background: var(--gray-950);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.7s ease, transform 1s ease;
}

.hero-slide.active {
    opacity: 1;
    transform: scale(1);
    z-index: 1;
}

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.72;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(5, 8, 22, 0.86), rgba(15, 39, 94, 0.62), rgba(15, 39, 94, 0.18)), linear-gradient(0deg, rgba(5, 8, 22, 0.68), rgba(5, 8, 22, 0.08));
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: center;
}

.hero-copy {
    max-width: 720px;
    color: var(--white);
    padding: 40px 0;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fde047;
    font-weight: 800;
    margin-bottom: 18px;
}

.hero-copy h1,
.page-hero h1,
.detail-title-row h1 {
    margin: 0 0 18px;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-line {
    max-width: 690px;
    color: #e5e7eb;
    font-size: clamp(18px, 2vw, 22px);
    margin: 0 0 18px;
}

.hero-meta {
    color: #bfdbfe;
    margin: 0 0 18px;
    font-weight: 700;
}

.hero-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.tag,
.detail-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    border-radius: 999px;
    padding: 5px 12px;
    color: var(--blue-800);
    background: var(--blue-100);
    font-size: 13px;
    font-weight: 700;
}

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

.primary-button,
.ghost-button,
.text-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    min-height: 44px;
    padding: 0 20px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.primary-button {
    color: var(--white);
    background: var(--orange-500);
    box-shadow: 0 16px 35px rgba(249, 115, 22, 0.35);
}

.primary-button:hover {
    background: var(--orange-600);
    transform: translateY(-2px);
}

.ghost-button {
    color: var(--white);
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(12px);
}

.ghost-button:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: translateY(-2px);
}

.text-button {
    color: var(--orange-600);
    padding: 0;
    min-height: auto;
}

.text-button:hover {
    color: var(--blue-700);
}

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

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

.hero-dot.active {
    width: 32px;
    background: var(--orange-500);
}

.page-section {
    padding: 54px 0;
}

.search-band {
    margin-top: -44px;
    position: relative;
    z-index: 5;
}

.search-panel,
.content-card,
.player-card,
.meta-card,
.cover-card,
.ranking-panel,
.category-card-large,
.search-box {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}

.search-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 24px;
}

.search-panel h2,
.section-heading h2,
.content-card h2,
.meta-card h2,
.ranking-layout aside h2 {
    margin: 0;
    color: var(--gray-800);
    font-size: 28px;
    line-height: 1.2;
}

.search-panel p,
.section-heading p {
    color: var(--gray-600);
    margin: 6px 0 0;
}

.search-box {
    min-width: min(420px, 100%);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}

.search-box span {
    color: var(--blue-700);
    font-weight: 800;
}

.search-box input {
    width: 100%;
    border: 0;
    outline: 0;
    color: var(--gray-800);
    background: transparent;
}

.inline-search {
    min-width: min(500px, 100%);
}

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

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

.section-more:hover {
    color: var(--blue-700);
}

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

.category-tile {
    position: relative;
    min-height: 190px;
    border-radius: var(--radius);
    overflow: hidden;
    color: var(--white);
    background: var(--gray-900);
    box-shadow: var(--shadow-md);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-tile img {
    width: 100%;
    height: 100%;
    min-height: 190px;
    object-fit: cover;
    opacity: 0.55;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.category-tile:hover img {
    transform: scale(1.08);
    opacity: 0.72;
}

.category-tile span {
    position: absolute;
    inset: auto 16px 16px;
}

.category-tile strong {
    display: block;
    font-size: 21px;
    margin-bottom: 6px;
}

.category-tile em {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #e5e7eb;
    font-style: normal;
    font-size: 13px;
}

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

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

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

.movie-card-link {
    display: block;
    overflow: hidden;
    height: 100%;
    border-radius: 16px;
    background: var(--white);
    box-shadow: var(--shadow-md);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, var(--blue-900), var(--gray-900));
}

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

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

.poster-mask {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(0, 0, 0, 0);
    opacity: 0;
    transition: background 0.25s ease, opacity 0.25s ease;
}

.movie-card-link:hover .poster-mask {
    opacity: 1;
    background: rgba(0, 0, 0, 0.34);
}

.poster-play {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    color: var(--white);
    background: var(--orange-500);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}

.poster-category,
.poster-year {
    position: absolute;
    top: 10px;
    border-radius: 8px;
    padding: 4px 8px;
    color: var(--white);
    font-size: 12px;
    font-weight: 800;
}

.poster-category {
    left: 10px;
    background: var(--orange-500);
}

.poster-year {
    right: 10px;
    background: rgba(0, 0, 0, 0.68);
}

.movie-info {
    display: block;
    padding: 14px;
}

.movie-info strong {
    display: -webkit-box;
    min-height: 48px;
    color: var(--gray-800);
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.movie-card-link:hover .movie-info strong {
    color: var(--orange-600);
}

.movie-info em {
    display: block;
    margin-top: 8px;
    color: var(--gray-500);
    font-style: normal;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: start;
    gap: 28px;
}

.ranking-panel {
    padding: 24px;
    position: sticky;
    top: 92px;
}

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

.rank-row a {
    display: grid;
    grid-template-columns: 46px 58px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    min-height: 76px;
    border-radius: 14px;
    padding: 8px;
    background: var(--gray-50);
    transition: background 0.2s ease, transform 0.2s ease;
}

.rank-row a:hover {
    background: var(--orange-100);
    transform: translateX(4px);
}

.rank-num {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    color: var(--white);
    background: linear-gradient(135deg, var(--orange-500), var(--orange-600));
    font-weight: 900;
}

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

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

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

.rank-copy strong {
    color: var(--gray-800);
}

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

.rank-meta {
    display: none;
    color: var(--gray-500);
    font-size: 13px;
}

.page-hero,
.detail-hero {
    color: var(--white);
    background: radial-gradient(circle at 12% 10%, rgba(249, 115, 22, 0.35), transparent 28%), linear-gradient(135deg, var(--blue-600), var(--blue-900));
    padding: 74px 0;
}

.blue-hero {
    background: radial-gradient(circle at 85% 20%, rgba(249, 115, 22, 0.22), transparent 30%), linear-gradient(135deg, var(--blue-600), var(--blue-900));
}

.category-hero {
    background: radial-gradient(circle at 85% 10%, rgba(34, 197, 94, 0.28), transparent 30%), linear-gradient(135deg, #15803d, #0f766e);
}

.ranking-hero {
    background: radial-gradient(circle at 18% 20%, rgba(251, 191, 36, 0.28), transparent 32%), linear-gradient(135deg, #7c2d12, #1f2937);
}

.page-hero h1 {
    margin-bottom: 14px;
}

.page-hero p,
.detail-title-row p {
    max-width: 780px;
    margin: 0;
    color: #e5e7eb;
    font-size: 18px;
}

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

.category-card-large {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    overflow: hidden;
}

.category-card-cover {
    position: relative;
    min-height: 240px;
    overflow: hidden;
    background: var(--gray-900);
}

.category-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.72;
    transition: transform 0.3s ease;
}

.category-card-large:hover img {
    transform: scale(1.08);
}

.category-card-cover span {
    position: absolute;
    left: 14px;
    bottom: 14px;
    color: var(--white);
    font-weight: 900;
    font-size: 22px;
}

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

.category-card-body h2 {
    margin: 0 0 10px;
}

.category-card-body p {
    margin: 0 0 16px;
    color: var(--gray-600);
}

.category-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.category-preview a {
    border-radius: 999px;
    padding: 5px 10px;
    color: var(--blue-700);
    background: var(--blue-100);
    font-size: 13px;
}

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

.empty-tip {
    display: none;
    margin: 30px 0 0;
    color: var(--gray-500);
    text-align: center;
}

.empty-tip.show {
    display: block;
}

.ranking-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 28px;
}

.rank-list-large .rank-row a {
    grid-template-columns: 54px 76px minmax(0, 1fr) auto;
    min-height: 96px;
    padding: 10px 14px;
}

.rank-list-large .rank-row img {
    width: 76px;
    height: 76px;
}

.rank-list-large .rank-meta {
    display: block;
}

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

.detail-hero {
    padding: 46px 0 64px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    color: var(--blue-100);
    margin-bottom: 28px;
}

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

.detail-title-row {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: end;
}

.detail-title-row h1 {
    font-size: clamp(34px, 5vw, 60px);
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 28px;
    margin-top: -40px;
    padding-bottom: 60px;
    position: relative;
    z-index: 4;
}

.detail-main {
    display: grid;
    gap: 24px;
}

.player-card {
    overflow: hidden;
    padding: 0;
    background: var(--gray-950);
}

.video-shell {
    position: relative;
    aspect-ratio: 16 / 9;
    min-height: 260px;
    background: var(--gray-950);
}

.video-shell video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    background: #000000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    gap: 12px;
    border: 0;
    color: var(--white);
    background: radial-gradient(circle, rgba(249, 115, 22, 0.24), rgba(5, 8, 22, 0.76));
    cursor: pointer;
}

.player-overlay.hide {
    display: none;
}

.player-button-icon {
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    padding-left: 5px;
    border-radius: 50%;
    background: var(--orange-500);
    box-shadow: 0 18px 50px rgba(249, 115, 22, 0.35);
    font-size: 34px;
}

.content-card,
.meta-card,
.cover-card {
    padding: 26px;
}

.content-card p {
    margin: 14px 0 0;
    color: var(--gray-700);
    font-size: 17px;
}

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

.cover-card img {
    width: 100%;
    border-radius: 16px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    margin-bottom: 18px;
    background: var(--gray-900);
}

.full-button {
    width: 100%;
}

.meta-card dl {
    margin: 16px 0 0;
    display: grid;
    gap: 12px;
}

.meta-card dt {
    color: var(--gray-500);
    font-size: 13px;
}

.meta-card dd {
    margin: -8px 0 0;
    color: var(--gray-800);
    font-weight: 800;
}

.meta-card a {
    color: var(--orange-600);
}

.related-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 20px;
}

.site-footer {
    color: #d1d5db;
    background: var(--gray-900);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 40px;
    padding: 44px 0;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: var(--white);
    font-size: 19px;
}

.site-footer p {
    margin: 0;
    color: #9ca3af;
}

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

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

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

@media (max-width: 1100px) {
    .movie-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

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

    .split-section,
    .detail-layout,
    .ranking-layout {
        grid-template-columns: 1fr;
    }

    .ranking-panel {
        position: static;
    }

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

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

    .mobile-menu-button {
        display: inline-grid;
        place-items: center;
    }

    .brand {
        min-width: 0;
    }

    .brand-copy em {
        display: none;
    }

    .hero-carousel {
        height: 620px;
    }

    .hero-content {
        align-items: end;
    }

    .hero-copy {
        padding-bottom: 82px;
    }

    .search-panel,
    .section-heading,
    .list-toolbar,
    .detail-title-row {
        align-items: stretch;
        flex-direction: column;
    }

    .category-grid,
    .category-large-grid,
    .footer-grid,
    .detail-sidebar {
        grid-template-columns: 1fr;
    }

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

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

    .rank-list-large .rank-row a,
    .rank-row a {
        grid-template-columns: 42px 58px minmax(0, 1fr);
    }

    .rank-list-large .rank-meta {
        display: none;
    }

    .rank-list-large .rank-row img {
        width: 58px;
        height: 58px;
    }

    .page-hero,
    .detail-hero {
        padding: 52px 0;
    }
}

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

    .brand-copy strong {
        font-size: 17px;
    }

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

    .movie-info {
        padding: 10px;
    }

    .movie-info strong {
        min-height: 42px;
        font-size: 14px;
    }

    .movie-info em {
        font-size: 12px;
    }

    .content-card,
    .meta-card,
    .cover-card,
    .search-panel,
    .ranking-panel {
        padding: 18px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }
}
