:root {
    --bg: #f8fafc;
    --ink: #111827;
    --muted: #64748b;
    --line: #e5e7eb;
    --dark: #0f172a;
    --dark-soft: #1e293b;
    --amber: #f59e0b;
    --amber-deep: #b45309;
    --amber-soft: #fff7ed;
    --card: #ffffff;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(15, 23, 42, 0.92);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(18px);
}

.header-inner {
    width: min(1280px, calc(100% - 32px));
    min-height: 72px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    color: #ffffff;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border-radius: 14px;
    color: #111827;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    box-shadow: 0 10px 28px rgba(245, 158, 11, 0.4);
}

.brand-text {
    font-size: 20px;
    letter-spacing: 0.03em;
}

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

.nav-link {
    color: rgba(255, 255, 255, 0.72);
    padding: 10px 14px;
    border-radius: 999px;
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: #ffffff;
    background: rgba(245, 158, 11, 0.18);
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.header-search input {
    width: 220px;
    color: #ffffff;
    background: transparent;
    border: 0;
    outline: 0;
    padding: 8px 10px;
}

.header-search input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.header-search button,
.hero-search button,
.filter-panel button,
.btn-primary {
    border: 0;
    color: #111827;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    border-radius: 999px;
    font-weight: 900;
    padding: 10px 18px;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(245, 158, 11, 0.28);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: #ffffff;
    border-radius: 999px;
}

.hero-carousel {
    min-height: calc(100vh - 72px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    background: var(--dark);
    color: #ffffff;
}

.hero-stage {
    position: relative;
    min-height: 680px;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    display: flex;
    align-items: center;
    background-position: center;
    background-size: cover;
    transition: opacity 0.7s ease, transform 0.7s ease;
    transform: scale(1.02);
}

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

.hero-content {
    width: min(760px, calc(100% - 80px));
    margin-left: clamp(24px, 7vw, 96px);
    padding: 42px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 32px;
    background: rgba(15, 23, 42, 0.42);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.36);
    backdrop-filter: blur(10px);
}

.hero-kicker,
.section-kicker,
.page-hero span {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border-radius: 999px;
    color: #fcd34d;
    background: rgba(245, 158, 11, 0.18);
    border: 1px solid rgba(245, 158, 11, 0.25);
    padding: 6px 14px;
    font-size: 14px;
    font-weight: 900;
}

.hero-content h1 {
    margin: 22px 0 16px;
    font-size: clamp(42px, 6vw, 82px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-content p {
    max-width: 660px;
    margin: 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: 19px;
}

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

.hero-meta span,
.detail-meta span {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 7px 12px;
    color: rgba(255, 255, 255, 0.86);
    font-weight: 700;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
}

.btn-ghost {
    padding: 10px 18px;
    border-radius: 999px;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.1);
    font-weight: 900;
}

.btn-link {
    color: #fcd34d;
    font-weight: 900;
}

.hero-controls {
    position: absolute;
    left: clamp(24px, 7vw, 96px);
    bottom: 44px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.hero-arrow,
.hero-dot {
    cursor: pointer;
    border: 0;
}

.hero-arrow {
    width: 46px;
    height: 46px;
    color: #ffffff;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    font-size: 30px;
}

.hero-dots {
    display: flex;
    gap: 8px;
}

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

.hero-dot.is-active {
    width: 48px;
    background: #f59e0b;
}

.hero-panel {
    padding: 34px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.98));
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.hero-search {
    padding: 20px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-search label {
    display: block;
    margin-bottom: 12px;
    color: #ffffff;
    font-size: 20px;
    font-weight: 900;
}

.hero-search div {
    display: flex;
    gap: 8px;
}

.hero-search input {
    min-width: 0;
    flex: 1;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.12);
    outline: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    padding: 10px 14px;
}

.quick-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.quick-categories a {
    color: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    padding: 9px 13px;
    font-weight: 800;
}

.hero-side-list h2 {
    margin: 0 0 14px;
    font-size: 22px;
}

.content-section {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 72px 0;
}

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

.section-head h2 {
    margin: 10px 0 6px;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.1;
}

.section-head p {
    margin: 0;
    color: var(--muted);
}

.section-head > a {
    color: var(--amber-deep);
    font-weight: 900;
}

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

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

.movie-card,
.compact-card,
.category-overview-card,
.category-tile,
.player-card,
.detail-copy,
.related-box {
    background: var(--card);
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.movie-card {
    display: block;
    overflow: hidden;
    border-radius: 22px;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(245, 158, 11, 0.5);
    box-shadow: var(--shadow);
}

.poster {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    background-position: center;
    background-size: cover;
    background-color: #1f2937;
    overflow: hidden;
}

.movie-card-masonry .poster,
.movie-card-mini .poster {
    aspect-ratio: 4 / 5;
}

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.72));
}

