:root {
    color-scheme: dark;
    --dark-950: #030507;
    --dark-900: #07090c;
    --dark-850: #0c1117;
    --dark-800: #12171e;
    --dark-700: #1d2530;
    --dark-600: #2b3645;
    --primary-600: #0043ad;
    --primary-500: #0056e0;
    --primary-400: #1a75ff;
    --accent-500: #e6a800;
    --accent-400: #ffc61a;
    --text-main: #ffffff;
    --text-soft: #d1d5db;
    --text-muted: #8b96a7;
    --line: rgba(255, 255, 255, 0.08);
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 14px;
}

* {
    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: linear-gradient(180deg, var(--dark-900) 0%, var(--dark-800) 42%, var(--dark-900) 100%);
    color: var(--text-main);
}

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 80;
    border-bottom: 1px solid rgba(29, 37, 48, 0.9);
    background: rgba(7, 9, 12, 0.94);
    backdrop-filter: blur(16px);
}

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

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

.brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
    box-shadow: 0 14px 34px rgba(0, 86, 224, 0.32);
    transition: transform 0.25s ease;
}

.brand:hover .brand-mark {
    transform: scale(1.08);
}

.brand-text {
    font-size: 21px;
}

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

.nav-link {
    position: relative;
    color: var(--text-soft);
    font-size: 14px;
    font-weight: 700;
    transition: color 0.25s ease;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -22px;
    height: 2px;
    transform: scaleX(0);
    transform-origin: center;
    background: var(--accent-400);
    transition: transform 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
    color: white;
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: scaleX(1);
}

.mobile-menu-btn {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--dark-800);
    color: white;
}

.hero-slider {
    position: relative;
    height: 70vh;
    min-height: 620px;
    overflow: hidden;
    background: var(--dark-900);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1s ease;
    pointer-events: none;
}

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

.hero-slide > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, var(--dark-900) 0%, rgba(7, 9, 12, 0.82) 32%, rgba(7, 9, 12, 0.2) 100%),
        radial-gradient(circle at 20% 78%, rgba(0, 86, 224, 0.38), transparent 32%),
        radial-gradient(circle at 80% 68%, rgba(230, 168, 0, 0.24), transparent 28%);
}

.hero-content {
    position: absolute;
    left: max(16px, calc((100vw - 1180px) / 2));
    bottom: 96px;
    width: min(680px, calc(100% - 32px));
}

.hero-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

.hero-tags span,
.hero-tags a,
.detail-tags span,
.detail-tags a {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 6px 12px;
    border-radius: 999px;
    color: var(--text-soft);
    background: rgba(29, 37, 48, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 13px;
    font-weight: 700;
}

.hero-tags a,
.detail-tags a {
    color: white;
    background: rgba(230, 168, 0, 0.88);
    border-color: rgba(230, 168, 0, 0.28);
}

.hero-content h1 {
    margin: 0 0 18px;
    font-size: clamp(42px, 6vw, 74px);
    line-height: 1.04;
    letter-spacing: -0.04em;
    text-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.hero-content p {
    max-width: 660px;
    margin: 0 0 28px;
    color: var(--text-soft);
    font-size: 18px;
    line-height: 1.8;
}

.hero-actions,
.detail-info .primary-btn {
    display: flex;
    align-items: center;
    gap: 14px;
}

.primary-btn,
.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 26px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.primary-btn {
    color: white;
    background: linear-gradient(90deg, var(--primary-600), var(--primary-500));
    box-shadow: 0 18px 44px rgba(0, 86, 224, 0.32);
}

.primary-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 22px 52px rgba(0, 86, 224, 0.46);
    background: linear-gradient(90deg, var(--primary-500), var(--primary-400));
}

.ghost-btn {
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(12px);
}

.ghost-btn:hover {
    transform: translateY(-2px);
    background: rgba(29, 37, 48, 0.88);
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 50px;
    height: 50px;
    border: 0;
    border-radius: 50%;
    color: white;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(12px);
    font-size: 36px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.25s ease, transform 0.25s ease;
}

.hero-control:hover {
    transform: translateY(-50%) scale(1.08);
    background: rgba(0, 0, 0, 0.72);
}

.hero-prev {
    left: 24px;
    transform: translateY(-50%);
}

.hero-next {
    right: 24px;
    transform: translateY(-50%);
}

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

.hero-dot {
    width: 16px;
    height: 4px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.active {
    width: 36px;
    background: var(--accent-400);
}

.search-landing {
    position: relative;
    z-index: 8;
    display: grid;
    grid-template-columns: 1fr minmax(320px, 520px);
    gap: 28px;
    align-items: center;
    margin-top: -40px;
    padding: 28px;
    border: 1px solid rgba(230, 168, 0, 0.18);
    border-radius: var(--radius-xl);
    background: rgba(18, 23, 30, 0.88);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.search-landing h2 {
    margin: 0 0 8px;
    font-size: 28px;
}

.search-landing p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.7;
}

.landing-search {
    display: flex;
    gap: 10px;
}

.landing-search input,
.filter-search input {
    width: 100%;
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    outline: none;
    padding: 0 18px;
    color: white;
    background: rgba(7, 9, 12, 0.72);
}

.landing-search button {
    height: 48px;
    border: 0;
    border-radius: 999px;
    padding: 0 22px;
    color: white;
    background: var(--primary-500);
    font-weight: 800;
    cursor: pointer;
}

.content-section {
    padding: 72px 0 0;
}

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

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

.section-heading p {
    max-width: 680px;
    margin: 10px 0 0;
    color: var(--text-muted);
    line-height: 1.7;
}

.section-more {
    flex: 0 0 auto;
    color: var(--accent-400);
    font-weight: 800;
}

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

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

.library-grid {
    padding-bottom: 60px;
}

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

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--dark-700);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.26);
}

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

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

