:root {
    color-scheme: dark;
    --bg-deep: #020617;
    --bg-main: #0f172a;
    --bg-soft: #1e293b;
    --bg-card: rgba(15, 23, 42, 0.86);
    --bg-glass: rgba(15, 23, 42, 0.72);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --cyan: #22d3ee;
    --cyan-deep: #0891b2;
    --orange: #fb923c;
    --yellow: #facc15;
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
    --shadow-strong: 0 28px 70px rgba(2, 6, 23, 0.46);
    --shadow-card: 0 18px 42px rgba(2, 6, 23, 0.28);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at 12% 8%, rgba(34, 211, 238, 0.16), transparent 30%),
        radial-gradient(circle at 88% 3%, rgba(251, 146, 60, 0.12), transparent 34%),
        linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
    color: var(--text);
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    border-bottom: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.82);
    backdrop-filter: blur(20px);
}

.navbar {
    width: min(1180px, calc(100% - 32px));
    min-height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

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

.logo-mark {
    width: 34px;
    height: 34px;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--cyan), var(--cyan-deep));
    box-shadow: 0 12px 32px rgba(34, 211, 238, 0.28);
    display: grid;
    place-items: center;
    color: #03131b;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-links a,
.nav-drop-button {
    padding: 10px 13px;
    border-radius: 999px;
    color: var(--muted-strong);
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.nav-drop-button:hover {
    color: var(--cyan);
    background: rgba(34, 211, 238, 0.08);
    transform: translateY(-1px);
}

.nav-drop {
    position: relative;
}

.nav-drop-button {
    border: 0;
    background: transparent;
    cursor: pointer;
}

.nav-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 12px);
    width: 210px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.96);
    box-shadow: var(--shadow-card);
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-drop:hover .nav-menu,
.nav-drop:focus-within .nav-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.nav-menu a {
    display: block;
    border-radius: 12px;
    padding: 10px 12px;
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.76);
    color: var(--text);
    cursor: pointer;
}

.mobile-panel {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.96);
    padding: 12px;
}

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

.mobile-panel a {
    padding: 12px 14px;
    border-radius: 12px;
    color: var(--muted-strong);
    background: rgba(148, 163, 184, 0.06);
}

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

.hero {
    position: relative;
    min-height: 610px;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}

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

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

.hero-backdrop {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.04);
    filter: saturate(1.12);
}

.hero-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(15, 23, 42, 0.74) 46%, rgba(15, 23, 42, 0.22) 100%),
        linear-gradient(0deg, #020617 0%, transparent 38%);
}

.hero-inner {
    position: relative;
    z-index: 3;
    width: min(1180px, calc(100% - 32px));
    min-height: 610px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(320px, 0.68fr);
    gap: 42px;
    align-items: center;
    padding: 70px 0 58px;
}

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

.hero-label,
.section-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 13px;
    border-radius: 999px;
    color: var(--cyan);
    background: rgba(34, 211, 238, 0.1);
    border: 1px solid rgba(34, 211, 238, 0.22);
    font-size: 14px;
    font-weight: 700;
}

.hero h1 {
    margin: 22px 0 18px;
    font-size: clamp(40px, 6.4vw, 78px);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero-title-link:hover {
    color: var(--cyan);
}

.hero-description {
    margin: 0;
    max-width: 660px;
    color: var(--muted-strong);
    font-size: 18px;
    line-height: 1.8;
}

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

.pill {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    color: var(--muted-strong);
    background: rgba(148, 163, 184, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.14);
    font-size: 14px;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 20px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

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

.btn-primary {
    color: #02131a;
    background: linear-gradient(135deg, var(--cyan), #67e8f9);
    box-shadow: 0 18px 36px rgba(34, 211, 238, 0.22);
}

.btn-secondary {
    color: var(--text);
    background: rgba(15, 23, 42, 0.68);
    border-color: var(--line);
}

.hero-panel {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: rgba(15, 23, 42, 0.52);
    box-shadow: var(--shadow-strong);
    backdrop-filter: blur(18px);
}

.hero-poster {
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.14), rgba(251, 146, 60, 0.12));
}

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

.hero-thumbs {
    position: absolute;
    z-index: 8;
    left: 50%;
    bottom: 26px;
    width: min(1180px, calc(100% - 32px));
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 58px;
    height: 6px;
    border: 0;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.34);
    cursor: pointer;
}

.hero-dot.is-active {
    background: var(--cyan);
}

.section {
    padding: 54px 0;
}

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

.section-title {
    margin: 12px 0 0;
    font-size: clamp(28px, 4vw, 42px);
    letter-spacing: -0.035em;
}

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    box-shadow: var(--shadow-card);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(34, 211, 238, 0.42);
    box-shadow: 0 24px 54px rgba(8, 145, 178, 0.18);
}

.movie-cover {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
}

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

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

.movie-badge {
    position: absolute;
    left: 10px;
    top: 10px;
    z-index: 2;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.72);
    color: var(--cyan);
    border: 1px solid rgba(34, 211, 238, 0.26);
    padding: 5px 9px;
    font-size: 12px;
    font-weight: 800;
}

