* {
    box-sizing: border-box;
}

:root {
    color-scheme: light;
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-soft: #f1f5f9;
    --text: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --accent: #111827;
    --accent-soft: #334155;
    --shadow: 0 24px 70px rgba(15, 23, 42, 0.16);
    --radius: 22px;
}

html {
    scroll-behavior: smooth;
}

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

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

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

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

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

.nav-wrap {
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.logo {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, #0f172a, #475569);
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 0.02em;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.25);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
}

.main-nav::-webkit-scrollbar {
    display: none;
}

.main-nav a {
    white-space: nowrap;
    padding: 9px 12px;
    border-radius: 999px;
    color: #334155;
    font-size: 14px;
    font-weight: 650;
    transition: background 0.2s ease, color 0.2s ease;
}

.main-nav a:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.nav-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    border-radius: 12px;
    background: #0f172a;
    color: #ffffff;
    font-size: 20px;
    padding: 8px 12px;
}

.hero-carousel {
    position: relative;
    min-height: 640px;
    overflow: hidden;
    background: #0f172a;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.8s ease, transform 1.2s ease;
    pointer-events: none;
}

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.04) contrast(1.05);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 76% 28%, rgba(255, 255, 255, 0.18), transparent 26%),
        linear-gradient(90deg, rgba(15, 23, 42, 0.92) 0%, rgba(15, 23, 42, 0.72) 43%, rgba(15, 23, 42, 0.24) 100%),
        linear-gradient(0deg, rgba(15, 23, 42, 0.92) 0%, transparent 38%);
}

.hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
}

.hero-text {
    max-width: 720px;
    color: #ffffff;
    padding-top: 42px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

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

.hero-text h2 {
    margin: 0 0 18px;
    color: #e2e8f0;
    font-size: clamp(24px, 3vw, 38px);
}

.hero-text p {
    max-width: 640px;
    margin: 0 0 30px;
    color: #dbe4ef;
    font-size: 19px;
}

.hero-actions,
.section-head,
.footer-links,
.detail-tags,
.tag-row,
.quick-cats {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.btn,
.home-search button,
.search-panel button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border: 0;
    border-radius: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover,
.home-search button:hover,
.search-panel button:hover {
    transform: translateY(-1px);
}

.btn.primary,
.home-search button,
.search-panel button {
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.2);
}

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

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

.hero-dots button {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.42);
    cursor: pointer;
}

.hero-dots button.is-active {
    width: 34px;
    background: #ffffff;
}

.floating-panel {
    position: relative;
    z-index: 5;
    margin-top: -64px;
    padding: 24px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow);
    backdrop-filter: blur(20px);
}

.home-search,
.search-panel {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    margin-bottom: 18px;
}

.home-search input,
.search-panel input,
.filter-bar input {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #ffffff;
    color: var(--text);
    font-size: 15px;
    outline: none;
    padding: 0 16px;
}

.home-search button,
.search-panel button {
    background: #0f172a;
    color: #ffffff;
}

.pill-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #334155;
    font-size: 14px;
    font-weight: 700;
}

.pill-link span {
    color: #64748b;
    font-size: 12px;
}

.section-block {
    padding: 64px 0 24px;
}

.section-head {
    justify-content: space-between;
    margin-bottom: 26px;
}

.section-head h2,
.page-hero h1,
.detail-info h1,
.player-title h2,
.detail-content h2 {
    margin: 0;
    line-height: 1.12;
    letter-spacing: -0.03em;
}

.section-head h2,
.page-hero h1 {
    font-size: clamp(30px, 4vw, 46px);
}

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

.section-head a {
    color: #334155;
    font-weight: 800;
}

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

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

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

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 20px;
    background: #e2e8f0;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
}

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

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

.play-mark {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.5);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.92);
    transition: opacity 0.2s ease, transform 0.2s ease;
    backdrop-filter: blur(12px);
}

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

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    display: grid;
    min-width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 12px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(10px);
}

.movie-card-body {
    padding: 14px 2px 0;
}

.movie-card h3 {
    margin: 0 0 6px;
    font-size: 18px;
    line-height: 1.3;
}

.small-grid .movie-card h3 {
    font-size: 16px;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
}

