:root {
    --red-950: #3f0808;
    --red-900: #611111;
    --red-800: #7f1d1d;
    --red-700: #b91c1c;
    --amber-600: #d97706;
    --amber-500: #f59e0b;
    --amber-100: #fef3c7;
    --ink: #171717;
    --muted: #626262;
    --line: rgba(127, 29, 29, 0.12);
    --paper: #fffaf0;
    --white: #ffffff;
    --shadow: 0 24px 60px rgba(63, 8, 8, 0.14);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Inter", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    color: var(--ink);
    background: linear-gradient(180deg, #fff7ed 0%, #ffffff 42%, #fef2f2 100%);
}

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #fff;
    background: linear-gradient(90deg, rgba(97, 17, 17, 0.96), rgba(146, 64, 14, 0.96));
    box-shadow: 0 12px 30px rgba(63, 8, 8, 0.22);
    backdrop-filter: blur(14px);
}

.header-inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 22px;
}

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

.brand-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: var(--red-900);
    background: linear-gradient(135deg, #fde68a, #f97316);
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.42), 0 10px 25px rgba(0, 0, 0, 0.2);
}

.brand-text {
    display: grid;
    line-height: 1.12;
}

.brand-text strong {
    font-size: 22px;
    letter-spacing: 0.08em;
}

.brand-text small {
    margin-top: 4px;
    color: #fde68a;
    font-size: 12px;
    font-weight: 500;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-left: auto;
}

.nav-link {
    position: relative;
    padding: 10px 0;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 700;
    transition: color 0.2s ease;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 4px;
    height: 2px;
    transform: scaleX(0);
    transform-origin: center;
    background: #fde68a;
    transition: transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: #fde68a;
}

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

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

.header-search input,
.mobile-search input {
    width: 210px;
    border: 0;
    outline: 0;
    color: #fff;
    background: transparent;
    padding: 8px 10px;
}

.header-search input::placeholder,
.mobile-search input::placeholder {
    color: rgba(254, 243, 199, 0.9);
}

.header-search button,
.mobile-search button,
.btn {
    border: 0;
    cursor: pointer;
    border-radius: 999px;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, var(--red-700), var(--amber-600));
    box-shadow: 0 12px 24px rgba(185, 28, 28, 0.22);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.header-search button,
.mobile-search button {
    padding: 8px 14px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 20px;
}

.btn:hover,
.header-search button:hover,
.mobile-search button:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(185, 28, 28, 0.28);
}

.btn.btn-ghost {
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.28);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.13);
}

.menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    margin: 5px auto;
    background: #fff;
}

.mobile-panel {
    display: none;
    padding: 0 16px 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.mobile-panel nav {
    display: grid;
    gap: 4px;
    margin-top: 12px;
}

.mobile-panel .nav-link {
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.hero {
    position: relative;
    height: min(620px, calc(100vh - 72px));
    min-height: 430px;
    overflow: hidden;
    background: linear-gradient(90deg, var(--red-950), #78350f);
}

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

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

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

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 15% 30%, rgba(245, 158, 11, 0.34), transparent 28%),
        linear-gradient(90deg, rgba(45, 5, 5, 0.92), rgba(67, 19, 5, 0.58) 44%, rgba(0, 0, 0, 0.5)),
        linear-gradient(0deg, rgba(0, 0, 0, 0.86), transparent 48%);
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: center;
}

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

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 7px 13px;
    border: 1px solid rgba(253, 230, 138, 0.46);
    border-radius: 999px;
    color: #fde68a;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.hero h1 {
    margin: 0;
    font-size: clamp(40px, 7vw, 78px);
    line-height: 1.05;
    letter-spacing: -0.04em;
    text-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
}

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

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

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.hero-meta span {
    padding: 8px 12px;
    border-radius: 999px;
    color: #fff7ed;
    background: rgba(255, 255, 255, 0.13);
}

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

.hero-dot {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.42);
}

.hero-dot.is-active {
    width: 36px;
    background: #fde68a;
}

.section {
    padding: 54px 0;
}

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

