:root {
    --bg: #0a0a0a;
    --bg-soft: #111111;
    --bg-card: #171717;
    --bg-elevated: #202020;
    --text: #f5f5f5;
    --muted: #a3a3a3;
    --subtle: #737373;
    --line: #2a2a2a;
    --accent: #f59e0b;
    --accent-dark: #d97706;
    --accent-soft: rgba(245, 158, 11, 0.14);
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
    --radius: 18px;
    --max: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background: radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.11), transparent 34%), var(--bg);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(10, 10, 10, 0.92);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(16px);
}

.navbar {
    max-width: var(--max);
    height: 68px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #111111;
    background: linear-gradient(135deg, var(--accent), #fbbf24);
    box-shadow: 0 12px 28px rgba(245, 158, 11, 0.32);
    font-size: 15px;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.12;
}

.brand-text strong {
    font-size: 19px;
    letter-spacing: 0.04em;
}

.brand-text small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

.nav-panel {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    padding: 9px 13px;
    border-radius: 11px;
    color: #d4d4d4;
    font-size: 14px;
    font-weight: 650;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: #111111;
    background: var(--accent);
    transform: translateY(-1px);
}

.nav-search {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 8px;
}

.nav-search input,
.filter-bar input,
.filter-bar select,
.search-panel input {
    color: var(--text);
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: 12px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nav-search input {
    width: 220px;
    padding: 9px 12px;
}

.nav-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus,
.search-panel input:focus {
    border-color: rgba(245, 158, 11, 0.75);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.nav-search button,
.primary-button,
.secondary-button,
.search-panel button,
.filter-clear,
.player-open-button {
    border: 0;
    cursor: pointer;
    border-radius: 12px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.nav-search button,
.primary-button,
.search-panel button,
.player-open-button {
    color: #111111;
    background: var(--accent);
}

.nav-search button {
    padding: 9px 14px;
}

.primary-button,
.secondary-button,
.player-open-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 18px;
}

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

.nav-search button:hover,
.primary-button:hover,
.search-panel button:hover,
.player-open-button:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
}

.secondary-button:hover {
    border-color: rgba(245, 158, 11, 0.65);
    color: var(--accent);
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    color: var(--text);
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: 12px;
}

.hero {
    position: relative;
    min-height: 72vh;
    overflow: hidden;
    background: #050505;
}

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

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

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

.hero-layer {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.96), rgba(0, 0, 0, 0.64) 43%, rgba(0, 0, 0, 0.16)), linear-gradient(0deg, var(--bg), transparent 28%);
}

.hero-content {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
}

.hero-inner {
    width: 100%;
    max-width: var(--max);
    margin: 0 auto;
    padding: 96px 20px 72px;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    color: #111111;
    background: rgba(245, 158, 11, 0.92);
    border-radius: 999px;
    padding: 6px 13px;
    font-size: 13px;
    font-weight: 850;
}

.hero h1 {
    margin: 0 0 16px;
    font-size: clamp(38px, 7vw, 76px);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.hero p {
    margin: 0 0 24px;
    color: #d4d4d4;
    font-size: clamp(16px, 2vw, 20px);
    max-width: 620px;
}

.hero-tags,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.hero-tags {
    margin-bottom: 28px;
}

.tag-pill,
.meta-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 11px;
    font-size: 13px;
    font-weight: 750;
}

.tag-pill {
    color: #111111;
    background: rgba(245, 158, 11, 0.9);
}

.meta-pill {
    color: #e5e5e5;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

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

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 46px;
    height: 46px;
    color: var(--text);
    background: rgba(0, 0, 0, 0.46);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    cursor: pointer;
    transform: translateY(-50%);
    backdrop-filter: blur(10px);
    font-size: 34px;
    line-height: 1;
}

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

.hero-arrow.prev {
    left: 20px;
}

.hero-arrow.next {
    right: 20px;
}

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

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

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

.section,
.page-section {
    max-width: var(--max);
    margin: 0 auto;
    padding: 64px 20px;
}

