* {
    box-sizing: border-box;
}

:root {
    color-scheme: light;
    --slate-950: #020617;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748b;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;
    --cyan-600: #0891b2;
    --cyan-500: #06b6d4;
    --cyan-400: #22d3ee;
    --blue-500: #3b82f6;
    --yellow-400: #facc15;
    --white: #ffffff;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.14);
    --shadow-soft: 0 10px 25px rgba(15, 23, 42, 0.1);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 12px;
    --container: 1180px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    color: var(--slate-900);
    background: linear-gradient(180deg, #f8fafc 0%, #eef6fb 45%, #f8fafc 100%);
    min-height: 100vh;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: var(--white);
    background: linear-gradient(90deg, var(--slate-950), var(--slate-800), var(--slate-950));
    border-bottom: 1px solid rgba(148, 163, 184, 0.24);
    box-shadow: 0 10px 30px rgba(2, 6, 23, 0.32);
}

.header-inner {
    max-width: var(--container);
    margin: 0 auto;
    height: 68px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--slate-900);
    background: linear-gradient(135deg, var(--cyan-400), var(--blue-500));
    box-shadow: 0 0 28px rgba(34, 211, 238, 0.4);
}

.brand-text {
    font-size: 20px;
    background: linear-gradient(90deg, var(--cyan-400), #60a5fa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.nav-link,
.mobile-link {
    color: #cbd5e1;
    font-weight: 650;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
    color: var(--cyan-400);
}

.nav-link:hover {
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    border: 0;
    border-radius: 12px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
}

.menu-toggle span {
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
}

.mobile-nav {
    display: none;
    padding: 10px 20px 18px;
    background: var(--slate-800);
    border-top: 1px solid rgba(148, 163, 184, 0.22);
}

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

.hero-slider {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    color: var(--white);
    background: radial-gradient(circle at 15% 25%, rgba(34, 211, 238, 0.28), transparent 28%), linear-gradient(135deg, var(--slate-950), #164e63 48%, var(--slate-950));
}

.hero-slides,
.hero-slide {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.7s ease, visibility 0.7s ease;
    background-image: linear-gradient(0deg, rgba(15, 23, 42, 0.96) 0%, rgba(15, 23, 42, 0.64) 45%, rgba(15, 23, 42, 0.36) 100%), var(--hero-image);
    background-position: center;
    background-size: cover;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
}

.hero-content {
    max-width: var(--container);
    height: 100%;
    margin: 0 auto;
    padding: 104px 20px 160px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.hero-kicker,
.section-kicker {
    margin: 0 0 12px;
    color: var(--cyan-400);
    font-size: 14px;
    font-weight: 850;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-content h1,
.hero-content h2 {
    max-width: 760px;
    margin: 0;
    color: var(--white);
    font-size: clamp(40px, 7vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

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

.hero-tags,
.detail-tags,
.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags {
    margin: 28px 0 0;
}

.hero-tags a,
.hero-tags span,
.detail-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 14px;
    border-radius: 999px;
    color: #cffafe;
    background: rgba(14, 116, 144, 0.35);
    border: 1px solid rgba(34, 211, 238, 0.42);
    backdrop-filter: blur(14px);
}

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

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

.primary-btn {
    color: var(--white);
    background: linear-gradient(90deg, var(--cyan-500), var(--blue-500));
    box-shadow: 0 16px 32px rgba(6, 182, 212, 0.25);
}

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

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

.ghost-btn.dark {
    color: var(--slate-900);
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(15, 23, 42, 0.08);
}

.hero-control {
    position: absolute;
    right: 34px;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    color: var(--white);
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
    cursor: pointer;
    font-size: 34px;
    line-height: 1;
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-control:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.hero-prev {
    bottom: 92px;
}

.hero-next {
    bottom: 34px;
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 46px;
    display: flex;
    gap: 9px;
    transform: translateX(-50%);
}

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

.hero-dot.is-active {
    width: 34px;
    background: var(--cyan-400);
}

.hero-search {
    position: absolute;
    left: 50%;
    bottom: 86px;
    width: min(640px, calc(100% - 40px));
    display: grid;
    grid-template-columns: 1fr auto;
    padding: 8px;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transform: translateX(-50%);
    backdrop-filter: blur(16px);
}

.hero-search input {
    min-width: 0;
    border: 0;
    outline: 0;
    color: var(--white);
    background: transparent;
    padding: 0 14px;
}

.hero-search input::placeholder {
    color: #94a3b8;
}

.hero-search button {
    border: 0;
    border-radius: 12px;
    color: var(--white);
    background: linear-gradient(90deg, var(--cyan-500), var(--blue-500));
    padding: 10px 20px;
    cursor: pointer;
    font-weight: 800;
}

.hero-category-bar {
    position: absolute;
    left: 50%;
    bottom: 16px;
    width: min(980px, calc(100% - 40px));
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
    transform: translateX(-50%);
}

.hero-category-bar a {
    flex: 0 0 auto;
    color: #e2e8f0;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
}

.intro-panel,
.content-section,
.detail-content,
.filter-panel {
    max-width: var(--container);
    margin: 0 auto;
}

.intro-panel {
    margin-top: -44px;
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding: 34px;
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.intro-copy h2,
.section-head h2,
.detail-article h1,
.detail-article h2 {
    margin: 0;
    letter-spacing: -0.035em;
}

.intro-copy p:last-child {
    max-width: 730px;
    margin: 12px 0 0;
    color: var(--slate-600);
    line-height: 1.8;
}

.content-section {
    padding: 70px 20px;
}

.content-section.section-dark,
.content-section.soft-bg {
    max-width: none;
}

.content-section.section-dark {
    color: var(--white);
    background: linear-gradient(90deg, var(--slate-950), #164e63);
}

.content-section.soft-bg {
    background: linear-gradient(135deg, #ecfeff, #eff6ff);
}

.content-section.section-dark .section-head,
.content-section.soft-bg .section-head,
.content-section.section-dark .movie-row,
.content-section.soft-bg .category-grid {
    max-width: var(--container);
    margin-left: auto;
    margin-right: auto;
}

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

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

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

.section-dark .section-more {
    color: var(--cyan-400);
}

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

.rank-grid {
    counter-reset: rank;
}

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

.movie-row {
    display: flex;
    gap: 22px;
    overflow-x: auto;
    padding-bottom: 12px;
}

.movie-row .movie-card {
    width: 310px;
    flex: 0 0 310px;
}

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

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

.card-link {
    display: flex;
    height: 100%;
    flex-direction: column;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-soft);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.card-poster {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(135deg, var(--slate-800), var(--slate-950));
}

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

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

.card-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.74), transparent 60%);
    pointer-events: none;
}

.card-year,
.card-duration,
.rank-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 9px;
    border-radius: 999px;
    color: var(--white);
    font-size: 12px;
    font-weight: 800;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(8px);
}

.card-year {
    top: 10px;
    right: 10px;
}

.card-duration {
    right: 10px;
    bottom: 10px;
}

.rank-badge {
    left: 10px;
    top: 10px;
    color: var(--slate-950);
    background: linear-gradient(135deg, var(--yellow-400), #fb923c);
}

.card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
}

.card-category {
    align-self: flex-start;
    color: #0e7490;
    background: #cffafe;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.card-title {
    color: var(--slate-900);
    font-size: 18px;
    line-height: 1.35;
    font-weight: 850;
}

.card-desc {
    color: var(--slate-600);
    font-size: 14px;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-tags span {
    color: var(--slate-500);
    font-size: 12px;
    line-height: 1;
}

.movie-card-horizontal .card-link {
    flex-direction: row;
}

.movie-card-horizontal .card-poster {
    width: 260px;
    flex: 0 0 260px;
    aspect-ratio: auto;
}

.movie-card-horizontal .card-body {
    justify-content: center;
}

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

.category-card,
.category-overview-card {
    min-height: 260px;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    background-image: linear-gradient(0deg, rgba(2, 6, 23, 0.9), rgba(15, 23, 42, 0.38)), var(--category-cover);
    background-size: cover;
    background-position: center;
    box-shadow: var(--shadow-soft);
}

.category-card a,
.category-overview-main {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: end;
    padding: 26px;
    color: var(--white);
}

.category-card-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 15% 15%, rgba(34, 211, 238, 0.32), transparent 35%);
}

.category-card-body {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 10px;
}

.category-name {
    font-size: 27px;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.category-desc {
    color: #dbeafe;
    line-height: 1.7;
}

.category-inline-links,
.category-feature-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.category-inline-links a,
.category-feature-links a {
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    color: #cffafe;
    background: rgba(8, 145, 178, 0.34);
    border: 1px solid rgba(34, 211, 238, 0.3);
}

.category-overview-card {
    min-height: 340px;
}

.category-feature-links {
    position: absolute;
    left: 26px;
    right: 26px;
    bottom: 24px;
    z-index: 3;
}

.page-hero,
.detail-hero {
    color: var(--white);
    background: radial-gradient(circle at 18% 22%, rgba(34, 211, 238, 0.22), transparent 30%), linear-gradient(135deg, var(--slate-950), #164e63 55%, var(--slate-900));
}

.page-hero {
    padding: 86px 20px;
}

.page-hero > div,
.detail-hero > div,
.detail-layout,
.detail-breadcrumb {
    max-width: var(--container);
    margin-left: auto;
    margin-right: auto;
}

.page-hero h1 {
    margin: 0;
    font-size: clamp(36px, 5vw, 58px);
    letter-spacing: -0.055em;
}

.page-hero p:last-child {
    max-width: 760px;
    color: #cbd5e1;
    font-size: 18px;
    line-height: 1.8;
}

.filter-panel {
    margin-top: -30px;
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 14px;
    padding: 20px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(14px);
}

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

.filter-panel label {
    display: grid;
    gap: 8px;
    color: var(--slate-700);
    font-size: 13px;
    font-weight: 800;
}

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

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--cyan-500);
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.12);
}

.detail-hero {
    padding: 28px 20px 68px;
}

.detail-breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #cbd5e1;
    font-size: 14px;
    padding: 18px 0 26px;
}

.detail-breadcrumb a {
    color: var(--cyan-400);
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 26px;
    align-items: stretch;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: #000;
    box-shadow: 0 30px 70px rgba(2, 6, 23, 0.35);
    aspect-ratio: 16 / 9;
}

.movie-player {
    display: block;
    width: 100%;
    height: 100%;
    background: #000;
}

.play-cover {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: var(--white);
    cursor: pointer;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.24));
}

.play-cover.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-icon {
    width: 78px;
    height: 78px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--slate-950);
    background: linear-gradient(135deg, var(--cyan-400), var(--blue-500));
    box-shadow: 0 0 44px rgba(34, 211, 238, 0.44);
    font-size: 34px;
    padding-left: 5px;
}

