:root {
    --bg: #f8fafc;
    --panel: #ffffff;
    --ink: #0f172a;
    --muted: #64748b;
    --soft: #e2e8f0;
    --blue: #2563eb;
    --cyan: #06b6d4;
    --emerald: #10b981;
    --orange: #f97316;
    --radius: 22px;
    --shadow: 0 18px 48px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--bg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.86);
    border-bottom: 1px solid rgba(226, 232, 240, 0.86);
    backdrop-filter: blur(18px);
}

.header-inner {
    height: 72px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.brand-mark {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    color: #ffffff;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.32);
}

.brand-text {
    font-size: 22px;
}

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

.nav-link,
.mobile-link {
    color: #334155;
    font-weight: 700;
    padding: 10px 14px;
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
    color: var(--blue);
    background: #eff6ff;
}

.header-search {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px;
    border: 1px solid var(--soft);
    border-radius: 999px;
    background: #ffffff;
}

.header-search input,
.mobile-search input,
.filter-input,
.filter-select,
.search-hero input {
    border: 0;
    outline: 0;
    color: var(--ink);
    background: transparent;
}

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

.header-search button,
.mobile-search button,
.search-hero button,
.primary-button,
.secondary-button {
    border: 0;
    cursor: pointer;
    font-weight: 800;
    border-radius: 999px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search button,
.mobile-search button,
.search-hero button,
.primary-button {
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.24);
}

.header-search button {
    padding: 8px 16px;
}

.primary-button,
.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
}

.secondary-button {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(10px);
}

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

.menu-toggle {
    width: 42px;
    height: 42px;
    display: none;
    border: 0;
    border-radius: 14px;
    background: #eff6ff;
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    display: block;
    margin: 4px auto;
    background: var(--blue);
}

.mobile-nav {
    display: none;
    padding: 0 16px 16px;
    border-top: 1px solid var(--soft);
    background: #ffffff;
}

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

.mobile-link {
    display: block;
}

.mobile-search {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    padding: 8px;
    border: 1px solid var(--soft);
    border-radius: 18px;
}

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

.mobile-search button {
    padding: 8px 14px;
}

.hero {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    color: #ffffff;
    background: radial-gradient(circle at 78% 22%, rgba(6, 182, 212, 0.38), transparent 30%), linear-gradient(135deg, #020617 0%, #172554 48%, #0e7490 100%);
}

.hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 150px;
    background: linear-gradient(to top, var(--bg), transparent);
    pointer-events: none;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.7s ease;
}

.hero-slide.is-active {
    opacity: 1;
    z-index: 1;
}

.hero-bg {
    position: absolute;
    inset: 0;
    opacity: 0.22;
    background-size: cover;
    background-position: center;
    filter: saturate(1.1);
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.28));
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 620px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 430px);
    align-items: center;
    gap: 48px;
    padding: 80px 0 120px;
}

.hero-copy {
    max-width: 680px;
}

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

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

.gradient-text {
    display: block;
    color: transparent;
    background: linear-gradient(120deg, #60a5fa, #22d3ee, #5eead4);
    -webkit-background-clip: text;
    background-clip: text;
}

.hero p {
    max-width: 640px;
    margin: 0 0 28px;
    color: #dbeafe;
    font-size: 19px;
}

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

.hero-poster {
    position: relative;
    overflow: hidden;
    border-radius: 32px;
    box-shadow: 0 36px 80px rgba(0, 0, 0, 0.42);
    transform: rotate(1.5deg);
}

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

.hero-poster span {
    position: absolute;
    right: 18px;
    bottom: 18px;
    padding: 8px 14px;
    color: #ffffff;
    font-weight: 800;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.74);
    backdrop-filter: blur(10px);
}

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

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

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

.section {
    padding: 72px 0;
}

