:root {
    --primary-900: #0b3f6e;
    --primary-800: #064b84;
    --primary-700: #0158a0;
    --primary-600: #006fc6;
    --primary-50: #f0f7ff;
    --accent-600: #0d9485;
    --accent-500: #14b8a2;
    --accent-300: #5feacf;
    --neutral-950: #020617;
    --neutral-900: #0f172a;
    --neutral-800: #1e293b;
    --neutral-700: #334155;
    --neutral-600: #475569;
    --neutral-300: #cbd5e1;
    --neutral-200: #e2e8f0;
    --neutral-100: #f1f5f9;
    --neutral-50: #f8fafc;
    --white: #ffffff;
    --shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
    --shadow-lg: 0 24px 48px rgba(15, 23, 42, 0.2);
    --radius: 16px;
    --radius-sm: 10px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--neutral-50);
    color: var(--neutral-900);
    font-family: Inter, "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}

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

img.is-missing {
    opacity: 0;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--primary-900);
    color: var(--white);
    box-shadow: var(--shadow);
}

.nav-layout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand {
    font-size: 20px;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-600), var(--accent-500));
    color: var(--white);
    font-size: 14px;
    box-shadow: 0 8px 18px rgba(20, 184, 162, 0.28);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 26px;
    font-size: 15px;
}

.desktop-nav a,
.mobile-nav a,
.site-footer a {
    transition: color 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.site-footer a:hover {
    color: var(--accent-300);
}

.menu-toggle {
    display: none;
    color: var(--white);
    border: 0;
    border-radius: 10px;
    padding: 8px 10px;
    background: transparent;
    font-size: 22px;
}

.mobile-nav {
    display: none;
    width: min(100% - 32px, 1280px);
    margin: 0 auto;
    padding: 0 0 16px;
}

.mobile-nav a {
    display: block;
    padding: 10px 14px;
    border-radius: 10px;
}

.mobile-nav a:hover {
    background: var(--primary-800);
}

.main-space {
    padding: 32px 0 64px;
}

.section-stack {
    display: grid;
    gap: 64px;
}

.hero-carousel {
    position: relative;
    height: 420px;
    overflow: hidden;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--primary-900), var(--neutral-950));
    box-shadow: var(--shadow-lg);
}

.hero-track,
.hero-slide {
    height: 100%;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.55s ease, transform 0.55s ease;
    pointer-events: none;
}

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

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

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.1));
}

.hero-content {
    position: absolute;
    left: clamp(24px, 6vw, 64px);
    right: clamp(24px, 18vw, 420px);
    bottom: clamp(28px, 8vw, 76px);
    z-index: 2;
    color: var(--white);
}

.hero-kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    border-radius: 999px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.18);
    color: var(--white);
    font-size: 13px;
    backdrop-filter: blur(12px);
}

.hero-content h1,
.hero-content h2 {
    margin: 0 0 16px;
    max-width: 800px;
    font-size: clamp(32px, 5vw, 54px);
    line-height: 1.08;
    font-weight: 900;
}

.hero-content p {
    max-width: 760px;
    margin: 0 0 22px;
    font-size: clamp(16px, 2vw, 19px);
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.92);
}

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

.hero-tags span,
.detail-tags span {
    border-radius: 999px;
    padding: 6px 11px;
    background: rgba(20, 184, 162, 0.16);
    color: var(--accent-300);
    font-size: 13px;
    font-weight: 600;
}

.hero-actions,
.section-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.btn,
.btn-secondary,
.btn-soft {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    border-radius: 12px;
    padding: 0 18px;
    font-weight: 700;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.btn {
    background: var(--primary-600);
    color: var(--white);
    box-shadow: 0 10px 18px rgba(0, 111, 198, 0.24);
}

.btn:hover {
    background: var(--primary-700);
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.18);
    color: var(--white);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.28);
    transform: translateY(-2px);
}

.btn-soft {
    background: var(--primary-50);
    color: var(--primary-700);
}

.btn-soft:hover {
    background: #dcefff;
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.48);
    color: var(--white);
    font-size: 24px;
    opacity: 0;
    transform: translateY(-50%);
    transition: opacity 0.2s ease, background 0.2s ease;
}

.hero-carousel:hover .hero-control {
    opacity: 1;
}

.hero-control:hover {
    background: rgba(0, 0, 0, 0.72);
}

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

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

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

