:root {
    color-scheme: light;
    --page-bg: #fff7ed;
    --surface: rgba(255, 255, 255, 0.78);
    --surface-strong: #ffffff;
    --text: #2f241d;
    --muted: #826b57;
    --line: rgba(146, 64, 14, 0.14);
    --brand: #ea580c;
    --brand-dark: #9a3412;
    --brand-soft: #fed7aa;
    --shadow: 0 24px 80px rgba(124, 45, 18, 0.16);
    --radius-lg: 30px;
    --radius-md: 20px;
    --radius-sm: 14px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    background:
        radial-gradient(circle at 10% 0%, rgba(251, 146, 60, 0.24), transparent 34%),
        radial-gradient(circle at 90% 8%, rgba(245, 158, 11, 0.2), transparent 30%),
        linear-gradient(135deg, #fff7ed 0%, #fffbeb 48%, #fed7aa 100%);
    min-height: 100vh;
}

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

img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: linear-gradient(135deg, #fed7aa, #ffedd5);
}

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    border-bottom: 1px solid rgba(154, 52, 18, 0.12);
    background: rgba(255, 247, 237, 0.86);
    backdrop-filter: blur(18px);
}

.header-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 22px;
    min-height: 72px;
}

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 132px;
    height: 42px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 18px;
    font-weight: 900;
    letter-spacing: 0.04em;
    background: linear-gradient(135deg, #f97316, #b45309);
    box-shadow: 0 12px 32px rgba(234, 88, 12, 0.25);
}

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

.desktop-nav a,
.mobile-nav a {
    padding: 10px 14px;
    border-radius: 999px;
    color: #5f4632;
    font-weight: 700;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
    color: var(--brand-dark);
    background: rgba(251, 146, 60, 0.16);
}

.header-search {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border: 1px solid rgba(154, 52, 18, 0.14);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
}

.header-search input {
    width: 230px;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
    padding: 8px 10px;
}

.header-search button,
.primary-button,
.secondary-button,
.text-link,
.filter-buttons button {
    cursor: pointer;
    transition: transform 0.24s ease, box-shadow 0.24s ease, background 0.24s ease;
}

.header-search button,
.primary-button {
    border: 0;
    color: #ffffff;
    border-radius: 999px;
    padding: 10px 18px;
    font-weight: 900;
    background: linear-gradient(135deg, #f97316, #c2410c);
    box-shadow: 0 14px 30px rgba(234, 88, 12, 0.28);
}

.header-search button:hover,
.primary-button:hover,
.secondary-button:hover,
.text-link:hover,
.filter-buttons button:hover {
    transform: translateY(-2px);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(154, 52, 18, 0.16);
    border-radius: 14px;
    color: var(--brand-dark);
    background: rgba(255, 255, 255, 0.72);
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 10px;
    border: 1px solid rgba(154, 52, 18, 0.12);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.82);
}

.mobile-nav.is-open {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.hero {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    height: min(680px, calc(100vh - 110px));
    min-height: 560px;
    margin: 28px auto 0;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.44);
    border-radius: 36px;
    background: #1f130b;
    box-shadow: var(--shadow);
}

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

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

.hero-bg,
.detail-bg {
    position: absolute;
    inset: 0;
    transform: scale(1.05);
    filter: blur(2px) saturate(1.08);
}

.hero-overlay,
.detail-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(40, 20, 8, 0.92) 0%, rgba(68, 29, 12, 0.76) 42%, rgba(124, 45, 18, 0.2) 100%),
        linear-gradient(0deg, rgba(30, 16, 8, 0.82), rgba(30, 16, 8, 0.04));
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) 340px;
    align-items: center;
    gap: 52px;
    padding: 64px;
}

.hero-copy {
    color: #fff7ed;
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-bottom: 12px;
    padding: 8px 12px;
    border-radius: 999px;
    color: #7c2d12;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: rgba(254, 215, 170, 0.92);
}

.hero h1,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    font-size: clamp(38px, 6vw, 76px);
    line-height: 0.98;
    letter-spacing: -0.05em;
}

.hero p,
.page-hero p,
.detail-info p {
    max-width: 760px;
    margin: 22px 0 0;
    color: rgba(255, 247, 237, 0.86);
    font-size: 18px;
    line-height: 1.82;
}

.hero-tags,
.movie-meta,
.tag-cloud,
.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags {
    margin-top: 24px;
}

.hero-tags span,
.tag-cloud span {
    padding: 8px 12px;
    border-radius: 999px;
    color: #7c2d12;
    font-size: 13px;
    font-weight: 800;
    background: rgba(255, 237, 213, 0.88);
}

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

.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border: 1px solid rgba(255, 237, 213, 0.52);
    border-radius: 999px;
    color: #fff7ed;
    font-weight: 900;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
}