.section + .section {
    padding-top: 22px;
}

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

.section-title {
    margin: 0;
    font-size: clamp(26px, 4vw, 38px);
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.section-desc {
    margin: 8px 0 0;
    color: var(--muted);
}

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

.category-card {
    min-height: 170px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(245, 158, 11, 0.55);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.16), rgba(255, 255, 255, 0.03));
}

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

.category-card p {
    margin: 0 0 18px;
    color: var(--muted);
    font-size: 14px;
}

.category-card span {
    color: var(--accent);
    font-size: 14px;
    font-weight: 800;
}

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

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

.movie-scroller {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    padding: 4px 2px 18px;
    scroll-snap-type: x mandatory;
}

.movie-scroller .movie-card {
    width: 270px;
    flex: 0 0 auto;
    scroll-snap-align: start;
}

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

.movie-card-link {
    display: block;
    height: 100%;
    overflow: hidden;
    background: rgba(23, 23, 23, 0.92);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card-link:hover {
    transform: translateY(-5px);
    border-color: rgba(245, 158, 11, 0.52);
    box-shadow: 0 24px 55px rgba(0, 0, 0, 0.42);
}

.movie-cover {
    position: relative;
    aspect-ratio: 16 / 10;
    margin: 0;
    overflow: hidden;
    background: #0f0f0f;
}

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

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

.cover-badge {
    position: absolute;
    right: 10px;
    bottom: 10px;
    padding: 4px 9px;
    color: var(--text);
    background: rgba(0, 0, 0, 0.74);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(8px);
}

.movie-card-body {
    padding: 16px;
}

.movie-card-body h3 {
    margin: 0 0 9px;
    min-height: 1.4em;
    font-size: 17px;
    line-height: 1.35;
}

.movie-card-body p {
    min-height: 3.2em;
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 14px;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--subtle);
    font-size: 12px;
}

.movie-meta span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.page-hero {
    background: linear-gradient(180deg, rgba(32, 32, 32, 0.95), rgba(10, 10, 10, 0));
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.page-hero-inner {
    max-width: var(--max);
    margin: 0 auto;
    padding: 72px 20px 44px;
}

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

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

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

.page-hero p {
    max-width: 820px;
    margin: 0;
    color: var(--muted);
    font-size: 18px;
}

.filter-bar,
.search-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 28px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(23, 23, 23, 0.86);
}

.filter-bar input,
.filter-bar select {
    min-width: 180px;
    padding: 12px 13px;
}

.filter-bar input {
    flex: 1 1 260px;
}

.filter-clear {
    padding: 0 16px;
    color: var(--text);
    border: 1px solid var(--line);
    background: var(--bg-elevated);
}

.filter-clear:hover {
    border-color: rgba(245, 158, 11, 0.6);
    color: var(--accent);
}

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

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

.rank-link {
    display: grid;
    grid-template-columns: 54px 96px 1fr 24px;
    align-items: center;
    gap: 15px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(23, 23, 23, 0.88);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.rank-link:hover {
    transform: translateX(4px);
    border-color: rgba(245, 158, 11, 0.55);
    background: rgba(32, 32, 32, 0.95);
}

.rank-number {
    color: var(--accent);
    font-size: 20px;
    font-weight: 900;
    text-align: center;
}

.rank-link img {
    width: 96px;
    height: 62px;
    object-fit: cover;
    border-radius: 10px;
}

.rank-info {
    min-width: 0;
}

.rank-info strong,
.rank-info small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-info small {
    margin-top: 4px;
    color: var(--muted);
}

.rank-arrow {
    color: var(--accent);
    font-size: 28px;
}

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

.detail-main,
.detail-side-card,
.related-panel,
.synopsis-card,
.review-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(23, 23, 23, 0.92);
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.26);
}

.detail-main {
    overflow: hidden;
}