.card-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), transparent 62%);
}

.year-pill,
.card-category,
.rank-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.year-pill {
    top: 12px;
    right: 12px;
    min-height: 26px;
    padding: 0 10px;
    background: rgba(0, 0, 0, 0.74);
}

.card-category {
    left: 12px;
    bottom: 12px;
    min-height: 26px;
    padding: 0 10px;
    background: rgba(0, 86, 224, 0.82);
}

.rank-badge {
    top: 12px;
    left: 12px;
    min-width: 30px;
    height: 30px;
    color: #111;
    background: var(--accent-400);
}

.card-body {
    padding: 14px 2px 0;
}

.movie-title {
    display: block;
    color: white;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.25s ease;
}

.movie-card:hover .movie-title,
.movie-title:hover {
    color: var(--accent-400);
}

.card-body p,
.wide-info p,
.movie-card-compact p {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    margin: 8px 0 10px;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.65;
}

.meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    color: var(--text-muted);
    font-size: 12px;
}

.meta-row a {
    color: var(--accent-400);
}

.wide-list,
.editor-list,
.ranking-list {
    display: grid;
    gap: 16px;
}

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

.ranking-list,
.editor-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.movie-card-wide,
.movie-card-compact {
    display: grid;
    gap: 16px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: rgba(18, 23, 30, 0.52);
    overflow: hidden;
    transition: background 0.25s ease, transform 0.25s ease;
}

.movie-card-wide {
    grid-template-columns: 190px 1fr;
    min-height: 128px;
}

.movie-card-compact {
    grid-template-columns: 106px 1fr;
    min-height: 106px;
}

.movie-card-wide:hover,
.movie-card-compact:hover {
    background: rgba(18, 23, 30, 0.95);
    transform: translateY(-2px);
}

.wide-cover,
.compact-cover {
    position: relative;
    height: 100%;
    min-height: 106px;
    overflow: hidden;
    background: var(--dark-700);
}

.wide-info,
.movie-card-compact > div {
    min-width: 0;
    padding: 12px 16px 12px 0;
}

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

.category-tile,
.category-card-large a {
    display: block;
    min-height: 158px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(18, 23, 30, 0.95), rgba(29, 37, 48, 0.62));
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.category-tile:hover,
.category-card-large a:hover {
    transform: translateY(-4px) scale(1.01);
    border-color: rgba(230, 168, 0, 0.4);
    background: linear-gradient(135deg, rgba(0, 67, 173, 0.38), rgba(18, 23, 30, 0.9));
}

.category-tile span,
.category-card-large h2 {
    display: block;
    margin: 0 0 10px;
    font-size: 20px;
    font-weight: 900;
}

.category-tile p,
.category-card-large p {
    margin: 0;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.65;
}

.category-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin-bottom: 18px;
    border-radius: 14px;
    color: #111;
    background: var(--accent-400);
    font-weight: 900;
}

.page-main {
    padding-top: 92px;
}

.page-hero {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 34px;
    padding: 54px 0 20px;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--accent-400);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.16em;
}

.page-hero h1 {
    margin: 0 0 14px;
    font-size: clamp(38px, 5vw, 64px);
    letter-spacing: -0.04em;
}

.page-hero p {
    max-width: 720px;
    margin: 0;
    color: var(--text-soft);
    line-height: 1.8;
}

