:root {
    --slate-950: #020617;
    --slate-900: #0f172a;
    --slate-850: #111827;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748b;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;
    --cyan-500: #06b6d4;
    --cyan-400: #22d3ee;
    --blue-500: #3b82f6;
    --amber-400: #fbbf24;
    --white: #ffffff;
    --body: #f8fafc;
    --text: #172033;
    --muted: #64748b;
    --line: rgba(148, 163, 184, 0.25);
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.16);
    --soft-shadow: 0 12px 30px rgba(15, 23, 42, 0.10);
}

* {
    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(--text);
    background: radial-gradient(circle at top left, rgba(34, 211, 238, 0.12), transparent 34rem), var(--body);
    line-height: 1.6;
}

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

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: 50;
    color: var(--white);
    background: linear-gradient(90deg, var(--slate-900), var(--slate-800), var(--slate-900));
    box-shadow: 0 12px 32px rgba(2, 6, 23, 0.2);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: max-content;
}

.brand-mark {
    display: inline-grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 14px;
    color: var(--white);
    background: linear-gradient(135deg, var(--cyan-400), var(--blue-500));
    box-shadow: 0 12px 25px rgba(6, 182, 212, 0.22);
    transition: transform 0.25s ease;
}

.brand:hover .brand-mark {
    transform: scale(1.08) rotate(-2deg);
}

.brand-text strong {
    display: block;
    font-size: 1.35rem;
    line-height: 1.1;
    letter-spacing: 0.02em;
}

.brand-text small {
    display: block;
    margin-top: 3px;
    color: #cbd5e1;
    font-size: 0.76rem;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-left: auto;
}

.nav-link {
    position: relative;
    color: #e2e8f0;
    font-weight: 650;
    transition: color 0.2s ease;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 0;
    height: 2px;
    border-radius: 999px;
    background: var(--cyan-400);
    transition: width 0.2s ease;
}

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

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

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

.header-search input,
.mobile-search input,
.filter-panel input,
.filter-panel select {
    border: 1px solid var(--line);
    border-radius: 14px;
    outline: none;
    color: var(--text);
    background: var(--white);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
    width: 210px;
    padding: 10px 12px;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--cyan-400);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.16);
}

.header-search button,
.mobile-search button,
.hero-search button,
.btn-primary,
.btn-secondary {
    border: 0;
    border-radius: 14px;
    color: var(--white);
    background: linear-gradient(135deg, var(--cyan-500), var(--blue-500));
    box-shadow: 0 14px 30px rgba(14, 165, 233, 0.24);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.header-search button,
.mobile-search button {
    padding: 10px 14px;
}

.header-search button:hover,
.mobile-search button:hover,
.hero-search button:hover,
.btn-primary:hover,
.btn-secondary:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 36px rgba(14, 165, 233, 0.32);
}

.mobile-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    border-radius: 12px;
    padding: 8px 12px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.08);
}

.mobile-nav {
    display: none;
    padding: 12px 16px 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.10);
    background: var(--slate-900);
}

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

.mobile-search input {
    width: 100%;
    padding: 10px 12px;
}

.hero {
    position: relative;
    overflow: hidden;
    color: var(--white);
    background: var(--slate-950);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 70% 20%, rgba(34, 211, 238, 0.24), transparent 28rem);
    pointer-events: none;
}

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

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

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

.hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08) brightness(0.62);
    transform: scale(1.02);
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.20)), linear-gradient(0deg, rgba(2, 6, 23, 0.92), transparent 55%);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.04fr) 380px;
    gap: 44px;
    align-items: center;
    min-height: 640px;
    padding: 74px 0 96px;
}

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

.hero-kicker,
.section-kicker,
.detail-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    border: 1px solid rgba(34, 211, 238, 0.28);
    border-radius: 999px;
    padding: 7px 13px;
    color: #a5f3fc;
    background: rgba(8, 145, 178, 0.12);
    backdrop-filter: blur(14px);
    font-size: 0.88rem;
    font-weight: 700;
}

.hero h1 {
    margin: 0;
    font-size: clamp(2.45rem, 6vw, 5.8rem);
    line-height: 0.98;
    letter-spacing: -0.055em;
}

.hero h1 a:hover {
    color: var(--cyan-400);
}

.hero-summary {
    max-width: 690px;
    margin: 22px 0 0;
    color: #dbeafe;
    font-size: 1.08rem;
}

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

.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 20px;
    font-weight: 800;
}

.btn-secondary {
    color: var(--white);
    border: 1px solid rgba(226, 232, 240, 0.22);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: none;
    backdrop-filter: blur(14px);
}

.hero-search {
    display: flex;
    max-width: 620px;
    gap: 10px;
    border: 1px solid rgba(226, 232, 240, 0.20);
    border-radius: 20px;
    padding: 8px;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(16px);
}

.hero-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    border-radius: 14px;
    padding: 13px 14px;
    color: var(--white);
    outline: none;
    background: rgba(255, 255, 255, 0.10);
}

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

