:root {
    --red: #ef4444;
    --orange: #f97316;
    --pink: #ec4899;
    --rose: #fff1f2;
    --cream: #fff7ed;
    --text: #1f2937;
    --muted: #6b7280;
    --line: rgba(248, 113, 113, 0.18);
    --shadow: 0 18px 50px rgba(127, 29, 29, 0.13);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: linear-gradient(135deg, #fff7ed 0%, #fff1f2 45%, #ffe4e6 100%);
    min-height: 100vh;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(248, 113, 113, 0.16);
    box-shadow: 0 8px 26px rgba(127, 29, 29, 0.08);
}

.nav-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    font-size: 26px;
    letter-spacing: -0.03em;
    background: linear-gradient(90deg, var(--red), var(--orange), var(--pink));
    -webkit-background-clip: text;
    color: transparent;
}

.brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--red), var(--orange), var(--pink));
    color: #fff;
    box-shadow: 0 12px 24px rgba(239, 68, 68, 0.28);
    font-size: 18px;
}

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

.nav-link {
    color: #374151;
    font-weight: 700;
    position: relative;
    padding: 8px 0;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--red);
}

.nav-link.active::after,
.nav-link:hover::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -3px;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--red), var(--orange), var(--pink));
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    color: #374151;
    background: #fff7ed;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 14px;
}

.mobile-nav.open {
    display: grid;
    gap: 8px;
}

.mobile-nav-link {
    display: block;
    padding: 12px 14px;
    border-radius: 14px;
    background: #fff;
    color: #374151;
    font-weight: 700;
}

.hero-carousel {
    position: relative;
    height: 640px;
    overflow: hidden;
    background: #1f0b11;
}

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

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

.hero-copy {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    max-width: 760px;
    color: #fff;
    padding-top: 30px;
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.02em;
    background: rgba(255, 255, 255, 0.17);
    color: #fff;
    backdrop-filter: blur(10px);
}

.section-kicker {
    color: #b91c1c;
    background: linear-gradient(90deg, #fee2e2, #ffedd5);
}

.hero-copy h1,
.page-hero h1 {
    margin: 22px 0 18px;
    font-size: clamp(42px, 7vw, 82px);
    line-height: 0.98;
    font-weight: 950;
    letter-spacing: -0.06em;
}

.hero-subtitle,
.page-hero p {
    font-size: clamp(18px, 2.2vw, 25px);
    line-height: 1.7;
    max-width: 760px;
    opacity: 0.94;
}

.hero-tags,
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 26px 0;
}