.movie-body {
    padding: 13px;
}

.movie-title {
    margin: 0;
    min-height: 44px;
    font-size: 16px;
    line-height: 1.38;
    color: #fff;
}

.movie-title a:hover {
    color: var(--cyan);
}

.movie-info {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 8px;
    color: var(--muted);
    font-size: 13px;
}

.movie-line {
    margin: 10px 0 0;
    color: var(--muted-strong);
    font-size: 13px;
    line-height: 1.62;
}

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

.category-card {
    min-height: 170px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background:
        radial-gradient(circle at 20% 18%, rgba(34, 211, 238, 0.18), transparent 36%),
        linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.9));
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: var(--shadow-card);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.category-card h2,
.category-card h3 {
    margin: 0;
    font-size: 22px;
}

.category-card p {
    margin: 12px 0 0;
    color: var(--muted);
    line-height: 1.65;
}

.category-count {
    color: var(--cyan);
    font-weight: 800;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 58px 72px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.76);
    padding: 10px 14px;
}

.rank-number {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #020617;
    background: linear-gradient(135deg, var(--yellow), var(--orange));
    font-weight: 900;
}

.rank-thumb {
    width: 62px;
    height: 84px;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(148, 163, 184, 0.12);
}

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

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

.rank-title a:hover {
    color: var(--cyan);
}

.rank-meta {
    margin-top: 7px;
    color: var(--muted);
    font-size: 14px;
}

.rank-heat {
    color: var(--orange);
    font-weight: 900;
}

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

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

.page-hero p {
    max-width: 820px;
    color: var(--muted-strong);
    line-height: 1.86;
    font-size: 17px;
}

.search-box {
    margin-top: 24px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px;
    gap: 12px;
}

.search-box input,
.search-box select {
    width: 100%;
    min-height: 50px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.78);
    color: var(--text);
    padding: 0 16px;
    outline: none;
}

.search-box input:focus,
.search-box select:focus {
    border-color: rgba(34, 211, 238, 0.58);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.08);
}

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

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

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 28px;
    align-items: start;
}

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

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

.player-stage video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
}

.play-layer {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: grid;
    place-items: center;
    cursor: pointer;
    background: rgba(2, 6, 23, 0.2);
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-button {
    width: 88px;
    height: 88px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cyan), #67e8f9);
    color: #02131a;
    font-size: 34px;
    box-shadow: 0 28px 62px rgba(34, 211, 238, 0.28);
    cursor: pointer;
}

.detail-card,
.side-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: rgba(15, 23, 42, 0.78);
    box-shadow: var(--shadow-card);
}

.detail-card {
    padding: 28px;
    margin-top: 24px;
}

.detail-card h1 {
    margin: 0;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 18px 0 0;
}

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

.detail-content p {
    margin: 0 0 16px;
    color: var(--muted-strong);
    line-height: 1.92;
    font-size: 16px;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.side-card {
    padding: 16px;
}

.side-card h2 {
    margin: 0 0 14px;
    font-size: 20px;
}

.side-cover {
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: rgba(148, 163, 184, 0.12);
}

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

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

.related-card {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    background: rgba(148, 163, 184, 0.07);
    transition: background 0.2s ease, transform 0.2s ease;
}

.related-card:hover {
    transform: translateX(2px);
    background: rgba(34, 211, 238, 0.1);
}

.related-card img {
    width: 58px;
    height: 78px;
    object-fit: cover;
    border-radius: 10px;
}

.related-card strong {
    display: block;
    color: #fff;
    line-height: 1.35;
}

.related-card span {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 13px;
}

.result-empty {
    display: none;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 18px;
    color: var(--muted-strong);
    background: rgba(15, 23, 42, 0.72);
}

.site-footer {
    margin-top: 58px;
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.68);
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 38px 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 1fr;
    gap: 28px;
}

.footer-inner p {
    margin: 12px 0 0;
    color: var(--muted);
    line-height: 1.75;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.footer-links a {
    color: var(--muted-strong);
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.08);
}

.footer-links a:hover {
    color: var(--cyan);
}

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

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

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

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

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

    .hero,
    .hero-inner {
        min-height: auto;
    }

    .hero-inner {
        grid-template-columns: 1fr;
        padding: 46px 0 80px;
    }

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

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

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

    .section {
        padding: 38px 0;
    }

    .section-header {
        display: block;
    }

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

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

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

    .rank-heat {
        grid-column: 3;
    }

    .search-box {
        grid-template-columns: 1fr;
    }

    .detail-card {
        padding: 20px;
    }

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

    .footer-links {
        justify-content: flex-start;
    }
}

@media (max-width: 420px) {
    .container,
    .navbar,
    .hero-inner,
    .hero-thumbs,
    .footer-inner,
    .mobile-panel {
        width: min(100% - 22px, 1180px);
    }

    .movie-title {
        font-size: 15px;
    }

    .play-button {
        width: 72px;
        height: 72px;
    }
}
