:root {
    --bg: #fff7ed;
    --panel: #ffffff;
    --text: #171717;
    --muted: #6b7280;
    --line: #f0d9c9;
    --orange: #f97316;
    --red: #ef4444;
    --pink: #ec4899;
    --dark: #0f172a;
    --radius: 24px;
    --shadow: 0 20px 45px rgba(127, 29, 29, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #fff;
    background: linear-gradient(90deg, var(--orange), var(--red), var(--pink));
    box-shadow: 0 14px 35px rgba(239, 68, 68, 0.28);
}

.header-inner {
    max-width: 1280px;
    height: 68px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(12px);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

.brand-text {
    font-size: 21px;
}

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

.nav-link {
    padding: 8px 10px;
    border-radius: 999px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.86);
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-1px);
}

.header-search,
.mobile-search {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search input,
.mobile-search input {
    width: 260px;
    border: 0;
    outline: 0;
    color: #fff;
    border-radius: 999px;
    padding: 10px 46px 10px 16px;
    background: rgba(255, 255, 255, 0.20);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.header-search input::placeholder,
.mobile-search input::placeholder {
    color: rgba(255, 255, 255, 0.78);
}

.header-search button {
    position: absolute;
    right: 10px;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    cursor: pointer;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.18);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    background: #fff;
    border-radius: 99px;
}

.mobile-panel {
    display: none;
    padding: 0 24px 18px;
    max-width: 1280px;
    margin: 0 auto;
}

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

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

.mobile-search button {
    border: 0;
    border-radius: 999px;
    padding: 10px 16px;
    color: var(--red);
    font-weight: 800;
    background: #fff;
}

.mobile-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.mobile-nav-link {
    padding: 11px 13px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.16);
    font-weight: 700;
}

.hero-carousel {
    position: relative;
    min-height: 690px;
    overflow: hidden;
    color: #fff;
    background: var(--dark);
}

.hero-slides {
    position: relative;
    min-height: 690px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) 360px;
    align-items: center;
    gap: 56px;
    padding: 92px max(24px, calc((100vw - 1280px) / 2 + 24px)) 96px;
    opacity: 0;
    pointer-events: none;
    transform: scale(1.02);
    transition: opacity 0.55s ease, transform 0.55s ease;
    background-image: linear-gradient(90deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.34)), var(--hero-image);
    background-size: cover;
    background-position: center;
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

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

.hero-label,
.section-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-bottom: 14px;
    padding: 6px 13px;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(90deg, var(--orange), var(--red));
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.06em;
}

.hero-site-title {
    margin: 0 0 6px;
    color: rgba(255, 255, 255, 0.80);
    font-size: clamp(22px, 3vw, 34px);
    font-weight: 900;
}

.hero-content h2 {
    margin: 0;
    font-size: clamp(42px, 6vw, 76px);
    line-height: 1.03;
    letter-spacing: -0.05em;
}

.hero-content p {
    max-width: 680px;
    margin: 22px 0 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 20px;
}

.hero-meta,
.detail-meta,
.card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.hero-meta {
    margin: 28px 0 32px;
}

.hero-meta span,
.detail-meta span {
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.92);
    font-weight: 800;
}

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

.primary-btn,
.ghost-btn,
.section-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
    padding: 14px 26px;
    color: #fff;
    background: linear-gradient(90deg, var(--orange), var(--red));
    box-shadow: 0 16px 30px rgba(239, 68, 68, 0.26);
}

.ghost-btn {
    padding: 14px 24px;
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(14px);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-link:hover {
    transform: translateY(-2px);
}

.hero-side-card {
    border-radius: 34px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(18px);
    box-shadow: 0 35px 80px rgba(0, 0, 0, 0.28);
}

.hero-side-card > img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 26px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.30);
}

.hero-side-card strong {
    display: block;
    margin-top: 16px;
    font-size: 20px;
}

.hero-side-card span {
    color: rgba(255, 255, 255, 0.70);
}

.hero-thumb-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 14px;
}

.hero-thumb-row img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 14px;
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(14px);
}

.hero-controls button {
    border: 0;
    color: #fff;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.16);
}

.hero-controls > button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 28px;
    line-height: 1;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border-radius: 999px;
    opacity: 0.55;
}