.detail-side {
    display: grid;
    gap: 16px;
    align-content: start;
}

.detail-side img {
    border-radius: var(--radius-lg);
    aspect-ratio: 3 / 4;
    object-fit: cover;
    background: var(--slate-800);
    box-shadow: var(--shadow-soft);
}

.detail-meta-card {
    padding: 18px;
    border-radius: var(--radius-lg);
    color: #dbeafe;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.detail-meta-card p {
    margin: 0 0 8px;
}

.detail-meta-card p:last-child {
    margin-bottom: 0;
}

.detail-content {
    padding: 54px 20px 10px;
}

.detail-article {
    max-width: 860px;
}

.detail-article h1 {
    font-size: clamp(34px, 4.5vw, 56px);
}

.detail-article h2 {
    margin-top: 34px;
    font-size: 28px;
}

.detail-article p {
    color: var(--slate-600);
    line-height: 2;
    font-size: 17px;
}

.detail-article .lead-text {
    color: var(--slate-700);
    font-size: 20px;
    font-weight: 650;
}

.detail-tags {
    margin: 22px 0 4px;
}

.detail-tags span {
    color: #075985;
    background: #cffafe;
    border-color: #a5f3fc;
}

.site-footer {
    color: #cbd5e1;
    background: var(--slate-950);
    border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.footer-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 50px 20px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
}

