* {
    box-sizing: border-box;
}

:root {
    color-scheme: light;
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-soft: #f1f5f9;
    --text: #111827;
    --muted: #64748b;
    --line: #e5e7eb;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-soft: #dbeafe;
    --footer: #0f172a;
    --shadow: 0 20px 40px rgba(15, 23, 42, 0.10);
    --radius: 18px;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.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.92);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(16px);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.brand-icon {
    width: 34px;
    height: 34px;
    color: var(--primary);
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand-text strong {
    font-size: 20px;
    font-weight: 800;
}

.brand-text small {
    margin-top: 3px;
    font-size: 12px;
    color: var(--muted);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

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

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    color: var(--primary-dark);
    background: var(--primary-soft);
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: var(--surface-soft);
    padding: 10px;
}

.menu-button span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: #1f2937;
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    border-top: 1px solid var(--line);
    padding: 10px 16px 16px;
    background: white;
}

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

.hero {
    position: relative;
    height: 62vh;
    min-height: 520px;
    overflow: hidden;
    background: #111827;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    opacity: 0;
    background-position: center;
    background-size: cover;
    transition: opacity 0.8s ease;
}

.hero-slide.active {
    opacity: 1;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.88) 0%, rgba(15, 23, 42, 0.62) 47%, rgba(15, 23, 42, 0.18) 100%),
        linear-gradient(0deg, rgba(15, 23, 42, 0.72) 0%, rgba(15, 23, 42, 0.12) 45%, rgba(15, 23, 42, 0.38) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-copy {
    width: min(680px, 100%);
    color: white;
}

.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    margin-bottom: 18px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.88);
    backdrop-filter: blur(12px);
    font-weight: 800;
}

.hero-pill em {
    font-style: normal;
    color: rgba(255, 255, 255, 0.78);
}

.hero h1,
.hero h2 {
    margin: 0 0 14px;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.04;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.hero h2 + p,
.hero h1 + h2 + p {
    margin-top: 8px;
}

.hero p {
    margin: 0 0 24px;
    color: #dbeafe;
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.8;
}

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

.hero-tags span,
.tag-list span {
    border-radius: 999px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.18);
    color: white;
    font-size: 13px;
    font-weight: 700;
    backdrop-filter: blur(8px);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

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

.primary-button {
    color: white;
    background: var(--primary);
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.35);
}

.secondary-button {
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.42);
    background: rgba(15, 23, 42, 0.35);
    backdrop-filter: blur(10px);
}

.primary-button:hover,
.secondary-button:hover {
    transform: translateY(-2px);
}

.primary-button:hover {
    background: var(--primary-dark);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    color: white;
    background: rgba(15, 23, 42, 0.55);
    font-size: 36px;
    line-height: 1;
    transform: translateY(-50%);
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(15, 23, 42, 0.82);
    transform: translateY(-50%) scale(1.05);
}

.hero-prev {
    left: 20px;
}

.hero-next {
    right: 20px;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    padding: 0;
    background: rgba(255, 255, 255, 0.55);
    transition: width 0.2s ease, background 0.2s ease;
}

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

.intro-search {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: 34px;
    padding: 24px;
    border-radius: var(--radius);
    background: white;
    box-shadow: var(--shadow);
}

.intro-search h2,
.section-heading h2,
.page-hero h1,
.article-section h2,
.rank-panel h2 {
    margin: 0;
    color: #0f172a;
    font-weight: 900;
}

.intro-search p,
.page-hero p,
.category-tile span,
.category-section p,
.article-section p {
    color: var(--muted);
}

