:root {
    --bg: #f8fafc;
    --panel: #ffffff;
    --dark: #0f172a;
    --dark-soft: #1e293b;
    --muted: #64748b;
    --line: #e2e8f0;
    --emerald: #059669;
    --emerald-light: #34d399;
    --cyan: #0891b2;
    --cyan-light: #22d3ee;
    --text: #111827;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Inter", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    color: var(--text);
    background: linear-gradient(180deg, #f8fafc 0%, #ecfdf5 42%, #ffffff 100%);
    line-height: 1.6;
}

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

img {
    display: block;
    width: 100%;
    height: auto;
}

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    color: #ffffff;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.98));
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.25);
    backdrop-filter: blur(18px);
}

.header-inner {
    max-width: 1280px;
    height: 70px;
    margin: 0 auto;
    padding: 0 22px;
    display: flex;
    align-items: center;
    gap: 22px;
}

.logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: -0.02em;
    background: linear-gradient(90deg, var(--emerald-light), var(--cyan-light));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.logo {
    font-size: 22px;
    white-space: nowrap;
}

.logo-mark {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    color: #04111d;
    background: linear-gradient(135deg, var(--emerald-light), var(--cyan-light));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 28px rgba(52, 211, 153, 0.4);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 5px;
}

.desktop-nav a,
.mobile-nav a {
    color: #cbd5e1;
    padding: 10px 13px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
    color: #ffffff;
    background: rgba(5, 150, 105, 0.9);
    transform: translateY(-1px);
}

.header-search {
    margin-left: auto;
    display: flex;
    align-items: center;
    background: rgba(51, 65, 85, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    padding: 5px;
}

.header-search input,
.mobile-nav input {
    width: 230px;
    border: 0;
    outline: 0;
    color: #ffffff;
    background: transparent;
    padding: 9px 12px;
}

.header-search input::placeholder,
.mobile-nav input::placeholder {
    color: #94a3b8;
}

.header-search button,
.mobile-nav button,
.hero-button,
.ghost-button,
.play-button,
.filter-panel button {
    border: 0;
    color: #ffffff;
    background: linear-gradient(135deg, var(--emerald), var(--cyan));
    border-radius: 999px;
    padding: 9px 16px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(5, 150, 105, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.header-search button:hover,
.hero-button:hover,
.play-button:hover,
.filter-panel button:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(5, 150, 105, 0.34);
}

.mobile-menu-button {
    display: none;
    margin-left: auto;
    border: 0;
    color: #ffffff;
    background: rgba(51, 65, 85, 0.9);
    border-radius: 10px;
    padding: 9px 12px;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    padding: 0 22px 18px;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
}

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

.mobile-nav form {
    display: flex;
    gap: 8px;
    background: rgba(51, 65, 85, 0.8);
    border-radius: 16px;
    padding: 6px;
}

main {
    min-height: 70vh;
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.025);
    transition: opacity 0.9s ease, transform 1.2s ease;
}

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

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

.hero-mask {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.72) 40%, rgba(2, 6, 23, 0.12) 100%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.08) 52%, rgba(2, 6, 23, 0.4) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    height: 100%;
    margin: 0 auto;
    padding: 76px 22px 56px;
    display: grid;
    align-content: center;
    grid-template-columns: minmax(0, 680px) 360px;
    gap: 54px;
}

.hero-copy {
    animation: rise 0.7s ease both;
}

.hero-kicker,
.section-kicker,
.page-kicker {
    display: inline-flex;
    align-items: center;
    color: var(--emerald-light);
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-copy h1 {
    margin: 16px 0 18px;
    font-size: clamp(40px, 8vw, 84px);
    line-height: 0.95;
    letter-spacing: -0.05em;
}

.hero-copy p {
    max-width: 680px;
    margin: 0;
    color: #e2e8f0;
    font-size: 18px;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 24px 0 30px;
}

.hero-meta span,
.tag-row span,
.detail-tags span,
.category-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    color: #047857;
    background: #d1fae5;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 800;
}

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