.player-shell {
    position: relative;
    background: #000000;
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.62));
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-icon {
    width: 78px;
    height: 78px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #111111;
    background: var(--accent);
    border-radius: 999px;
    box-shadow: 0 18px 45px rgba(245, 158, 11, 0.34);
    font-size: 30px;
    transform: translateX(2px);
}

.detail-content {
    padding: 26px;
}

.detail-content h1 {
    margin: 14px 0 14px;
    font-size: clamp(30px, 4.5vw, 48px);
    line-height: 1.1;
    letter-spacing: -0.035em;
}

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

.synopsis-card,
.review-card,
.related-panel,
.detail-side-card {
    padding: 22px;
}

.synopsis-card h2,
.review-card h2,
.related-panel h2,
.detail-side-card h2 {
    margin: 0 0 14px;
    font-size: 21px;
}

.synopsis-card p,
.review-card p,
.detail-side-card p {
    margin: 0 0 14px;
    color: #d4d4d4;
}

.synopsis-card p:last-child,
.review-card p:last-child,
.detail-side-card p:last-child {
    margin-bottom: 0;
}

.detail-side {
    display: grid;
    gap: 20px;
    align-content: start;
    position: sticky;
    top: 88px;
}

.poster-card img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 14px;
    margin-bottom: 14px;
}

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

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

.related-link img {
    width: 112px;
    height: 72px;
    object-fit: cover;
    border-radius: 10px;
}

.related-link strong {
    display: -webkit-box;
    overflow: hidden;
    color: var(--text);
    font-size: 14px;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.related-link small {
    display: block;
    margin-top: 5px;
    color: var(--muted);
}

.search-panel {
    align-items: center;
}

.search-panel input {
    flex: 1 1 280px;
    padding: 14px 15px;
}

.search-panel button {
    min-height: 50px;
    padding: 0 24px;
}

.search-results {
    min-height: 280px;
}

.empty-state {
    padding: 54px 20px;
    color: var(--muted);
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    text-align: center;
}

.site-footer {
    margin-top: 56px;
    border-top: 1px solid var(--line);
    background: rgba(10, 10, 10, 0.98);
}

.footer-grid {
    max-width: var(--max);
    margin: 0 auto;
    padding: 42px 20px;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 30px;
}

.footer-brand {
    color: var(--text);
    font-size: 22px;
    font-weight: 900;
}

.site-footer p {
    max-width: 480px;
    color: var(--muted);
}

.site-footer h2 {
    margin: 0 0 14px;
    font-size: 16px;
}

.footer-links {
    display: grid;
    gap: 8px;
}

.footer-links a {
    color: var(--muted);
    font-size: 14px;
}

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

.footer-bottom {
    max-width: var(--max);
    margin: 0 auto;
    padding: 18px 20px 30px;
    color: var(--subtle);
    font-size: 13px;
}

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

    .nav-panel {
        position: absolute;
        top: 68px;
        left: 14px;
        right: 14px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 16px;
        border: 1px solid var(--line);
        border-radius: 16px;
        background: rgba(10, 10, 10, 0.98);
        box-shadow: var(--shadow);
    }

    .nav-panel.is-open {
        display: flex;
    }

    .nav-search {
        margin-left: 0;
    }

    .nav-search input {
        width: 100%;
        flex: 1;
    }

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

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

    .detail-side {
        position: static;
    }

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

@media (max-width: 640px) {
    .navbar {
        padding: 0 14px;
    }

    .brand-text small {
        display: none;
    }

    .hero {
        min-height: 76vh;
    }

    .hero-inner {
        padding: 82px 18px 70px;
    }

    .hero-arrow {
        display: none;
    }

    .section,
    .page-section {
        padding: 42px 16px;
    }

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

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

    .movie-scroller .movie-card {
        width: 82vw;
    }

    .rank-link {
        grid-template-columns: 42px 78px 1fr;
    }

    .rank-arrow {
        display: none;
    }

    .rank-link img {
        width: 78px;
        height: 54px;
    }

    .related-link {
        grid-template-columns: 96px 1fr;
    }

    .related-link img {
        width: 96px;
        height: 64px;
    }
}
