:root {
    --rose: #e11d48;
    --rose-dark: #be123c;
    --amber: #d97706;
    --emerald: #059669;
    --ink: #111827;
    --muted: #6b7280;
    --line: #ffe4e6;
    --paper: #ffffff;
    --soft: #fff7ed;
    --shadow: 0 22px 50px rgba(17, 24, 39, 0.14);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--ink);
    background: linear-gradient(180deg, #fff7ed 0%, #fff 42%, #fff7ed 100%);
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 8px 28px rgba(225, 29, 72, 0.08);
}

.header-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
    min-height: 68px;
    display: flex;
    align-items: center;
    gap: 22px;
}

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

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, var(--rose), var(--amber), var(--emerald));
    box-shadow: 0 12px 26px rgba(225, 29, 72, 0.25);
    font-size: 14px;
}

.brand-name {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.04em;
    background: linear-gradient(90deg, var(--rose), var(--amber), var(--emerald));
    -webkit-background-clip: text;
    color: transparent;
    white-space: nowrap;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
}

.nav-link,
.mobile-nav-link {
    padding: 9px 12px;
    border-radius: 12px;
    color: #4b5563;
    font-size: 14px;
    font-weight: 650;
    transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: var(--rose);
    background: #fff1f2;
}

.header-search,
.mobile-search,
.page-search,
.intro-search form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search input,
.mobile-search input,
.page-search input,
.intro-search input {
    width: 230px;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    padding: 10px 16px;
    outline: none;
    background: #fff;
    transition: 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.page-search input:focus,
.intro-search input:focus {
    border-color: var(--rose);
    box-shadow: 0 0 0 4px rgba(225, 29, 72, 0.12);
}

.header-search button,
.mobile-search button,
.page-search button,
.intro-search button {
    border: 0;
    border-radius: 999px;
    padding: 10px 16px;
    color: #fff;
    background: linear-gradient(90deg, var(--rose), var(--amber));
    cursor: pointer;
    font-weight: 700;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    background: #fff1f2;
    border-radius: 12px;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    background: #374151;
    border-radius: 99px;
}

.mobile-nav {
    display: none;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px 18px;
}

.mobile-nav.open {
    display: block;
}

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

.hero-wrap {
    position: relative;
    min-height: 74vh;
    overflow: hidden;
    background: #111827;
}

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

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

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

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 70% 35%, rgba(217, 119, 6, 0.32), transparent 34%),
        linear-gradient(90deg, rgba(17, 24, 39, 0.92), rgba(17, 24, 39, 0.55), rgba(17, 24, 39, 0.18)),
        linear-gradient(0deg, rgba(17, 24, 39, 0.75), transparent 42%);
}

.hero-content {
    position: absolute;
    z-index: 2;
    left: max(24px, calc((100vw - 1180px) / 2));
    top: 50%;
    transform: translateY(-50%);
    max-width: 650px;
    color: #fff;
}

.hero-kicker {
    display: inline-flex;
    margin-bottom: 16px;
    color: #fbbf24;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.hero-content h1 {
    margin: 0 0 16px;
    font-size: clamp(42px, 6vw, 76px);
    line-height: 0.98;
    letter-spacing: -0.07em;
}

.hero-content p {
    margin: 0 0 24px;
    color: #e5e7eb;
    font-size: 18px;
    line-height: 1.8;
    max-width: 570px;
}

.hero-tags,
.detail-tags,
.tag-list,
.topic-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.detail-tags span,
.tag-list span,
.topic-tags a {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.hero-tags span {
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(10px);
}

.hero-actions,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 28px;
}

.primary-button,
.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 24px;
    border-radius: 999px;
    font-weight: 800;
    transition: 0.2s ease;
}

.primary-button {
    color: #fff;
    background: linear-gradient(90deg, var(--rose), var(--amber));
    box-shadow: 0 18px 34px rgba(225, 29, 72, 0.32);
}

.primary-button:hover {
    transform: translateY(-2px) scale(1.02);
}

.secondary-button {
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(12px);
}

.secondary-button.light {
    color: var(--rose);
    background: #fff1f2;
    border-color: #fecdd3;
}

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

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

.hero-dot.active {
    width: 34px;
    background: #fff;
}

