* {
    box-sizing: border-box;
}

:root {
    --bg: #f9fafb;
    --paper: #ffffff;
    --ink: #111827;
    --muted: #6b7280;
    --soft: #f3f4f6;
    --line: #e5e7eb;
    --teal: #0d9488;
    --teal-dark: #0f766e;
    --cyan: #0891b2;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.10);
    --small-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    --radius: 20px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: 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,
video {
    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.92);
    border-bottom: 1px solid rgba(229, 231, 235, 0.88);
    backdrop-filter: blur(18px);
}

.nav-shell {
    width: min(1180px, calc(100% - 32px));
    height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--ink);
}

.brand-icon {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--teal), var(--cyan));
    box-shadow: 0 10px 20px rgba(13, 148, 136, 0.28);
    font-size: 15px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 28px;
    color: #374151;
    font-weight: 650;
}

.desktop-nav a {
    transition: color 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
    color: var(--teal);
}

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

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
    flex-direction: column;
    gap: 12px;
    color: #374151;
    font-weight: 650;
}

.mobile-nav.is-open {
    display: flex;
}

.hero-carousel {
    position: relative;
    height: min(680px, calc(100vh - 72px));
    min-height: 520px;
    overflow: hidden;
    background: linear-gradient(135deg, #134e4a, #164e63);
}

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

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

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.34;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 72% 26%, rgba(45, 212, 191, 0.30), transparent 32%),
        linear-gradient(90deg, rgba(8, 47, 73, 0.96), rgba(15, 118, 110, 0.74), rgba(15, 23, 42, 0.40));
}

.hero-content {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    height: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    align-items: center;
    gap: 64px;
}

.hero-copy {
    max-width: 720px;
    color: #ffffff;
}

.hero-kicker,
.page-hero span {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-bottom: 18px;
    padding: 8px 16px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(20, 184, 166, 0.92);
    font-weight: 800;
    letter-spacing: 0.03em;
}

.hero-copy h1 {
    margin: 0 0 18px;
    font-size: clamp(42px, 7vw, 72px);
    line-height: 1.04;
    letter-spacing: -0.05em;
}

.hero-copy p {
    max-width: 650px;
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(18px, 2vw, 22px);
}

.hero-meta,
.detail-meta,
.rank-meta,
.card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.hero-meta span,
.detail-meta span,
.rank-meta span,
.card-meta span {
    border-radius: 999px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.13);
    color: inherit;
}

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

.primary-button,
.ghost-button,
.home-search button,
.section-more,
.category-panel-head a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 22px;
    border: 0;
    border-radius: 14px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.primary-button,
.home-search button,
.category-panel-head a {
    color: #ffffff;
    background: var(--teal);
}

.primary-button:hover,
.home-search button:hover,
.category-panel-head a:hover {
    background: var(--teal-dark);
    transform: translateY(-1px);
}

.ghost-button {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.12);
}

.hero-poster {
    display: block;
    padding: 10px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 22px;
}

.hero-control {
    position: absolute;
    left: 50%;
    bottom: 28px;
    width: min(1180px, calc(100% - 32px));
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 16px;
}

.hero-control button {
    border: 0;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(10px);
}

.hero-control > button {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    font-size: 30px;
    line-height: 1;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border-radius: 999px;
    opacity: 0.45;
}

.hero-dot.active {
    width: 32px;
    opacity: 1;
    background: #2dd4bf;
}

.search-strip {
    background: #ffffff;
    border-bottom: 1px solid var(--line);
}

.search-strip-inner,
.content-section,
.page-main,
.footer-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.search-strip-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 520px);
    align-items: center;
    gap: 24px;
    padding: 30px 0;
}

.search-strip h2 {
    margin: 0;
    font-size: clamp(24px, 4vw, 38px);
    letter-spacing: -0.04em;
}

.home-search,
.filter-panel {
    display: flex;
    gap: 12px;
}