.section-soft {
    background: linear-gradient(90deg, #ecfdf5, #f0fdfa);
}

.section-blue {
    background: linear-gradient(180deg, #eff6ff, #ecfeff);
}

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

.section-head h2,
.page-hero h1,
.detail-title h1 {
    margin: 0;
    line-height: 1.15;
    letter-spacing: -0.035em;
}

.section-head h2 {
    font-size: clamp(28px, 4vw, 40px);
}

.section-head p {
    margin: 8px 0 0;
    color: var(--muted);
}

.text-link {
    color: var(--blue);
    font-weight: 800;
}

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

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

.movie-card,
.scroll-card,
.category-tile,
.info-panel,
.filter-panel,
.search-panel {
    background: var(--panel);
    border: 1px solid rgba(226, 232, 240, 0.86);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.movie-card {
    overflow: hidden;
    border-radius: 22px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

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

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

.movie-card:hover .card-cover img,
.scroll-card:hover img,
.related-card:hover img {
    transform: scale(1.08);
}

.card-cover::after,
.scroll-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.72), transparent);
    transition: opacity 0.25s ease;
}

.movie-card:hover .card-cover::after,
.scroll-card:hover .scroll-cover::after {
    opacity: 1;
}

.card-play {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    color: #ffffff;
    border-radius: 999px;
    opacity: 0;
    background: rgba(37, 99, 235, 0.92);
    transform: translate(-50%, -50%) scale(0.85);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .card-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.card-type,
.rank-badge {
    position: absolute;
    z-index: 3;
    top: 12px;
    padding: 5px 10px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    border-radius: 999px;
}

.card-type {
    right: 12px;
    background: rgba(37, 99, 235, 0.92);
}

.rank-badge {
    left: 12px;
    background: linear-gradient(135deg, var(--orange), #ef4444);
}

.card-body {
    padding: 18px;
}

.card-title {
    display: -webkit-box;
    min-height: 52px;
    overflow: hidden;
    color: #111827;
    font-size: 18px;
    font-weight: 900;
    line-height: 1.4;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-title:hover {
    color: var(--blue);
}

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

.card-meta,
.card-tags {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--muted);
    font-size: 13px;
}

.card-tags {
    justify-content: flex-start;
    margin-top: 12px;
}

.card-tags span,
.detail-tags span {
    display: inline-flex;
    max-width: 100%;
    padding: 4px 9px;
    color: #0369a1;
    border-radius: 999px;
    background: #e0f2fe;
}

.scroll-row {
    display: flex;
    gap: 22px;
    overflow-x: auto;
    padding: 6px 0 18px;
    scrollbar-width: thin;
}

.scroll-card {
    width: 330px;
    flex: 0 0 auto;
    overflow: hidden;
    border-radius: 24px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.scroll-card:hover {
    transform: scale(1.03);
    box-shadow: var(--shadow);
}

.scroll-cover {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 10;
}

.scroll-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.scroll-cover span {
    position: absolute;
    left: 14px;
    top: 14px;
    z-index: 2;
    padding: 5px 11px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
    border-radius: 999px;
    background: var(--emerald);
}

.scroll-body {
    padding: 18px;
}

.scroll-body a {
    display: block;
    margin-bottom: 8px;
    font-size: 19px;
    font-weight: 900;
}

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

.scroll-body small {
    color: var(--muted);
}

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

.category-tile {
    min-height: 156px;
    padding: 22px;
    border-radius: 24px;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

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

.category-tile span {
    display: block;
    margin-bottom: 10px;
    font-size: 22px;
    font-weight: 900;
}

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

.page-hero {
    color: #ffffff;
    background: radial-gradient(circle at 15% 10%, rgba(125, 211, 252, 0.28), transparent 24%), linear-gradient(135deg, #1e3a8a, #0891b2, #0f766e);
}

.page-hero .container {
    padding: 72px 0;
}

.page-hero h1 {
    max-width: 880px;
    font-size: clamp(34px, 5vw, 56px);
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
    color: #bfdbfe;
    font-weight: 700;
}

.filter-panel,
.search-panel {
    position: sticky;
    top: 86px;
    z-index: 20;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 190px 190px auto;
    gap: 12px;
    align-items: center;
    margin: -34px auto 34px;
    padding: 14px;
    border-radius: 22px;
}

.search-panel {
    position: relative;
    top: auto;
    margin: 24px 0 34px;
    grid-template-columns: minmax(0, 1fr) auto;
}

.filter-input,
.filter-select,
.search-hero input {
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
    border: 1px solid var(--soft);
    border-radius: 16px;
    background: #ffffff;
}

.filter-count {
    color: var(--muted);
    font-weight: 800;
    white-space: nowrap;
}

.empty-state {
    display: none;
    padding: 64px 24px;
    color: var(--muted);
    text-align: center;
    border: 1px dashed #cbd5e1;
    border-radius: 24px;
    background: #ffffff;
}

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

.detail-player {
    background: #020617;
}

.player-shell {
    position: relative;
    max-width: 1180px;
    margin: 0 auto;
    background: #000000;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    cursor: pointer;
    background: linear-gradient(to top, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.16));
}

.player-start {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    color: #ffffff;
    font-size: 30px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 24px 50px rgba(37, 99, 235, 0.38);
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
    padding: 42px 0 72px;
}

.info-panel {
    padding: 28px;
    border-radius: 24px;
}

.detail-title {
    display: flex;
    gap: 22px;
    align-items: flex-start;
}

.detail-title img {
    width: 190px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 18px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
}

.detail-title h1 {
    font-size: clamp(30px, 5vw, 46px);
}

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

.detail-meta span {
    padding: 6px 12px;
    color: #1d4ed8;
    font-weight: 800;
    border-radius: 999px;
    background: #dbeafe;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0 0;
}

.content-block {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--soft);
}

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

.content-block p {
    margin: 0;
    color: #334155;
}

.review-box {
    padding: 22px;
    border-radius: 18px;
    background: linear-gradient(135deg, #eff6ff, #ecfeff);
}

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

.sidebar h2 {
    margin: 0 0 8px;
    font-size: 22px;
}

.related-card {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid var(--soft);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.07);
}

.related-card img {
    width: 110px;
    height: 74px;
    object-fit: cover;
    border-radius: 12px;
    transition: transform 0.35s ease;
}

.related-card span {
    min-width: 0;
}

.related-card strong {
    display: -webkit-box;
    overflow: hidden;
    font-size: 15px;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.related-card em {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-style: normal;
    font-size: 12px;
}

.search-hero {
    color: #ffffff;
    background: linear-gradient(135deg, #020617, #1d4ed8, #0891b2);
}

.search-hero .container {
    padding: 76px 0;
}

.search-hero h1 {
    max-width: 760px;
    margin: 0 0 18px;
    font-size: clamp(34px, 6vw, 58px);
    line-height: 1.1;
}

.search-box-large {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    max-width: 760px;
    padding: 8px;
    border-radius: 22px;
    background: #ffffff;
}

.search-box-large input {
    padding: 0 16px;
    color: var(--ink);
}

.search-box-large button {
    padding: 0 26px;
}

.site-footer {
    color: #cbd5e1;
    background: #020617;
}

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

.footer-brand {
    color: #ffffff;
    font-size: 24px;
}

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

.site-footer p {
    max-width: 520px;
    margin: 14px 0 0;
}

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

.footer-links a {
    padding: 7px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.footer-links a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
}

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

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

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

    .hero-poster {
        max-width: 360px;
        transform: none;
    }

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

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

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

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

    .header-inner {
        height: 64px;
    }

    .brand-text {
        font-size: 19px;
    }

    .hero,
    .hero-content {
        min-height: 700px;
    }

    .hero-content {
        padding: 48px 0 106px;
    }

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

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

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

    .filter-panel,
    .search-panel,
    .search-box-large {
        grid-template-columns: 1fr;
    }

    .detail-title img {
        width: 100%;
        max-width: 260px;
    }

    .section {
        padding: 52px 0;
    }
}

@media (max-width: 460px) {
    .movie-grid {
        gap: 16px;
    }

    .info-panel {
        padding: 20px;
    }

    .related-card {
        grid-template-columns: 96px 1fr;
    }

    .related-card img {
        width: 96px;
        height: 66px;
    }
}