.hero-dot {
    width: 9px;
    height: 9px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.52);
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
    width: 32px;
    background: var(--white);
}

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

.section-head h1,
.section-head h2,
.page-title h1 {
    margin: 0;
    color: var(--neutral-900);
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.18;
    font-weight: 900;
}

.section-head p,
.page-title p {
    margin: 8px 0 0;
    max-width: 760px;
    color: var(--neutral-600);
    line-height: 1.75;
}

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

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

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

.movie-card a {
    display: block;
    height: 100%;
    overflow: hidden;
    border-radius: 14px;
    background: var(--white);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.1);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card a:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 32px rgba(15, 23, 42, 0.16);
}

.card-poster {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-900), var(--accent-600));
}

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

.movie-card a:hover .card-poster img {
    transform: scale(1.08);
}

.card-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0));
    opacity: 0;
    transition: opacity 0.25s ease;
}

.movie-card a:hover .card-poster::after {
    opacity: 1;
}

.card-badge,
.card-duration,
.related-cover span {
    position: absolute;
    z-index: 2;
    border-radius: 7px;
    padding: 3px 7px;
    color: var(--white);
    font-size: 12px;
    font-weight: 700;
}

.card-badge {
    top: 10px;
    left: 10px;
    background: var(--accent-500);
}

.card-duration,
.related-cover span {
    right: 10px;
    bottom: 10px;
    background: rgba(0, 0, 0, 0.72);
}

.card-play {
    position: absolute;
    inset: 50% auto auto 50%;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    color: var(--white);
    opacity: 0;
    backdrop-filter: blur(10px);
    transform: translate(-50%, -50%) scale(0.86);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card a:hover .card-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.card-body {
    padding: 16px;
}

.card-body h3 {
    display: -webkit-box;
    min-height: 48px;
    margin: 0 0 10px;
    overflow: hidden;
    color: var(--neutral-900);
    font-size: 16px;
    font-weight: 800;
    line-height: 1.5;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    transition: color 0.2s ease;
}

.movie-card a:hover h3 {
    color: var(--primary-600);
}

.card-body p {
    display: -webkit-box;
    min-height: 44px;
    margin: 0 0 12px;
    overflow: hidden;
    color: var(--neutral-600);
    font-size: 14px;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--neutral-600);
    font-size: 13px;
}

.category-preview,
.white-panel,
.filter-panel,
.detail-card,
.related-panel,
.rank-panel,
.category-card {
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow);
}

.category-preview,
.white-panel {
    padding: 28px;
}

.scroll-row {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    padding: 4px 2px 16px;
    scrollbar-width: none;
}

.scroll-row::-webkit-scrollbar {
    display: none;
}

.scroll-row .movie-card {
    flex: 0 0 292px;
}

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

.page-title {
    margin-bottom: 28px;
}

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

.category-card {
    padding: 26px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.category-card h2 {
    margin: 0 0 10px;
    font-size: 24px;
    font-weight: 900;
}

.category-card p {
    margin: 0 0 18px;
    color: var(--neutral-600);
    line-height: 1.7;
}

.category-mini-list {
    display: grid;
    gap: 8px;
    margin-top: 18px;
    color: var(--neutral-700);
    font-size: 14px;
}

.filter-panel {
    display: grid;
    gap: 18px;
    margin-bottom: 28px;
    padding: 22px;
}

.filter-panel label span {
    display: block;
    margin-bottom: 7px;
    color: var(--neutral-700);
    font-size: 13px;
    font-weight: 800;
}

.search-field input,
.filter-panel select {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--neutral-200);
    border-radius: 12px;
    background: var(--neutral-50);
    padding: 0 14px;
    color: var(--neutral-900);
    outline: none;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.search-field input:focus,
.filter-panel select:focus {
    border-color: var(--primary-600);
    box-shadow: 0 0 0 4px rgba(0, 111, 198, 0.12);
}

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

.filter-empty {
    margin: 0;
    color: var(--neutral-600);
    font-weight: 700;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 52px 180px 1fr auto;
    gap: 18px;
    align-items: center;
    border-radius: 14px;
    background: var(--white);
    padding: 14px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.rank-num {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary-50);
    color: var(--primary-700);
    font-weight: 900;
}

.rank-cover {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary-900), var(--accent-600));
}

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

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

