:root {
    color-scheme: light;
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-soft: #f1f5f9;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --brand: #2563eb;
    --brand-deep: #1e3a8a;
    --cyan: #06b6d4;
    --teal: #14b8a6;
    --gold: #f59e0b;
    --shadow: 0 24px 60px rgba(15, 23, 42, 0.14);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 45%, #eff6ff 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.header-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    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;
    background: linear-gradient(135deg, var(--brand), var(--cyan));
    border-radius: 14px;
    box-shadow: 0 16px 35px rgba(37, 99, 235, 0.35);
}

.brand-text {
    font-size: 1.22rem;
}

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

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

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--cyan));
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    background: var(--surface-soft);
    border-radius: 14px;
    cursor: pointer;
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    background: #0f172a;
    border-radius: 99px;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 12px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
}

.hero-section {
    position: relative;
    overflow: hidden;
    min-height: 680px;
    color: #ffffff;
    background: radial-gradient(circle at 20% 20%, rgba(6, 182, 212, 0.32), transparent 34%), linear-gradient(135deg, #0f2a64 0%, #16213f 48%, #0f172a 100%);
}

.hero-grid-bg {
    position: absolute;
    inset: 0;
    opacity: 0.16;
    background-image: linear-gradient(rgba(255, 255, 255, 0.18) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.18) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: linear-gradient(to bottom, black, transparent 88%);
}

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

.hero-inner {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 92px 0 150px;
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.7fr);
    align-items: center;
    gap: 56px;
    opacity: 0;
    transform: translateY(18px) scale(0.98);
    pointer-events: none;
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.hero-slide.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #67e8f9;
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
    margin: 14px 0 10px;
    font-size: clamp(2.5rem, 5vw, 5.6rem);
    line-height: 1.02;
    letter-spacing: -0.07em;
}

.hero-copy h1 {
    max-width: 760px;
    background: linear-gradient(120deg, #dbeafe 0%, #ffffff 44%, #67e8f9 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-copy h2 {
    margin: 0 0 18px;
    font-size: clamp(1.45rem, 3vw, 3rem);
    line-height: 1.16;
}

.hero-copy p,
.page-hero p,
.detail-one-line {
    margin: 0;
    max-width: 720px;
    color: #cbd5e1;
    font-size: clamp(1.03rem, 1.6vw, 1.35rem);
}

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

.hero-tags {
    margin: 24px 0 30px;
}

.hero-tags span,
.tag-row span {
    padding: 7px 10px;
    color: #0f172a;
    background: rgba(255, 255, 255, 0.88);
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 800;
}

.hero-actions,
.detail-copy .primary-btn {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}

.primary-btn,
.ghost-btn,
.home-search button,
.section-heading a,
.category-preview .section-heading a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 14px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn,
.home-search button {
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--cyan));
    box-shadow: 0 18px 35px rgba(37, 99, 235, 0.35);
}

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

.primary-btn:hover,
.ghost-btn:hover,
.home-search button:hover,
.section-heading a:hover {
    transform: translateY(-2px);
}

.hero-poster {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 34px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.35), rgba(6, 182, 212, 0.18));
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.4);
}

.hero-poster img,
.card-cover img,
.rank-item img,
.detail-poster img,
.detail-backdrop img,
.movie-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.poster-shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.26) 45%, transparent 60%);
    transform: translateX(-120%);
    animation: shine 4.8s ease-in-out infinite;
}

@keyframes shine {
    0%, 55% {
        transform: translateX(-120%);
    }
    100% {
        transform: translateX(120%);
    }
}