.hero-search button {
    padding: 0 20px;
    font-weight: 750;
}

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

.hero-tags span,
.tag-list span,
.detail-tags span {
    border-radius: 999px;
    padding: 5px 10px;
    color: #0e7490;
    background: #cffafe;
    font-size: 0.78rem;
    font-weight: 750;
}

.hero-tags span {
    color: #e0f2fe;
    background: rgba(255, 255, 255, 0.12);
}

.hero-panel {
    position: relative;
    border: 1px solid rgba(226, 232, 240, 0.18);
    border-radius: 30px;
    padding: 18px;
    background: rgba(15, 23, 42, 0.46);
    box-shadow: 0 30px 80px rgba(2, 6, 23, 0.42);
    backdrop-filter: blur(18px);
}

.hero-panel img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.hero-panel-info {
    margin-top: 14px;
}

.hero-panel-info strong {
    display: block;
    font-size: 1.18rem;
}

.hero-panel-info span {
    color: #bae6fd;
    font-size: 0.9rem;
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 30px;
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateX(-50%);
}

.hero-control,
.hero-dot {
    border: 0;
    color: var(--white);
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(12px);
    cursor: pointer;
}

.hero-control {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    font-size: 1.2rem;
}

.hero-dots {
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 28px;
    height: 8px;
    border-radius: 999px;
    padding: 0;
    transition: width 0.2s ease, background 0.2s ease;
}

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

.section {
    padding: 66px 0 0;
}

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

.section-heading h1,
.section-heading h2,
.page-title h1 {
    margin: 0;
    color: var(--slate-900);
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    letter-spacing: -0.035em;
    line-height: 1.08;
}

.section-heading p,
.page-title p {
    max-width: 760px;
    margin: 10px 0 0;
    color: var(--muted);
}

.more-link {
    display: inline-flex;
    align-items: center;
    min-width: max-content;
    color: #0891b2;
    font-weight: 800;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(203, 213, 225, 0.72);
    border-radius: 24px;
    background: var(--white);
    box-shadow: var(--soft-shadow);
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 211, 238, 0.52);
    box-shadow: var(--shadow);
}

.movie-poster {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, var(--slate-800), var(--slate-900));
}

.movie-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: transform 0.45s ease;
}

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

.poster-glow {
    position: absolute;
    inset: auto 0 0;
    height: 45%;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.76), transparent);
}

.score-badge,
.rank-no {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    color: var(--white);
    font-weight: 850;
}

.score-badge {
    right: 12px;
    bottom: 12px;
    padding: 5px 10px;
    background: rgba(8, 145, 178, 0.92);
}

.rank-no {
    left: 12px;
    top: 12px;
    min-width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #f97316, var(--amber-400));
    box-shadow: 0 8px 18px rgba(249, 115, 22, 0.22);
}

.movie-info {
    padding: 17px;
}

.movie-info h2 {
    margin: 8px 0 8px;
    color: var(--slate-900);
    font-size: 1.08rem;
    line-height: 1.28;
}

.movie-info h2 a:hover {
    color: #0891b2;
}

.movie-info p {
    min-height: 3.1em;
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 0.92rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    color: #0891b2;
    font-size: 0.78rem;
    font-weight: 800;
}

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

.category-card {
    overflow: hidden;
    border: 1px solid rgba(203, 213, 225, 0.72);
    border-radius: 28px;
    background: var(--white);
    box-shadow: var(--soft-shadow);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.category-thumbs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    padding: 12px 12px 0;
}

.category-thumbs img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 18px;
    background: var(--slate-800);
}

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

.category-card-body span {
    color: #0891b2;
    font-weight: 850;
    font-size: 0.82rem;
}

.category-card-body h2 {
    margin: 4px 0 8px;
    color: var(--slate-900);
    font-size: 1.3rem;
}

.category-card-body p {
    margin: 0;
    color: var(--muted);
}

.rank-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 28px;
    align-items: start;
}

.rank-list,
.side-panel {
    border: 1px solid rgba(203, 213, 225, 0.72);
    border-radius: 26px;
    padding: 18px;
    background: var(--white);
    box-shadow: var(--soft-shadow);
}

.rank-list h2,
.side-panel h2 {
    margin: 0 0 14px;
    font-size: 1.18rem;
    color: var(--slate-900);
}

.rank-item {
    display: grid;
    grid-template-columns: 40px 54px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 11px 0;
    border-bottom: 1px solid rgba(203, 213, 225, 0.65);
}

.rank-item:last-child {
    border-bottom: 0;
}

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

.rank-item img {
    width: 54px;
    height: 72px;
    object-fit: cover;
    border-radius: 12px;
    background: var(--slate-800);
}

.rank-title {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--slate-900);
    font-weight: 750;
}

.rank-item em {
    color: #0891b2;
    font-style: normal;
    font-weight: 900;
}