.page-main {
    padding: 28px 0 56px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 4px 0 20px;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumb a {
    color: var(--primary-dark);
    font-weight: 700;
}

.breadcrumb span::before,
.breadcrumb a + a::before {
    content: "/";
    margin-right: 10px;
    color: #cbd5e1;
}

.page-hero {
    margin-bottom: 26px;
    padding: 32px;
    border-radius: 24px;
    background:
        radial-gradient(circle at 12% 20%, rgba(37, 99, 235, 0.18), transparent 28%),
        linear-gradient(135deg, white, #eff6ff);
    box-shadow: var(--shadow);
}

.page-hero h1 {
    margin-bottom: 10px;
    font-size: clamp(32px, 5vw, 52px);
    letter-spacing: -0.04em;
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    font-size: 17px;
}

.small-hero {
    margin-bottom: 34px;
}

.section-block,
.category-section {
    margin-top: 42px;
}

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

.section-heading h2 {
    font-size: clamp(24px, 3vw, 34px);
    letter-spacing: -0.03em;
}

.section-heading a {
    color: var(--primary-dark);
    font-weight: 800;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.88);
    border-radius: 18px;
    background: white;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
    border-color: rgba(37, 99, 235, 0.35);
    box-shadow: 0 22px 36px rgba(15, 23, 42, 0.14);
    transform: translateY(-5px);
}

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

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #e2e8f0;
}

.movie-card-featured .poster-wrap {
    aspect-ratio: 16 / 9;
}

.poster-wrap img,
.detail-poster img,
.compact-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.poster-shade {
    position: absolute;
    inset: auto 0 0;
    height: 45%;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.78), transparent);
    opacity: 0.85;
}

.type-badge,
.year-badge,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    padding: 5px 9px;
    color: white;
    background: rgba(15, 23, 42, 0.72);
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(10px);
}

.type-badge {
    top: 10px;
    right: 10px;
}

.year-badge {
    left: 10px;
    bottom: 10px;
}

.rank-badge {
    left: 10px;
    top: 10px;
    background: rgba(37, 99, 235, 0.9);
}

.card-body {
    padding: 13px;
}

.card-body h2 {
    margin: 0 0 6px;
    font-size: 16px;
    line-height: 1.4;
    font-weight: 900;
}

.card-body h2 a:hover {
    color: var(--primary-dark);
}

.card-body p {
    display: -webkit-box;
    min-height: 44px;
    margin: 0 0 10px;
    overflow: hidden;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.7;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: #64748b;
    font-size: 12px;
}

.card-meta a {
    max-width: 58%;
    overflow: hidden;
    border-radius: 8px;
    padding: 4px 7px;
    color: var(--primary-dark);
    background: var(--primary-soft);
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.category-tile {
    min-height: 190px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 14px;
    padding: 22px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 22px;
    background: linear-gradient(145deg, #ffffff, #eff6ff);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.14);
}

.category-tile strong {
    font-size: 22px;
    font-weight: 900;
}

.category-tile em {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-style: normal;
    color: var(--primary-dark);
    font-size: 13px;
    font-weight: 700;
}

.movie-row {
    display: grid;
    grid-auto-columns: minmax(185px, 1fr);
    grid-auto-flow: column;
    gap: 18px;
    overflow-x: auto;
    padding: 4px 2px 18px;
    scroll-behavior: smooth;
    scrollbar-width: thin;
}

.movie-row .movie-card {
    min-width: 185px;
}

.scroll-actions {
    display: flex;
    gap: 8px;
}

.scroll-actions button {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 999px;
    background: white;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
    font-size: 26px;
}

.ranking-list,
.compact-grid {
    display: grid;
    gap: 12px;
}

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

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

.compact-card {
    display: flex;
    gap: 12px;
    align-items: center;
    min-width: 0;
    padding: 10px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 16px;
    background: white;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.07);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.compact-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12);
}

.compact-card img {
    width: 90px;
    height: 62px;
    flex: 0 0 auto;
    border-radius: 12px;
    background: #e2e8f0;
}

