:root {
    --slate-950: #020617;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --blue-900: #1e3a8a;
    --blue-600: #2563eb;
    --blue-500: #3b82f6;
    --cyan-500: #06b6d4;
    --emerald-500: #10b981;
    --orange-500: #f97316;
    --text: #111827;
    --muted: #64748b;
    --border: #e5e7eb;
    --surface: #ffffff;
    --soft: #f8fafc;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background: #f8fafc;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.6;
}

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

img {
    display: block;
    max-width: 100%;
    background: linear-gradient(135deg, #dbeafe, #cffafe);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, var(--slate-900), var(--blue-900), var(--slate-900));
    box-shadow: 0 10px 35px rgba(2, 6, 23, 0.3);
}

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

.logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.logo {
    font-size: 24px;
}

.logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue-500), var(--cyan-500));
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.35);
    font-size: 13px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 26px;
    color: #e5e7eb;
    font-size: 15px;
}

.desktop-nav a,
.nav-dropdown button {
    border: 0;
    padding: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
    transition: color 0.2s ease;
}

.desktop-nav a:hover,
.nav-dropdown button:hover,
.desktop-nav .is-active {
    color: #ffffff;
}

.nav-dropdown {
    position: relative;
}

.dropdown-panel {
    position: absolute;
    left: 0;
    top: 32px;
    width: 210px;
    padding: 8px;
    background: #ffffff;
    color: #334155;
    border-radius: 12px;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: 0.2s ease;
}

.nav-dropdown:hover .dropdown-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-panel a {
    display: block;
    padding: 9px 12px;
    border-radius: 10px;
}

.dropdown-panel a:hover {
    color: var(--blue-600);
    background: #eff6ff;
}

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

.header-search input,
.mobile-search input,
.search-page-form input,
.filter-bar input,
.filter-bar select {
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 999px;
    padding: 10px 14px;
    outline: none;
    background: rgba(15, 23, 42, 0.82);
    color: #ffffff;
}

.header-search input {
    width: 230px;
}

.header-search button,
.mobile-search button,
.search-page-form button {
    border: 0;
    border-radius: 999px;
    padding: 10px 16px;
    color: #ffffff;
    background: var(--blue-500);
    cursor: pointer;
    transition: 0.2s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.search-page-form button:hover {
    background: var(--blue-600);
}

.menu-toggle {
    display: none;
    border: 0;
    background: transparent;
    color: #ffffff;
    font-size: 28px;
    cursor: pointer;
}

.mobile-panel {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 16px;
    border-top: 1px solid rgba(226, 232, 240, 0.18);
}

.mobile-panel a {
    display: block;
    color: #e5e7eb;
    padding: 10px 4px;
}

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

.hero {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    background: var(--slate-900);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    background-position: center;
    background-size: cover;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.6s ease, transform 0.8s ease;
}

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

.hero-slide::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 150px;
    background: linear-gradient(0deg, #f8fafc, transparent);
}

.hero-content {
    position: relative;
    z-index: 1;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    max-width: 760px;
    color: #ffffff;
}

.hero-kicker,
.section-label {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 12px;
    color: #dbeafe;
    background: rgba(59, 130, 246, 0.18);
    border: 1px solid rgba(147, 197, 253, 0.2);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.hero h1,
.hero h2 {
    margin: 18px 0 20px;
    max-width: 760px;
    font-size: clamp(40px, 7vw, 72px);
    line-height: 1.08;
    letter-spacing: -0.05em;
}

.hero h1 span,
.hero h2 span {
    display: block;
    margin-top: 8px;
    color: transparent;
    background: linear-gradient(90deg, #60a5fa, #22d3ee);
    -webkit-background-clip: text;
    background-clip: text;
}

.hero p {
    margin: 0 0 24px;
    max-width: 680px;
    color: #d1d5db;
    font-size: 19px;
}

.hero-tags,
.detail-tags,
.tag-row,
.rank-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.detail-tags span,
.tag-row span,
.rank-tags span {
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    color: #0f172a;
    background: #e0f2fe;
}

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

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

.primary-btn {
    color: #ffffff;
    background: var(--blue-500);
    box-shadow: 0 12px 30px rgba(59, 130, 246, 0.35);
}

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

.primary-btn:hover {
    background: var(--blue-600);
}

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

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

.hero-dots button {
    width: 34px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.38);
    cursor: pointer;
}

.hero-dots button.is-active {
    background: #ffffff;
}

.section-block {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 70px 0;
}

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

.section-heading.compact {
    align-items: center;
}

.section-heading h2,
.category-panel h2 {
    margin: 10px 0 0;
    color: #111827;
    font-size: clamp(28px, 4vw, 38px);
    line-height: 1.2;
}

.section-heading a {
    color: var(--blue-600);
    font-weight: 800;
}

.section-label.emerald {
    color: #047857;
    background: #d1fae5;
}

.section-label.orange {
    color: #c2410c;
    background: #ffedd5;
}

.section-label.cyan {
    color: #0e7490;
    background: #cffafe;
}

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

.movie-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 22px 50px rgba(15, 23, 42, 0.16);
}

.card-poster {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #dbeafe;
}

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

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

.card-type,
.card-year {
    position: absolute;
    z-index: 1;
    border-radius: 999px;
    padding: 5px 10px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
}

.card-type {
    top: 12px;
    right: 12px;
    background: var(--blue-500);
}

.card-year {
    left: 12px;
    bottom: 12px;
    background: rgba(2, 6, 23, 0.68);
}

.card-body {
    padding: 18px;
}

.card-meta {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 13px;
}

.card-body h3 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.35;
    transition: color 0.2s ease;
}