.hero-thumbs {
    position: absolute;
    z-index: 3;
    right: max(24px, calc((100vw - 1180px) / 2));
    bottom: 68px;
    display: grid;
    width: 290px;
    gap: 10px;
}

.hero-thumbs a {
    display: grid;
    grid-template-columns: 64px 1fr;
    align-items: center;
    gap: 12px;
    padding: 9px;
    border-radius: 16px;
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(14px);
}

.hero-thumbs img {
    width: 64px;
    height: 44px;
    object-fit: cover;
    border-radius: 10px;
}

.hero-thumbs span {
    font-weight: 750;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.content-section {
    max-width: 1180px;
    margin: 0 auto;
    padding: 56px 20px 0;
}

.intro-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 28px;
    align-items: center;
    margin-top: -34px;
    position: relative;
    z-index: 10;
    padding: 28px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
    border: 1px solid #fff1f2;
    backdrop-filter: blur(18px);
}

.intro-copy h2,
.section-heading h2,
.rank-preview h2,
.topic-preview h2,
.detail-main-text h2,
.detail-side-card h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 36px);
    letter-spacing: -0.04em;
}

.intro-copy p,
.section-heading p {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.8;
}

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

.section-link {
    color: var(--rose);
    font-weight: 800;
}

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

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

.category-pill {
    min-height: 118px;
    padding: 20px;
    border-radius: 22px;
    background: linear-gradient(135deg, #fff, #fff7ed);
    border: 1px solid #fed7aa;
    box-shadow: 0 16px 34px rgba(217, 119, 6, 0.1);
    transition: 0.2s ease;
}

.category-pill:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 46px rgba(225, 29, 72, 0.16);
}

.category-pill span {
    display: block;
    margin-bottom: 8px;
    color: var(--rose);
    font-size: 20px;
    font-weight: 850;
}

.category-pill small {
    color: var(--muted);
    line-height: 1.7;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 14px 32px rgba(17, 24, 39, 0.09);
    border: 1px solid #fff1f2;
    transition: 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 26px 58px rgba(17, 24, 39, 0.16);
}

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

.movie-card.compact {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
}

.card-cover {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, #111827, #be123c);
}

.movie-card.compact .card-cover {
    height: 100%;
    min-height: 154px;
    aspect-ratio: auto;
}

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

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

.play-hover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 42px;
    background: rgba(17, 24, 39, 0.36);
    opacity: 0;
    transition: 0.2s ease;
}

.movie-card:hover .play-hover {
    opacity: 1;
}

.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    min-width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--rose), var(--amber));
    font-weight: 900;
    box-shadow: 0 12px 22px rgba(17, 24, 39, 0.25);
}

.card-body {
    padding: 18px;
}

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.card-body h3 {
    margin: 0 0 8px;
    font-size: 19px;
    line-height: 1.35;
}

.card-body h3 a:hover {
    color: var(--rose);
}

.card-body p {
    margin: 0 0 14px;
    color: #4b5563;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tag-list span {
    color: var(--rose);
    background: #fff1f2;
}

.split-section {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 22px;
}

.rank-preview,
.topic-preview,
.detail-side-card,
.detail-main-text {
    padding: 26px;
    border-radius: 26px;
    background: #fff;
    box-shadow: 0 16px 34px rgba(17, 24, 39, 0.08);
    border: 1px solid #fff1f2;
}

.rank-list {
    display: grid;
    gap: 10px;
    margin-top: 20px;
}

.rank-list a {
    display: grid;
    grid-template-columns: 38px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 16px;
    background: #fff7ed;
}

.rank-list span {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 99px;
    color: #fff;
    background: linear-gradient(135deg, var(--rose), var(--amber));
    font-weight: 900;
}

.rank-list em {
    color: var(--muted);
    font-style: normal;
}

.topic-tags {
    margin-top: 20px;
}

.topic-tags a {
    color: var(--rose);
    background: #fff1f2;
}

.page-hero,
.detail-hero {
    max-width: 1180px;
    margin: 38px auto 0;
    padding: 0 20px;
}

.small-hero > div {
    position: relative;
    overflow: hidden;
    padding: 54px;
    border-radius: 32px;
    color: #fff;
    background:
        radial-gradient(circle at 88% 20%, rgba(5, 150, 105, 0.55), transparent 30%),
        linear-gradient(135deg, var(--rose), var(--amber) 55%, var(--emerald));
    box-shadow: var(--shadow);
}