.hero-bottom {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

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

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

.hero-dot.active {
    width: 34px;
    background: #ffffff;
}

.hero-category-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.hero-category-links a {
    padding: 9px 12px;
    color: #e0f2fe;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    font-weight: 800;
}

.home-search-panel {
    width: min(940px, calc(100% - 32px));
    margin: -58px auto 42px;
    position: relative;
    z-index: 4;
}

.home-search,
.filter-shell {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 22px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.home-search input,
.search-box input,
.filter-controls select {
    width: 100%;
    min-height: 48px;
    color: #0f172a;
    background: var(--surface-soft);
    border: 1px solid transparent;
    border-radius: 14px;
    outline: none;
}

.home-search input,
.search-box input {
    padding: 0 16px;
}

.home-search input:focus,
.search-box input:focus,
.filter-controls select:focus {
    border-color: rgba(37, 99, 235, 0.45);
    background: #ffffff;
}

.section-wrap,
.content-shell,
.category-preview-wrap,
.detail-content,
.player-section {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.section-wrap {
    padding: 70px 0;
}

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

.section-heading h2 {
    margin: 6px 0 0;
    font-size: clamp(1.8rem, 3vw, 3rem);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.section-heading p {
    max-width: 620px;
    margin: 8px 0 0;
    color: var(--muted);
}

.section-heading a {
    color: var(--brand);
    background: #dbeafe;
}

.section-heading.light h2,
.section-heading.light a,
.category-band .section-kicker {
    color: #ffffff;
}

.section-heading.light a {
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

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

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

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

.movie-card {
    overflow: hidden;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(226, 232, 240, 0.88);
    border-radius: var(--radius);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(37, 99, 235, 0.32);
    box-shadow: 0 26px 60px rgba(15, 23, 42, 0.16);
}

.card-cover {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, #cbd5e1, #dbeafe);
}

.feature .card-cover,
.mini .card-cover {
    aspect-ratio: 16 / 10;
}

.card-cover img {
    transition: transform 0.45s ease;
}

.movie-card:hover .card-cover img {
    transform: scale(1.06);
}

.play-float {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    color: var(--brand);
    background: rgba(255, 255, 255, 0.9);
    border-radius: 999px;
    transform: translate(-50%, -50%) scale(0.84);
    opacity: 0;
    transition: 0.24s ease;
}

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

.cover-region,
.rank-badge {
    position: absolute;
    top: 12px;
    z-index: 2;
    padding: 6px 9px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 900;
}

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

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

.card-body {
    padding: 16px;
}

.card-body h3 {
    margin: 0 0 8px;
    font-size: 1.06rem;
    line-height: 1.35;
}

.card-body h3 a:hover {
    color: var(--brand);
}

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

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.card-meta span {
    padding: 5px 8px;
    color: #1d4ed8;
    background: #dbeafe;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
}

.tag-row span {
    color: #334155;
    background: #f1f5f9;
}

.category-band {
    padding: 72px max(16px, calc((100% - 1180px) / 2));
    background: radial-gradient(circle at 84% 12%, rgba(6, 182, 212, 0.24), transparent 30%), linear-gradient(135deg, #0f172a, #1e3a8a 58%, #0f766e);
}

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

.category-tile {
    min-height: 230px;
    padding: 20px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 22px;
    backdrop-filter: blur(16px);
    transition: 0.24s ease;
}

.category-tile:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.16);
}

.category-tile span {
    display: block;
    font-size: 1.18rem;
    font-weight: 900;
}

.category-tile p {
    min-height: 68px;
    color: #bfdbfe;
    font-size: 0.9rem;
}

.tile-thumbs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.tile-thumbs img {
    aspect-ratio: 1;
    width: 100%;
    object-fit: cover;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.2);
}

.rank-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
    gap: 28px;
    align-items: stretch;
}

.rank-panel,
.rank-side,
.story-card,
.filter-shell,
.category-preview {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.rank-panel,
.rank-side {
    padding: 26px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 38px 54px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: #f8fafc;
    border-radius: 16px;
}

.rank-index {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--cyan));
    border-radius: 10px;
    font-weight: 900;
}

.rank-item img {
    aspect-ratio: 1;
    border-radius: 12px;
    background: #e2e8f0;
}

.rank-title,
.rank-meta {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-title {
    font-weight: 900;
}

.rank-meta {
    grid-column: 3;
    color: var(--muted);
    font-size: 0.86rem;
}

.rank-side {
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #ffffff;
    background: radial-gradient(circle at top right, rgba(6, 182, 212, 0.35), transparent 35%), linear-gradient(135deg, #1e3a8a, #0f172a);
}

.rank-side h2 {
    margin: 0 0 10px;
    font-size: clamp(2rem, 3vw, 3.4rem);
    letter-spacing: -0.05em;
}

.rank-side p {
    color: #cbd5e1;
}

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 92px max(16px, calc((100% - 1180px) / 2));
    color: #ffffff;
    background: radial-gradient(circle at 20% 30%, rgba(14, 165, 233, 0.32), transparent 36%), linear-gradient(135deg, #0f172a, #1e3a8a 52%, #0f766e);
}

.page-hero > div {
    max-width: 800px;
}

.content-shell {
    padding: 36px 0 80px;
}

.filter-shell {
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    flex: 1 1 300px;
}

.search-box span {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
}

.search-box input {
    padding-left: 42px;
}

.filter-controls {
    display: flex;
    flex: 2 1 520px;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-controls select {
    width: auto;
    min-width: 150px;
    padding: 0 12px;
}

.category-preview-wrap {
    padding: 42px 0 80px;
    display: grid;
    gap: 28px;
}

.category-preview {
    padding: 26px;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: #0f172a;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    opacity: 0.28;
    filter: blur(8px) saturate(1.2);
    transform: scale(1.04);
}

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.66), rgba(15, 23, 42, 0.9));
}

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

.breadcrumb {
    display: inline-flex;
    margin-bottom: 24px;
    padding: 8px 12px;
    color: #dbeafe;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    font-weight: 800;
}

.detail-main {
    display: grid;
    grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
    align-items: center;
    gap: 42px;
}

.detail-poster {
    overflow: hidden;
    aspect-ratio: 3 / 4;
    border-radius: 28px;
    background: #1e293b;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.detail-copy h1 {
    color: #ffffff;
}

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

.detail-meta span {
    padding: 9px 12px;
    color: #dbeafe;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    font-weight: 800;
}

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

.player-section {
    padding: 34px 0 0;
}

.player-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: radial-gradient(circle at center, #1e3a8a, #020617 64%);
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.movie-video {
    display: block;
    background: #020617;
}

.play-button {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 14px;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.58));
    cursor: pointer;
}