.tag {
    display: inline-flex;
    align-items: center;
    padding: 8px 13px;
    border-radius: 999px;
    background: linear-gradient(90deg, #ffedd5, #ffe4e6);
    color: #7f1d1d;
    font-size: 13px;
    font-weight: 800;
}

.hero-tags .tag {
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

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

.primary-button,
.secondary-button,
.search-form button,
.watch-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 24px;
    border-radius: 999px;
    border: 0;
    cursor: pointer;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button,
.search-form button,
.watch-button {
    color: #fff;
    background: linear-gradient(90deg, var(--red), var(--orange), var(--pink));
    box-shadow: 0 15px 34px rgba(239, 68, 68, 0.28);
}

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

.primary-button:hover,
.secondary-button:hover,
.search-form button:hover,
.watch-button:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 20px 44px rgba(239, 68, 68, 0.32);
}

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

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

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

.search-strip,
.content-section,
.detail-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.search-strip {
    margin-top: -46px;
    position: relative;
    z-index: 5;
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 24px;
    align-items: center;
    padding: 28px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.search-form {
    display: flex;
    gap: 12px;
    align-items: center;
}

.search-form input {
    width: 100%;
    height: 52px;
    padding: 0 18px;
    border: 1px solid rgba(248, 113, 113, 0.28);
    border-radius: 999px;
    color: var(--text);
    background: #fff7ed;
    outline: none;
}

.search-form input:focus {
    border-color: var(--red);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

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

.content-section.tinted {
    width: 100%;
    max-width: none;
    margin-top: 72px;
    padding: 72px max(16px, calc((100% - 1180px) / 2));
    background: linear-gradient(90deg, rgba(255, 237, 213, 0.88), rgba(255, 228, 230, 0.88));
}

.section-heading {
    text-align: center;
    margin: 0 auto 36px;
    max-width: 760px;
}

.section-heading.left {
    text-align: left;
    margin-left: 0;
}

.section-heading.compact {
    text-align: left;
    margin: 0;
}

.section-heading h2 {
    margin: 14px 0 10px;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.1;
    font-weight: 950;
    color: #1f2937;
    letter-spacing: -0.04em;
}

.section-heading p {
    margin: 0;
    color: var(--muted);
    line-height: 1.8;
}

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

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

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

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

.movie-card {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 12px 32px rgba(127, 29, 29, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.12);
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 22px 48px rgba(127, 29, 29, 0.18);
    border-color: rgba(239, 68, 68, 0.26);
}

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

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

.movie-card:hover .poster-wrap img {
    transform: scale(1.08);
    filter: saturate(1.06) contrast(1.05);
}

.type-badge,
.rank-badge {
    position: absolute;
    top: 12px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    background: rgba(239, 68, 68, 0.92);
    backdrop-filter: blur(10px);
}

.type-badge {
    right: 12px;
}

.rank-badge {
    left: 12px;
    background: linear-gradient(135deg, var(--red), var(--orange));
}

.play-mark {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 58px;
    height: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    background: rgba(0, 0, 0, 0.42);
    transform: translate(-50%, -50%) scale(0.72);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
    backdrop-filter: blur(8px);
}

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

.card-body {
    padding: 18px;
}

.card-body h3 {
    margin: 0 0 8px;
    font-size: 19px;
    line-height: 1.32;
    font-weight: 900;
    color: #1f2937;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.movie-card:hover .card-body h3 {
    color: var(--red);
}

.card-body p {
    margin: 0 0 14px;
    min-height: 46px;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    color: #9a3412;
    font-size: 13px;
    font-weight: 800;
}

.card-meta span {
    background: #ffedd5;
    border-radius: 999px;
    padding: 5px 9px;
}

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

.compact-card .card-body h3 {
    font-size: 16px;
}

.compact-card .card-body p {
    min-height: 42px;
    font-size: 13px;
}

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

.category-card {
    min-height: 176px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 22px;
    border-radius: 24px;
    overflow: hidden;
    color: #fff;
    background-size: cover;
    background-position: center;
    box-shadow: 0 16px 38px rgba(127, 29, 29, 0.14);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 52px rgba(127, 29, 29, 0.2);
}

.category-card span {
    font-size: 23px;
    font-weight: 950;
}

.category-card p {
    margin: 10px 0 0;
    font-size: 14px;
    line-height: 1.65;
    opacity: 0.92;
}

.split-section {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 34px;
    align-items: stretch;
}

.ranking-panel,
.promo-panel,
.detail-card,
.info-card,
.category-overview-card {
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow);
    border: 1px solid rgba(248, 113, 113, 0.13);
}

.ranking-panel {
    overflow: hidden;
}

.ranking-row {
    display: grid;
    grid-template-columns: 42px 48px 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 13px 18px;
    border-bottom: 1px solid #fee2e2;
    transition: background 0.2s ease;
}

.ranking-row:hover {
    background: #fff7ed;
}

.ranking-row img {
    width: 48px;
    height: 64px;
    object-fit: cover;
    border-radius: 10px;
}

.ranking-index {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: #fff;
    font-weight: 950;
    background: linear-gradient(135deg, var(--red), var(--orange));
}

.ranking-title {
    font-weight: 900;
    color: #1f2937;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ranking-meta {
    color: #9a3412;
    font-size: 13px;
    font-weight: 800;
}

.promo-panel {
    padding: 44px;
    color: #fff;
    background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.25), transparent 26%), linear-gradient(135deg, #ef4444, #f97316 52%, #ec4899);
}

.promo-panel h2 {
    margin: 0 0 16px;
    font-size: clamp(32px, 4vw, 52px);
    line-height: 1.05;
    font-weight: 950;
}

.promo-panel p {
    line-height: 1.8;
    opacity: 0.94;
    margin-bottom: 28px;
}

.page-hero {
    min-height: 390px;
    display: flex;
    align-items: center;
    color: #fff;
    background: linear-gradient(135deg, #7f1d1d, #ea580c, #db2777);
    background-size: cover;
    background-position: center;
    padding: 72px max(16px, calc((100% - 1180px) / 2));
}

.small-hero {
    min-height: 320px;
}

.category-hero {
    min-height: 430px;
}

.hero-search {
    max-width: 720px;
    margin-top: 28px;
}

.filter-bar {
    justify-content: center;
    margin-bottom: 30px;
}

.filter-button {
    min-height: 42px;
    padding: 0 17px;
    border: 0;
    border-radius: 999px;
    color: #7f1d1d;
    background: #fff;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(127, 29, 29, 0.08);
}

.filter-button:hover,
.filter-button.active {
    color: #fff;
    background: linear-gradient(90deg, var(--red), var(--orange), var(--pink));
}

.empty-state {
    margin: 30px auto 0;
    padding: 28px;
    border-radius: 20px;
    background: #fff;
    color: var(--muted);
    text-align: center;
    font-weight: 800;
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 180px 1fr;
    overflow: hidden;
}

.category-cover {
    display: flex;
    align-items: flex-end;
    min-height: 220px;
    padding: 20px;
    color: #fff;
    background-size: cover;
    background-position: center;
}

.category-cover span {
    font-size: 24px;
    font-weight: 950;
}

.category-overview-card > div {
    padding: 26px;
}

.category-overview-card h2 {
    margin: 0 0 12px;
    font-size: 26px;
    font-weight: 950;
}

.category-overview-card p {
    color: var(--muted);
    line-height: 1.75;
}

.mini-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.mini-links a {
    padding: 6px 10px;
    border-radius: 999px;
    color: #9a3412;
    background: #ffedd5;
    font-size: 13px;
    font-weight: 800;
}

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

.detail-shell {
    padding-top: 34px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    align-items: center;
    margin-bottom: 22px;
    color: #7f1d1d;
    font-weight: 800;
}

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

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
    gap: 32px;
    align-items: start;
}

.player-box {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000;
    box-shadow: 0 22px 55px rgba(0, 0, 0, 0.28);
}

.movie-video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    object-fit: contain;
}

