:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-card: rgba(15, 23, 42, 0.86);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --cyan: #22d3ee;
    --cyan-strong: #06b6d4;
    --blue: #2563eb;
    --yellow: #facc15;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(8, 145, 178, 0.16), transparent 34rem),
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.15), transparent 32rem),
        var(--bg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.6;
}

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(15, 23, 42, 0.93);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(18px);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand-icon {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #001014;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 0 28px rgba(34, 211, 238, 0.38);
    font-size: 15px;
    font-weight: 900;
}

.brand strong,
.footer-brand strong {
    display: block;
    color: #ffffff;
    font-size: 21px;
    line-height: 1.1;
}

.brand em {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: auto;
}

.desktop-nav a,
.nav-dropdown button {
    color: #dbeafe;
    border: 0;
    background: transparent;
    cursor: pointer;
    transition: color 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active,
.nav-dropdown button:hover {
    color: var(--cyan);
}

.nav-dropdown {
    position: relative;
    padding: 24px 0;
}

.dropdown-panel {
    position: absolute;
    top: 68px;
    left: 0;
    width: 190px;
    padding: 10px;
    display: grid;
    gap: 3px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.98);
    box-shadow: var(--shadow);
    transition: all 0.2s ease;
}

.nav-dropdown:hover .dropdown-panel,
.nav-dropdown:focus-within .dropdown-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-panel a {
    padding: 9px 12px;
    border-radius: 10px;
}

.dropdown-panel a:hover {
    color: #ffffff;
    background: rgba(34, 211, 238, 0.12);
}

.header-search {
    position: relative;
    display: flex;
    align-items: center;
    width: 286px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.42);
    overflow: hidden;
}

.header-search input,
.mobile-panel input,
.hero-search input,
.search-box input,
.filter-box input {
    width: 100%;
    min-width: 0;
    color: #ffffff;
    border: 0;
    outline: 0;
    background: transparent;
}

.header-search input {
    padding: 11px 12px 11px 16px;
}

.header-search button,
.hero-search button,
.search-box button,
.mobile-panel button {
    border: 0;
    cursor: pointer;
    color: #04111d;
    background: var(--cyan);
    transition: background 0.2s ease, transform 0.2s ease;
}

.header-search button {
    align-self: stretch;
    padding: 0 16px;
}

.header-search button:hover,
.hero-search button:hover,
.search-box button:hover,
.mobile-panel button:hover {
    background: #67e8f9;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    color: #ffffff;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.82);
}

.mobile-panel {
    display: none;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 22px 18px;
}

.mobile-panel.is-open {
    display: block;
}

.mobile-panel form {
    display: flex;
    border: 1px solid var(--line);
    border-radius: 999px;
    overflow: hidden;
    background: rgba(2, 6, 23, 0.5);
}

.mobile-panel input {
    padding: 12px 16px;
}

.mobile-panel button {
    padding: 0 18px;
}

.mobile-panel nav {
    display: grid;
    gap: 7px;
    padding-top: 14px;
}

.mobile-panel nav a {
    padding: 10px 4px;
    color: #dbeafe;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.main-section,
.page-shell {
    max-width: 1240px;
    margin: 0 auto;
    padding: 44px 22px;
}

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

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

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

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(15, 23, 42, 0.78) 44%, rgba(2, 6, 23, 0.15) 100%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.92) 0%, transparent 45%);
}

.hero-content {
    position: relative;
    z-index: 1;
    width: min(1240px, 100%);
    margin: 0 auto;
    padding: 72px 22px 86px;
}

.hero-text {
    max-width: 680px;
}

.hero-label,
.section-label,
.detail-label,
.category-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    color: #a5f3fc;
    border: 1px solid rgba(34, 211, 238, 0.24);
    border-radius: 999px;
    background: rgba(8, 145, 178, 0.16);
}