.rank-info p {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: var(--neutral-600);
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.rank-score {
    color: #ca8a04;
    font-weight: 900;
    white-space: nowrap;
}

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

.detail-main {
    display: grid;
    gap: 24px;
}

.breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 22px;
    color: var(--neutral-600);
    font-weight: 700;
}

.breadcrumb:hover {
    color: var(--primary-600);
}

.video-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius);
    background: var(--neutral-950);
    box-shadow: var(--shadow-lg);
}

.video-shell video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: var(--neutral-950);
}

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.18));
    color: var(--white);
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-ring {
    display: grid;
    place-items: center;
    width: 78px;
    height: 78px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.24);
    font-size: 30px;
    backdrop-filter: blur(14px);
}

.player-loading,
.player-error {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(0, 0, 0, 0.55);
    color: var(--white);
    font-weight: 800;
}

.player-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255, 255, 255, 0.25);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.player-controls {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    gap: 10px;
    padding: 18px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.84), transparent);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.video-shell:hover .player-controls,
.video-shell.is-playing .player-controls {
    opacity: 1;
}

.player-controls input[type="range"] {
    width: 100%;
    accent-color: var(--primary-600);
}

.control-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    color: var(--white);
}

.control-left,
.control-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.control-row button {
    border: 0;
    background: transparent;
    color: var(--white);
    font-size: 18px;
}

.time-label {
    font-size: 13px;
    font-weight: 700;
}

.detail-card,
.related-panel {
    padding: 26px;
}

.detail-card h1 {
    margin: 0 0 18px;
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 900;
    line-height: 1.18;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 22px;
    color: var(--neutral-600);
    font-size: 14px;
}

.detail-meta span {
    border-radius: 999px;
    background: var(--neutral-100);
    padding: 7px 12px;
}

.content-block {
    border-top: 1px solid var(--neutral-200);
    padding-top: 22px;
    margin-top: 22px;
}

.content-block h2 {
    margin: 0 0 12px;
    font-size: 22px;
    font-weight: 900;
}

.content-block p {
    margin: 0;
    color: var(--neutral-700);
    line-height: 1.85;
}

.related-panel {
    position: sticky;
    top: 88px;
}

.related-panel h2 {
    margin: 0 0 16px;
    font-size: 22px;
    font-weight: 900;
}

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

.related-item {
    display: grid;
    grid-template-columns: 126px 1fr;
    gap: 12px;
    align-items: center;
}

.related-cover {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary-900), var(--accent-600));
}

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

.related-item:hover img {
    transform: scale(1.08);
}

.related-item h3 {
    display: -webkit-box;
    margin: 0 0 6px;
    overflow: hidden;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    transition: color 0.2s ease;
}

.related-item:hover h3 {
    color: var(--primary-600);
}

.related-item p {
    margin: 0;
    color: var(--neutral-600);
    font-size: 12px;
}

.site-footer {
    margin-top: 72px;
    background: var(--neutral-900);
    color: var(--neutral-300);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.4fr;
    gap: 32px;
    padding: 48px 0;
}

.footer-brand {
    margin-bottom: 14px;
    color: var(--white);
    font-size: 18px;
}

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

.site-footer p,
.site-footer li {
    color: var(--neutral-300);
    font-size: 14px;
    line-height: 1.8;
}

.site-footer ul {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-bottom {
    border-top: 1px solid var(--neutral-800);
    padding: 18px 16px;
    text-align: center;
    color: var(--neutral-300);
    font-size: 14px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (min-width: 768px) {
    .hero-carousel {
        height: 500px;
    }
}

@media (min-width: 1024px) {
    .hero-carousel {
        height: 600px;
    }
}

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

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

    .related-panel {
        position: static;
    }

    .filter-selects {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

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

    .menu-toggle {
        display: inline-flex;
    }

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

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

    .hero-carousel {
        height: 500px;
        border-radius: 0;
        margin-inline: -16px;
    }

    .hero-content {
        right: 24px;
    }

    .hero-control {
        opacity: 1;
    }

    .movie-grid,
    .movie-grid.three,
    .editor-grid,
    .category-overview {
        grid-template-columns: 1fr;
    }

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

    .rank-item {
        grid-template-columns: 42px 110px 1fr;
    }

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

    .related-item {
        grid-template-columns: 112px 1fr;
    }
}

@media (max-width: 520px) {
    .container {
        width: min(100% - 24px, 1280px);
    }

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

    .hero-content p {
        font-size: 15px;
    }

    .footer-grid {
        padding: 36px 0;
    }
}
