* {
    box-sizing: border-box;
}

:root {
    --bg: #f8fafc;
    --bg-soft: #eef2f7;
    --text: #111827;
    --muted: #64748b;
    --dark: #0f172a;
    --dark-2: #111827;
    --line: rgba(148, 163, 184, 0.24);
    --red: #dc2626;
    --red-dark: #b91c1c;
    --orange: #f97316;
    --gold: #facc15;
    --white: #ffffff;
    --shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
    --shadow-strong: 0 24px 70px rgba(15, 23, 42, 0.22);
    --radius: 22px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: linear-gradient(180deg, var(--bg), var(--bg-soft));
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: var(--white);
    background: linear-gradient(90deg, #0f172a, #1f2937 48%, #111827);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 68px;
    gap: 24px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    white-space: nowrap;
}

.logo-mark {
    display: inline-grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--red), var(--orange));
    color: var(--white);
    box-shadow: 0 10px 24px rgba(220, 38, 38, 0.35);
}

.logo-text {
    background: linear-gradient(90deg, #f87171, #fb923c);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.nav-links a,
.mobile-menu a {
    transition: color 0.22s ease, transform 0.22s ease;
}

.nav-links a:hover,
.mobile-menu a:hover {
    color: #f87171;
}

.search-box {
    position: relative;
    width: 260px;
}

.search-box input {
    width: 100%;
    height: 40px;
    padding: 0 46px 0 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    outline: none;
    background: rgba(51, 65, 85, 0.95);
    color: var(--white);
}

.search-box input:focus {
    border-color: rgba(248, 113, 113, 0.75);
    box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.2);
}

.search-box button {
    position: absolute;
    right: 6px;
    top: 50%;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #cbd5e1;
    cursor: pointer;
}

.search-box button:hover {
    color: var(--white);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    color: var(--white);
    background: rgba(51, 65, 85, 0.9);
    cursor: pointer;
}

.mobile-menu {
    display: none;
    padding: 0 0 18px;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
}

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

.mobile-menu-inner {
    display: grid;
    gap: 14px;
    padding-top: 18px;
}

.hero-carousel {
    position: relative;
    min-height: 72vh;
    overflow: hidden;
    color: var(--white);
    background: linear-gradient(120deg, #0f172a, #7f1d1d 48%, #9a3412);
}

.hero-track {
    position: relative;
    min-height: 72vh;
}

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

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

.hero-bg {
    position: absolute;
    inset: 0;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.32;
    transform: scale(1.03);
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 72% 18%, rgba(248, 113, 113, 0.24), transparent 32%),
        linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.62) 48%, rgba(15, 23, 42, 0.88)),
        linear-gradient(0deg, rgba(0, 0, 0, 0.9), transparent 42%);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.56fr);
    align-items: center;
    min-height: 72vh;
    gap: 44px;
    padding: 76px 0 92px;
}

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

.hero-badge,
.section-kicker,
.meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border-radius: 999px;
    font-weight: 700;
}

.hero-badge {
    padding: 8px 14px;
    background: rgba(220, 38, 38, 0.92);
    color: var(--white);
    box-shadow: 0 10px 24px rgba(220, 38, 38, 0.3);
}

.hero-copy h1 {
    margin: 18px 0 18px;
    font-size: clamp(36px, 6vw, 72px);
    line-height: 1.04;
    letter-spacing: -0.04em;
}

.hero-copy p {
    max-width: 690px;
    margin: 0 0 26px;
    color: #e5e7eb;
    font-size: clamp(17px, 2vw, 22px);
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 28px;
    color: #e2e8f0;
}

.meta-pill {
    padding: 8px 12px;
    background: rgba(15, 23, 42, 0.46);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
}

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

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

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    color: var(--white);
    background: linear-gradient(90deg, var(--red), var(--orange));
    box-shadow: 0 16px 34px rgba(220, 38, 38, 0.34);
}

.btn-primary:hover {
    box-shadow: 0 20px 42px rgba(220, 38, 38, 0.42);
}

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