.hero-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
}

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

.hero-panel {
    align-self: center;
    padding: 24px;
    border-radius: 26px;
    background: rgba(15, 23, 42, 0.68);
    border: 1px solid rgba(148, 163, 184, 0.22);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.hero-panel h3 {
    margin: 0 0 16px;
    font-size: 20px;
}

.hero-panel-row {
    display: grid;
    grid-template-columns: 74px 1fr;
    gap: 14px;
    align-items: center;
    padding: 12px 0;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.hero-panel-row:first-of-type {
    border-top: 0;
}

.hero-panel-row img {
    width: 74px;
    height: 92px;
    object-fit: cover;
    border-radius: 14px;
}

.hero-panel-row strong {
    display: block;
    font-size: 15px;
}

.hero-panel-row span {
    color: #cbd5e1;
    font-size: 13px;
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 28px;
    z-index: 3;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 12px;
}

.hero-controls button {
    border: 0;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.68);
    border-radius: 999px;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    cursor: pointer;
}

.hero-dot {
    opacity: 0.55;
    transition: width 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
    width: 42px;
    opacity: 1;
    background: var(--emerald);
}

.content-wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 54px 22px;
}

.section-block {
    margin: 0 0 70px;
}

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

.section-head h2,
.page-title h1 {
    margin: 4px 0 0;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.section-more {
    color: var(--emerald);
    font-weight: 900;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-7px);
    border-color: rgba(52, 211, 153, 0.55);
    box-shadow: 0 22px 48px rgba(15, 23, 42, 0.16);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a, #064e3b);
}

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

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

.poster-badge,
.poster-score {
    position: absolute;
    top: 12px;
    z-index: 2;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(10px);
}

.poster-badge {
    left: 12px;
}

.poster-score {
    right: 12px;
    background: linear-gradient(135deg, var(--emerald), var(--cyan));
}

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

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

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

.movie-card p {
    min-height: 52px;
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 14px;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.tag-row span {
    padding: 4px 9px;
    font-size: 12px;
}

.feature-panel {
    border-radius: 30px;
    padding: 34px;
    background: linear-gradient(135deg, #ecfdf5, #ecfeff);
    box-shadow: inset 0 0 0 1px rgba(5, 150, 105, 0.12);
}

.horizontal-scroll {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(220px, 260px);
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 12px;
    scroll-snap-type: x mandatory;
}

.horizontal-scroll .movie-card {
    scroll-snap-align: start;
}

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

.category-card {
    min-height: 190px;
    padding: 26px;
    border-radius: 26px;
    color: #ffffff;
    background: linear-gradient(135deg, #0f172a, #047857 52%, #0891b2);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

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

.category-card h3 {
    margin: 0 0 8px;
    font-size: 24px;
}

.category-card p {
    margin: 0;
    color: #dbeafe;
}

.rank-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 48px 70px 1fr;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.rank-number {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--emerald), var(--cyan));
    font-weight: 900;
}

.rank-item img {
    width: 70px;
    height: 88px;
    object-fit: cover;
    border-radius: 14px;
}

.rank-copy strong,
.rank-copy em {
    display: block;
}

.rank-copy em {
    color: var(--muted);
    font-style: normal;
    font-size: 13px;
}

.page-hero {
    color: #ffffff;
    background: radial-gradient(circle at top left, rgba(52, 211, 153, 0.42), transparent 34%), linear-gradient(135deg, #0f172a, #1e293b 58%, #064e3b);
    padding: 76px 22px;
}

.page-title {
    max-width: 1280px;
    margin: 0 auto;
}

.page-title p {
    max-width: 760px;
    margin: 18px 0 0;
    color: #cbd5e1;
    font-size: 18px;
}

.filter-panel {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 12px;
    margin: 0 0 28px;
    padding: 16px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    border: 1px solid #dbe3ef;
    border-radius: 16px;
    background: #ffffff;
    outline: none;
    padding: 12px 14px;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--emerald);
    box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.14);
}

.empty-state {
    display: none;
    padding: 34px;
    text-align: center;
    color: var(--muted);
    border-radius: 24px;
    background: #ffffff;
}

.detail-hero {
    color: #ffffff;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.72)), var(--detail-image);
    background-size: cover;
    background-position: center;
}

.detail-hero-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 70px 22px;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 36px;
    align-items: end;
}

