:root {
    --teal: #0d9488;
    --teal-dark: #0f766e;
    --cyan: #06b6d4;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --soft: #f8fafc;
    --card: #ffffff;
    --shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
    color: var(--ink);
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 42%, #eef7f8 100%);
    min-height: 100vh;
}

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

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

button,
input {
    font: inherit;
}

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

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

.header-shell {
    width: min(1220px, calc(100% - 28px));
    height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 22px;
}

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

.brand-mark {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    border-radius: 14px;
    color: #ffffff;
    font-weight: 800;
    background: linear-gradient(135deg, var(--teal), var(--cyan));
    box-shadow: 0 14px 30px rgba(13, 148, 136, 0.28);
}

.brand-text {
    font-size: clamp(20px, 2.4vw, 28px);
    font-weight: 900;
    letter-spacing: -0.04em;
    background: linear-gradient(90deg, var(--teal-dark), var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

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

.nav-link:hover,
.nav-link.is-active {
    color: var(--teal);
}

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

.header-search input {
    width: 210px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    padding: 10px 14px;
    outline: none;
    background: #ffffff;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.search-panel input:focus,
.local-filter input:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.12);
}

.header-search button,
.search-panel button {
    border: 0;
    border-radius: 999px;
    padding: 10px 16px;
    color: #ffffff;
    cursor: pointer;
    background: linear-gradient(135deg, var(--teal), var(--cyan));
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: #f1f5f9;
    cursor: pointer;
    padding: 10px;
}

.menu-button span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: var(--ink);
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    width: min(1220px, calc(100% - 28px));
    margin: 0 auto;
    padding: 0 0 18px;
    gap: 12px;
    flex-direction: column;
}

.mobile-nav a {
    padding: 12px 14px;
    border-radius: 14px;
    color: #334155;
    background: #f8fafc;
    font-weight: 650;
}

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

.hero {
    position: relative;
    height: min(760px, 72vh);
    min-height: 520px;
    overflow: hidden;
    background: #020617;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.9s ease;
    background-image: var(--hero-image);
    background-size: cover;
    background-position: center;
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

.hero-backdrop {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 70% 30%, rgba(6, 182, 212, 0.24), transparent 36%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.88) 0%, rgba(2, 6, 23, 0.66) 48%, rgba(2, 6, 23, 0.18) 100%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.18) 64%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    height: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    padding: 90px 0;
    color: #ffffff;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    color: #d7fffb;
    background: rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(10px);
    font-weight: 700;
}

.hero h1 {
    margin: 22px 0 18px;
    max-width: 760px;
    font-size: clamp(38px, 7vw, 78px);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero p {
    max-width: 700px;
    margin: 0 0 28px;
    color: #dbeafe;
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.8;
}

.hero-actions,
.detail-info .primary-button {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.primary-button,
.ghost-button,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
    padding: 13px 22px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--teal), var(--cyan));
    box-shadow: 0 18px 36px rgba(13, 148, 136, 0.32);
}

.ghost-button {
    padding: 12px 21px;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.36);
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(12px);
}

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

.hero-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    color: #ffffff;
    background: rgba(2, 6, 23, 0.42);
    backdrop-filter: blur(12px);
    cursor: pointer;
    z-index: 4;
    font-size: 34px;
    line-height: 1;
}

.hero-prev {
    left: max(18px, calc((100vw - 1180px) / 2 - 68px));
}

.hero-next {
    right: max(18px, calc((100vw - 1180px) / 2 - 68px));
}

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

.hero-dots button {
    width: 28px;
    height: 6px;
    border: 0;
    border-radius: 99px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.36);
}

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

.quick-category-band {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
}

.category-pills {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 18px 0;
    scrollbar-width: none;
}

.category-pills::-webkit-scrollbar {
    display: none;
}

.category-pill {
    min-width: max-content;
    padding: 10px 16px;
    border-radius: 999px;
    background: linear-gradient(180deg, #ffffff, #f1f5f9);
    border: 1px solid #dbeafe;
    color: #0f766e;
    font-weight: 750;
}

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

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

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

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

.section-more {
    min-width: max-content;
    padding: 11px 18px;
    color: var(--teal-dark);
    background: #ccfbf1;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.92);
    border-radius: 24px;
    background: var(--card);
    box-shadow: 0 14px 36px 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(13, 148, 136, 0.32);
    box-shadow: var(--shadow);
}

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

.compact-card .poster-link {
    aspect-ratio: 16 / 10;
}

.poster-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.01);
    transition: transform 0.35s ease, opacity 0.35s ease;
}

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

