:root {
    --teal-950: #042f2e;
    --teal-900: #134e4a;
    --teal-700: #0f766e;
    --teal-500: #14b8a6;
    --amber: #f59e0b;
    --slate-950: #020617;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-100: #f1f5f9;
    --slate-50: #f8fafc;
    --white: #ffffff;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.14);
    --soft-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
    --radius: 22px;
}

* {
    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(--slate-900);
    background: linear-gradient(180deg, #f8fafc 0%, #eef7f6 42%, #f8fafc 100%);
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, var(--teal-950), var(--slate-800));
    color: var(--white);
    box-shadow: 0 16px 40px rgba(2, 6, 23, 0.28);
}

.site-nav {
    max-width: 1240px;
    height: 68px;
    margin: 0 auto;
    padding: 0 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

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

.brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: var(--slate-950);
    background: linear-gradient(135deg, #facc15, var(--amber));
    box-shadow: 0 10px 24px rgba(245, 158, 11, 0.32);
}

.brand-text {
    display: grid;
    line-height: 1.1;
}

.brand-text strong {
    font-size: 22px;
    letter-spacing: 0.08em;
}

.brand-text small {
    color: #99f6e4;
    font-size: 12px;
    margin-top: 4px;
}

.nav-menu {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 20px;
}

.nav-menu > a {
    font-size: 15px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.88);
    transition: color 0.25s ease, transform 0.25s ease;
}

.nav-menu > a:hover,
.nav-menu > a.is-active {
    color: #5eead4;
    transform: translateY(-1px);
}

.nav-search {
    display: flex;
    align-items: center;
    min-width: 270px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.nav-search input {
    width: 100%;
    border: 0;
    outline: none;
    color: var(--white);
    background: transparent;
    padding: 11px 13px;
}

.nav-search input::placeholder {
    color: rgba(255, 255, 255, 0.68);
}

.nav-search button {
    border: 0;
    padding: 11px 14px;
    color: var(--white);
    background: rgba(20, 184, 166, 0.64);
    cursor: pointer;
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.12);
}

.hero {
    position: relative;
    overflow: hidden;
    background: var(--slate-950);
}

.hero-stage {
    position: relative;
    min-height: 680px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease;
}

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

.hero-bg {
    width: 100%;
    height: 100%;
    min-height: 680px;
    object-fit: cover;
    transform: scale(1.03);
    filter: saturate(1.08) contrast(1.02);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 75% 35%, rgba(20, 184, 166, 0.22), transparent 34%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(15, 23, 42, 0.74) 46%, rgba(15, 23, 42, 0.18) 100%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.86) 0%, rgba(2, 6, 23, 0.02) 48%);
}