.play-circle {
    width: 74px;
    height: 74px;
    display: grid;
    place-items: center;
    padding-left: 5px;
    color: var(--brand);
    background: rgba(255, 255, 255, 0.94);
    border-radius: 999px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.24);
}

.player-shell.is-playing .play-button {
    opacity: 0;
    pointer-events: none;
}

.player-status {
    position: absolute;
    left: 18px;
    bottom: 16px;
    z-index: 4;
    padding: 7px 10px;
    color: #dbeafe;
    background: rgba(15, 23, 42, 0.7);
    border-radius: 999px;
    font-size: 0.86rem;
}

.player-shell.is-playing .player-status {
    display: none;
}

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

.story-card {
    padding: 26px;
}

.story-card h2 {
    margin: 0 0 12px;
}

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

.related-section {
    padding-top: 48px;
}

.site-footer {
    color: #dbeafe;
    background: #0f172a;
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0;
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 34px;
}

.footer-brand {
    font-size: 1.25rem;
}

.footer-inner p {
    color: #94a3b8;
}

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

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

.is-hidden {
    display: none !important;
}

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

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

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

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

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

    .menu-toggle {
        display: flex;
    }

    .mobile-nav.open {
        display: grid;
    }

    .hero-inner {
        padding-top: 62px;
    }

    .hero-section {
        min-height: 760px;
    }

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

    .hero-slide {
        gap: 28px;
    }

    .hero-bottom {
        align-items: flex-start;
        flex-direction: column;
        bottom: 34px;
    }

    .home-search,
    .filter-shell {
        align-items: stretch;
        flex-direction: column;
    }

    .home-search button,
    .filter-controls select {
        width: 100%;
    }

    .movie-grid,
    .feature-grid,
    .mini-grid,
    .category-grid,
    .rank-list {
        grid-template-columns: 1fr;
    }

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

    .page-hero {
        padding-top: 64px;
        padding-bottom: 64px;
    }

    .detail-inner {
        padding-top: 26px;
    }
}
