:root {
    --sky-50: #f0f9ff;
    --sky-100: #e0f2fe;
    --sky-400: #38bdf8;
    --sky-500: #0ea5e9;
    --sky-600: #0284c7;
    --blue-500: #3b82f6;
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
    --black: #020617;
    --shadow-sm: 0 8px 22px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 16px 38px rgba(14, 165, 233, 0.16);
    --shadow-lg: 0 25px 70px rgba(15, 23, 42, 0.18);
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--gray-800);
    background: linear-gradient(180deg, rgba(240, 249, 255, 0.55), #ffffff 36%, #ffffff);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(125, 211, 252, 0.45);
    background: linear-gradient(90deg, rgba(240, 249, 255, 0.95), rgba(248, 250, 252, 0.95));
    backdrop-filter: blur(18px);
}

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

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

.brand-icon {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 14px;
    color: var(--white);
    background: linear-gradient(135deg, var(--sky-400), var(--blue-500));
    box-shadow: var(--shadow-md);
    font-size: 15px;
}

.brand-text {
    display: grid;
    gap: 1px;
}

.brand strong {
    font-size: 21px;
    line-height: 1.1;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, var(--sky-600), #2563eb);
    -webkit-background-clip: text;
    color: transparent;
}

.brand small {
    color: var(--gray-500);
    font-size: 12px;
}

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

.desktop-nav a,
.mobile-nav a {
    border-radius: 12px;
    color: var(--gray-600);
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a {
    padding: 10px 15px;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
    color: var(--sky-600);
    background: var(--sky-100);
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(14, 165, 233, 0.08);
}

.mobile-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    border-radius: 999px;
    background: var(--gray-700);
}

.mobile-nav {
    display: none;
    padding: 0 16px 16px;
}

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

.mobile-nav a {
    padding: 11px 14px;
}

.page-shell {
    padding: 34px 0 8px;
}

.hero-slider {
    position: relative;
    min-height: 560px;
    margin-bottom: 64px;
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: var(--black);
    box-shadow: var(--shadow-lg);
}

.hero-track,
.hero-slide,
.hero-slide img,
.hero-shade {
    position: absolute;
    inset: 0;
}

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

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

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

.hero-shade {
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.86), rgba(2, 6, 23, 0.58) 48%, rgba(2, 6, 23, 0.12));
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(680px, calc(100% - 44px));
    padding: 82px 0 120px 54px;
    color: var(--white);
}

.hero-badges,
.hero-tags,
.hero-actions,
.hero-meta,
.meta-row,
.tag-row,
.pill-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-badges span,
.hero-tags span {
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
}

.hero-badges span:first-child {
    background: var(--sky-500);
    padding: 7px 16px;
}

.hero-badges span:last-child,
.hero-tags span {
    padding: 7px 14px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

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

.hero-content p {
    max-width: 620px;
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
}

.hero-meta {
    margin-bottom: 24px;
    color: rgba(255, 255, 255, 0.76);
}

.hero-meta i {
    width: 5px;
    height: 5px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.56);
}

.hero-tags {
    margin-bottom: 30px;
}

.primary-btn,
.ghost-btn,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.primary-btn {
    min-height: 46px;
    padding: 0 26px;
    color: var(--white);
    background: var(--sky-500);
    box-shadow: var(--shadow-md);
}

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

.primary-btn:hover {
    background: var(--sky-600);
    box-shadow: var(--shadow-lg);
}

.ghost-btn {
    min-height: 46px;
    padding: 0 24px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    color: var(--white);
    background: rgba(2, 6, 23, 0.52);
    backdrop-filter: blur(10px);
    transform: translateY(-50%);
    font-size: 30px;
    line-height: 1;
}

.hero-arrow:hover {
    background: rgba(2, 6, 23, 0.72);
}

.hero-arrow.prev {
    left: 18px;
}

.hero-arrow.next {
    right: 18px;
}

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

.hero-dots button {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.5);
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dots button.is-active {
    width: 34px;
    background: var(--white);
}