.movie-card:hover h3 {
    color: var(--blue-600);
}

.card-body p {
    display: -webkit-box;
    min-height: 48px;
    margin: 0 0 14px;
    overflow: hidden;
    color: #475569;
    font-size: 14px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.recommend-band {
    padding: 70px max(16px, calc((100vw - 1180px) / 2));
    background: linear-gradient(90deg, #ecfdf5, #f0fdfa);
}

.section-heading.contained {
    width: min(1180px, 100%);
    margin-left: auto;
    margin-right: auto;
}

.scroll-row {
    display: flex;
    gap: 24px;
    width: min(1180px, 100%);
    margin: 0 auto;
    overflow-x: auto;
    padding: 6px 2px 24px;
    scroll-snap-type: x mandatory;
}

.scroll-row .movie-card {
    width: 330px;
    flex: 0 0 330px;
    scroll-snap-align: start;
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    gap: 34px;
    align-items: start;
}

.rank-list {
    display: grid;
    gap: 14px;
}

.rank-list-large {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rank-item {
    display: grid;
    grid-template-columns: 46px 92px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    padding: 14px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.rank-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--orange-500), #ef4444);
    font-weight: 900;
}

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

.rank-item strong {
    display: block;
    margin-bottom: 4px;
    font-size: 17px;
}

.rank-item p {
    display: -webkit-box;
    margin: 0 0 8px;
    overflow: hidden;
    color: var(--muted);
    font-size: 13px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
}

.category-panel {
    position: sticky;
    top: 92px;
    border-radius: 26px;
    padding: 28px;
    background: linear-gradient(135deg, #ffffff, #eff6ff);
    box-shadow: var(--shadow);
}

.category-panel p {
    color: var(--muted);
}

.category-grid {
    display: grid;
    gap: 16px;
}

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

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

.category-tile,
.category-card-large {
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 18px;
    background: #ffffff;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover,
.category-card-large:hover {
    transform: translateY(-5px);
    border-color: #bfdbfe;
    box-shadow: var(--shadow);
}

.category-tile span,
.category-card-head span {
    display: block;
    color: #0f172a;
    font-weight: 900;
    font-size: 18px;
}

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

.category-card-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.category-card-head strong {
    color: var(--blue-600);
    white-space: nowrap;
}

.category-samples {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.category-samples a {
    border-radius: 999px;
    padding: 6px 10px;
    color: #1e40af;
    background: #dbeafe;
    font-size: 13px;
}

.inner-hero {
    min-height: 320px;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--slate-900), var(--blue-900), #0e7490);
    color: #ffffff;
}

.inner-hero > div {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 54px 0;
}

.inner-hero h1 {
    margin: 14px 0;
    font-size: clamp(40px, 6vw, 66px);
    line-height: 1.1;
}

.inner-hero p {
    max-width: 760px;
    margin: 0;
    color: #dbeafe;
    font-size: 18px;
}

.ranking-hero {
    background-position: center;
    background-size: cover;
}

.filter-bar {
    display: grid;
    grid-template-columns: 1fr 180px 180px;
    gap: 14px;
    margin-bottom: 28px;
    border-radius: 22px;
    padding: 18px;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.filter-bar input,
.filter-bar select {
    width: 100%;
    color: #0f172a;
    background: #f8fafc;
    border-color: #cbd5e1;
}

.catalog-grid .movie-card.is-hidden {
    display: none;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: var(--slate-900);
}

.detail-bg {
    position: absolute;
    inset: 0;
    background-position: center;
    background-size: cover;
    filter: saturate(1.15);
}

.detail-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.86), transparent 42%, rgba(2, 6, 23, 0.5));
}

.detail-inner {
    position: relative;
    z-index: 1;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 36px 0 70px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 32px;
    color: #bfdbfe;
    font-size: 14px;
}

.breadcrumb strong {
    color: #ffffff;
}

.detail-grid {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 38px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border-radius: 24px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

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

.detail-info h1 {
    margin: 16px 0;
    font-size: clamp(38px, 6vw, 64px);
    line-height: 1.08;
}

.detail-one-line {
    max-width: 820px;
    margin: 0 0 18px;
    color: #e0f2fe;
    font-size: 20px;
}

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

.detail-meta span {
    border-radius: 999px;
    padding: 7px 12px;
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.detail-tags {
    margin-bottom: 26px;
}

.player-section {
    padding-bottom: 40px;
}

.video-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000000;
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.25);
}

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

.play-cover {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle at center, rgba(37, 99, 235, 0.25), rgba(2, 6, 23, 0.58));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-cover span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 82px;
    height: 82px;
    border-radius: 999px;
    background: var(--blue-500);
    box-shadow: 0 18px 45px rgba(37, 99, 235, 0.45);
    font-size: 28px;
}

.play-cover strong {
    font-size: 20px;
}

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

.detail-text {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
    padding-top: 24px;
}

.detail-text article {
    border-radius: 24px;
    padding: 28px;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.detail-text h2 {
    margin: 0 0 14px;
    font-size: 26px;
}

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

.search-page-form {
    margin-top: 24px;
    max-width: 640px;
}

.search-page-form input {
    flex: 1;
    min-height: 48px;
    background: rgba(15, 23, 42, 0.72);
}

.search-page-form button {
    min-height: 48px;
    padding: 0 24px;
}

.search-status {
    margin-bottom: 24px;
    border-radius: 16px;
    padding: 14px 18px;
    color: #1e40af;
    background: #dbeafe;
    font-weight: 800;
}

.site-footer {
    color: #cbd5e1;
    background: linear-gradient(180deg, var(--slate-900), #020617);
}

.footer-inner {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 36px;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 48px 0;
}

.footer-logo {
    margin-bottom: 14px;
    font-size: 22px;
}

.site-footer p {
    max-width: 380px;
    color: #94a3b8;
}

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

.site-footer ul {
    padding: 0;
    margin: 0;
    list-style: none;
}

.site-footer li + li {
    margin-top: 9px;
}

.site-footer a:hover {
    color: #60a5fa;
}

.footer-bottom {
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    padding: 18px 16px;
    color: #64748b;
    text-align: center;
    font-size: 13px;
}

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

    .menu-toggle {
        display: block;
    }

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

    .split-layout,
    .detail-text,
    .rank-list-large {
        grid-template-columns: 1fr;
    }

    .category-panel {
        position: static;
    }
}

@media (max-width: 760px) {
    .hero {
        min-height: 660px;
    }

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

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

    .movie-grid,
    .category-grid.large,
    .category-grid.small,
    .footer-inner,
    .detail-grid,
    .filter-bar {
        grid-template-columns: 1fr;
    }

    .detail-poster {
        max-width: 260px;
    }

    .rank-item {
        grid-template-columns: 40px 78px minmax(0, 1fr);
        gap: 12px;
    }

    .rank-item img {
        width: 78px;
        height: 56px;
    }

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

@media (max-width: 480px) {
    .logo {
        font-size: 20px;
    }

    .hero h1,
    .hero h2,
    .inner-hero h1,
    .detail-info h1 {
        font-size: 36px;
    }

    .scroll-row .movie-card {
        width: 286px;
        flex-basis: 286px;
    }
}