.compact-card span {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.compact-card strong {
    color: var(--primary-dark);
    font-size: 12px;
}

.compact-card em {
    overflow: hidden;
    color: #111827;
    font-style: normal;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.compact-card small {
    overflow: hidden;
    color: var(--muted);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-panel {
    display: grid;
    gap: 14px;
    margin-bottom: 28px;
    padding: 18px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 22px;
    background: white;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

.search-box {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid #dbeafe;
    border-radius: 16px;
    padding: 10px 14px;
    background: #f8fbff;
}

.search-box span {
    color: var(--primary-dark);
    font-weight: 900;
}

.search-box input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
}

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

.filter-chip {
    border: 0;
    border-radius: 999px;
    padding: 8px 13px;
    color: #334155;
    background: #eef2ff;
    font-size: 13px;
    font-weight: 800;
}

.filter-chip:hover,
.filter-chip.active {
    color: white;
    background: var(--primary);
}

.category-section {
    padding: 22px;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

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

.rank-panel {
    padding: 20px;
    border-radius: 22px;
    background: white;
    box-shadow: var(--shadow);
}

.rank-panel h2 {
    margin-bottom: 16px;
    font-size: 24px;
}

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

.player-card {
    overflow: hidden;
    border-radius: 26px;
    background: white;
    box-shadow: var(--shadow);
}

.video-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
}

.video-frame video {
    width: 100%;
    height: 100%;
    background: #000;
    object-fit: contain;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: white;
    background: rgba(2, 6, 23, 0.25);
    transition: background 0.2s ease, opacity 0.2s ease, visibility 0.2s ease;
}

.play-overlay:hover {
    background: rgba(2, 6, 23, 0.42);
}

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

.play-circle {
    width: 86px;
    height: 86px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding-left: 6px;
    color: #0f172a;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 20px 46px rgba(15, 23, 42, 0.35);
    font-size: 36px;
}

.detail-content {
    display: grid;
    grid-template-columns: 210px 1fr;
    gap: 26px;
    padding: 26px;
}

.detail-poster {
    overflow: hidden;
    border-radius: 18px;
    aspect-ratio: 3 / 4;
    background: #e2e8f0;
}

.detail-info h1 {
    margin: 0 0 12px;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.12;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.one-line {
    margin: 0 0 18px;
    color: #475569;
    font-size: 18px;
}

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

.detail-meta a,
.detail-meta span {
    border-radius: 999px;
    padding: 7px 12px;
    color: #1e3a8a;
    background: #dbeafe;
    font-size: 13px;
    font-weight: 800;
}

.detail-info .tag-list span {
    color: #334155;
    background: #f1f5f9;
}

.article-section {
    margin-top: 28px;
    padding: 26px;
    border-radius: 22px;
    background: white;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
}

.article-section h2 {
    margin-bottom: 12px;
    font-size: 26px;
}

.article-section p {
    margin: 0;
    font-size: 17px;
    line-height: 1.9;
}

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

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

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

.footer-brand {
    margin-bottom: 14px;
    color: white;
}

.footer-brand .brand-icon {
    color: #60a5fa;
}

.footer-brand div {
    display: grid;
    line-height: 1.2;
}

.footer-brand span {
    color: #94a3b8;
    font-size: 12px;
}

.site-footer p {
    margin: 0;
    color: #94a3b8;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: white;
    font-size: 18px;
}

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

.footer-links a:hover {
    color: #60a5fa;
}

.footer-bottom {
    padding: 18px;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    color: #94a3b8;
    text-align: center;
}

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

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

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

    .nav-category {
        display: none;
    }
}

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

    .nav-links {
        display: none;
    }

    .menu-button {
        display: block;
    }

    .hero {
        height: auto;
        min-height: 620px;
    }

    .hero-copy {
        padding: 64px 0 80px;
    }

    .hero-arrow {
        top: auto;
        bottom: 72px;
        width: 42px;
        height: 42px;
        font-size: 30px;
    }

    .hero-prev {
        left: 18px;
    }

    .hero-next {
        right: 18px;
    }

    .intro-search,
    .section-heading,
    .detail-content {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: flex-start;
    }

    .movie-grid,
    .related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .category-grid,
    .ranking-list,
    .compact-grid,
    .rank-columns,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .detail-content {
        display: grid;
        gap: 18px;
        padding: 18px;
    }

    .detail-poster {
        width: min(220px, 100%);
    }

    .page-hero,
    .article-section,
    .category-section {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .brand-text strong {
        font-size: 17px;
    }

    .brand-text small {
        display: none;
    }

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

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

    .poster-wrap {
        aspect-ratio: 16 / 10;
    }

    .search-box {
        align-items: stretch;
        flex-direction: column;
        gap: 6px;
    }
}