.hero h1,
.hero h2 {
    margin: 18px 0 18px;
    color: #ffffff;
    font-size: clamp(36px, 7vw, 66px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.hero p {
    max-width: 620px;
    margin: 0 0 28px;
    color: #cbd5e1;
    font-size: 18px;
}

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

.btn-primary,
.btn-secondary,
.btn-small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 20px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-weight: 700;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
    color: #04111d;
    background: linear-gradient(135deg, var(--cyan), #60a5fa);
    box-shadow: 0 12px 30px rgba(34, 211, 238, 0.25);
}

.btn-secondary {
    color: #e2e8f0;
    border-color: rgba(148, 163, 184, 0.26);
    background: rgba(15, 23, 42, 0.64);
}

.btn-small {
    min-height: 36px;
    padding: 0 14px;
    color: #cffafe;
    border-color: rgba(34, 211, 238, 0.28);
    background: rgba(8, 145, 178, 0.15);
    font-size: 14px;
}

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

.hero-search {
    display: flex;
    max-width: 560px;
    margin-top: 30px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.hero-search input {
    padding: 16px 20px;
}

.hero-search button {
    min-width: 108px;
    padding: 0 20px;
    font-weight: 700;
}

.hero-control {
    position: absolute;
    z-index: 2;
    top: 50%;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.56);
    cursor: pointer;
    transform: translateY(-50%);
}

.hero-control:hover {
    background: rgba(8, 145, 178, 0.55);
}

.hero-control.prev {
    left: 24px;
}

.hero-control.next {
    right: 24px;
}

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

.hero-dots button {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    transition: all 0.2s ease;
}

.hero-dots button.is-active {
    width: 34px;
    background: var(--cyan);
}

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

.section-head h2,
.page-head h1,
.detail-text h1 {
    margin: 10px 0 0;
    color: #ffffff;
    line-height: 1.16;
}

.section-head h2,
.page-head h1 {
    font-size: clamp(28px, 4vw, 42px);
}

.section-head p,
.page-head p,
.detail-text p {
    max-width: 760px;
    color: var(--muted);
}

.grid {
    display: grid;
    gap: 22px;
}

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

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

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

.feature-band {
    margin: 58px 0;
    padding: 30px;
    border: 1px solid rgba(34, 211, 238, 0.16);
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(8, 145, 178, 0.17), rgba(37, 99, 235, 0.12));
    box-shadow: var(--shadow);
}

.movie-card {
    min-width: 0;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 20px;
    background: var(--bg-card);
    overflow: hidden;
    box-shadow: 0 20px 54px rgba(0, 0, 0, 0.2);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 211, 238, 0.42);
    box-shadow: 0 28px 70px rgba(8, 145, 178, 0.22);
}

.movie-card a {
    display: block;
    height: 100%;
}

.movie-thumb {
    position: relative;
    min-height: 275px;
    background-color: #111827;
    background-position: center;
    background-size: cover;
}

.movie-card.card-wide .movie-thumb,
.movie-card.card-small .movie-thumb {
    min-height: 205px;
}

