:root {
    --bg: #f8fafc;
    --panel: #ffffff;
    --panel-soft: #eff6ff;
    --text: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --cyan: #0891b2;
    --blue: #2563eb;
    --teal: #0d9488;
    --orange: #f97316;
    --shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
    --soft-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Roboto, Arial, sans-serif;
    color: var(--text);
    background: linear-gradient(180deg, #f8fbff 0%, #f8fafc 45%, #ffffff 100%);
}

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

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

button,
input,
select {
    font: inherit;
}

.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.84);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    backdrop-filter: blur(18px);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: #0f172a;
}

.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 12px 24px rgba(8, 145, 178, 0.25);
}

.brand-text {
    font-size: 20px;
    letter-spacing: 0.02em;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    padding: 10px 15px;
    border-radius: 999px;
    color: #334155;
    font-weight: 700;
    transition: color 0.24s ease, background 0.24s ease, transform 0.24s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--cyan);
    background: rgba(8, 145, 178, 0.1);
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #ffffff;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

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

.hero {
    position: relative;
    min-height: 650px;
    overflow: hidden;
    background: #020617;
}

.hero-track,
.hero-slide,
.hero-bg {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.7s ease;
}

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

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(5px) scale(1.08);
    opacity: 0.55;
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 74% 34%, rgba(34, 211, 238, 0.25), transparent 34%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.72) 46%, rgba(2, 6, 23, 0.28) 100%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.82), transparent 50%);
}

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

.hero-copy {
    max-width: 760px;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--cyan);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero .eyebrow {
    color: #67e8f9;
}

.hero h1 {
    margin: 0;
    font-size: clamp(42px, 7vw, 86px);
    line-height: 0.98;
    letter-spacing: -0.06em;
    text-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.hero-desc {
    margin: 24px 0 0;
    max-width: 690px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
    line-height: 1.9;
}

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

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

.hero-tags span,
.detail-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.hero-tags span,
.detail-tags span {
    padding: 8px 12px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

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

.primary-btn,
.ghost-btn,
.outline-btn,
.text-btn,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 900;
    transition: transform 0.24s ease, box-shadow 0.24s ease, background 0.24s ease, color 0.24s ease;
}

.primary-btn {
    padding: 13px 22px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 14px 32px rgba(37, 99, 235, 0.28);
}

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

.ghost-btn {
    padding: 12px 20px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.text-btn,
.section-more {
    color: var(--cyan);
}

.hero .text-btn {
    color: #67e8f9;
}

.hero-poster {
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.45);
    transform: rotate(2deg);
    transition: transform 0.35s ease;
}

.hero-poster:hover {
    transform: rotate(0deg) scale(1.02);
}

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

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

.hero-dot {
    width: 34px;
    height: 7px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.38);
}

.hero-dot.is-active {
    background: #67e8f9;
}

.section {
    padding: 76px 0;
}

.section-tight {
    padding-top: 58px;
}

.bg-soft {
    background: linear-gradient(180deg, rgba(239, 246, 255, 0.75), rgba(255, 255, 255, 0));
}

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

.section h2,
.sub-hero h1,
.detail-copy h1 {
    margin: 0;
    color: var(--text);
    font-size: clamp(28px, 4vw, 46px);
    line-height: 1.15;
    letter-spacing: -0.04em;
}

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

.category-card,
.category-overview-card,
.prose-card,
.ranking-card,
.player-box {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(226, 232, 240, 0.85);
    border-radius: 26px;
    box-shadow: var(--soft-shadow);
}

.category-card {
    padding: 18px;
    min-height: 210px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 18px;
    transition: transform 0.26s ease, box-shadow 0.26s ease;
}

.category-card:hover,
.movie-card:hover,
.ranking-card:hover,
.related-card:hover,
.category-overview-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
}

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

.category-thumbs img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 12px;
}

.category-card h3,
.category-overview-card h2 {
    margin: 0 0 8px;
    font-size: 21px;
}

.category-card p,
.category-overview-card p,
.rank-copy p,
.sub-hero p,
.card-desc,
.ranking-body p,
.prose-card p,
.site-footer p {
    color: var(--muted);
    line-height: 1.78;
}

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

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

.movie-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.86);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    transition: transform 0.26s ease, box-shadow 0.26s ease;
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: #e2e8f0;
}

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

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

.poster-shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 42%, rgba(2, 6, 23, 0.58));
}

.poster-badge {
    position: absolute;
    left: 12px;
    bottom: 12px;
    padding: 5px 9px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(8, 145, 178, 0.88);
    font-size: 12px;
    font-weight: 900;
}

.card-body {
    padding: 14px;
}

.card-title {
    margin: 0;
    font-size: 17px;
    line-height: 1.35;
    letter-spacing: -0.02em;
}

.card-title a:hover,
.ranking-body a:hover,
.category-title-link:hover {
    color: var(--cyan);
}

.card-meta {
    margin: 7px 0 0;
    color: #64748b;
    font-size: 13px;
}

.card-desc {
    margin: 9px 0 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    min-height: 70px;
    overflow: hidden;
    font-size: 14px;
}

.tag-row {
    margin-top: 12px;
}

.tag-row span {
    padding: 5px 8px;
    color: #0e7490;
    background: #ecfeff;
}

.rank-layout {
    display: grid;
    grid-template-columns: 0.9fr 1.4fr;
    gap: 42px;
    align-items: start;
}

.rank-copy {
    position: sticky;
    top: 104px;
}

.rank-copy .primary-btn {
    margin-top: 18px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    transition: transform 0.24s ease, border 0.24s ease;
}

.rank-item:hover {
    border-color: rgba(8, 145, 178, 0.36);
    transform: translateX(4px);
}

.rank-num {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--orange), var(--blue));
    font-weight: 900;
}