.hero-poster-card {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    box-shadow: var(--shadow-strong);
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.hero-poster-card img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.hero-poster-info {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 22px;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.92), transparent);
}

.hero-poster-info strong {
    display: block;
    margin-bottom: 6px;
    font-size: 21px;
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 28px;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateX(-50%);
}

.hero-arrow,
.hero-dot {
    border: 0;
    color: var(--white);
    cursor: pointer;
    transition: background 0.22s ease, transform 0.22s ease;
}

.hero-arrow {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(12px);
}

.hero-arrow:hover {
    background: rgba(220, 38, 38, 0.9);
    transform: translateY(-2px);
}

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

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

.hero-dot.is-active {
    width: 28px;
    background: linear-gradient(90deg, var(--red), var(--orange));
}

.main-section {
    padding: 58px 0;
}

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

.section-head h2,
.page-hero h1,
.detail-title h1 {
    margin: 0;
    color: #0f172a;
    line-height: 1.12;
    letter-spacing: -0.035em;
}

.section-head h2 {
    font-size: clamp(28px, 4vw, 40px);
}

.section-head p,
.page-hero p {
    margin: 10px 0 0;
    color: var(--muted);
}

.section-kicker {
    padding: 7px 12px;
    color: #991b1b;
    background: #fee2e2;
    font-size: 13px;
}

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    background: var(--white);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.movie-card.is-hidden {
    display: none;
}

.card-link {
    display: block;
    height: 100%;
}

.poster-wrap {
    position: relative;
    overflow: hidden;
    background: #111827;
}

.poster-wrap img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.34s ease;
}

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

.poster-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.58), transparent 48%);
}

.card-rating,
.card-type {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.card-rating {
    left: 10px;
    top: 10px;
    gap: 4px;
    padding: 5px 9px;
    color: #111827;
    background: rgba(250, 204, 21, 0.95);
}

.card-type {
    right: 10px;
    bottom: 10px;
    padding: 5px 9px;
    color: var(--white);
    background: rgba(220, 38, 38, 0.9);
}

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

.card-body h3 {
    margin: 0 0 8px;
    color: #111827;
    font-size: 16px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #64748b;
    font-size: 12px;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 180px;
    padding: 26px;
    border-radius: 24px;
    color: var(--white);
    background: linear-gradient(135deg, #111827, #7f1d1d 52%, #c2410c);
    box-shadow: var(--shadow);
}

.category-card::before {
    content: "";
    position: absolute;
    right: -42px;
    top: -42px;
    width: 140px;
    height: 140px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
}

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

.category-card p {
    position: relative;
    margin: 0 0 18px;
    color: #e5e7eb;
}

.category-card span {
    position: relative;
    display: inline-flex;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.15);
    font-weight: 800;
}

.page-hero {
    padding: 62px 0 40px;
    background:
        radial-gradient(circle at 10% 0%, rgba(248, 113, 113, 0.18), transparent 30%),
        linear-gradient(180deg, #ffffff, #f8fafc);
}

.page-hero h1 {
    font-size: clamp(34px, 5vw, 54px);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
    color: #64748b;
    font-size: 14px;
}

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

.catalog-tools {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, minmax(130px, 0.4fr));
    gap: 12px;
    margin: 0 0 28px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
}

.catalog-tools input,
.catalog-tools select {
    width: 100%;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid #dbe3ef;
    border-radius: 14px;
    outline: none;
    background: var(--white);
    color: #0f172a;
}

.catalog-tools input:focus,
.catalog-tools select:focus {
    border-color: #f87171;
    box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.18);
}

