:root {
    --color-primary: #e11d48;
    --color-primary-dark: #be123c;
    --color-accent: #f59e0b;
    --color-text: #1f2937;
    --color-muted: #6b7280;
    --color-soft: #fff1f2;
    --color-border: #e5e7eb;
    --shadow-soft: 0 16px 40px rgba(15, 23, 42, 0.12);
    --shadow-card: 0 10px 30px rgba(15, 23, 42, 0.10);
    --radius-large: 24px;
    --radius-card: 18px;
    --container: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--color-text);
    background: linear-gradient(180deg, #f9fafb 0%, #ffffff 38%, #fff7ed 100%);
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(229, 231, 235, 0.82);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    font-weight: 800;
    color: #111827;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    color: #ffffff;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    box-shadow: 0 10px 22px rgba(225, 29, 72, 0.28);
}

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

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

.nav-link {
    padding: 9px 14px;
    color: #4b5563;
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-primary);
    background: #ffe4e6;
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    background: #ffffff;
}

.header-search input {
    width: 180px;
    border: none;
    outline: none;
    padding: 8px 10px;
    background: transparent;
}

.header-search button,
.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 20px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search button,
.primary-button {
    color: #ffffff;
    background: var(--color-primary);
    box-shadow: 0 12px 26px rgba(225, 29, 72, 0.22);
}

.header-search button:hover,
.primary-button:hover {
    background: var(--color-primary-dark);
    transform: translateY(-1px);
}

.ghost-button {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.ghost-button:hover {
    background: rgba(255, 255, 255, 0.28);
    transform: translateY(-1px);
}

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

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

.hero {
    position: relative;
    height: 70vh;
    min-height: 500px;
    overflow: hidden;
    background: linear-gradient(90deg, #881337, #78350f);
}

.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;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.12));
}

.hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    max-width: 720px;
    color: #ffffff;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    margin-bottom: 22px;
    border-radius: 999px;
    background: var(--color-primary);
    font-weight: 700;
}

.hero h1 {
    margin: 0;
    font-size: clamp(40px, 7vw, 72px);
    line-height: 1.02;
    letter-spacing: -0.06em;
}

.hero p {
    max-width: 680px;
    margin: 24px 0 0;
    color: #e5e7eb;
    font-size: clamp(18px, 2.1vw, 24px);
}

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

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    color: #ffffff;
    font-size: 42px;
    line-height: 1;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.20);
    backdrop-filter: blur(8px);
    cursor: pointer;
    transform: translateY(-50%);
}

.hero-arrow:hover {
    background: rgba(255, 255, 255, 0.32);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

.hero-dots {
    position: absolute;
    right: 0;
    bottom: 28px;
    left: 0;
    z-index: 5;
    display: flex;
    justify-content: center;
    gap: 8px;
}

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

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

.page-section {
    padding: 72px 0;
}

.soft-section {
    background: linear-gradient(90deg, #fffbeb, #fff1f2);
}

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

.section-kicker {
    display: inline-flex;
    margin-bottom: 8px;
    color: var(--color-primary);
    font-weight: 800;
}

.section-heading h2 {
    margin: 0;
    color: #111827;
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.1;
    letter-spacing: -0.05em;
}

.section-heading p {
    max-width: 520px;
    margin: 0;
    color: var(--color-muted);
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(229, 231, 235, 0.88);
    border-radius: var(--radius-card);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
    border-color: rgba(225, 29, 72, 0.35);
    box-shadow: var(--shadow-card);
    transform: translateY(-6px);
}

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, #f3f4f6, #fee2e2);
}

.poster-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.poster-badge,
.poster-play {
    position: absolute;
    z-index: 2;
}

.poster-badge {
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    color: #ffffff;
    border-radius: 999px;
    background: rgba(225, 29, 72, 0.92);
    font-size: 12px;
    font-weight: 700;
}

.poster-play {
    right: 12px;
    bottom: 12px;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: #ffffff;
    border-radius: 50%;
    background: rgba(17, 24, 39, 0.72);
    backdrop-filter: blur(8px);
}

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

.movie-meta-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--color-muted);
    font-size: 13px;
}

.movie-card h3 {
    margin: 8px 0 8px;
    font-size: 18px;
    line-height: 1.25;
}

.movie-card h3 a:hover {
    color: var(--color-primary);
}

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

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-list span {
    padding: 4px 9px;
    color: var(--color-primary);
    border-radius: 999px;
    background: #ffe4e6;
    font-size: 12px;
    font-weight: 700;
}

.horizontal-scroller {
    display: grid;
    grid-auto-columns: 280px;
    grid-auto-flow: column;
    gap: 24px;
    overflow-x: auto;
    padding-bottom: 18px;
    scroll-snap-type: x mandatory;
}

.horizontal-scroller .movie-card {
    scroll-snap-align: start;
}

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

.category-card {
    position: relative;
    min-height: 230px;
    overflow: hidden;
    border-radius: var(--radius-card);
    color: #ffffff;
    background: #111827;
    box-shadow: var(--shadow-card);
}

.category-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.62;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.category-card:hover img {
    opacity: 0.78;
    transform: scale(1.08);
}

.category-card div {
    position: absolute;
    inset: auto 0 0;
    padding: 22px;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.84), rgba(0, 0, 0, 0));
}

.category-card strong {
    display: block;
    font-size: 21px;
}

.category-card span {
    color: #fecdd3;
}

.category-card p {
    margin: 8px 0 0;
    color: #e5e7eb;
    font-size: 13px;
}

