:root {
    color-scheme: dark;
    --bg: #070914;
    --bg-soft: #101426;
    --panel: rgba(17, 24, 39, 0.78);
    --panel-strong: rgba(15, 23, 42, 0.95);
    --line: rgba(255, 255, 255, 0.1);
    --text: #f8fafc;
    --muted: #a7b0c3;
    --accent: #ff477e;
    --accent-2: #8b5cf6;
    --gold: #f8c75a;
    --radius: 24px;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 8% 0%, rgba(255, 71, 126, 0.26), transparent 34rem),
        radial-gradient(circle at 92% 8%, rgba(139, 92, 246, 0.28), transparent 36rem),
        linear-gradient(180deg, #080a16 0%, #0b1020 42%, #090b14 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
}

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

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

button,
input,
select {
    font: inherit;
}

.page-shell {
    min-height: 100vh;
    overflow: hidden;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--line);
    background: rgba(7, 9, 20, 0.76);
    backdrop-filter: blur(22px);
}

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

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.site-logo::before {
    content: "";
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 14px 35px rgba(255, 71, 126, 0.36);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.site-nav a {
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--muted);
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover,
.site-nav a.is-active {
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    width: min(300px, 28vw);
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
}

.header-search input {
    width: 100%;
    min-width: 0;
    color: var(--text);
    border: 0;
    outline: 0;
    background: transparent;
}

.header-search button,
.primary-button,
.secondary-button,
.play-trigger {
    border: 0;
    cursor: pointer;
}

.header-search button {
    flex: 0 0 auto;
    padding: 8px 14px;
    color: #fff;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    font-weight: 800;
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    color: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
}

.hero {
    position: relative;
    padding: 38px 0 28px;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 18px auto auto 50%;
    width: 86vw;
    max-width: 1200px;
    height: 520px;
    transform: translateX(-50%);
    border-radius: 44px;
    background:
        linear-gradient(135deg, rgba(255, 71, 126, 0.2), rgba(139, 92, 246, 0.12)),
        rgba(255, 255, 255, 0.03);
    filter: blur(0);
    opacity: 0.8;
    pointer-events: none;
}

.hero-frame {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 36px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(41, 23, 55, 0.88));
    box-shadow: var(--shadow);
}

.hero-track {
    position: relative;
    min-height: 520px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 36px;
    align-items: center;
    padding: 54px;
    opacity: 0;
    transform: translateX(24px) scale(0.98);
    pointer-events: none;
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.hero-slide.is-active {
    opacity: 1;
    transform: translateX(0) scale(1);
    pointer-events: auto;
}

.hero-copy {
    position: relative;
    z-index: 2;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    color: #ffe4ee;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    font-size: 13px;
    font-weight: 800;
}

.hero h1,
.page-hero h1,
.detail-title h1 {
    margin: 18px 0 16px;
    font-size: clamp(34px, 6vw, 66px);
    line-height: 1.06;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.hero p,
.page-hero p,
.detail-title p {
    max-width: 720px;
    color: #d7deef;
    font-size: 18px;
}

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

.primary-button,
.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 999px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 18px 42px rgba(255, 71, 126, 0.32);
}

.secondary-button {
    color: #fff;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.08);
}

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

.hero-poster {
    position: relative;
    z-index: 1;
}

.hero-poster::before {
    content: "";
    position: absolute;
    inset: 32px -26px -26px 42px;
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(255, 71, 126, 0.42), rgba(139, 92, 246, 0.2));
    filter: blur(22px);
}

.hero-poster img,
.detail-poster img,
.movie-card img,
.rank-thumb img,
.category-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-poster img {
    position: relative;
    aspect-ratio: 3 / 4;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 28px;
    box-shadow: 0 26px 65px rgba(0, 0, 0, 0.4);
}

.hero-dots {
    position: absolute;
    left: 54px;
    bottom: 34px;
    display: flex;
    gap: 9px;
    z-index: 3;
}

.hero-dot {
    width: 34px;
    height: 8px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
    cursor: pointer;
}

.hero-dot.is-active {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.quick-search {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    margin-top: 26px;
    max-width: 620px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.quick-search input,
.filter-box input,
.search-panel input,
.search-panel select {
    color: var(--text);
    border: 1px solid var(--line);
    outline: 0;
    background: rgba(255, 255, 255, 0.07);
}

.quick-search input {
    min-width: 0;
    padding: 0 18px;
    border: 0;
    background: transparent;
}

.section {
    padding: 34px 0;
}

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

.section-head h2 {
    margin: 0;
    font-size: clamp(26px, 4vw, 38px);
    font-weight: 950;
    letter-spacing: -0.03em;
}

.section-head p {
    max-width: 640px;
    margin: 6px 0 0;
    color: var(--muted);
}

.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.chip {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #dbe4f7;
    background: rgba(255, 255, 255, 0.06);
    font-size: 13px;
    font-weight: 800;
}

.chip:hover {
    background: rgba(255, 255, 255, 0.11);
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 20px 55px rgba(0, 0, 0, 0.18);
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 71, 126, 0.42);
    background: rgba(255, 255, 255, 0.1);
}

.poster-link {
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.04);
}

.card-body {
    padding: 13px;
}