.movie-badge,
.movie-year,
.rank-num {
    position: absolute;
    z-index: 1;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.movie-badge {
    top: 14px;
    left: 14px;
    padding: 6px 10px;
    color: #a5f3fc;
    background: rgba(2, 6, 23, 0.74);
}

.movie-year {
    top: 14px;
    right: 14px;
    padding: 6px 10px;
    color: #ffffff;
    background: rgba(8, 145, 178, 0.78);
}

.rank-num {
    left: 14px;
    bottom: 14px;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #021016;
    background: var(--yellow);
    box-shadow: 0 12px 28px rgba(250, 204, 21, 0.3);
}

.movie-info {
    padding: 18px;
}

.movie-info h3 {
    margin: 0 0 8px;
    color: #ffffff;
    font-size: 19px;
    line-height: 1.28;
}

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

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

.tag-row span {
    padding: 4px 8px;
    color: #cbd5e1;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.75);
    font-size: 12px;
}

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

.category-tile {
    position: relative;
    min-height: 250px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 24px;
    background: #0f172a;
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-tile:hover {
    transform: translateY(-5px);
    border-color: rgba(34, 211, 238, 0.42);
}

.category-cover {
    position: absolute;
    inset: 0;
    background-position: center;
    background-size: cover;
    transition: transform 0.35s ease;
}

.category-tile:hover .category-cover {
    transform: scale(1.06);
}

.category-content {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    padding: 20px;
}

.category-content strong {
    display: block;
    color: #ffffff;
    font-size: 22px;
}

.category-content em {
    display: block;
    margin: 8px 0 12px;
    color: #cbd5e1;
    font-style: normal;
}

.category-content ul {
    margin: 0;
    padding-left: 18px;
    color: #94a3b8;
    font-size: 13px;
}

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

.mini-card {
    display: grid;
    grid-template-columns: auto 64px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    min-height: 76px;
    padding: 10px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.78);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.mini-card:hover {
    transform: translateX(4px);
    border-color: rgba(34, 211, 238, 0.38);
}

.mini-rank {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #021016;
    border-radius: 999px;
    background: var(--cyan);
    font-weight: 800;
}

.mini-cover {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    background-color: #111827;
    background-position: center;
    background-size: cover;
}

.mini-body {
    min-width: 0;
}

.mini-body strong {
    display: block;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mini-body em {
    display: block;
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.page-hero {
    border-bottom: 1px solid var(--line);
    background:
        linear-gradient(135deg, rgba(8, 145, 178, 0.22), rgba(2, 6, 23, 0.15)),
        radial-gradient(circle at right, rgba(37, 99, 235, 0.24), transparent 34rem);
}

.search-box,
.filter-box {
    display: flex;
    max-width: 760px;
    margin-top: 18px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    overflow: hidden;
}

.search-box input,
.filter-box input {
    padding: 15px 20px;
}

.search-box button {
    min-width: 116px;
    padding: 0 20px;
    font-weight: 800;
}

.filter-box {
    margin: 0 0 26px;
}

.filter-box input {
    width: 100%;
}

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

.breadcrumb a {
    color: #a5f3fc;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
    gap: 34px;
    align-items: start;
}

.player-box {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(34, 211, 238, 0.2);
    border-radius: 26px;
    background: #020617;
    box-shadow: var(--shadow);
}

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

.player-cover {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-position: center;
    background-size: cover;
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(2, 6, 23, 0.28), rgba(2, 6, 23, 0.82)),
        radial-gradient(circle, rgba(34, 211, 238, 0.12), transparent 24rem);
}

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

.play-button {
    position: relative;
    z-index: 1;
    width: 86px;
    height: 86px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #03131b;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--cyan), #93c5fd);
    box-shadow: 0 22px 60px rgba(34, 211, 238, 0.34);
    cursor: pointer;
    font-size: 30px;
}

.detail-panel,
.prose-card {
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 26px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.18);
}

.detail-panel {
    padding: 26px;
}

.detail-text h1 {
    font-size: clamp(30px, 5vw, 46px);
}

.meta-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 22px 0;
}

.meta-list span {
    display: block;
    padding: 12px 14px;
    color: #e2e8f0;
    border: 1px solid rgba(148, 163, 184, 0.13);
    border-radius: 14px;
    background: rgba(2, 6, 23, 0.36);
}

.prose-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    margin-top: 28px;
}

.prose-card {
    padding: 24px;
}

.prose-card h2 {
    margin: 0 0 12px;
    color: #ffffff;
}

.prose-card p {
    margin: 0;
    color: #cbd5e1;
}

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

.no-results {
    padding: 28px;
    color: #cbd5e1;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.72);
}

@media (max-width: 1120px) {
    .header-search {
        display: none;
    }

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

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

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

    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-left: auto;
    }

    .hero {
        min-height: 610px;
    }

    .hero-control {
        display: none;
    }

    .grid.cards-5,
    .grid.cards-4,
    .grid.cards-3,
    .category-grid,
    .detail-layout,
    .prose-grid {
        grid-template-columns: 1fr 1fr;
    }

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

    .section-head,
    .page-head {
        display: block;
    }
}

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

    .brand strong {
        font-size: 18px;
    }

    .brand em {
        display: none;
    }

    .main-section,
    .page-shell,
    .hero-content {
        padding-left: 16px;
        padding-right: 16px;
    }

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

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

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

    .btn-primary,
    .btn-secondary,
    .btn-small {
        width: 100%;
    }

    .hero-search,
    .search-box {
        border-radius: 22px;
        flex-direction: column;
    }

    .hero-search button,
    .search-box button {
        min-height: 48px;
    }

    .grid.cards-5,
    .grid.cards-4,
    .grid.cards-3,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .movie-thumb {
        min-height: 235px;
    }

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