.section-kicker {
    color: var(--amber-600);
    font-weight: 900;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.section-heading h2,
.page-title h1 {
    margin: 6px 0 0;
    color: #1f1f1f;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.12;
}

.section-heading p,
.page-title p {
    max-width: 720px;
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

.more-link {
    color: var(--red-700);
    font-weight: 900;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 14px 35px rgba(127, 29, 29, 0.1);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow);
}

.movie-cover {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, #431407, #7f1d1d);
}

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

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

.cover-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), transparent 46%);
}

.movie-year,
.rank-badge {
    position: absolute;
    top: 12px;
    z-index: 2;
    border-radius: 999px;
    color: #fff;
    background: rgba(0, 0, 0, 0.62);
    backdrop-filter: blur(8px);
}

.movie-year {
    right: 12px;
    padding: 5px 9px;
    font-size: 12px;
    font-weight: 800;
}

.rank-badge {
    left: 12px;
    min-width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--red-700), var(--amber-500));
}

.play-dot {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.22);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
    backdrop-filter: blur(12px);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

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

.movie-info {
    padding: 16px;
}

.movie-title {
    display: -webkit-box;
    min-height: 48px;
    overflow: hidden;
    color: #1f1f1f;
    font-size: 17px;
    font-weight: 900;
    line-height: 1.38;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-title:hover {
    color: var(--red-700);
}

.movie-line {
    display: -webkit-box;
    min-height: 42px;
    overflow: hidden;
    margin: 10px 0 12px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-meta,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.movie-meta span,
.movie-meta a,
.tag-row span,
.detail-chip,
.breadcrumb a,
.breadcrumb span {
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 12px;
    font-weight: 800;
    color: #7f1d1d;
    background: #fff7ed;
}

.tag-row {
    margin-top: 10px;
}

.tag-row span {
    color: #92400e;
    background: #fef3c7;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 180px;
    padding: 24px;
    border-radius: 24px;
    color: #fff;
    background: linear-gradient(135deg, var(--red-800), var(--amber-600));
    box-shadow: 0 20px 50px rgba(127, 29, 29, 0.2);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card::after {
    content: "";
    position: absolute;
    right: -35px;
    bottom: -35px;
    width: 120px;
    height: 120px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.15);
}

.category-card:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: var(--shadow);
}

.category-card h3 {
    position: relative;
    z-index: 1;
    margin: 0 0 10px;
    font-size: 24px;
}

.category-card p {
    position: relative;
    z-index: 1;
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
    line-height: 1.6;
}

.category-card strong {
    position: relative;
    z-index: 1;
    display: inline-block;
    margin-top: 18px;
    color: #fde68a;
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.85fr);
    gap: 26px;
    align-items: start;
}

.rank-panel,
.filter-bar,
.content-panel,
.player-card,
.detail-side-card {
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 18px 45px rgba(127, 29, 29, 0.1);
}

.rank-panel {
    padding: 18px;
}

.rank-panel h3,
.detail-side-card h3 {
    margin: 0 0 14px;
    font-size: 22px;
}

.rank-row {
    display: grid;
    grid-template-columns: 42px 74px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
    background: #fff7ed;
    transform: translateX(4px);
}

.rank-number {
    font-size: 20px;
    font-weight: 900;
    color: var(--red-700);
}

.rank-row img {
    width: 74px;
    height: 56px;
    object-fit: cover;
    border-radius: 12px;
    background: #431407;
}

.rank-text strong,
.rank-text small {
    display: block;
}