.hero-search {
    position: absolute;
    z-index: 5;
    right: 36px;
    bottom: 42px;
    display: flex;
    width: min(420px, calc(100% - 72px));
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(18px);
}

.hero-search input,
.hero-search button {
    border: 0;
    outline: none;
}

.hero-search input {
    flex: 1;
    min-width: 0;
    padding: 15px 18px;
    color: var(--white);
    background: transparent;
}

.hero-search input::placeholder {
    color: rgba(255, 255, 255, 0.72);
}

.hero-search button {
    padding: 0 22px;
    color: var(--white);
    background: var(--sky-500);
    font-weight: 800;
}

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

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

.section-heading h2,
.page-hero h1,
.filter-panel h2 {
    margin: 0;
    color: var(--gray-800);
    letter-spacing: -0.03em;
}

.section-heading h2 {
    font-size: clamp(26px, 3vw, 36px);
}

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

.text-link {
    color: var(--sky-600);
}

.horizontal-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 245px;
    gap: 18px;
    overflow-x: auto;
    margin: 0 -16px;
    padding: 0 16px 14px;
    scroll-snap-type: x proximity;
}

.movie-grid {
    display: grid;
    gap: 20px;
}

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

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

.movie-card,
.movie-list-card,
.category-card,
.category-overview-card,
.detail-card,
.filter-panel,
.ranking-strip,
.watch-panel,
.page-hero {
    border: 1px solid rgba(226, 232, 240, 0.88);
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.movie-card {
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    scroll-snap-align: start;
}

.movie-card:hover,
.movie-list-card:hover,
.category-card:hover,
.category-overview-card:hover {
    border-color: rgba(14, 165, 233, 0.28);
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: var(--slate-100);
}

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

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

.poster-badge,
.poster-mask {
    position: absolute;
    border-radius: 10px;
    color: var(--white);
}

.poster-badge {
    top: 12px;
    right: 12px;
    min-width: 34px;
    padding: 5px 9px;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(10px);
    font-size: 12px;
    font-style: normal;
    text-align: center;
}

.poster-badge b {
    display: block;
    font-size: 14px;
}

.poster-mask {
    inset: auto 12px 12px;
    display: grid;
    place-items: center;
    min-height: 38px;
    background: rgba(14, 165, 233, 0.92);
    font-size: 14px;
    font-weight: 800;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .poster-mask {
    opacity: 1;
    transform: translateY(0);
}

.movie-info {
    padding: 14px;
}

.movie-info h3,
.list-info h3 {
    margin: 0;
    overflow: hidden;
    color: var(--gray-800);
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 16px;
}

.movie-info h3 a:hover,
.list-info h3 a:hover,
.detail-info h1 a:hover {
    color: var(--sky-600);
}

.movie-meta {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-top: 8px;
    color: var(--gray-500);
    font-size: 12px;
}

.tag-row {
    margin-top: 12px;
}

.tag-row span,
.pill-row span,
.pill-row a,
.meta-row span,
.meta-row a {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    padding: 4px 9px;
    border-radius: 8px;
    color: var(--sky-600);
    background: var(--sky-50);
    font-size: 12px;
    font-weight: 700;
}

.compact {
    gap: 5px;
}

.movie-list-card {
    display: grid;
    grid-template-columns: 180px 1fr;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.list-thumb {
    min-height: 128px;
    background: var(--slate-100);
}

.list-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.list-info {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 18px;
}

.list-info p {
    margin: 8px 0 0;
    color: var(--gray-600);
}

.meta-row {
    margin-bottom: 9px;
}

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

.category-card,
.category-overview-card {
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.category-card {
    display: block;
}

.category-covers,
.overview-covers {
    display: grid;
    background: var(--slate-100);
}

.category-covers {
    grid-template-columns: repeat(3, 1fr);
    height: 130px;
}

.category-covers img,
.overview-covers img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-card > div:last-child,
.category-overview-card > div {
    padding: 18px;
}

.category-card span,
.category-overview-card span,
.page-hero span,
.ranking-strip span:first-child {
    color: var(--sky-600);
    font-weight: 900;
    letter-spacing: 0.06em;
}

.category-card h3,
.category-overview-card h2 {
    margin: 5px 0 8px;
    color: var(--gray-800);
}

.category-card p,
.category-overview-card p {
    margin: 0;
    color: var(--gray-600);
    font-size: 14px;
}

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

.overview-covers {
    grid-template-columns: repeat(4, 1fr);
    height: 180px;
}

.list-stack {
    display: grid;
    gap: 18px;
}

.ranking-strip {
    display: grid;
    grid-template-columns: 1fr 1.5fr auto;
    align-items: center;
    gap: 26px;
    padding: 28px;
    background: linear-gradient(135deg, #eff6ff, #ffffff 55%, #f0f9ff);
}

.ranking-strip h2 {
    margin: 4px 0 8px;
    font-size: 30px;
}

.ranking-strip p {
    margin: 0;
    color: var(--gray-600);
}

.ranking-mini,
.ranking-list {
    display: grid;
    gap: 10px;
}

.ranking-mini a,
.ranking-list a {
    display: grid;
    align-items: center;
    grid-template-columns: 34px 1fr auto;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.75);
    transition: background 0.2s ease, transform 0.2s ease;
}

.ranking-mini a:hover,
.ranking-list a:hover {
    background: var(--sky-50);
    transform: translateX(3px);
}

.ranking-mini b,
.ranking-list b {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 999px;
    color: var(--white);
    background: linear-gradient(135deg, var(--sky-400), var(--blue-500));
}

.ranking-mini span,
.ranking-list span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--gray-800);
    font-weight: 800;
}

.ranking-mini em,
.ranking-list em {
    color: var(--sky-600);
    font-style: normal;
    font-weight: 800;
}

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

.page-hero {
    margin-bottom: 30px;
    padding: 40px;
    background: linear-gradient(135deg, var(--sky-50), #ffffff 58%, #eff6ff);
}

.page-hero h1 {
    margin-top: 6px;
    font-size: clamp(34px, 5vw, 52px);
}

.compact-hero p {
    max-width: 760px;
    font-size: 17px;
}

.filter-panel {
    display: grid;
    grid-template-columns: 0.9fr 1.4fr;
    gap: 24px;
    align-items: center;
    margin-bottom: 30px;
    padding: 24px;
}

.filter-controls {
    display: grid;
    grid-template-columns: 1fr 160px 160px;
    gap: 12px;
}

.filter-controls input,
.filter-controls select {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 0 14px;
    color: var(--gray-700);
    background: var(--white);
    outline: none;
}

.filter-controls input:focus,
.filter-controls select:focus {
    border-color: var(--sky-400);
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.12);
}

.empty-state {
    padding: 40px;
    border-radius: var(--radius-lg);
    color: var(--gray-500);
    background: var(--gray-50);
    text-align: center;
}

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--gray-500);
    font-size: 14px;
}

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