.poster-play {
    position: absolute;
    right: 14px;
    bottom: 14px;
    padding: 7px 12px;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--teal), var(--cyan));
    font-size: 13px;
    font-weight: 800;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.24s ease, transform 0.24s ease;
}

.movie-card:hover .poster-play {
    opacity: 1;
    transform: translateY(0);
}

.rank-badge {
    position: absolute;
    left: 14px;
    top: 14px;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, #f97316, #ef4444);
    box-shadow: 0 12px 28px rgba(239, 68, 68, 0.25);
}

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

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

.card-meta span {
    padding: 4px 8px;
    border-radius: 99px;
    background: #f1f5f9;
}

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

.movie-card h3 a:hover {
    color: var(--teal-dark);
}

.movie-card p {
    margin: 0;
    color: #475569;
    line-height: 1.65;
    font-size: 14px;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.tag-row span {
    padding: 6px 9px;
    border-radius: 999px;
    color: #0f766e;
    background: #ccfbf1;
    font-size: 12px;
    font-weight: 750;
}

.ranking-strip {
    padding: 58px 0;
    background:
        radial-gradient(circle at 10% 10%, rgba(20, 184, 166, 0.18), transparent 28%),
        linear-gradient(135deg, #f0fdfa, #ecfeff 55%, #ffffff);
    border-top: 1px solid #dbeafe;
    border-bottom: 1px solid #dbeafe;
}

.category-card {
    position: relative;
    min-width: 180px;
    flex: 1;
    overflow: hidden;
    border-radius: 24px;
    min-height: 170px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: end;
    color: #ffffff;
    background: #0f172a;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

.category-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.48;
    transition: transform 0.35s ease;
}

.category-card:hover img {
    transform: scale(1.08);
}

.category-card span,
.category-card p {
    position: relative;
    z-index: 2;
}

.category-card span {
    font-size: 22px;
    font-weight: 900;
}

.category-card p {
    margin: 8px 0 0;
    color: #dbeafe;
    line-height: 1.6;
    font-size: 14px;
}

.page-main {
    padding: 42px 0 70px;
}

.page-hero {
    padding: 54px 0 34px;
}

.page-hero span {
    display: inline-flex;
    padding: 8px 14px;
    border-radius: 999px;
    color: #0f766e;
    background: #ccfbf1;
    font-weight: 800;
}

.page-hero h1 {
    margin: 18px 0 14px;
    font-size: clamp(34px, 6vw, 62px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

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

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

.category-overview-card {
    overflow: hidden;
    border-radius: 28px;
    background: #ffffff;
    box-shadow: 0 16px 42px rgba(15, 23, 42, 0.08);
    border: 1px solid #e2e8f0;
}

.category-overview-card a {
    display: grid;
    grid-template-columns: 42% 1fr;
    min-height: 230px;
}

.category-cover-mosaic {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 2px;
    background: #0f172a;
}

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

.category-overview-body {
    padding: 26px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.category-overview-body h2 {
    margin: 0 0 12px;
    font-size: 28px;
}

.category-overview-body p {
    margin: 0;
    color: var(--muted);
    line-height: 1.75;
}

.category-overview-body span {
    margin-top: 20px;
    color: var(--teal-dark);
    font-weight: 850;
}

.local-filter {
    margin-top: 24px;
}

.local-filter input,
.search-panel input {
    width: min(680px, 100%);
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    outline: none;
    padding: 14px 18px;
    background: #ffffff;
}

.catalog-grid {
    align-items: stretch;
}

.search-panel {
    display: flex;
    gap: 10px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.search-status {
    margin-bottom: 20px;
    color: var(--muted);
    font-weight: 700;
}

.movie-detail-main {
    background: #f8fafc;
}

.detail-hero {
    position: relative;
    min-height: 570px;
    color: #ffffff;
    background-image: var(--detail-bg);
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.detail-hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 72% 24%, rgba(6, 182, 212, 0.24), transparent 34%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.9), rgba(2, 6, 23, 0.7) 52%, rgba(2, 6, 23, 0.35)),
        linear-gradient(0deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.2));
    backdrop-filter: blur(2px);
}

.detail-hero-shell {
    position: relative;
    z-index: 2;
    min-height: 570px;
    display: grid;
    grid-template-columns: 310px 1fr;
    gap: 42px;
    align-items: center;
    padding: 56px 0;
}

.detail-poster {
    overflow: hidden;
    border-radius: 28px;
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.38);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

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

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    color: #bfdbfe;
    font-weight: 700;
}

.breadcrumb a:hover {
    color: #ffffff;
}

.detail-info h1 {
    margin: 18px 0;
    font-size: clamp(34px, 5vw, 66px);
    line-height: 1.08;
    letter-spacing: -0.05em;
}

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

.detail-meta span {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    color: #ecfeff;
    font-weight: 750;
}

.detail-one-line {
    max-width: 760px;
    color: #e0f2fe;
    font-size: 19px;
    line-height: 1.8;
}

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

.player-section {
    margin-top: -74px;
    position: relative;
    z-index: 3;
}

.player-card {
    padding: 12px;
    border-radius: 30px;
    background: #ffffff;
    box-shadow: var(--shadow);
    border: 1px solid rgba(226, 232, 240, 0.9);
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #020617;
    aspect-ratio: 16 / 9;
}

.movie-video {
    width: 100%;
    height: 100%;
    display: block;
    background: #020617;
}

.play-layer {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #ffffff;
    cursor: pointer;
    background: radial-gradient(circle at center, rgba(13, 148, 136, 0.2), rgba(2, 6, 23, 0.58));
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-icon {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--teal), var(--cyan));
    box-shadow: 0 22px 42px rgba(13, 148, 136, 0.35);
    font-size: 34px;
    text-indent: 4px;
}

.detail-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
    padding: 42px 0 20px;
}