.filter-panel {
    margin-bottom: 28px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(18, 23, 30, 0.74);
}

.filter-search {
    margin-bottom: 14px;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-buttons button {
    min-height: 34px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0 14px;
    color: var(--text-soft);
    background: rgba(7, 9, 12, 0.74);
    cursor: pointer;
    transition: color 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.filter-buttons button:hover,
.filter-buttons button.active {
    color: white;
    border-color: rgba(230, 168, 0, 0.48);
    background: rgba(230, 168, 0, 0.2);
}

.filter-empty {
    display: none;
    margin: 18px 0 0;
    color: var(--text-muted);
}

.filter-empty.show {
    display: block;
}

.detail-main {
    background: radial-gradient(circle at 20% 120px, rgba(0, 86, 224, 0.24), transparent 28%),
        radial-gradient(circle at 86% 300px, rgba(230, 168, 0, 0.14), transparent 26%);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 24px;
    color: var(--text-muted);
    font-size: 14px;
}

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

.detail-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 34px;
    align-items: center;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: rgba(18, 23, 30, 0.76);
    box-shadow: var(--shadow);
}

.detail-poster {
    aspect-ratio: 3 / 4;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--dark-700);
}

.detail-info h1 {
    margin: 0 0 18px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.lead-text {
    max-width: 780px;
    margin: 0 0 22px;
    color: var(--text-soft);
    font-size: 18px;
    line-height: 1.85;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}

.detail-meta span {
    padding: 8px 12px;
    border-radius: 999px;
    color: var(--text-soft);
    background: rgba(7, 9, 12, 0.62);
    border: 1px solid var(--line);
    font-size: 13px;
    font-weight: 700;
}

.player-section {
    padding-top: 34px;
}

.player-shell {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: #000;
    box-shadow: var(--shadow);
}

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

.play-cover {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: white;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.25));
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-icon {
    width: 74px;
    height: 74px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: white;
    background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.42);
    font-size: 30px;
    padding-left: 5px;
}

.play-cover span:last-child {
    font-size: 18px;
    font-weight: 900;
}

.detail-content {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    padding-top: 34px;
}

.story-card {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(18, 23, 30, 0.72);
}

.story-card h2 {
    margin: 0 0 16px;
    font-size: 24px;
}

.story-card p {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.9;
}

.related-grid {
    padding-bottom: 72px;
}

.site-footer {
    margin-top: 72px;
    border-top: 1px solid var(--line);
    background: rgba(7, 9, 12, 0.84);
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 36px 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    color: var(--text-muted);
}

.footer-brand {
    color: white;
    font-weight: 900;
    font-size: 18px;
}

.footer-inner p {
    margin: 0;
}

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

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

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

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

@media (max-width: 860px) {
    .mobile-menu-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .site-nav {
        position: absolute;
        top: 64px;
        left: 16px;
        right: 16px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 12px;
        border: 1px solid var(--line);
        border-radius: 18px;
        background: rgba(7, 9, 12, 0.98);
        box-shadow: var(--shadow);
    }

    .site-nav.open {
        display: flex;
    }

    .nav-link {
        padding: 14px 12px;
    }

    .nav-link::after {
        display: none;
    }

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

    .hero-content {
        bottom: 78px;
    }

    .hero-control {
        display: none;
    }

    .search-landing,
    .page-hero,
    .detail-layout,
    .detail-content {
        grid-template-columns: 1fr;
    }

    .search-landing,
    .page-hero {
        display: grid;
    }

    .wide-list,
    .ranking-list,
    .editor-list {
        grid-template-columns: 1fr;
    }

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

    .detail-layout {
        gap: 24px;
    }

    .detail-poster {
        width: min(320px, 100%);
    }
}

@media (max-width: 600px) {
    .container,
    .header-inner,
    .footer-inner {
        width: min(100% - 24px, 1180px);
    }

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

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

    .hero-content p,
    .lead-text {
        font-size: 16px;
    }

    .hero-actions,
    .landing-search,
    .footer-inner,
    .footer-links {
        align-items: stretch;
        flex-direction: column;
    }

    .hero-actions .primary-btn,
    .hero-actions .ghost-btn,
    .landing-search button {
        width: 100%;
    }

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

    .movie-card-wide,
    .movie-card-compact {
        grid-template-columns: 120px 1fr;
    }

    .wide-cover,
    .compact-cover {
        min-height: 120px;
    }

    .page-main {
        padding-top: 78px;
    }

    .page-hero {
        padding-top: 28px;
    }

    .detail-layout,
    .story-card,
    .filter-panel,
    .search-landing {
        padding: 18px;
    }
}