.rank-title {
    font-weight: 900;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank-meta {
    color: var(--muted);
    font-size: 13px;
}

.sub-hero {
    padding: 88px 0 58px;
    background:
        radial-gradient(circle at 80% 20%, rgba(34, 211, 238, 0.22), transparent 30%),
        linear-gradient(135deg, #eff6ff 0%, #ffffff 58%, #ecfeff 100%);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.sub-hero p {
    max-width: 760px;
    font-size: 18px;
}

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

.category-overview-card {
    padding: 24px;
    transition: transform 0.26s ease, box-shadow 0.26s ease;
}

.mini-link-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin: 18px 0;
}

.mini-link-list a {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: #0e7490;
    font-weight: 700;
}

.outline-btn {
    padding: 10px 16px;
    color: var(--cyan);
    border: 1px solid rgba(8, 145, 178, 0.32);
    background: #ecfeff;
}

.control-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) 220px 220px;
    gap: 16px;
    margin-bottom: 26px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.07);
}

.search-field,
.filter-field {
    display: grid;
    gap: 7px;
}

.search-field span,
.filter-field span {
    color: #334155;
    font-size: 13px;
    font-weight: 900;
}

.search-field input,
.filter-field select {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: #0f172a;
    background: #f8fafc;
    outline: none;
}

.search-field input:focus,
.filter-field select:focus {
    border-color: rgba(8, 145, 178, 0.5);
    box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.1);
}

.ranking-list {
    display: grid;
    gap: 18px;
}

.ranking-card {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 22px;
    padding: 16px;
    transition: transform 0.26s ease, box-shadow 0.26s ease;
}

.ranking-cover {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
}

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

.ranking-cover span {
    position: absolute;
    left: 10px;
    top: 10px;
    display: grid;
    place-items: center;
    min-width: 44px;
    height: 34px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(249, 115, 22, 0.92);
    font-weight: 900;
}

.ranking-body h2 {
    margin: 4px 0 0;
    font-size: 28px;
    letter-spacing: -0.03em;
}

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

.detail-bg {
    position: absolute;
    inset: 0;
}

.detail-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(5px) scale(1.07);
    opacity: 0.45;
}

.detail-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.58));
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    padding: 34px 0 62px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 28px;
    color: rgba(255, 255, 255, 0.74);
    font-size: 14px;
}

.breadcrumb a:hover {
    color: #67e8f9;
}

.detail-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 38px;
    align-items: end;
}

.detail-poster {
    width: 100%;
    aspect-ratio: 3 / 4.2;
    object-fit: cover;
    border-radius: 28px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
}

.detail-copy h1 {
    color: #ffffff;
    font-size: clamp(40px, 6vw, 72px);
}

.detail-one-line {
    max-width: 800px;
    margin: 18px 0 24px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
    line-height: 1.85;
}

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

.player-section {
    padding-top: 54px;
}

.player-box {
    position: relative;
    overflow: hidden;
    background: #000000;
    border-radius: 30px;
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: #ffffff;
    border: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.22), rgba(2, 6, 23, 0.68));
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.play-circle {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    padding-left: 5px;
    border-radius: 50%;
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 18px 44px rgba(8, 145, 178, 0.36);
    font-size: 28px;
}

.prose-card {
    padding: 30px;
}

.prose-card h2 {
    margin: 0 0 12px;
    font-size: 28px;
}

.prose-card h2:not(:first-child) {
    margin-top: 28px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 28px;
}

.info-grid div {
    padding: 16px;
    border-radius: 18px;
    background: #f8fafc;
    border: 1px solid var(--line);
}

.info-grid span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.info-grid strong {
    display: block;
    margin-top: 6px;
    color: #0f172a;
}

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

.related-card {
    display: block;
    overflow: hidden;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    transition: transform 0.26s ease, box-shadow 0.26s ease;
}

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

.related-card span {
    display: block;
    padding: 11px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-weight: 900;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 30px;
}

.footer-brand {
    margin-bottom: 12px;
    font-size: 22px;
}

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

.footer-links a {
    padding: 8px 12px;
    border-radius: 999px;
    color: #0e7490;
    background: #ecfeff;
    font-weight: 800;
}

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 22px auto 0;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 14px;
    text-align: center;
}

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

@media (max-width: 1080px) {
    .hero-content {
        grid-template-columns: 1fr 260px;
        gap: 30px;
    }

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

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

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

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

    .nav-toggle {
        display: flex;
    }

    .main-nav {
        position: absolute;
        left: 12px;
        right: 12px;
        top: 82px;
        display: none;
        padding: 14px;
        border: 1px solid var(--line);
        border-radius: 20px;
        background: #ffffff;
        box-shadow: var(--shadow);
        flex-direction: column;
        align-items: stretch;
    }

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

    .nav-link {
        width: 100%;
        border-radius: 14px;
    }

    .hero,
    .hero-content {
        min-height: 760px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        align-content: center;
        padding: 46px 0 90px;
    }

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

    .hero h1 {
        font-size: clamp(40px, 16vw, 66px);
    }

    .section {
        padding: 54px 0;
    }

    .section-head,
    .rank-layout,
    .footer-grid,
    .detail-layout,
    .control-panel,
    .ranking-card {
        grid-template-columns: 1fr;
    }

    .section-head {
        align-items: start;
    }

    .rank-copy {
        position: static;
    }

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

    .rank-meta {
        grid-column: 2;
    }

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

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

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

    .footer-links {
        justify-content: flex-start;
    }
}

@media (max-width: 460px) {
    .brand-text {
        font-size: 18px;
    }

    .hero-desc,
    .detail-one-line,
    .sub-hero p {
        font-size: 16px;
    }

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

    .card-desc {
        min-height: auto;
    }
}