.empty-result {
    display: none;
    padding: 34px;
    border-radius: 22px;
    color: #64748b;
    background: var(--white);
    text-align: center;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

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

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

.rank-item {
    display: grid;
    grid-template-columns: 58px 86px minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 12px 18px 12px 12px;
    border-radius: 20px;
    background: var(--white);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.07);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.rank-number {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 15px;
    color: var(--white);
    background: linear-gradient(135deg, var(--red), var(--orange));
    font-weight: 900;
}

.rank-item img {
    width: 86px;
    height: 118px;
    border-radius: 14px;
    object-fit: cover;
}

.rank-item h3 {
    margin: 0 0 8px;
    font-size: 19px;
}

.rank-item p {
    margin: 0;
    color: var(--muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.detail-hero {
    padding: 46px 0 36px;
    color: var(--white);
    background:
        linear-gradient(90deg, rgba(15, 23, 42, 0.95), rgba(127, 29, 29, 0.86)),
        linear-gradient(135deg, #0f172a, #7f1d1d, #9a3412);
}

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

.detail-cover {
    overflow: hidden;
    border-radius: 24px;
    box-shadow: var(--shadow-strong);
}

.detail-cover img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.detail-title h1 {
    color: var(--white);
    font-size: clamp(34px, 5vw, 58px);
}

.detail-title p {
    max-width: 800px;
    color: #e2e8f0;
    font-size: 18px;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.detail-tags span,
.tag {
    display: inline-flex;
    padding: 6px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.15);
    color: inherit;
    font-size: 13px;
    font-weight: 800;
}

.player-panel {
    overflow: hidden;
    border-radius: 28px;
    background: #020617;
    box-shadow: var(--shadow-strong);
}

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

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

.play-layer {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.2));
    cursor: pointer;
    z-index: 2;
}

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

.play-button {
    display: grid;
    width: 88px;
    height: 88px;
    place-items: center;
    border: 0;
    border-radius: 999px;
    color: var(--white);
    background: linear-gradient(135deg, var(--red), var(--orange));
    box-shadow: 0 18px 42px rgba(220, 38, 38, 0.5);
    cursor: pointer;
}

.play-button svg {
    width: 34px;
    height: 34px;
    transform: translateX(3px);
}

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

.article-card,
.side-card {
    border-radius: 24px;
    background: var(--white);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
}

.article-card {
    padding: 30px;
}

.article-card h2,
.side-card h2 {
    margin: 0 0 16px;
    color: #0f172a;
}

.article-card p {
    margin: 0 0 18px;
    color: #334155;
    font-size: 16px;
}

.side-card {
    padding: 22px;
}

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

.meta-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #edf2f7;
    color: #334155;
}

.meta-row span:first-child {
    color: #64748b;
}

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

.footer {
    margin-top: 58px;
    color: #cbd5e1;
    background: linear-gradient(180deg, #0f172a, #020617);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 30px;
    padding: 44px 0;
}

.footer h2,
.footer h3 {
    margin: 0 0 14px;
    color: var(--white);
}

.footer p,
.footer li {
    color: #94a3b8;
    font-size: 14px;
}

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

.footer a:hover {
    color: #f87171;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 0;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    color: #94a3b8;
    font-size: 14px;
}

.back-to-top {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 40;
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 999px;
    color: var(--white);
    background: linear-gradient(135deg, var(--red), var(--orange));
    box-shadow: var(--shadow);
    cursor: pointer;
}

.back-to-top.is-visible {
    display: grid;
    place-items: center;
}

@media (max-width: 1120px) {
    .movie-grid,
    .movie-grid.compact,
    .recommend-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

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

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

    .menu-toggle {
        display: inline-grid;
        place-items: center;
    }

    .mobile-search {
        width: 100%;
    }

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

    .hero-poster-card {
        max-width: 330px;
    }

    .catalog-tools {
        grid-template-columns: 1fr 1fr;
    }

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

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

    .hero-carousel,
    .hero-track,
    .hero-content {
        min-height: 78vh;
    }

    .hero-content {
        gap: 28px;
        padding: 52px 0 92px;
    }

    .hero-meta {
        gap: 8px;
        font-size: 13px;
    }

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

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

    .catalog-tools {
        grid-template-columns: 1fr;
    }

    .rank-item {
        grid-template-columns: 42px 70px minmax(0, 1fr);
    }

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

    .rank-item img {
        width: 70px;
        height: 96px;
    }

    .detail-cover {
        max-width: 220px;
    }

    .article-card,
    .side-card {
        padding: 20px;
    }

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