.page-hero {
    padding: 56px 0 0;
}

.page-title {
    border: 1px solid rgba(203, 213, 225, 0.72);
    border-radius: 30px;
    padding: 34px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(236, 254, 255, 0.72));
    box-shadow: var(--soft-shadow);
}

.filter-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 28px 0;
    border: 1px solid rgba(203, 213, 225, 0.72);
    border-radius: 24px;
    padding: 16px;
    background: var(--white);
    box-shadow: var(--soft-shadow);
}

.filter-search {
    display: flex;
    align-items: center;
    flex: 1;
    gap: 12px;
}

.filter-search span {
    color: #0891b2;
    font-weight: 850;
    white-space: nowrap;
}

.filter-panel input,
.filter-panel select {
    min-height: 44px;
    padding: 0 13px;
}

.filter-panel input {
    width: 100%;
}

.filter-selects {
    display: flex;
    gap: 10px;
}

.detail-hero {
    color: var(--white);
    background: radial-gradient(circle at 72% 12%, rgba(34, 211, 238, 0.22), transparent 26rem), linear-gradient(135deg, var(--slate-950), var(--slate-800));
}

.detail-hero-inner {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
    padding: 52px 0;
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 28px;
    box-shadow: 0 28px 70px rgba(2, 6, 23, 0.42);
    background: var(--slate-800);
}

.breadcrumb {
    margin-bottom: 18px;
    color: #cbd5e1;
    font-size: 0.9rem;
}

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

.detail-copy h1 {
    margin: 0;
    font-size: clamp(2.1rem, 4vw, 4.1rem);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

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

.detail-meta span {
    border-radius: 999px;
    padding: 7px 12px;
    color: #dff9ff;
    background: rgba(255, 255, 255, 0.12);
}

.detail-copy p {
    max-width: 850px;
    color: #dbeafe;
    font-size: 1.03rem;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 28px;
    align-items: start;
    padding-top: 42px;
}

.content-card,
.player-section {
    border: 1px solid rgba(203, 213, 225, 0.72);
    border-radius: 28px;
    padding: 24px;
    background: var(--white);
    box-shadow: var(--soft-shadow);
}

.content-card + .content-card,
.player-section + .content-card {
    margin-top: 24px;
}

.content-card h2,
.player-section h2 {
    margin: 0 0 14px;
    color: var(--slate-900);
    font-size: 1.45rem;
}

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

.content-card p + p {
    margin-top: 14px;
}

.video-frame {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: var(--slate-950);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.video-frame video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--slate-950);
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 12px;
    border: 0;
    color: var(--white);
    background: radial-gradient(circle at center, rgba(8, 145, 178, 0.14), rgba(2, 6, 23, 0.50));
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-circle {
    display: grid;
    place-items: center;
    width: 82px;
    height: 82px;
    border-radius: 50%;
    padding-left: 5px;
    color: var(--white);
    background: linear-gradient(135deg, var(--cyan-500), var(--blue-500));
    box-shadow: 0 20px 40px rgba(14, 165, 233, 0.38);
    font-size: 2rem;
}

.play-text {
    border-radius: 999px;
    padding: 8px 14px;
    background: rgba(15, 23, 42, 0.62);
    font-weight: 850;
}

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

.site-footer {
    margin-top: 70px;
    color: #cbd5e1;
    background: var(--slate-900);
}

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

.footer-brand {
    color: var(--white);
    margin-bottom: 12px;
}

.footer-grid p {
    margin: 0;
    max-width: 470px;
}

.footer-grid h2 {
    margin: 0 0 12px;
    color: var(--white);
    font-size: 1rem;
}

.footer-links {
    display: grid;
    gap: 8px;
}

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

.footer-bottom {
    border-top: 1px solid rgba(226, 232, 240, 0.10);
    padding: 18px 0 26px;
    color: #94a3b8;
    font-size: 0.92rem;
}

[hidden] {
    display: none !important;
}

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

    .mobile-toggle {
        display: inline-flex;
    }

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

    .hero-panel {
        max-width: 360px;
    }

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

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

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

    .header-inner {
        min-height: 66px;
    }

    .brand-text strong {
        font-size: 1.08rem;
    }

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

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

    .hero-content {
        padding: 46px 0 92px;
        gap: 26px;
    }

    .hero-search,
    .filter-panel,
    .filter-search,
    .filter-selects {
        flex-direction: column;
        align-items: stretch;
    }

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

    .hero-panel {
        max-width: 280px;
    }

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

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

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

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

    .content-card,
    .player-section,
    .page-title {
        padding: 20px;
    }
}

@media (max-width: 520px) {
    .movie-grid {
        grid-template-columns: 1fr;
    }

    .rank-item {
        grid-template-columns: 32px 44px minmax(0, 1fr) auto;
        gap: 9px;
    }

    .rank-item img {
        width: 44px;
        height: 60px;
    }
}