.poster-badge,
.poster-play,
.rank-number {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    font-weight: 900;
}

.poster-badge {
    top: 12px;
    left: 12px;
    color: #111827;
    background: #fbbf24;
    padding: 5px 10px;
    font-size: 13px;
}

.poster-play {
    right: 12px;
    bottom: 12px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.16);
    padding: 7px 12px;
    font-size: 13px;
}

.card-copy {
    display: grid;
    gap: 8px;
    padding: 16px;
}

.card-copy strong {
    color: #111827;
    font-size: 18px;
    line-height: 1.28;
}

.card-copy em {
    color: var(--muted);
    min-height: 46px;
    font-style: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    color: #92400e;
    font-size: 13px;
    font-weight: 800;
}

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

.tag-row span,
.detail-tags a {
    border-radius: 999px;
    color: #92400e;
    background: #fffbeb;
    padding: 4px 9px;
    font-size: 12px;
    font-weight: 800;
}

.split-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: start;
}

.ranking-list,
.rank-page-list,
.hero-side-list,
.related-box {
    display: grid;
    gap: 14px;
}

.compact-card {
    display: grid;
    grid-template-columns: 112px 1fr;
    gap: 14px;
    align-items: center;
    overflow: hidden;
    border-radius: 18px;
    padding: 12px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.compact-card:hover {
    transform: translateX(4px);
    border-color: rgba(245, 158, 11, 0.5);
}

.hero-panel .compact-card {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: none;
}

.compact-poster {
    position: relative;
    display: block;
    height: 74px;
    border-radius: 14px;
    background-position: center;
    background-size: cover;
    background-color: #1f2937;
}

.rank-number {
    top: 8px;
    left: 8px;
    min-width: 28px;
    height: 28px;
    display: inline-grid;
    place-items: center;
    color: #111827;
    background: #fbbf24;
}

.compact-copy {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.compact-copy strong {
    overflow: hidden;
    color: #111827;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-weight: 900;
}

.hero-panel .compact-copy strong {
    color: #ffffff;
}

.compact-copy em,
.compact-copy span {
    overflow: hidden;
    color: var(--muted);
    white-space: nowrap;
    text-overflow: ellipsis;
    font-style: normal;
    font-size: 13px;
}

.hero-panel .compact-copy em,
.hero-panel .compact-copy span {
    color: rgba(255, 255, 255, 0.66);
}

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

.category-section {
    width: 100%;
    max-width: none;
    padding-left: max(16px, calc((100% - 1280px) / 2));
    padding-right: max(16px, calc((100% - 1280px) / 2));
    background: linear-gradient(135deg, #fff7ed, #ffffff 42%, #fffbeb);
}

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

.category-tile,
.category-overview-card {
    border-radius: 24px;
    padding: 22px;
}

.category-tile {
    display: grid;
    gap: 8px;
    min-height: 170px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-tile span,
.category-main-link span {
    color: var(--amber-deep);
    font-weight: 900;
}

.category-tile strong,
.category-main-link h2 {
    font-size: 24px;
    line-height: 1.2;
}

.category-tile em,
.category-main-link p {
    color: var(--muted);
    font-style: normal;
}

.masonry-grid {
    columns: 3 260px;
    column-gap: 22px;
}

.masonry-grid .movie-card {
    break-inside: avoid;
    margin-bottom: 22px;
}

.page-main {
    min-height: 70vh;
}

.page-hero {
    padding: 84px max(16px, calc((100% - 1280px) / 2));
}

.page-hero h1 {
    max-width: 960px;
    margin: 18px 0 12px;
    font-size: clamp(34px, 5vw, 62px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    font-size: 18px;
}

.page-hero-dark {
    color: #ffffff;
    background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.35), transparent 34%), linear-gradient(135deg, #0f172a, #1e293b);
}

.page-hero-soft {
    color: #111827;
    background: radial-gradient(circle at top right, rgba(245, 158, 11, 0.22), transparent 34%), #fff7ed;
}

.filter-panel {
    display: grid;
    grid-template-columns: 1fr 180px auto;
    gap: 12px;
    margin-bottom: 28px;
    padding: 16px;
    border-radius: 22px;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.filter-panel input,
.filter-panel select {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #f8fafc;
    outline: 0;
    padding: 12px 16px;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--amber);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.14);
}

.filter-empty {
    display: none;
    margin: 28px 0 0;
    color: var(--muted);
    text-align: center;
    font-weight: 800;
}

.filter-empty.is-visible {
    display: block;
}

.category-overview-card {
    display: grid;
    gap: 18px;
}

.category-main-link {
    display: grid;
    gap: 8px;
}

.category-main-link h2,
.category-main-link p {
    margin: 0;
}

.category-samples {
    display: grid;
    gap: 8px;
    border-top: 1px solid var(--line);
    padding-top: 14px;
}

.category-samples a {
    overflow: hidden;
    color: var(--muted);
    white-space: nowrap;
    text-overflow: ellipsis;
    font-weight: 700;
}

.category-samples a:hover {
    color: var(--amber-deep);
}

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

.detail-main {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0 72px;
}

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

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

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

.detail-primary {
    display: grid;
    gap: 22px;
}

.player-card {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #020617;
    aspect-ratio: 16 / 9;
}

.stream-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    background: #020617;
    cursor: pointer;
}

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 14px;
    color: #ffffff;
    background: radial-gradient(circle at center, rgba(245, 158, 11, 0.18), rgba(2, 6, 23, 0.42) 42%, rgba(2, 6, 23, 0.72));
    border: 0;
    cursor: pointer;
}

.play-overlay.is-hidden {
    display: none;
}

.play-icon {
    width: 84px;
    height: 84px;
    border-radius: 999px;
    display: inline-grid;
    place-items: center;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    box-shadow: 0 18px 38px rgba(245, 158, 11, 0.42);
}

.play-icon::before {
    content: "";
    width: 0;
    height: 0;
    margin-left: 6px;
    border-top: 16px solid transparent;
    border-bottom: 16px solid transparent;
    border-left: 24px solid #111827;
}

.play-overlay strong {
    font-size: 22px;
    letter-spacing: 0.03em;
}

.detail-copy,
.related-box {
    border-radius: 24px;
    padding: 26px;
}

.detail-copy h1 {
    margin: 0 0 12px;
    font-size: clamp(32px, 4vw, 52px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.detail-one-line {
    margin: 0;
    color: #475569;
    font-size: 19px;
}

.detail-copy .detail-meta span {
    color: #92400e;
    background: #fffbeb;
    border-color: #fde68a;
}

.detail-text-block {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

.detail-text-block h2,
.related-box h2 {
    margin: 0 0 12px;
    font-size: 24px;
}

.detail-text-block p {
    margin: 0;
    color: #334155;
    font-size: 17px;
}

.detail-sidebar {
    position: sticky;
    top: 96px;
    display: grid;
    gap: 18px;
}

.detail-poster {
    min-height: 500px;
    border-radius: 26px;
    background-position: center;
    background-size: cover;
    background-color: #1f2937;
    box-shadow: var(--shadow);
}

.site-footer {
    color: rgba(255, 255, 255, 0.72);
    background: #0f172a;
    padding: 48px 0 24px;
}

.footer-grid {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 40px;
}

.footer-grid p {
    max-width: 520px;
    margin: 14px 0 0;
}

.footer-grid h2 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: 18px;
}

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

.footer-links a:hover {
    color: #fbbf24;
}

.footer-bottom {
    width: min(1280px, calc(100% - 32px));
    margin: 34px auto 0;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.48);
}

@media (max-width: 1100px) {
    .header-inner {
        grid-template-columns: auto auto;
    }

    .menu-toggle {
        display: block;
        justify-self: end;
    }

    .main-nav,
    .header-search {
        grid-column: 1 / -1;
        display: none;
    }

    .site-header.is-open .main-nav,
    .site-header.is-open .header-search {
        display: flex;
    }

    .site-header.is-open .header-search {
        width: 100%;
    }

    .header-search input {
        width: 100%;
    }

    .hero-carousel {
        grid-template-columns: 1fr;
    }

    .hero-panel {
        border-left: 0;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
    }

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

    .detail-sidebar {
        position: static;
    }

    .detail-poster {
        min-height: 360px;
    }
}

@media (max-width: 900px) {
    .movie-grid,
    .movie-grid-large,
    .category-grid,
    .category-overview-grid,
    .rank-page-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

@media (max-width: 640px) {
    .header-inner {
        width: min(100% - 24px, 1280px);
        gap: 12px;
    }

    .main-nav {
        flex-wrap: wrap;
    }

    .hero-stage {
        min-height: 620px;
    }

    .hero-content {
        width: calc(100% - 28px);
        margin: 0 auto;
        padding: 24px;
    }

    .hero-controls {
        left: 16px;
        right: 16px;
        bottom: 18px;
        justify-content: space-between;
    }

    .hero-search div {
        display: grid;
    }

    .content-section,
    .detail-main {
        width: min(100% - 24px, 1280px);
        padding-top: 46px;
        padding-bottom: 46px;
    }

    .section-head {
        display: grid;
        align-items: start;
    }

    .movie-grid,
    .movie-grid-large,
    .category-grid,
    .category-overview-grid,
    .rank-page-list,
    .mini-grid {
        grid-template-columns: 1fr;
    }

    .compact-card {
        grid-template-columns: 96px 1fr;
    }

    .detail-copy,
    .related-box {
        padding: 20px;
    }

    .footer-grid {
        gap: 28px;
    }
}