.card-body h3 {
    display: -webkit-box;
    min-height: 48px;
    margin: 0 0 8px;
    overflow: hidden;
    font-size: 16px;
    font-weight: 900;
    line-height: 1.5;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.card-text {
    display: -webkit-box;
    min-height: 42px;
    margin: 10px 0 0;
    overflow: hidden;
    color: #c7d0e5;
    font-size: 13px;
    line-height: 1.6;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 260px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
    box-shadow: 0 20px 65px rgba(0, 0, 0, 0.22);
}

.category-card::before {
    content: "";
    position: absolute;
    inset: auto -60px -80px auto;
    width: 180px;
    height: 180px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(255, 71, 126, 0.26), rgba(139, 92, 246, 0.24));
    filter: blur(8px);
}

.category-card h2,
.category-card h3 {
    position: relative;
    margin: 0 0 10px;
    font-size: 26px;
    font-weight: 950;
}

.category-card p {
    position: relative;
    color: var(--muted);
}

.category-preview {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin: 22px 0;
}

.category-preview img {
    aspect-ratio: 3 / 4;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

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

.page-hero-box {
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: 30px;
    background: linear-gradient(135deg, rgba(255, 71, 126, 0.16), rgba(139, 92, 246, 0.12)), rgba(255, 255, 255, 0.05);
}

.filter-box,
.search-panel {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin: 24px 0;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
}

.filter-box input,
.search-panel input,
.search-panel select {
    min-height: 46px;
    padding: 0 14px;
    border-radius: 14px;
}

.filter-box input,
.search-panel input {
    flex: 1 1 280px;
}

.search-panel select {
    flex: 0 1 180px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 66px 92px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.06);
}

.rank-number {
    display: grid;
    place-items: center;
    width: 50px;
    height: 50px;
    border-radius: 18px;
    color: #111827;
    background: linear-gradient(135deg, var(--gold), #fff2b8);
    font-size: 22px;
    font-weight: 950;
}

.rank-thumb {
    overflow: hidden;
    aspect-ratio: 3 / 4;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.05);
}

.rank-info h3 {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 900;
}

.rank-info p {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: #c9d3e7;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.detail-layout {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 32px;
    align-items: start;
    padding: 42px 0 22px;
}

.detail-poster {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.05);
    box-shadow: var(--shadow);
}

.detail-poster img {
    aspect-ratio: 3 / 4;
}

.detail-title h1 {
    font-size: clamp(34px, 5vw, 58px);
}

.detail-info-panel {
    margin-top: 22px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.06);
}

.detail-info-panel h2,
.player-section h2,
.related-section h2 {
    margin: 0 0 12px;
    font-size: 26px;
    font-weight: 950;
}

.detail-info-panel p {
    color: #d7deef;
}

.player-section {
    padding: 24px 0 34px;
}

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

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

.play-trigger {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    transform: translate(-50%, -50%);
    color: #fff;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 16px 45px rgba(255, 71, 126, 0.38);
    font-size: 30px;
}

.play-trigger.is-hidden {
    display: none;
}

.related-section {
    padding: 26px 0 58px;
}

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

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

.site-footer {
    border-top: 1px solid var(--line);
    padding: 34px 0;
    color: var(--muted);
    background: rgba(0, 0, 0, 0.16);
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 16px;
}

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

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

.empty-result {
    display: none;
    padding: 28px;
    text-align: center;
    color: var(--muted);
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.05);
}

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

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

    .hero-slide {
        grid-template-columns: minmax(0, 1fr) 300px;
        padding: 42px;
    }

    .detail-layout {
        grid-template-columns: 300px minmax(0, 1fr);
    }
}

@media (max-width: 860px) {
    .header-inner {
        min-height: 64px;
    }

    .site-nav,
    .header-search {
        position: absolute;
        left: 16px;
        right: 16px;
        display: none;
        width: auto;
        background: rgba(7, 9, 20, 0.96);
    }

    .site-nav {
        top: 70px;
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        border: 1px solid var(--line);
        border-radius: 20px;
    }

    .header-search {
        top: 286px;
        border-radius: 18px;
    }

    .site-header.is-open .site-nav,
    .site-header.is-open .header-search {
        display: flex;
    }

    .menu-toggle {
        display: inline-grid;
        place-items: center;
    }

    .hero-track {
        min-height: 760px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 30px;
    }

    .hero-poster {
        max-width: 280px;
        margin: 0 auto;
    }

    .hero-dots {
        left: 30px;
    }

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

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

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

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

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

    .rank-item .primary-button {
        grid-column: 2 / -1;
        width: fit-content;
    }
}

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

    .hero {
        padding-top: 18px;
    }

    .hero-frame,
    .page-hero-box {
        border-radius: 24px;
    }

    .hero-track {
        min-height: 700px;
    }

    .hero-slide {
        padding: 22px;
    }

    .quick-search {
        grid-template-columns: 1fr;
        border-radius: 22px;
    }

    .quick-search input {
        min-height: 44px;
    }

    .section-head {
        display: block;
    }

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

    .card-body {
        padding: 11px;
    }

    .rank-item {
        grid-template-columns: 42px 64px minmax(0, 1fr);
        gap: 12px;
    }

    .rank-number {
        width: 40px;
        height: 40px;
        border-radius: 14px;
        font-size: 18px;
    }

    .rank-info h3 {
        font-size: 17px;
    }

    .play-trigger {
        width: 68px;
        height: 68px;
        font-size: 24px;
    }
}