.small-hero span {
    display: block;
    margin-bottom: 10px;
    color: #fffbeb;
    font-weight: 800;
}

.small-hero h1 {
    margin: 0;
    font-size: clamp(36px, 5vw, 58px);
    letter-spacing: -0.06em;
}

.small-hero p {
    max-width: 720px;
    margin: 14px 0 0;
    color: #fff7ed;
    font-size: 18px;
    line-height: 1.8;
}

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    padding: 18px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid #fff1f2;
    box-shadow: 0 12px 26px rgba(17, 24, 39, 0.07);
}

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

.filter-button {
    border: 1px solid #fecdd3;
    color: var(--rose);
    background: #fff;
    border-radius: 999px;
    padding: 9px 14px;
    cursor: pointer;
    font-weight: 800;
}

.filter-button.active,
.filter-button:hover {
    color: #fff;
    background: linear-gradient(90deg, var(--rose), var(--amber));
    border-color: transparent;
}

.empty-state {
    display: none;
    padding: 42px;
    text-align: center;
    color: var(--muted);
    border-radius: 24px;
    background: #fff;
}

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

.detail-hero {
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border-radius: 30px;
    box-shadow: var(--shadow);
    aspect-ratio: 3 / 4;
    background: #111827;
}

.detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-info {
    padding: 34px;
    border-radius: 30px;
    background: #fff;
    box-shadow: 0 18px 42px rgba(17, 24, 39, 0.1);
    border: 1px solid #fff1f2;
}

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

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

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

.detail-one-line {
    margin: 0 0 18px;
    color: #4b5563;
    font-size: 18px;
    line-height: 1.8;
}

.detail-tags span {
    color: var(--rose);
    background: #fff1f2;
}

.player-section {
    scroll-margin-top: 90px;
}

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

.movie-player {
    width: 100%;
    height: 100%;
    display: block;
    background: #0f172a;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 16px;
    color: #fff;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.28));
    border: 0;
    cursor: pointer;
}

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

.play-circle {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--rose), var(--amber));
    font-size: 30px;
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.32);
}

.player-overlay strong {
    font-size: 22px;
}

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

.detail-main-text p {
    color: #374151;
    line-height: 1.95;
    font-size: 16px;
}

.detail-side-card dl {
    display: grid;
    grid-template-columns: 78px 1fr;
    gap: 14px 12px;
    margin: 22px 0 0;
}

.detail-side-card dt {
    color: var(--muted);
}

.detail-side-card dd {
    margin: 0;
    font-weight: 750;
}

.detail-side-card a {
    color: var(--rose);
}

.site-footer {
    margin-top: 70px;
    color: #e5e7eb;
    background: linear-gradient(135deg, #111827, #1f2937, #111827);
}

.footer-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 44px 20px;
    display: grid;
    gap: 18px;
}

.footer-brand {
    color: #fff;
    font-size: 24px;
    font-weight: 850;
}

.footer-inner p {
    max-width: 760px;
    margin: 0;
    color: #d1d5db;
    line-height: 1.8;
}

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

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

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

    .header-inner {
        justify-content: space-between;
    }

    .menu-toggle {
        display: block;
    }

    .hero-thumbs {
        display: none;
    }

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

    .detail-hero,
    .detail-content,
    .split-section,
    .intro-panel {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .brand-name {
        font-size: 20px;
    }

    .hero-wrap {
        min-height: 78vh;
    }

    .hero-content {
        left: 20px;
        right: 20px;
    }

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

    .content-section {
        padding-top: 38px;
    }

    .intro-panel {
        margin-top: 0;
        border-radius: 0;
    }

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

    .movie-card.compact {
        grid-template-columns: 120px minmax(0, 1fr);
    }

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

    .page-search,
    .mobile-search,
    .intro-search form {
        flex-direction: column;
        align-items: stretch;
    }

    .page-search input,
    .mobile-search input,
    .intro-search input {
        width: 100%;
    }

    .small-hero > div,
    .detail-info,
    .rank-preview,
    .topic-preview,
    .detail-side-card,
    .detail-main-text {
        padding: 24px;
        border-radius: 24px;
    }

    .detail-hero {
        gap: 20px;
    }

    .detail-poster {
        max-width: 280px;
        margin: 0 auto;
    }
}