.hero-content {
    position: absolute;
    left: max(32px, calc((100vw - 1240px) / 2 + 22px));
    top: 50%;
    transform: translateY(-50%);
    width: min(680px, calc(100vw - 44px));
    color: var(--white);
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: #5eead4;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero h1,
.hero h2 {
    margin: 0;
    font-size: clamp(42px, 6vw, 74px);
    line-height: 1.02;
    letter-spacing: -0.05em;
    text-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
}

.hero p {
    max-width: 620px;
    margin: 24px 0 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.7;
}

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

.hero-tags span,
.tag-cloud span {
    display: inline-flex;
    border: 1px solid rgba(20, 184, 166, 0.34);
    border-radius: 999px;
    padding: 7px 12px;
    color: #ccfbf1;
    background: rgba(15, 118, 110, 0.28);
    backdrop-filter: blur(10px);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border-radius: 14px;
    padding: 0 20px;
    font-weight: 800;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

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

.btn-primary {
    color: var(--slate-950);
    background: linear-gradient(135deg, #facc15, var(--amber));
    box-shadow: 0 16px 32px rgba(245, 158, 11, 0.34);
}

.btn-light {
    color: var(--teal-950);
    background: rgba(255, 255, 255, 0.92);
}

.btn-ghost {
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.1);
}

.hero-control {
    position: absolute;
    top: 50%;
    width: 50px;
    height: 50px;
    border: 0;
    border-radius: 999px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
    cursor: pointer;
    font-size: 42px;
    line-height: 1;
    transform: translateY(-50%);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

.hero-dot {
    width: 32px;
    height: 7px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.36);
    cursor: pointer;
}

.hero-dot.is-active {
    background: #5eead4;
}

.search-band,
.content-section,
.rank-section,
.page-hero,
.detail-page,
.breadcrumb {
    width: min(1240px, calc(100% - 44px));
    margin-left: auto;
    margin-right: auto;
}

.search-band {
    margin-top: -44px;
    position: relative;
    z-index: 4;
    display: grid;
    grid-template-columns: 1fr minmax(300px, 520px);
    align-items: center;
    gap: 28px;
    padding: 30px;
    border-radius: var(--radius);
    color: var(--white);
    background: linear-gradient(135deg, rgba(15, 78, 74, 0.96), rgba(30, 41, 59, 0.96));
    box-shadow: var(--shadow);
}

.search-band h2,
.search-band p {
    margin: 0;
}

.search-band h2 {
    font-size: clamp(24px, 3vw, 34px);
}

.search-band p {
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.7;
}

.wide-search {
    display: flex;
    border-radius: 18px;
    overflow: hidden;
    background: var(--white);
    box-shadow: 0 12px 28px rgba(2, 6, 23, 0.12);
}

.wide-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: none;
    padding: 16px 18px;
    background: transparent;
}

.wide-search button {
    border: 0;
    padding: 0 22px;
    color: var(--white);
    background: linear-gradient(135deg, var(--teal-700), var(--teal-500));
    cursor: pointer;
    font-weight: 800;
}

.content-section,
.rank-section {
    margin-top: 72px;
}

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

.section-head h2,
.section-head p {
    margin: 0;
}

.section-head h2 {
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.section-head p {
    max-width: 720px;
    color: #64748b;
    line-height: 1.8;
    margin-top: 8px;
}

.section-more {
    min-width: max-content;
    color: var(--teal-700);
    font-weight: 800;
}

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

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

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

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

.movie-card {
    min-width: 0;
}

.movie-link {
    display: grid;
    height: 100%;
    overflow: hidden;
    border-radius: 20px;
    background: var(--white);
    box-shadow: var(--soft-shadow);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

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

.poster-frame {
    position: relative;
    aspect-ratio: 3 / 4;
    margin: 0;
    overflow: hidden;
    background: linear-gradient(135deg, var(--slate-800), var(--teal-900));
}

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

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

.poster-shade {
    position: absolute;
    inset: auto 0 0;
    height: 45%;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), transparent);
}

.poster-type,
.rank-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    border-radius: 999px;
    padding: 7px 11px;
    color: var(--white);
    font-size: 12px;
    font-weight: 800;
    background: rgba(15, 78, 74, 0.84);
    backdrop-filter: blur(8px);
}

.poster-type {
    left: 12px;
    top: 12px;
}

