:root {
    --bg: #f8fafc;
    --paper: #ffffff;
    --ink: #101827;
    --muted: #64748b;
    --line: #e2e8f0;
    --brand: #0d9488;
    --brand-dark: #0f766e;
    --brand-soft: #ccfbf1;
    --cyan: #0891b2;
    --dark: #06151d;
    --warm: #f59e0b;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(20, 184, 166, 0.12), transparent 28rem),
        linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

img {
    max-width: 100%;
    height: auto;
}

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

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

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.brand-mark {
    display: inline-flex;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--brand), var(--cyan));
    box-shadow: 0 10px 25px rgba(13, 148, 136, 0.25);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    color: #334155;
    font-size: 15px;
    font-weight: 650;
}

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

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

.nav-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #ffffff;
    padding: 10px 16px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--brand), var(--cyan));
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    background: #f1f5f9;
}

.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: #0f172a;
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    padding: 0 0 18px;
}

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

.mobile-nav a {
    padding: 12px 14px;
    border-radius: 14px;
    background: #f8fafc;
}

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

.hero-carousel {
    position: relative;
    min-height: 640px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.7s ease;
}

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

.hero-backdrop {
    position: absolute;
    inset: 0;
}

.hero-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.34;
    filter: saturate(1.1);
    transform: scale(1.04);
}

.hero-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.62), rgba(2, 6, 23, 0.4)),
        linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.92));
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(280px, 0.82fr);
    gap: 46px;
    align-items: center;
    padding: 86px 0 78px;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 8px 12px;
    color: #ccfbf1;
    font-size: 14px;
    font-weight: 700;
    border: 1px solid rgba(204, 251, 241, 0.26);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

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

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

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

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    color: #0f766e;
    font-size: 13px;
    font-weight: 700;
    border-radius: 999px;
    background: #ccfbf1;
}

.chip.dark {
    color: #e0f2fe;
    background: rgba(255, 255, 255, 0.12);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--cyan));
    box-shadow: 0 15px 32px rgba(8, 145, 178, 0.28);
}

.btn-ghost {
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-panel {
    position: relative;
    padding: 16px;
    border-radius: 34px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(12px);
}

.hero-poster {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    border-radius: 26px;
    background: #0f172a;
}

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

.hero-poster::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 45%;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.75));
}

.hero-ribbon {
    position: absolute;
    right: 18px;
    top: 18px;
    z-index: 2;
    padding: 8px 12px;
    border-radius: 999px;
    color: #ffffff;
    font-weight: 800;
    background: rgba(13, 148, 136, 0.92);
}

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

.hero-dot {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
}

.hero-dot.is-active {
    width: 32px;
    border-radius: 999px;
    background: #ffffff;
}

.section {
    padding: 62px 0;
}

.section.tight {
    padding: 42px 0;
}

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

.section-title {
    margin: 0;
    font-size: clamp(26px, 4vw, 40px);
    line-height: 1.14;
    letter-spacing: -0.04em;
}

.section-desc {
    margin: 10px 0 0;
    color: var(--muted);
    max-width: 680px;
    line-height: 1.75;
}

.search-box {
    position: relative;
    width: min(100%, 520px);
}

.search-box input {
    width: 100%;
    min-height: 50px;
    padding: 0 18px 0 48px;
    color: #0f172a;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.95);
    outline: none;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.search-box input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.15);
}

.search-box span {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0 28px;
}

.filter-chip {
    padding: 9px 14px;
    color: #334155;
    border: 1px solid #dbe3ef;
    border-radius: 999px;
    background: #ffffff;
    font-weight: 750;
}

.filter-chip.is-active,
.filter-chip:hover {
    color: #ffffff;
    border-color: transparent;
    background: linear-gradient(135deg, var(--brand), var(--cyan));
}

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.07);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(20, 184, 166, 0.5);
    box-shadow: var(--shadow);
}

.poster {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3 / 4.1;
    background: #0f172a;
}

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

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

.badge {
    position: absolute;
    z-index: 2;
    left: 12px;
    top: 12px;
    display: inline-flex;
    padding: 6px 9px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(8px);
}

.score {
    position: absolute;
    z-index: 2;
    right: 12px;
    bottom: 12px;
    display: inline-flex;
    padding: 6px 9px;
    color: #111827;
    font-size: 12px;
    font-weight: 900;
    border-radius: 999px;
    background: #fbbf24;
}

.card-body {
    padding: 15px;
}

.card-title {
    display: -webkit-box;
    min-height: 46px;
    margin: 0;
    overflow: hidden;
    color: #0f172a;
    font-size: 16px;
    line-height: 1.45;
    font-weight: 850;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    color: #64748b;
    font-size: 13px;
}