.hero-poster {
    height: 470px;
    overflow: hidden;
    border: 10px solid rgba(255, 255, 255, 0.18);
    border-radius: 34px;
    box-shadow: 0 34px 80px rgba(0, 0, 0, 0.36);
    transform: rotate(2deg);
}

.hero-dots {
    position: absolute;
    z-index: 4;
    left: 64px;
    bottom: 34px;
    display: flex;
    gap: 10px;
}

.hero-dots button {
    width: 44px;
    height: 8px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 247, 237, 0.42);
}

.hero-dots button.is-active {
    width: 70px;
    background: #ffffff;
}

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

.wide-section {
    margin-top: 72px;
}

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

.section-heading h2,
.search-panel h2,
.movie-article h2,
.watch-card h2,
.category-overview-card h2,
.ranking-card h2 {
    margin: 0;
    color: #3b2a1f;
    font-size: clamp(26px, 3vw, 40px);
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.section-heading p,
.search-panel p,
.category-overview-card p,
.ranking-card p,
.movie-card-body p,
.watch-card p,
.movie-article p {
    color: var(--muted);
    line-height: 1.72;
}

.section-heading a,
.text-link {
    flex: 0 0 auto;
    color: var(--brand-dark);
    font-weight: 900;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(154, 52, 18, 0.12);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 18px 45px rgba(124, 45, 18, 0.08);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 26px 70px rgba(124, 45, 18, 0.18);
}

.movie-poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #fed7aa;
}

.movie-poster img,
.category-tile img,
.compact-card img,
.ranking-cover img {
    transition: transform 0.34s ease;
}

.movie-card:hover .movie-poster img,
.category-tile:hover img,
.compact-card:hover img,
.ranking-card:hover .ranking-cover img {
    transform: scale(1.06);
}

.movie-type,
.movie-year {
    position: absolute;
    top: 10px;
    padding: 6px 9px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
    background: rgba(154, 52, 18, 0.8);
    backdrop-filter: blur(10px);
}

.movie-type {
    left: 10px;
}

.movie-year {
    right: 10px;
}

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

.movie-card-body h3 {
    margin: 0;
    color: #3b2a1f;
    font-size: 17px;
    line-height: 1.34;
}

.movie-card-body p {
    display: -webkit-box;
    margin: 8px 0 12px;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 14px;
}

.movie-meta span {
    color: #9a3412;
    font-size: 12px;
    font-weight: 800;
}

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

.category-tile {
    position: relative;
    min-height: 260px;
    overflow: hidden;
    border-radius: 28px;
    box-shadow: var(--shadow);
    isolation: isolate;
}

.category-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(0deg, rgba(67, 20, 7, 0.82), rgba(67, 20, 7, 0.12));
}

.category-tile span,
.category-tile p {
    position: absolute;
    z-index: 2;
    left: 22px;
    right: 22px;
    color: #ffffff;
}

.category-tile span {
    bottom: 66px;
    font-size: 24px;
    font-weight: 900;
}

.category-tile p {
    bottom: 18px;
    margin: 0;
    color: rgba(255, 247, 237, 0.82);
    line-height: 1.55;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(340px, 0.58fr);
    gap: 24px;
    align-items: start;
}

.rank-list,
.search-panel,
.filter-panel,
.category-overview-card,
.ranking-card,
.movie-article,
.watch-card {
    border: 1px solid rgba(154, 52, 18, 0.12);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 18px 45px rgba(124, 45, 18, 0.08);
}

.rank-list {
    padding: 10px;
}

.rank-row {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 13px 12px;
    border-radius: 18px;
}

.rank-row:hover {
    background: rgba(251, 146, 60, 0.12);
}

.rank-row span {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 12px;
    color: #ffffff;
    font-weight: 900;
    background: linear-gradient(135deg, #f97316, #b45309);
}

.rank-row strong {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank-row em {
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
}

.search-panel {
    padding: 24px;
}

.filter-panel {
    display: grid;
    gap: 14px;
    margin-bottom: 24px;
    padding: 16px;
}

.filter-panel input {
    width: 100%;
    border: 1px solid rgba(154, 52, 18, 0.14);
    border-radius: 18px;
    outline: 0;
    padding: 13px 16px;
    color: var(--text);
    background: #ffffff;
}

.filter-buttons button {
    border: 1px solid rgba(154, 52, 18, 0.14);
    border-radius: 999px;
    padding: 9px 14px;
    color: #7c2d12;
    font-weight: 900;
    background: #fff7ed;
}

.filter-buttons button.is-active {
    color: #ffffff;
    background: linear-gradient(135deg, #f97316, #c2410c);
}

.mini-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.compact-card {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    border-radius: 18px;
    background: #fed7aa;
}

.compact-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(67, 20, 7, 0.84), transparent 62%);
}

.compact-card span {
    position: absolute;
    z-index: 2;
    left: 12px;
    right: 12px;
    bottom: 12px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 900;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    margin: 28px auto 0;
    border-radius: 36px;
    box-shadow: var(--shadow);
}

.page-hero {
    width: min(1180px, calc(100% - 32px));
    min-height: 320px;
    padding: 64px;
    color: #ffffff;
    background:
        linear-gradient(135deg, rgba(124, 45, 18, 0.92), rgba(234, 88, 12, 0.76)),
        radial-gradient(circle at 70% 20%, rgba(255, 237, 213, 0.34), transparent 42%);
}

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

.category-page-hero {
    background:
        linear-gradient(135deg, rgba(67, 20, 7, 0.92), rgba(194, 65, 12, 0.74)),
        radial-gradient(circle at 80% 15%, rgba(254, 215, 170, 0.28), transparent 40%);
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 20px;
    padding: 18px;
}

.category-cover-stack {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    overflow: hidden;
    border-radius: 20px;
}

.category-cover-stack img {
    aspect-ratio: 2 / 3;
}

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

.ranking-card {
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr);
    gap: 18px;
    padding: 14px;
}