.detail-poster img {
    width: 280px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 26px;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.4);
}

.detail-copy h1 {
    margin: 14px 0;
    font-size: clamp(34px, 6vw, 70px);
    line-height: 1;
    letter-spacing: -0.05em;
}

.detail-copy p {
    max-width: 780px;
    color: #dbeafe;
    font-size: 18px;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 24px;
}

.player-shell {
    max-width: 1160px;
    margin: 0 auto 46px;
    border-radius: 30px;
    overflow: hidden;
    background: #020617;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.28);
    position: relative;
}

.player-stage {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.movie-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000000;
}

.play-cover {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.82));
    cursor: pointer;
    transition: opacity 0.25s ease;
}

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

.play-button {
    width: 84px;
    height: 84px;
    padding: 0;
    font-size: 30px;
}

.player-title {
    padding: 18px 22px;
    color: #e2e8f0;
    background: #0f172a;
    display: flex;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.detail-body {
    max-width: 1160px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 28px;
}

.article-panel,
.side-panel {
    padding: 28px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

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

.article-panel p {
    margin: 0 0 18px;
    color: #334155;
    font-size: 17px;
}

.breadcrumb {
    max-width: 1160px;
    margin: 0 auto 22px;
    color: var(--muted);
    font-weight: 700;
}

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

.side-card {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 12px;
    align-items: center;
    padding: 12px 0;
    border-top: 1px solid var(--line);
}

.side-card:first-of-type {
    border-top: 0;
}

.side-card img {
    width: 72px;
    height: 90px;
    object-fit: cover;
    border-radius: 14px;
}

.side-card strong,
.side-card span {
    display: block;
}

.side-card span {
    color: var(--muted);
    font-size: 13px;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 36px;
}

.pagination a,
.pagination span {
    min-width: 40px;
    padding: 9px 12px;
    border-radius: 12px;
    text-align: center;
    background: #ffffff;
    border: 1px solid var(--line);
    font-weight: 800;
}

.pagination .current {
    color: #ffffff;
    background: linear-gradient(135deg, var(--emerald), var(--cyan));
    border-color: transparent;
}

.site-footer {
    color: #cbd5e1;
    background: linear-gradient(135deg, #0f172a, #1e293b);
    margin-top: 40px;
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 48px 22px;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 36px;
}

.footer-logo {
    font-size: 24px;
}

.footer-inner p {
    max-width: 620px;
    margin: 12px 0 0;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-content: start;
}

.footer-links a {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

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

    .hero-panel {
        display: none;
    }
}

@media (max-width: 820px) {
    .desktop-nav,
    .header-search {
        display: none;
    }

    .mobile-menu-button {
        display: inline-flex;
    }

    .hero-slider {
        min-height: 620px;
        height: 78vh;
    }

    .hero-content {
        padding-top: 64px;
    }

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

    .filter-panel {
        grid-template-columns: 1fr;
    }

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

    .detail-poster img {
        width: 220px;
    }

    .footer-inner {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 540px) {
    .header-inner {
        height: 64px;
        padding: 0 16px;
    }

    .logo {
        font-size: 18px;
    }

    .content-wrap {
        padding: 36px 16px;
    }

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

    .hero-copy p,
    .page-title p,
    .detail-copy p {
        font-size: 16px;
    }

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

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

    .rank-item {
        grid-template-columns: 40px 62px 1fr;
    }

    .rank-item img {
        width: 62px;
        height: 78px;
    }

    .detail-hero-inner,
    .page-hero {
        padding-left: 16px;
        padding-right: 16px;
    }

    .article-panel,
    .side-panel,
    .feature-panel {
        padding: 22px;
        border-radius: 22px;
    }
}