.sub-hero {
    padding: 88px 0;
    color: #ffffff;
    background: radial-gradient(circle at top left, rgba(251, 113, 133, 0.55), transparent 34%), linear-gradient(135deg, #881337, #7c2d12);
}

.sub-hero span {
    display: inline-flex;
    margin-bottom: 12px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    font-weight: 800;
}

.sub-hero h1 {
    margin: 0;
    font-size: clamp(36px, 5vw, 60px);
    line-height: 1.08;
    letter-spacing: -0.06em;
}

.sub-hero p {
    max-width: 760px;
    margin: 18px 0 0;
    color: #f3f4f6;
    font-size: 18px;
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 210px 1fr;
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-card);
    background: #ffffff;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
}

.category-preview {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2px;
    min-height: 210px;
    background: #f3f4f6;
}

.category-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-overview-body {
    padding: 24px;
}

.category-overview-body h2 {
    margin: 0 0 8px;
}

.category-overview-body p {
    color: var(--color-muted);
}

.category-overview-body span,
.search-count {
    color: var(--color-primary);
    font-weight: 800;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 180px 180px;
    gap: 12px;
    margin-bottom: 28px;
    padding: 14px;
    border: 1px solid var(--color-border);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    outline: none;
    padding: 0 14px;
    background: #ffffff;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(225, 29, 72, 0.12);
}

.search-page-panel {
    grid-template-columns: minmax(260px, 1fr) 180px 140px;
}

.search-page-panel button {
    min-height: 46px;
    border: none;
    border-radius: 12px;
    color: #ffffff;
    background: var(--color-primary);
    cursor: pointer;
}

.empty-state {
    padding: 48px 20px;
    text-align: center;
    color: var(--color-muted);
    border: 1px dashed var(--color-border);
    border-radius: var(--radius-card);
    background: #ffffff;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 64px 96px 1fr;
    align-items: center;
    gap: 20px;
    padding: 16px;
    border: 1px solid var(--color-border);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.rank-number {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    color: #ffffff;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    font-weight: 900;
}

.rank-poster {
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 12px;
    background: #f3f4f6;
}

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

.rank-info h2 {
    margin: 0;
    font-size: 22px;
}

.rank-info p {
    margin: 8px 0;
    color: var(--color-muted);
}

.rank-info div {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--color-muted);
}

.rank-info strong {
    color: var(--color-primary);
}

.detail-hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: #111827;
}

.detail-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(12px);
    transform: scale(1.08);
    opacity: 0.5;
}

.detail-bg-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.52));
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 42px;
    padding: 72px 0;
}

.detail-poster {
    overflow: hidden;
    border-radius: 24px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: #fecdd3;
}

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

.detail-one-line {
    max-width: 820px;
    margin: 18px 0;
    color: #f3f4f6;
    font-size: 19px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.detail-meta span {
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.15);
}

.detail-tags {
    margin-bottom: 24px;
}

.player-card {
    overflow: hidden;
    border-radius: var(--radius-large);
    background: #0f172a;
    box-shadow: var(--shadow-soft);
}

.player-topbar {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
}

.player-topbar span {
    color: #fecdd3;
}

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

.video-shell video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.big-play {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 10px;
    width: 100%;
    color: #ffffff;
    border: none;
    background: radial-gradient(circle, rgba(225, 29, 72, 0.28), rgba(0, 0, 0, 0.52));
    cursor: pointer;
    font-size: 18px;
    font-weight: 800;
}

.big-play span {
    display: grid;
    place-items: center;
    width: 74px;
    height: 74px;
    border-radius: 50%;
    background: var(--color-primary);
    box-shadow: 0 16px 38px rgba(225, 29, 72, 0.36);
}

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

.player-note {
    margin: 0;
    padding: 14px 20px 18px;
    color: #cbd5e1;
}

.detail-content-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 24px;
    padding-bottom: 18px;
}

.content-panel {
    padding: 28px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-card);
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.content-panel h2 {
    margin: 0 0 12px;
    font-size: 26px;
}

.content-panel p {
    margin: 0;
    color: #374151;
    font-size: 17px;
}

.site-footer {
    margin-top: 40px;
    padding: 50px 0;
    color: #cbd5e1;
    background: #111827;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 1fr;
    gap: 30px;
}

.footer-logo {
    margin-bottom: 12px;
    color: #ffffff;
    font-size: 24px;
    font-weight: 900;
}

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

.site-footer a {
    display: block;
    margin: 8px 0;
    color: #cbd5e1;
}

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

@media (max-width: 980px) {
    .header-inner {
        flex-wrap: wrap;
        gap: 12px;
        padding: 12px 0;
    }

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

    .main-nav {
        display: none;
        order: 4;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        margin-left: 0;
    }

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

    .header-search {
        width: 100%;
        order: 5;
    }

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

    .hero {
        height: 66vh;
    }

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

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

    .category-overview-grid,
    .detail-content-grid {
        grid-template-columns: 1fr;
    }

    .detail-hero-inner {
        grid-template-columns: 220px 1fr;
    }
}

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

    .hero {
        min-height: 540px;
    }

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

    .hero-arrow {
        display: none;
    }

    .section-heading {
        display: block;
    }

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

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

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

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

    .rank-item {
        grid-template-columns: 44px 82px 1fr;
        gap: 12px;
    }

    .rank-info p {
        display: none;
    }

    .detail-hero-inner {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .detail-poster {
        max-width: 240px;
    }

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

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