.player-loading {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: rgba(17, 24, 39, 0.82);
    pointer-events: none;
    font-weight: 900;
}

.player-loading.ready {
    display: none;
}

.player-controls {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.76), transparent);
}

.player-controls button {
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    cursor: pointer;
    backdrop-filter: blur(10px);
}

.player-controls button:hover {
    background: rgba(255, 255, 255, 0.32);
}

.watch-button {
    width: 100%;
    margin: 18px 0;
    border-radius: 18px;
    min-height: 56px;
    font-size: 18px;
}

.detail-card {
    padding: 26px;
    margin-top: 22px;
}

.detail-card h2 {
    margin: 0 0 14px;
    font-size: 24px;
    font-weight: 950;
}

.detail-card p {
    margin: 0;
    color: #4b5563;
    line-height: 1.9;
}

.info-column {
    position: sticky;
    top: 92px;
}

.detail-poster {
    width: 100%;
    border-radius: 28px;
    box-shadow: var(--shadow);
    aspect-ratio: 3 / 4;
    object-fit: cover;
    background: linear-gradient(135deg, #fee2e2, #ffedd5);
}

.info-card {
    margin-top: 18px;
    padding: 26px;
}

.category-pill {
    display: inline-flex;
    padding: 7px 13px;
    border-radius: 999px;
    color: #9a3412;
    background: #ffedd5;
    font-weight: 900;
    font-size: 13px;
}

.info-card h1 {
    margin: 14px 0 10px;
    font-size: clamp(28px, 3vw, 42px);
    line-height: 1.12;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.one-line {
    color: #6b7280;
    line-height: 1.75;
}

.meta-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 22px 0;
}

.meta-list div {
    padding: 14px;
    border-radius: 16px;
    background: #fff7ed;
}

.meta-list dt {
    color: #9ca3af;
    font-size: 12px;
    font-weight: 900;
}

.meta-list dd {
    margin: 6px 0 0;
    color: #1f2937;
    font-weight: 900;
}

.site-footer {
    margin-top: 86px;
    color: #fff;
    background: linear-gradient(90deg, #7f1d1d, #9a3412, #831843);
}

.footer-grid {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.4fr 0.75fr 0.75fr 0.9fr;
    gap: 36px;
    padding: 52px 0;
}

.footer-grid h3 {
    margin: 0 0 16px;
}

.footer-grid p {
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.8;
}

.footer-grid a:not(.footer-brand) {
    display: block;
    margin: 9px 0;
    color: rgba(255, 255, 255, 0.78);
}

.footer-grid a:hover {
    color: #fff;
}

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.72);
    font-size: 14px;
}

.hidden-card {
    display: none !important;
}

@media (max-width: 1180px) {
    .movie-grid,
    .featured-grid,
    .all-grid,
    .ranking-large {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

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

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

    .mobile-menu-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .hero-carousel {
        height: 590px;
    }

    .search-strip,
    .split-section,
    .detail-grid,
    .footer-grid,
    .category-overview-card {
        grid-template-columns: 1fr;
    }

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

    .info-column {
        position: static;
    }

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

@media (max-width: 640px) {
    .nav-shell,
    .search-strip,
    .content-section,
    .detail-shell,
    .footer-grid,
    .footer-bottom,
    .hero-copy {
        width: min(100% - 24px, 1180px);
    }

    .brand {
        font-size: 22px;
    }

    .hero-carousel {
        height: 560px;
    }

    .hero-copy h1,
    .page-hero h1 {
        font-size: 42px;
    }

    .search-strip {
        padding: 20px;
    }

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

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

    .card-body {
        padding: 14px;
    }

    .card-body h3 {
        font-size: 16px;
    }

    .card-body p {
        font-size: 13px;
    }

    .ranking-row {
        grid-template-columns: 34px 44px 1fr;
    }

    .ranking-meta {
        display: none;
    }

    .promo-panel {
        padding: 28px;
    }

    .meta-list {
        grid-template-columns: 1fr;
    }
}