.detail-article,
.detail-side {
    border-radius: 26px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}

.detail-article {
    padding: 30px;
}

.detail-article h2,
.detail-side h2 {
    margin: 0 0 16px;
    font-size: 26px;
}

.detail-article p {
    margin: 0 0 24px;
    color: #334155;
    line-height: 1.9;
    font-size: 17px;
}

.detail-side {
    padding: 26px;
    align-self: start;
    position: sticky;
    top: 96px;
}

.detail-side dl {
    margin: 0;
}

.detail-side dl div {
    display: grid;
    grid-template-columns: 74px 1fr;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid #e2e8f0;
}

.detail-side dl div:last-child {
    border-bottom: 0;
}

.detail-side dt {
    color: var(--muted);
    font-weight: 750;
}

.detail-side dd {
    margin: 0;
    color: var(--ink);
    font-weight: 700;
}

.site-footer {
    background: #0f172a;
    color: #cbd5e1;
    margin-top: 50px;
}

.footer-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding: 34px 0;
}

.footer-logo {
    color: #ffffff;
    font-weight: 900;
    font-size: 24px;
}

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

.footer-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

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

.is-filtered-out {
    display: none !important;
}

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

    .header-search input {
        width: 180px;
    }

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

    .detail-hero-shell {
        grid-template-columns: 240px 1fr;
    }

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

    .detail-side {
        position: static;
    }
}

@media (max-width: 760px) {
    .header-shell {
        height: auto;
        min-height: 68px;
        padding: 12px 0;
    }

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

    .header-search {
        display: none;
    }

    .menu-button {
        display: block;
        margin-left: auto;
    }

    .hero {
        min-height: 560px;
        height: 68vh;
    }

    .hero-content {
        padding: 82px 0 74px;
    }

    .hero-control {
        display: none;
    }

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

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

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

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

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

    .category-overview-card a {
        grid-template-columns: 1fr;
    }

    .category-cover-mosaic {
        height: 210px;
    }

    .detail-hero-shell {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 34px 0 110px;
    }

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

    .player-section {
        margin-top: -86px;
    }

    .detail-article,
    .detail-side {
        padding: 22px;
    }

    .footer-shell {
        align-items: flex-start;
        flex-direction: column;
    }
}

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

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

    .hero h1 {
        font-size: 40px;
    }

    .page-hero h1,
    .detail-info h1 {
        font-size: 34px;
    }

    .player-card {
        padding: 6px;
        border-radius: 22px;
    }

    .player-shell {
        border-radius: 17px;
    }
}