.home-search input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #ffffff;
    color: var(--ink);
    outline: none;
}

.home-search input {
    min-height: 48px;
    padding: 0 16px;
}

.content-section {
    padding: 62px 0;
}

.content-section.no-top-gap {
    padding-top: 28px;
}

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(26px, 4vw, 36px);
    letter-spacing: -0.04em;
}

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

.section-more {
    color: var(--teal);
    background: #ecfeff;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(229, 231, 235, 0.90);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--small-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, #ccfbf1, #e0f2fe);
}

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

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

.poster-badge {
    position: absolute;
    right: 12px;
    top: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(15, 118, 110, 0.88);
    font-size: 12px;
    font-weight: 800;
}

.movie-card-body {
    padding: 18px;
}

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

.movie-card h3 a:hover,
.rank-copy h2 a:hover {
    color: var(--teal);
}

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

.card-meta {
    margin-bottom: 14px;
    color: #4b5563;
    font-size: 13px;
}

.card-meta span {
    background: var(--soft);
}

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

.card-tags span,
.detail-tags span {
    padding: 4px 9px;
    border-radius: 999px;
    color: #0f766e;
    background: #ccfbf1;
    font-size: 12px;
    font-weight: 700;
}

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

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

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

.category-tile,
.category-panel,
.side-card,
.info-block,
.filter-panel,
.page-hero {
    border: 1px solid rgba(229, 231, 235, 0.90);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--small-shadow);
}