.hero-dot.is-active {
    width: 28px;
    opacity: 1;
    background: #fff;
}

.hero-category-strip {
    position: absolute;
    left: 50%;
    bottom: 88px;
    transform: translateX(-50%);
    display: flex;
    max-width: min(980px, calc(100vw - 32px));
    overflow-x: auto;
    gap: 10px;
    padding: 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(14px);
}

.hero-category-strip a {
    flex: 0 0 auto;
    padding: 9px 14px;
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    font-weight: 800;
}

.section-block,
.rank-section,
.filter-panel,
.breadcrumb,
.page-hero,
.detail-hero,
.player-section {
    max-width: 1280px;
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
}

.section-block {
    padding-top: 70px;
    padding-bottom: 10px;
}

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

.section-title-row h2,
.page-hero h1,
.detail-copy h1,
.rank-copy h2,
.filter-head h2,
.detail-text h2 {
    margin: 0;
    letter-spacing: -0.04em;
    line-height: 1.12;
}

.section-title-row h2,
.rank-copy h2,
.filter-head h2 {
    font-size: clamp(28px, 4vw, 42px);
}

.section-link {
    flex: 0 0 auto;
    padding: 11px 18px;
    color: var(--red);
    background: #fff;
    box-shadow: 0 10px 25px rgba(239, 68, 68, 0.12);
}

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

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

.category-card {
    display: grid;
    gap: 18px;
    padding: 18px;
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover,
.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 26px 60px rgba(127, 29, 29, 0.16);
}

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

.category-covers img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 16px;
}

.category-copy span {
    color: var(--red);
    font-weight: 900;
    font-size: 13px;
}

.category-copy h2 {
    margin: 8px 0 6px;
    font-size: 24px;
}

.category-copy p {
    margin: 0;
    color: var(--muted);
}

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

.movie-card {
    overflow: hidden;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 14px 35px rgba(127, 29, 29, 0.10);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: #f7e1d3;
}

.poster-link img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: transform 0.45s ease;
}

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

.poster-badge,
.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    padding: 5px 9px;
    border-radius: 999px;
    color: #fff;
    font-weight: 900;
    font-size: 12px;
    background: linear-gradient(90deg, var(--orange), var(--red));
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.18);
}