.rank-badge {
    right: 12px;
    top: 12px;
    color: var(--slate-950);
    background: linear-gradient(135deg, #facc15, var(--amber));
}

.movie-info {
    padding: 17px;
}

.movie-info h3 {
    margin: 0;
    font-size: 18px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-info p {
    min-height: 48px;
    margin: 10px 0 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-meta {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-top: 14px;
    color: var(--teal-700);
    font-size: 13px;
    font-weight: 800;
}

.movie-card.compact .movie-info p,
.movie-card.rank-card .movie-info p {
    display: none;
}

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

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

.category-tile {
    display: grid;
    gap: 18px;
    border: 1px solid rgba(20, 184, 166, 0.16);
    border-radius: 24px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: var(--soft-shadow);
}

.category-tile > a h3 {
    margin: 14px 0 8px;
    font-size: 24px;
}

.category-tile > a p {
    margin: 0;
    color: #64748b;
    line-height: 1.7;
}

.category-icon {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border-radius: 16px;
    color: var(--slate-950);
    background: linear-gradient(135deg, #facc15, var(--amber));
}

.tile-links {
    display: grid;
    gap: 10px;
}

.mini-link {
    display: grid;
    grid-template-columns: 42px 1fr;
    align-items: center;
    gap: 10px;
    color: #334155;
    font-size: 14px;
    font-weight: 700;
}

.mini-link img {
    width: 42px;
    height: 54px;
    border-radius: 10px;
    object-fit: cover;
}

.rank-section {
    padding: 42px 0;
}

.rank-panel {
    padding: 34px;
    border-radius: 28px;
    color: var(--white);
    background:
        radial-gradient(circle at 88% 18%, rgba(245, 158, 11, 0.18), transparent 30%),
        linear-gradient(135deg, var(--slate-950), var(--teal-950));
    box-shadow: var(--shadow);
}

.rank-panel .section-kicker,
.rank-panel .section-more {
    color: #5eead4;
}

.rank-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 26px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.rank-list a {
    display: grid;
    grid-template-columns: 48px 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.rank-list strong {
    color: var(--amber);
    font-size: 20px;
}

.rank-list span {
    font-weight: 800;
}

.rank-list em {
    color: rgba(255, 255, 255, 0.58);
    font-size: 13px;
    font-style: normal;
}

.inner-page {
    padding-top: 42px;
}

.page-hero {
    border-radius: 28px;
    padding: clamp(34px, 6vw, 68px);
    color: var(--white);
    background:
        radial-gradient(circle at 82% 20%, rgba(245, 158, 11, 0.2), transparent 30%),
        linear-gradient(135deg, var(--teal-950), var(--slate-800));
    box-shadow: var(--shadow);
}

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

.page-hero p {
    max-width: 820px;
    margin: 16px 0 0;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.8;
    font-size: 18px;
}

.category-hero {
    display: grid;
    grid-template-columns: 1fr minmax(280px, 480px);
    align-items: center;
    gap: 32px;
}

.filter-bar {
    width: min(1240px, calc(100% - 44px));
    margin: 34px auto 0;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.filter-bar button {
    border: 1px solid rgba(15, 118, 110, 0.18);
    border-radius: 999px;
    padding: 10px 17px;
    color: var(--teal-900);
    background: var(--white);
    cursor: pointer;
    font-weight: 800;
}

.filter-bar button.is-active {
    color: var(--white);
    background: var(--teal-700);
}

.empty-state {
    display: none;
    margin-top: 24px;
    border-radius: 18px;
    padding: 30px;
    text-align: center;
    color: #64748b;
    background: var(--white);
    box-shadow: var(--soft-shadow);
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 28px;
    color: #64748b;
    font-size: 14px;
}

.breadcrumb a {
    color: var(--teal-700);
    font-weight: 800;
}

.detail-page {
    padding-bottom: 30px;
}

.detail-hero {
    width: min(1240px, calc(100% - 44px));
    margin: 28px auto 0;
    display: grid;
    grid-template-columns: 310px 1fr;
    gap: 34px;
    align-items: center;
    border-radius: 30px;
    padding: 30px;
    color: var(--white);
    background:
        radial-gradient(circle at 82% 18%, rgba(20, 184, 166, 0.22), transparent 34%),
        linear-gradient(135deg, var(--slate-950), var(--teal-950));
    box-shadow: var(--shadow);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 24px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
}

.detail-main h1 {
    margin: 0;
    font-size: clamp(36px, 5vw, 62px);
    line-height: 1.1;
}

.detail-line {
    max-width: 780px;
    margin: 18px 0 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: 19px;
    line-height: 1.8;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
}

.detail-meta span {
    border-radius: 999px;
    padding: 9px 14px;
    color: #ccfbf1;
    background: rgba(255, 255, 255, 0.12);
}

.player-section,
.detail-content,
.related-section {
    width: min(1240px, calc(100% - 44px));
    margin-left: auto;
    margin-right: auto;
}

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

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

.movie-video {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    background: #000;
}

.play-layer {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: radial-gradient(circle, rgba(15, 23, 42, 0.12), rgba(2, 6, 23, 0.46));
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-trigger {
    width: 88px;
    height: 88px;
    border: 0;
    border-radius: 999px;
    color: var(--slate-950);
    background: linear-gradient(135deg, #facc15, var(--amber));
    box-shadow: 0 18px 45px rgba(245, 158, 11, 0.42);
    cursor: pointer;
    font-size: 36px;
    padding-left: 6px;
}

.detail-content {
    margin-top: 34px;
    border-radius: 26px;
    padding: 34px;
    background: var(--white);
    box-shadow: var(--soft-shadow);
}

.detail-content h2 {
    margin: 0 0 12px;
    font-size: 28px;
}

.detail-content h2:not(:first-child) {
    margin-top: 30px;
}

.detail-content p {
    margin: 0;
    color: #475569;
    line-height: 2;
    font-size: 17px;
}

.related-section {
    margin-top: 52px;
}

.site-footer {
    margin-top: 90px;
    padding: 58px 22px 28px;
    color: #cbd5e1;
    background: linear-gradient(180deg, var(--slate-900), var(--slate-950));
}

.footer-grid {
    width: min(1240px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 38px;
}

.footer-logo {
    color: var(--white);
    font-size: 26px;
    font-weight: 900;
    margin-bottom: 14px;
}

.site-footer h2 {
    color: var(--white);
    margin: 0 0 16px;
    font-size: 18px;
}

.site-footer p,
.site-footer li {
    line-height: 1.8;
}

.site-footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

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

.footer-bottom {
    width: min(1240px, 100%);
    margin: 34px auto 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 24px;
    text-align: center;
    color: #94a3b8;
    font-size: 14px;
}

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

    .nav-menu {
        gap: 14px;
    }

    .nav-search {
        min-width: 220px;
    }
}

@media (max-width: 900px) {
    .site-nav {
        height: auto;
        min-height: 66px;
        align-items: flex-start;
        padding-top: 12px;
        padding-bottom: 12px;
    }

    .nav-toggle {
        display: block;
        margin-left: auto;
    }

    .nav-menu {
        position: absolute;
        left: 12px;
        right: 12px;
        top: 70px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 18px;
        border-radius: 20px;
        background: rgba(15, 23, 42, 0.98);
        box-shadow: var(--shadow);
    }

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

    .nav-menu > a {
        padding: 8px 0;
    }

    .nav-search {
        width: 100%;
    }

    .hero-stage,
    .hero-bg {
        min-height: 620px;
    }

    .hero-content {
        top: 54%;
    }

    .hero-control {
        display: none;
    }

    .search-band,
    .category-hero,
    .detail-hero,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .detail-poster {
        max-width: 320px;
    }

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

@media (max-width: 680px) {
    .movie-grid,
    .compact-grid,
    .library-grid,
    .rank-grid,
    .category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .search-band,
    .content-section,
    .rank-section,
    .page-hero,
    .detail-page,
    .breadcrumb,
    .detail-hero,
    .player-section,
    .detail-content,
    .related-section,
    .filter-bar {
        width: min(100% - 26px, 1240px);
    }

    .search-band,
    .rank-panel,
    .page-hero,
    .detail-hero,
    .detail-content {
        padding: 22px;
        border-radius: 22px;
    }

    .wide-search {
        display: grid;
    }

    .wide-search button {
        padding: 14px;
    }

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

    .hero-stage,
    .hero-bg {
        min-height: 590px;
    }

    .hero-content {
        left: 18px;
        width: calc(100vw - 36px);
    }

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

    .hero p {
        font-size: 16px;
    }

    .movie-info {
        padding: 13px;
    }

    .movie-info h3 {
        font-size: 15px;
    }

    .movie-info p {
        min-height: 42px;
        font-size: 12px;
    }

    .movie-meta {
        font-size: 12px;
        flex-direction: column;
    }

    .rank-list a {
        grid-template-columns: 42px 1fr;
    }

    .rank-list em {
        grid-column: 2;
    }

    .play-trigger {
        width: 70px;
        height: 70px;
        font-size: 28px;
    }
}