.footer-logo .brand-mark {
    width: 30px;
    height: 30px;
}

.footer-brand p {
    max-width: 420px;
    color: #94a3b8;
    line-height: 1.8;
}

.footer-links {
    display: grid;
    align-content: start;
    gap: 10px;
}

.footer-links h2 {
    margin: 0 0 8px;
    color: var(--white);
    font-size: 18px;
}

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

.footer-copy {
    padding: 20px;
    text-align: center;
    color: #64748b;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

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

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

    .detail-side {
        grid-template-columns: 180px 1fr;
        align-items: stretch;
    }

    .detail-side img {
        aspect-ratio: 3 / 4;
    }
}

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

    .menu-toggle {
        display: flex;
    }

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

    .hero-content {
        padding-top: 82px;
        padding-bottom: 250px;
    }

    .hero-control {
        display: none;
    }

    .intro-panel,
    .section-head,
    .footer-inner {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: flex-start;
    }

    .intro-panel {
        margin-left: 20px;
        margin-right: 20px;
    }

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

    .filter-panel,
    .full-filter {
        margin-left: 20px;
        margin-right: 20px;
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .header-inner {
        height: 62px;
    }

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

    .hero-content h1,
    .hero-content h2 {
        font-size: 38px;
    }

    .hero-desc {
        font-size: 16px;
    }

    .hero-search {
        grid-template-columns: 1fr;
        gap: 8px;
    }

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

    .content-section {
        padding: 52px 20px;
    }

    .movie-card-horizontal .card-link {
        flex-direction: column;
    }

    .movie-card-horizontal .card-poster {
        width: 100%;
        flex-basis: auto;
        aspect-ratio: 16 / 9;
    }

    .detail-side {
        grid-template-columns: 1fr;
    }

    .detail-side img {
        max-width: 220px;
    }
}