.rank-badge {
    background: linear-gradient(90deg, #f59e0b, #ef4444);
}

.card-body {
    padding: 14px;
}

.card-meta {
    gap: 6px;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.card-meta span:not(:last-child)::after {
    content: "·";
    margin-left: 6px;
    color: #d1a190;
}

.card-body h3 {
    margin: 0;
    font-size: 17px;
    line-height: 1.32;
}

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

.card-body p {
    min-height: 44px;
    margin: 8px 0 12px;
    color: var(--muted);
    font-size: 13px;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag-row span {
    padding: 4px 8px;
    border-radius: 999px;
    color: #9a3412;
    background: #ffedd5;
    font-size: 12px;
    font-weight: 800;
}

.rank-section {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 34px;
    margin-top: 70px;
    padding-top: 54px;
    padding-bottom: 54px;
    color: #fff;
    border-radius: 34px;
    background: radial-gradient(circle at 10% 10%, rgba(249, 115, 22, 0.75), transparent 30%), linear-gradient(135deg, #111827, #7f1d1d 58%, #be185d);
    box-shadow: var(--shadow);
}

.rank-copy p {
    color: rgba(255, 255, 255, 0.78);
    font-size: 18px;
}

.ranking-list {
    display: grid;
    gap: 10px;
}

.ranking-item {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 13px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.12);
    transition: background 0.2s ease, transform 0.2s ease;
}

.ranking-item:hover {
    background: rgba(255, 255, 255, 0.20);
    transform: translateX(4px);
}

.ranking-number {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(90deg, var(--orange), var(--red));
    font-weight: 900;
}

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

.ranking-meta {
    color: rgba(255, 255, 255, 0.70);
    font-size: 13px;
}

.page-hero {
    padding-top: 72px;
    padding-bottom: 42px;
}

.slim-hero,
.category-hero {
    margin-top: 28px;
    border-radius: 34px;
    color: #fff;
    background: linear-gradient(135deg, #111827, #991b1b 62%, #db2777);
    box-shadow: var(--shadow);
}

.page-hero h1 {
    font-size: clamp(38px, 6vw, 64px);
}

.page-hero p {
    max-width: 820px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 18px;
}

.breadcrumb {
    padding-top: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    color: var(--muted);
    font-size: 14px;
}

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

.filter-panel {
    margin-top: 28px;
    padding-top: 18px;
    padding-bottom: 18px;
    display: grid;
    gap: 16px;
    border-radius: 26px;
    background: #fff;
    box-shadow: var(--shadow);
}

.filter-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.filter-head input,
.filter-controls select,
.clear-filter {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 11px 15px;
    outline: 0;
    background: #fff7ed;
}

.filter-head input {
    width: min(420px, 100%);
}

.filter-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.clear-filter {
    color: #fff;
    border: 0;
    cursor: pointer;
    font-weight: 900;
    background: linear-gradient(90deg, var(--orange), var(--red));
}

.card-results {
    padding-top: 32px;
}

.detail-hero {
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    gap: 36px;
    align-items: center;
    margin-top: 28px;
    padding-top: 36px;
    padding-bottom: 36px;
    border-radius: 34px;
    color: #fff;
    background: linear-gradient(135deg, #111827, #7f1d1d 55%, #be185d);
    box-shadow: var(--shadow);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 28px;
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.28);
}

.detail-copy h1 {
    font-size: clamp(38px, 6vw, 68px);
}

.detail-one-line {
    max-width: 850px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 20px;
}

.detail-tags {
    margin: 22px 0 28px;
}

.detail-tags span {
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
}

.player-section {
    padding-top: 66px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    background: #000;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.22);
}

.movie-player {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 12px;
    align-content: center;
    border: 0;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.20), rgba(15, 23, 42, 0.72));
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-symbol {
    width: 84px;
    height: 84px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    padding-left: 6px;
    font-size: 30px;
    background: linear-gradient(90deg, var(--orange), var(--red));
    box-shadow: 0 16px 40px rgba(239, 68, 68, 0.35);
}

.detail-text {
    display: grid;
    gap: 12px;
    max-width: 980px;
}

.detail-text h2 {
    margin-top: 24px;
    font-size: 30px;
}

.detail-text p {
    margin: 0;
    color: #374151;
    font-size: 18px;
}

.site-footer {
    margin-top: 86px;
    color: rgba(255, 255, 255, 0.76);
    background: #111827;
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 42px 24px;
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 36px;
}

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

.footer-inner p {
    max-width: 520px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-end;
}

.footer-links a {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.footer-links a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
}

.footer-bottom {
    max-width: 1280px;
    margin: 0 auto;
    padding: 18px 24px 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 14px;
}

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

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

    .hero-slide {
        grid-template-columns: minmax(0, 1fr) 300px;
    }
}

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

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

    .hero-carousel,
    .hero-slides {
        min-height: 760px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        align-content: center;
        gap: 28px;
        padding-top: 88px;
        padding-bottom: 150px;
    }

    .hero-side-card {
        display: none;
    }

    .hero-category-strip {
        bottom: 86px;
    }

    .rank-section,
    .detail-hero,
    .footer-inner {
        grid-template-columns: 1fr;
    }

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

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

    .filter-head input {
        width: 100%;
    }
}

@media (max-width: 680px) {
    .header-inner {
        padding: 0 16px;
    }

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

    .section-block,
    .rank-section,
    .filter-panel,
    .breadcrumb,
    .page-hero,
    .detail-hero,
    .player-section {
        padding-left: 16px;
        padding-right: 16px;
    }

    .section-block {
        padding-top: 48px;
    }

    .section-title-row,
    .ranking-item {
        align-items: start;
        grid-template-columns: 1fr;
    }

    .section-title-row {
        flex-direction: column;
    }

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

    .card-body {
        padding: 12px;
    }

    .card-body p {
        display: none;
    }

    .tag-row span:nth-child(n + 3) {
        display: none;
    }

    .hero-content p,
    .detail-one-line {
        font-size: 17px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .primary-btn,
    .ghost-btn {
        width: 100%;
    }

    .filter-controls select,
    .clear-filter {
        width: 100%;
    }

    .footer-links {
        justify-content: flex-start;
    }
}