.rank-text strong {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

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

.page-hero {
    padding: 60px 0;
    color: #fff;
    background:
        radial-gradient(circle at 18% 20%, rgba(245, 158, 11, 0.35), transparent 25%),
        linear-gradient(90deg, var(--red-900), #92400e);
}

.page-title {
    max-width: 820px;
}

.page-title h1 {
    color: #fff;
}

.page-title p {
    color: rgba(255, 255, 255, 0.86);
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 24px;
    padding: 18px;
}

.filter-bar input,
.search-page-box input {
    width: min(420px, 100%);
    border: 1px solid rgba(127, 29, 29, 0.16);
    border-radius: 999px;
    outline: 0;
    padding: 13px 16px;
    background: #fff;
}

.filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-pills a,
.filter-pills span {
    padding: 9px 12px;
    border-radius: 999px;
    color: #7f1d1d;
    font-weight: 800;
    background: #fff7ed;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 24px 0;
}

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

.player-card {
    overflow: hidden;
}

.player-shell {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #050505;
}

.player-video {
    width: 100%;
    height: 100%;
    background: #050505;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #fff;
    background:
        radial-gradient(circle, rgba(245, 158, 11, 0.2), transparent 35%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.76));
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-shell.is-playing .player-overlay {
    visibility: hidden;
    opacity: 0;
}

.player-start {
    width: 92px;
    height: 92px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    color: #fff;
    font-size: 34px;
    background: linear-gradient(135deg, var(--red-700), var(--amber-500));
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.36);
}

.player-status {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 16px;
    margin: 0;
    color: rgba(255, 255, 255, 0.84);
    text-align: center;
}

.detail-body {
    padding: 24px;
}

.detail-body h1 {
    margin: 0;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.15;
}

.detail-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0 18px;
}

.detail-section {
    margin-top: 26px;
}

.detail-section h2 {
    margin: 0 0 12px;
    padding-left: 12px;
    border-left: 5px solid var(--amber-500);
    font-size: 24px;
}

.detail-section p {
    margin: 0;
    color: #333;
    line-height: 1.9;
}

.detail-side-card {
    padding: 18px;
}

.detail-side-card img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 18px;
    background: #431407;
}

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

.side-item {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 12px;
    align-items: center;
    padding: 8px;
    border-radius: 14px;
}

.side-item:hover {
    background: #fff7ed;
}

.side-item img {
    width: 72px;
    height: 88px;
    object-fit: cover;
    border-radius: 12px;
}

.side-item strong {
    display: -webkit-box;
    overflow: hidden;
    line-height: 1.4;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.search-page-box {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 24px;
    padding: 18px;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 18px 45px rgba(127, 29, 29, 0.1);
}

.search-page-box button {
    min-width: 96px;
}

.empty-state {
    padding: 48px 24px;
    border: 1px dashed rgba(127, 29, 29, 0.26);
    border-radius: 24px;
    color: var(--muted);
    text-align: center;
    background: rgba(255, 255, 255, 0.72);
}

.site-footer {
    margin-top: 60px;
    color: rgba(255, 255, 255, 0.82);
    background: linear-gradient(90deg, #111827, #3f0808);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.7fr 1fr;
    gap: 36px;
    padding: 44px 0;
}

.footer-brand {
    color: #fde68a;
    font-size: 24px;
}

.site-footer p {
    max-width: 520px;
    line-height: 1.8;
}

.site-footer h3 {
    margin: 0 0 12px;
    color: #fff;
}

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

.site-footer a:hover {
    color: #fde68a;
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    padding: 18px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.66);
}

.hidden-by-filter {
    display: none !important;
}

@media (max-width: 1060px) {
    .desktop-nav,
    .header-search {
        display: none;
    }

    .menu-toggle {
        display: block;
        margin-left: auto;
    }

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

    .mobile-search input {
        flex: 1;
        width: auto;
    }

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

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

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

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

    .brand-text small {
        display: none;
    }

    .hero {
        min-height: 560px;
    }

    .hero-copy {
        padding-bottom: 40px;
    }

    .section {
        padding: 38px 0;
    }

    .section-heading,
    .filter-bar,
    .search-page-box {
        align-items: stretch;
        flex-direction: column;
    }

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

    .movie-info {
        padding: 13px;
    }

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

    .movie-line {
        min-height: 39px;
        font-size: 13px;
    }

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

    .rank-row {
        grid-template-columns: 36px 64px 1fr;
    }

    .rank-row img {
        width: 64px;
        height: 52px;
    }
}

@media (max-width: 420px) {
    .movie-grid,
    .movie-grid-wide,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}