.card-desc {
    display: -webkit-box;
    margin: 10px 0 0;
    overflow: hidden;
    color: #64748b;
    font-size: 14px;
    line-height: 1.65;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 168px;
    padding: 24px;
    border-radius: 28px;
    color: #ffffff;
    background: linear-gradient(135deg, #0f766e, #0891b2);
    box-shadow: 0 16px 38px rgba(8, 145, 178, 0.18);
}

.category-card:nth-child(3n + 2) {
    background: linear-gradient(135deg, #334155, #0f766e);
}

.category-card:nth-child(3n + 3) {
    background: linear-gradient(135deg, #7c3aed, #0891b2);
}

.category-card::after {
    content: "";
    position: absolute;
    right: -30px;
    bottom: -40px;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
}

.category-card h2,
.category-card h3 {
    position: relative;
    margin: 0;
    font-size: 24px;
    font-weight: 900;
}

.category-card p {
    position: relative;
    margin: 12px 0 0;
    color: rgba(255, 255, 255, 0.86);
    line-height: 1.7;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 68px 86px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 12px;
    border-radius: 22px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.rank-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    color: #ffffff;
    font-weight: 900;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--brand), var(--cyan));
}

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

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

.rank-title {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 850;
}

.rank-desc {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

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

.page-hero-card {
    position: relative;
    overflow: hidden;
    padding: clamp(26px, 5vw, 52px);
    border-radius: 34px;
    color: #ffffff;
    background: radial-gradient(circle at top right, rgba(20, 184, 166, 0.65), transparent 30rem), linear-gradient(135deg, #020617, #0f172a 58%, #0f766e);
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
}

.page-hero-card h1 {
    margin: 0;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.1;
    letter-spacing: -0.05em;
}

.page-hero-card p {
    max-width: 760px;
    margin: 18px 0 0;
    color: #dbeafe;
    font-size: 18px;
    line-height: 1.8;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(280px, 0.62fr) minmax(0, 1.38fr);
    gap: 32px;
    align-items: start;
}

.detail-poster {
    position: sticky;
    top: 96px;
    overflow: hidden;
    border-radius: 30px;
    background: #0f172a;
    box-shadow: var(--shadow);
}

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

.detail-main {
    display: grid;
    gap: 22px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 14px;
}

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

.detail-lead {
    margin: 0;
    color: #475569;
    font-size: 18px;
    line-height: 1.85;
}

.info-panel {
    padding: 24px;
    border: 1px solid #e2e8f0;
    border-radius: 26px;
    background: #ffffff;
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.06);
}

.info-panel h2,
.info-panel h3 {
    margin: 0 0 14px;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.info-panel p {
    margin: 0;
    color: #475569;
    line-height: 1.9;
}

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

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

.player-cover {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.24), rgba(2, 6, 23, 0.86));
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 22px;
    color: #ffffff;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--brand), var(--cyan));
    font-weight: 900;
    box-shadow: 0 16px 40px rgba(8, 145, 178, 0.3);
}

.play-icon {
    width: 0;
    height: 0;
    border-top: 9px solid transparent;
    border-bottom: 9px solid transparent;
    border-left: 14px solid #ffffff;
}

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

.site-footer {
    margin-top: 54px;
    padding: 36px 0;
    color: #cbd5e1;
    background: #020617;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

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

.empty-state {
    display: none;
    padding: 22px;
    color: #64748b;
    border: 1px dashed #cbd5e1;
    border-radius: 22px;
    background: #ffffff;
}

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

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

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

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

    .menu-toggle {
        display: block;
    }

    .hero-carousel {
        min-height: auto;
    }

    .hero-content {
        grid-template-columns: 1fr;
        padding: 58px 0 72px;
    }

    .hero-panel {
        max-width: 380px;
    }

    .section-head,
    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
    }

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

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

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

    .detail-poster {
        position: relative;
        top: auto;
        max-width: 380px;
    }

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

    .rank-item .btn {
        grid-column: 2 / -1;
        justify-self: start;
    }

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

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

    .brand {
        font-size: 17px;
    }

    .brand-mark {
        width: 38px;
        height: 38px;
        border-radius: 14px;
    }

    .hero h1,
    .page-hero-card h1,
    .detail-title {
        letter-spacing: -0.03em;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-panel {
        max-width: 100%;
    }

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

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

    .card-body {
        padding: 12px;
    }

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

    .rank-num {
        width: 40px;
        height: 40px;
        border-radius: 14px;
    }
}