.ranking-cover {
    position: relative;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    border-radius: 18px;
}

.ranking-cover span {
    position: absolute;
    z-index: 2;
    top: 10px;
    left: 10px;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    color: #ffffff;
    font-weight: 900;
    background: rgba(154, 52, 18, 0.86);
}

.detail-hero {
    width: min(1180px, calc(100% - 32px));
    min-height: 570px;
    background: #1f130b;
}

.detail-wrap {
    position: relative;
    z-index: 2;
    padding: 36px 48px 48px;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: rgba(255, 247, 237, 0.82);
    font-size: 14px;
    font-weight: 800;
}

.breadcrumbs a:hover {
    color: #ffffff;
}

.detail-grid {
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr);
    gap: 44px;
    align-items: center;
    margin-top: 42px;
}

.detail-poster {
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border: 10px solid rgba(255, 255, 255, 0.18);
    border-radius: 32px;
    box-shadow: 0 34px 80px rgba(0, 0, 0, 0.36);
}

.detail-info {
    color: #fff7ed;
}

.player-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
    align-items: start;
}

.player-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border: 1px solid rgba(154, 52, 18, 0.14);
    border-radius: 30px;
    background: #111827;
    box-shadow: var(--shadow);
}

.player-video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    background: #111827;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    border: 0;
    cursor: pointer;
    background: linear-gradient(0deg, rgba(30, 16, 8, 0.74), rgba(30, 16, 8, 0.18));
}

.player-overlay.is-hidden {
    display: none;
}

.play-icon {
    display: grid;
    place-items: center;
    width: 88px;
    height: 88px;
    padding-left: 6px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 38px;
    background: linear-gradient(135deg, #f97316, #c2410c);
    box-shadow: 0 24px 60px rgba(234, 88, 12, 0.44);
}

.watch-card {
    padding: 24px;
}

.article-section {
    margin-top: 36px;
}

.movie-article {
    padding: 30px;
}

.movie-article h2 + p {
    margin-top: 12px;
}

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

.site-footer {
    margin-top: 70px;
    border-top: 1px solid rgba(154, 52, 18, 0.12);
    background: rgba(255, 247, 237, 0.76);
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 30px 0;
}

.footer-inner p {
    color: var(--muted);
    font-weight: 700;
}

[data-movie-card].is-hidden,
.compact-card.is-hidden,
.ranking-card.is-hidden {
    display: none;
}

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

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

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

    .hero {
        height: auto;
        min-height: 760px;
    }

    .hero-content {
        padding: 46px;
    }

    .hero-poster {
        width: min(300px, 70vw);
        height: 430px;
    }
}

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

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

    .site-logo {
        min-width: 118px;
        height: 38px;
        font-size: 16px;
    }

    .hero,
    .page-hero,
    .detail-hero,
    .section {
        width: min(100% - 24px, 1180px);
    }

    .hero {
        min-height: 760px;
        border-radius: 28px;
    }

    .hero-content {
        padding: 34px 24px 88px;
    }

    .hero h1,
    .page-hero h1,
    .detail-info h1 {
        font-size: clamp(34px, 13vw, 52px);
    }

    .hero p,
    .page-hero p,
    .detail-info p {
        font-size: 16px;
    }

    .hero-dots {
        left: 24px;
        bottom: 26px;
    }

    .page-hero,
    .detail-wrap {
        padding: 34px 24px;
    }

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

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

    .category-overview-card,
    .ranking-card {
        grid-template-columns: 110px minmax(0, 1fr);
    }

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

    .category-cover-stack img:nth-child(n + 2) {
        display: none;
    }

    .ranking-cover {
        min-height: 160px;
    }

    .footer-inner,
    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }
}

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

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

    .hero-poster,
    .detail-poster {
        width: 100%;
        height: auto;
    }

    .rank-row {
        grid-template-columns: 36px minmax(0, 1fr);
    }

    .rank-row em {
        grid-column: 2;
    }
}