.category-tile {
    padding: 22px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-tile strong {
    display: block;
    margin-bottom: 10px;
    font-size: 20px;
}

.category-tile p {
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 14px;
}

.category-tile div {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.category-tile span {
    padding: 4px 8px;
    border-radius: 999px;
    background: #f0fdfa;
    color: #0f766e;
    font-size: 12px;
}

.page-main {
    padding: 34px 0 66px;
}

.page-hero {
    margin-bottom: 24px;
    padding: clamp(30px, 5vw, 54px);
    overflow: hidden;
}

.soft-hero {
    background:
        radial-gradient(circle at top right, rgba(45, 212, 191, 0.25), transparent 32%),
        linear-gradient(135deg, #ffffff, #ecfeff);
}

.rank-hero {
    color: #ffffff;
    border: 0;
    background:
        radial-gradient(circle at 80% 20%, rgba(34, 211, 238, 0.34), transparent 34%),
        linear-gradient(135deg, #0f766e, #164e63);
}

.page-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(34px, 6vw, 56px);
    line-height: 1.06;
    letter-spacing: -0.05em;
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: var(--muted);
    font-size: 18px;
}

.rank-hero p {
    color: rgba(255, 255, 255, 0.82);
}

.filter-panel {
    align-items: center;
    margin: 0 0 22px;
    padding: 16px;
}

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

.filter-panel select {
    max-width: 180px;
}

.category-panels {
    display: grid;
    gap: 24px;
}

.category-panel {
    padding: 24px;
}

.category-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.category-panel h2 {
    margin: 0 0 8px;
    font-size: 28px;
}

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

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

.related-item {
    display: block;
    overflow: hidden;
    border-radius: 16px;
    background: #f9fafb;
}

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

.related-item span,
.related-item small {
    display: block;
    padding: 0 10px;
}

.related-item span {
    margin-top: 10px;
    font-weight: 800;
}

.related-item small {
    padding-bottom: 12px;
    color: var(--muted);
}

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

.rank-item {
    display: grid;
    grid-template-columns: 116px minmax(0, 1fr);
    gap: 20px;
    align-items: center;
    padding: 16px;
    border: 1px solid rgba(229, 231, 235, 0.90);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--small-shadow);
}

.rank-poster {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
}

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

.rank-poster span {
    position: absolute;
    left: 8px;
    top: 8px;
    z-index: 2;
    padding: 3px 8px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(15, 118, 110, 0.90);
    font-size: 12px;
    font-weight: 900;
}

.rank-copy h2 {
    margin: 0 0 8px;
    font-size: 24px;
}

.rank-copy p {
    margin: 0 0 12px;
    color: var(--muted);
}

.rank-meta {
    color: #4b5563;
    font-size: 14px;
}

.rank-meta span,
.rank-meta strong {
    padding: 5px 10px;
    border-radius: 999px;
    background: #f3f4f6;
}

.rank-meta strong {
    color: #0f766e;
    background: #ccfbf1;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 20px;
    color: #6b7280;
}

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

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

.video-player {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: #000000;
    box-shadow: var(--shadow);
}

.video-player video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
    cursor: pointer;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: rgba(0, 0, 0, 0.36);
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-circle {
    width: 76px;
    height: 76px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #ffffff;
    background: linear-gradient(135deg, var(--teal), var(--cyan));
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.34);
    font-size: 28px;
    padding-left: 4px;
}

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

.detail-copy h1 {
    margin: 0 0 16px;
    font-size: clamp(32px, 5vw, 48px);
    letter-spacing: -0.04em;
}

.detail-meta {
    margin-bottom: 18px;
    color: #4b5563;
}

.detail-meta span {
    background: #f3f4f6;
}

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

.info-block {
    margin-bottom: 18px;
    padding: 24px;
}

.info-block h2,
.side-card h2 {
    margin: 0 0 12px;
    font-size: 22px;
}

.info-block p,
.side-card p {
    margin: 0;
    color: #374151;
}

.highlight-block {
    background: linear-gradient(135deg, #ecfeff, #ffffff);
}

.review-block {
    background: linear-gradient(135deg, #f0fdfa, #ffffff);
}

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

.side-card {
    padding: 18px;
}

.poster-side img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 16px;
}

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

.empty-state {
    display: none;
    margin: 28px 0 0;
    padding: 24px;
    border-radius: var(--radius);
    color: var(--muted);
    text-align: center;
    background: #ffffff;
    border: 1px solid var(--line);
}

.empty-state.is-visible {
    display: block;
}

.site-footer {
    background: #111827;
    color: #d1d5db;
}

.footer-shell {
    padding: 48px 0 28px;
}

.footer-main {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 36px;
}

.footer-brand {
    margin-bottom: 16px;
    color: #ffffff;
}

.site-footer p {
    max-width: 560px;
    margin: 0;
    color: #9ca3af;
}

.site-footer h3 {
    margin: 0 0 14px;
    color: #ffffff;
}

.site-footer a:not(.footer-brand) {
    display: block;
    margin: 8px 0;
    color: #d1d5db;
}

.site-footer a:hover {
    color: #5eead4;
}

.footer-bottom {
    margin-top: 34px;
    padding-top: 22px;
    border-top: 1px solid #1f2937;
    color: #9ca3af;
    text-align: center;
    font-size: 14px;
}

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

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

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

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

    .hero-poster {
        display: none;
    }

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

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

    .menu-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

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

    .hero-content {
        gap: 24px;
    }

    .hero-copy h1 {
        font-size: 42px;
    }

    .search-strip-inner,
    .home-search,
    .filter-panel,
    .section-heading,
    .category-panel-head {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

    .filter-panel select {
        max-width: none;
    }

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

    .category-grid,
    .related-grid,
    .side-related,
    .detail-side,
    .footer-main {
        grid-template-columns: 1fr;
    }

    .rank-item {
        grid-template-columns: 88px minmax(0, 1fr);
        gap: 14px;
    }

    .rank-copy h2 {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .nav-shell,
    .search-strip-inner,
    .content-section,
    .page-main,
    .footer-shell,
    .hero-content,
    .hero-control,
    .mobile-nav {
        width: min(100% - 22px, 1180px);
    }

    .movie-card-body {
        padding: 12px;
    }

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

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

    .hero-copy p {
        font-size: 17px;
    }

    .page-hero {
        padding: 26px;
    }
}