.watch-panel {
    margin-bottom: 28px;
    padding: 12px;
    background: #020617;
    box-shadow: var(--shadow-lg);
}

.player-frame {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    background: #000;
    aspect-ratio: 16 / 9;
}

.player-frame video,
.player-cover,
.player-cover img,
.player-status {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.player-frame video {
    object-fit: contain;
    z-index: 1;
    background: #000;
}

.player-cover {
    z-index: 3;
    display: grid;
    place-items: center;
    border: 0;
    padding: 0;
    background: #000;
}

.player-cover img {
    object-fit: cover;
    filter: brightness(0.52);
}

.play-orb {
    position: relative;
    z-index: 2;
    display: grid;
    width: clamp(68px, 9vw, 96px);
    height: clamp(68px, 9vw, 96px);
    place-items: center;
    border-radius: 999px;
    color: var(--white);
    background: rgba(14, 165, 233, 0.92);
    box-shadow: 0 0 0 14px rgba(14, 165, 233, 0.16), var(--shadow-lg);
    font-size: 32px;
}

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

.player-status {
    z-index: 4;
    display: grid;
    place-items: center;
    color: var(--white);
    background: rgba(2, 6, 23, 0.84);
    font-weight: 800;
}

.player-status[hidden] {
    display: none;
}

.detail-shell {
    max-width: 1180px;
}

.detail-card {
    padding: 28px;
}

.detail-top {
    display: grid;
    grid-template-columns: 230px 1fr;
    gap: 28px;
    padding-bottom: 26px;
    border-bottom: 1px solid var(--gray-200);
}

.detail-poster {
    overflow: hidden;
    border-radius: 18px;
    background: var(--slate-100);
    box-shadow: var(--shadow-sm);
}

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

.detail-info h1 {
    margin: 14px 0 14px;
    color: var(--gray-900);
    font-size: clamp(32px, 4vw, 48px);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.lead-text {
    margin: 0 0 18px;
    color: var(--gray-700);
    font-size: 18px;
}

.detail-genre {
    margin-bottom: 14px;
    color: var(--gray-700);
}

.detail-tags {
    gap: 8px;
}

.story-block {
    padding-top: 26px;
}

.story-block h2 {
    margin: 0 0 12px;
    color: var(--gray-800);
    font-size: 24px;
}

.story-block p {
    margin: 0;
    color: var(--gray-700);
    font-size: 16px;
    line-height: 1.9;
}

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

.site-footer {
    margin-top: 70px;
    border-top: 1px solid var(--slate-200);
    background: linear-gradient(180deg, var(--slate-50), var(--slate-100));
}

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

.footer-brand p {
    max-width: 420px;
    margin: 16px 0 0;
    color: var(--gray-600);
}

.site-footer h3 {
    margin: 0 0 14px;
    color: var(--gray-800);
}

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

.footer-links a {
    color: var(--gray-600);
    font-size: 14px;
}

.footer-links a:hover {
    color: var(--sky-600);
}

.footer-bottom {
    padding: 18px 16px;
    border-top: 1px solid var(--slate-200);
    color: var(--gray-500);
    text-align: center;
    font-size: 14px;
}

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

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

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

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

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

    .mobile-toggle {
        display: block;
    }

    .hero-slider {
        min-height: 620px;
        border-radius: 20px;
    }

    .hero-shade {
        background: linear-gradient(180deg, rgba(2, 6, 23, 0.38), rgba(2, 6, 23, 0.86));
    }

    .hero-content {
        width: 100%;
        padding: 170px 22px 132px;
    }

    .hero-arrow {
        display: none;
    }

    .hero-search {
        right: 22px;
        bottom: 56px;
        width: calc(100% - 44px);
    }

    .section-heading {
        align-items: start;
        flex-direction: column;
    }

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

    .horizontal-row {
        grid-auto-columns: 210px;
    }

    .movie-list-card,
    .detail-top,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .list-thumb {
        aspect-ratio: 16 / 9;
    }

    .ranking-strip {
        padding: 22px;
    }

    .ranking-list {
        grid-template-columns: 1fr;
    }

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

    .page-hero,
    .detail-card,
    .filter-panel {
        padding: 24px;
    }

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

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

    .brand strong {
        font-size: 18px;
    }

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

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

    .hero-slider {
        min-height: 640px;
    }

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

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

    .primary-btn,
    .ghost-btn {
        width: 100%;
    }

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

    .hero-search button {
        min-height: 44px;
    }

    .large-grid,
    .six-grid,
    .category-grid,
    .category-overview-grid {
        gap: 14px;
    }

    .movie-info {
        padding: 11px;
    }

    .tag-row span,
    .pill-row span,
    .pill-row a,
    .meta-row span,
    .meta-row a {
        font-size: 11px;
    }

    .footer-links {
        grid-template-columns: 1fr;
    }
}