.movie-card p {
    display: -webkit-box;
    min-height: 46px;
    margin: 8px 0 10px;
    overflow: hidden;
    color: #475569;
    font-size: 14px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.tag-row {
    gap: 6px;
}

.tag-row span,
.detail-tags span {
    display: inline-flex;
    padding: 4px 8px;
    border-radius: 999px;
    background: #e2e8f0;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
}

.wide-band {
    margin: 54px 0;
    padding: 70px 0;
    color: #ffffff;
    background:
        radial-gradient(circle at top right, rgba(148, 163, 184, 0.45), transparent 32%),
        linear-gradient(135deg, #0f172a, #334155 55%, #64748b);
}

.rank-layout {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 36px;
    align-items: start;
}

.rank-layout p {
    color: #cbd5e1;
    font-size: 17px;
}

.rank-list {
    display: grid;
    gap: 14px;
}

.rank-row {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 16px;
    padding: 12px;
    border-radius: 18px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.92);
}

.rank-cover {
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 14px;
    background: #e2e8f0;
}

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

.rank-row strong {
    color: #94a3b8;
    font-size: 13px;
}

.rank-row h3 {
    margin: 4px 0 4px;
    line-height: 1.25;
}

.rank-row p {
    display: -webkit-box;
    margin: 0 0 6px;
    overflow: hidden;
    color: #475569;
    font-size: 14px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.rank-row span {
    color: #64748b;
    font-size: 13px;
}

.all-previews {
    padding-bottom: 64px;
}

.category-preview {
    margin-bottom: 54px;
}

.page-hero,
.detail-hero {
    color: #ffffff;
    background:
        radial-gradient(circle at 76% 24%, rgba(255, 255, 255, 0.15), transparent 30%),
        linear-gradient(135deg, #0f172a, #334155 55%, #64748b);
}

.compact-hero {
    padding: 82px 0 70px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    color: #cbd5e1;
    font-size: 14px;
}

.breadcrumb a {
    color: #ffffff;
    font-weight: 750;
}

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

.category-tile a {
    display: block;
    min-height: 220px;
    padding: 28px;
    border-radius: 26px;
    color: #ffffff;
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.2), transparent 34%),
        linear-gradient(135deg, #0f172a, #475569);
    box-shadow: var(--shadow);
}

.category-tile span {
    color: #cbd5e1;
    font-size: 13px;
    font-weight: 800;
}

.category-tile h2 {
    margin: 18px 0 10px;
    font-size: 30px;
}

.category-tile p,
.category-tile em {
    color: #dbe4ef;
}

.category-tile em {
    display: block;
    margin-top: 18px;
    font-style: normal;
}

.filter-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 26px;
}

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

.detail-hero {
    padding: 58px 0 66px;
}

.detail-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 38px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border-radius: 26px;
    box-shadow: var(--shadow);
}

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

.detail-info h1 {
    margin-bottom: 18px;
    font-size: clamp(36px, 5vw, 62px);
}

.lead {
    max-width: 760px;
    margin: 0 0 20px;
    color: #dbe4ef;
    font-size: 19px;
}

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

.detail-tags span {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
}

.player-section {
    padding: 56px 0 24px;
}

.video-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #020617;
    box-shadow: var(--shadow);
}

.video-shell video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.big-play {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    width: 86px;
    height: 86px;
    place-items: center;
    border: 0;
    border-radius: 999px;
    color: #0f172a;
    background: rgba(255, 255, 255, 0.92);
    cursor: pointer;
    font-size: 34px;
    transform: translate(-50%, -50%);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.28);
}

.big-play.is-hidden {
    display: none;
}

.player-title {
    padding-top: 22px;
}

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

.detail-content {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 28px;
    padding: 34px 0 8px;
}

.detail-content article,
.detail-content aside {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 16px 45px rgba(15, 23, 42, 0.06);
}

.detail-content h2 {
    margin-bottom: 12px;
    font-size: 26px;
}

.detail-content p {
    margin: 0 0 24px;
    color: #334155;
}

.detail-content dl {
    display: grid;
    grid-template-columns: 76px 1fr;
    gap: 10px 14px;
    margin: 0;
}

.detail-content dt {
    color: #94a3b8;
    font-weight: 800;
}

.detail-content dd {
    margin: 0;
    color: #334155;
}

.rank-page-grid {
    padding-top: 44px;
}

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

.site-footer {
    margin-top: 70px;
    padding: 40px 0;
    border-top: 1px solid var(--line);
    background: #ffffff;
}

.footer-grid {
    display: flex;
    justify-content: space-between;
    gap: 24px;
}

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

.footer-links a {
    color: #475569;
    font-weight: 750;
}

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

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

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

@media (max-width: 760px) {
    .nav-wrap {
        align-items: flex-start;
        padding: 12px 0;
        flex-wrap: wrap;
    }

    .main-nav {
        order: 3;
        width: 100%;
    }

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

    .hero-carousel {
        min-height: 560px;
    }

    .hero-text p {
        font-size: 16px;
    }

    .home-search,
    .search-panel {
        grid-template-columns: 1fr;
    }

    .movie-grid,
    .small-grid,
    .category-grid,
    .detail-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

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

    .detail-poster {
        width: min(260px, 72vw);
    }

    .rank-row {
        grid-template-columns: 82px 1fr;
    }

    .footer-grid {
        flex-direction: column;
    }
}

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

    .floating-panel {
        padding: 16px;
    }

    .movie-grid,
    .small-grid,
    .category-grid {
        grid-template-columns: 1fr 1fr;
        gap: 14px;
    }

    .movie-card h3 {
        font-size: 15px;
    }

    .movie-card p,
    .tag-row {
        display: none;
    }

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