:root {
    --bg: #fff7ed;
    --paper: #ffffff;
    --paper-soft: #fffaf5;
    --ink: #111827;
    --muted: #6b7280;
    --line: #fed7aa;
    --brand: #ea580c;
    --brand-dark: #c2410c;
    --brand-soft: #ffedd5;
    --shadow: 0 16px 45px rgba(124, 45, 18, 0.12);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

body.menu-open {
    overflow: hidden;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(254, 215, 170, 0.9);
    backdrop-filter: blur(18px);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: max-content;
}

.brand-mark,
.footer-logo span {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    color: #ffffff;
    border-radius: 14px;
    background: linear-gradient(135deg, #f97316, #dc2626);
    box-shadow: 0 12px 24px rgba(234, 88, 12, 0.28);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-text strong {
    font-size: 20px;
    color: var(--ink);
}

.brand-text small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

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

.nav-link,
.mobile-nav-link {
    padding: 10px 14px;
    color: #374151;
    border-radius: 999px;
    transition: color 0.25s ease, background-color 0.25s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: var(--brand-dark);
    background: var(--brand-soft);
}

.header-search {
    width: 270px;
    display: flex;
    align-items: center;
    padding: 4px;
    border: 1px solid #fed7aa;
    border-radius: 999px;
    background: #ffffff;
}

.header-search input,
.mobile-nav input,
.filter-panel input,
.search-form-large input {
    width: 100%;
    min-width: 0;
    color: var(--ink);
    border: 0;
    outline: 0;
    background: transparent;
}

.header-search input {
    padding: 8px 10px 8px 14px;
}

.header-search button,
.mobile-nav button,
.search-form-large button {
    border: 0;
    color: #ffffff;
    cursor: pointer;
    border-radius: 999px;
    background: linear-gradient(135deg, #f97316, #dc2626);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.header-search button {
    padding: 8px 14px;
}

.header-search button:hover,
.mobile-nav button:hover,
.search-form-large button:hover,
.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(234, 88, 12, 0.26);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid #fed7aa;
    color: var(--brand-dark);
    cursor: pointer;
    border-radius: 14px;
    background: #fff7ed;
}

.mobile-nav {
    display: none;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto 16px;
    padding: 16px;
    border: 1px solid #fed7aa;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

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

.mobile-nav form {
    display: flex;
    gap: 8px;
    padding: 6px;
    border: 1px solid #fed7aa;
    border-radius: 999px;
}

.mobile-nav input {
    padding: 10px 12px;
}

.mobile-nav button {
    padding: 10px 16px;
}

.hero {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    background: #111827;
}

.hero-track,
.hero-slide {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    display: flex;
    align-items: center;
    background-position: center;
    background-size: cover;
    transition: opacity 0.6s ease;
}

.hero-slide.active {
    opacity: 1;
    z-index: 1;
}

.hero-content {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    color: #ffffff;
    position: relative;
    z-index: 2;
    max-width: 760px;
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    color: var(--brand-dark);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-content .eyebrow {
    color: #fed7aa;
}

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

.hero p {
    max-width: 690px;
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 18px;
}

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

.hero-tags span,
.tag-row span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255, 237, 213, 0.86);
    color: var(--brand-dark);
    font-size: 12px;
    font-weight: 700;
}

.hero-tags span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

.btn.primary {
    color: #ffffff;
    background: linear-gradient(135deg, #f97316, #dc2626);
}

.btn.ghost {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(12px);
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 46px;
    height: 46px;
    border: 0;
    color: #ffffff;
    cursor: pointer;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
    transform: translateY(-50%);
}

.hero-control.prev {
    left: 24px;
}

.hero-control.next {
    right: 24px;
}

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

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

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

main,
.page-main {
    width: 100%;
}

.section-block,
.search-panel,
.page-hero,
.filter-panel,
.ranking-page-list,
.detail-hero {
    width: min(1280px, calc(100% - 32px));
    margin-left: auto;
    margin-right: auto;
}

.search-panel {
    display: grid;
    grid-template-columns: 1fr minmax(320px, 520px);
    gap: 24px;
    align-items: center;
    margin-top: -52px;
    position: relative;
    z-index: 10;
    padding: 26px;
    border: 1px solid rgba(254, 215, 170, 0.9);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow);
}

.search-panel h2,
.section-heading h2,
.page-hero h1,
.category-card h2,
.category-overview-card h2,
.detail-info h1,
.content-card h2 {
    margin: 0;
    color: var(--ink);
    line-height: 1.1;
}

.search-panel p,
.category-card p,
.category-overview-card p,
.page-hero p,
.content-card p,
.detail-info .one-line {
    color: var(--muted);
}

.search-form-large {
    display: flex;
    gap: 8px;
    padding: 8px;
    border: 1px solid #fed7aa;
    border-radius: 999px;
    background: #fff7ed;
}

.search-form-large input {
    padding: 12px 16px;
}

.search-form-large button {
    min-width: 112px;
    padding: 12px 18px;
}

.section-block {
    padding: 64px 0 0;
}

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

.section-heading h2 {
    margin-top: 8px;
    font-size: clamp(28px, 4vw, 42px);
    letter-spacing: -0.03em;
}

.section-heading a {
    color: var(--brand-dark);
    font-weight: 800;
}

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

.category-card,
.category-overview-card {
    overflow: hidden;
    border: 1px solid rgba(254, 215, 170, 0.88);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(124, 45, 18, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover,
.category-overview-card:hover,
.movie-card:hover,
.ranking-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.category-card > div:last-child,
.category-overview-body {
    padding: 18px;
}

.category-card h2,
.category-overview-card h2 {
    margin-bottom: 10px;
    font-size: 22px;
}

.category-card span,
.category-overview-card span {
    color: var(--brand-dark);
    font-weight: 800;
}

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

.category-overview-covers {
    height: 180px;
    grid-template-columns: repeat(6, 1fr);
}

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

.movie-card {
    overflow: hidden;
    min-width: 0;
    border: 1px solid rgba(254, 215, 170, 0.9);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 10px 26px rgba(124, 45, 18, 0.07);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #ffedd5, #fdba74);
}

.poster-link img {
    transition: transform 0.4s ease;
}

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

.poster-year,
.poster-play {
    position: absolute;
    display: inline-grid;
    place-items: center;
    color: #ffffff;
    font-weight: 900;
    background: rgba(17, 24, 39, 0.72);
    backdrop-filter: blur(8px);
}

.poster-year {
    top: 10px;
    left: 10px;
    min-width: 48px;
    height: 28px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 12px;
}

.poster-play {
    right: 10px;
    bottom: 10px;
    width: 40px;
    height: 40px;
    border-radius: 999px;
}

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

.movie-card-body h2 {
    margin: 6px 0 8px;
    font-size: 17px;
    line-height: 1.3;
}

.movie-card-body h2 a:hover {
    color: var(--brand-dark);
}

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

.movie-meta-line {
    overflow: hidden;
    color: var(--brand-dark);
    font-size: 12px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.two-column-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
    align-items: start;
}

.ranking-panel {
    position: sticky;
    top: 96px;
    padding: 22px;
    border: 1px solid rgba(254, 215, 170, 0.9);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow);
}

.section-heading.slim {
    align-items: center;
    margin-bottom: 16px;
}

.section-heading.slim h2 {
    font-size: 26px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 44px 56px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 18px;
    background: #fff7ed;
}

.rank-no {
    color: var(--brand-dark);
    font-size: 18px;
    font-weight: 900;
}

.rank-item img {
    width: 56px;
    height: 74px;
    border-radius: 14px;
}

.rank-title,
.rank-type {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-title {
    font-weight: 900;
}

.rank-type {
    color: var(--muted);
    font-size: 12px;
}

.page-main {
    padding-bottom: 72px;
}

.page-hero {
    margin-top: 36px;
    padding: 42px;
    border: 1px solid rgba(254, 215, 170, 0.88);
    border-radius: var(--radius);
    background: linear-gradient(135deg, #ffffff, #fff7ed);
    box-shadow: var(--shadow);
}

.page-hero.small h1 {
    margin-top: 10px;
    font-size: clamp(34px, 5vw, 58px);
    letter-spacing: -0.04em;
}

.page-hero p {
    max-width: 800px;
    margin: 16px 0 0;
    font-size: 17px;
}

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

.breadcrumb a {
    color: var(--brand-dark);
    font-weight: 800;
}

.filter-panel {
    position: relative;
    z-index: 4;
    display: grid;
    gap: 16px;
    margin-top: 24px;
    padding: 18px;
    border: 1px solid rgba(254, 215, 170, 0.9);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 12px 36px rgba(124, 45, 18, 0.1);
}

.filter-panel input {
    padding: 14px 18px;
    border: 1px solid #fed7aa;
    border-radius: 999px;
    background: #fff7ed;
}

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

.filter-chip {
    padding: 9px 14px;
    border: 1px solid #fed7aa;
    color: #9a3412;
    cursor: pointer;
    border-radius: 999px;
    background: #ffffff;
}

.filter-chip.active,
.filter-chip:hover {
    color: #ffffff;
    border-color: transparent;
    background: linear-gradient(135deg, #f97316, #dc2626);
}

.empty-state {
    display: none;
    margin: 28px auto 0;
    padding: 24px;
    color: var(--muted);
    text-align: center;
    border: 1px dashed #fdba74;
    border-radius: var(--radius);
    background: #fff7ed;
}

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

.ranking-page-list {
    display: grid;
    gap: 16px;
    margin-top: 32px;
}

.ranking-card {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 20px;
    padding: 16px;
    border: 1px solid rgba(254, 215, 170, 0.9);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 10px 26px rgba(124, 45, 18, 0.07);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.ranking-cover span {
    position: absolute;
    left: 10px;
    top: 10px;
    padding: 4px 8px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.72);
}

.ranking-info h2 {
    margin: 0 0 8px;
    font-size: 24px;
}

.ranking-info h2 a:hover {
    color: var(--brand-dark);
}

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

.detail-hero {
    margin-top: 36px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.85fr);
    gap: 28px;
    align-items: stretch;
}

.player-card,
.detail-info,
.content-card {
    border: 1px solid rgba(254, 215, 170, 0.88);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow);
}

.player-card {
    overflow: hidden;
}

.video-shell {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #111827;
}

.video-shell video {
    width: 100%;
    height: 100%;
    display: block;
    background: #111827;
}

.video-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    cursor: pointer;
    background: radial-gradient(circle, rgba(234, 88, 12, 0.18), rgba(17, 24, 39, 0.42));
}

.video-cover.hidden {
    display: none;
}

.big-play {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    color: #ffffff;
    font-size: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f97316, #dc2626);
    box-shadow: 0 20px 50px rgba(234, 88, 12, 0.42);
}

.detail-info {
    padding: 28px;
}

.detail-info h1 {
    margin-top: 10px;
    font-size: clamp(30px, 4vw, 50px);
    letter-spacing: -0.04em;
}

.detail-info .one-line {
    margin: 18px 0;
    font-size: 17px;
}

.detail-meta {
    margin: 18px 0;
}

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

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.content-card {
    padding: 26px;
}

.content-card h2 {
    margin-bottom: 12px;
    font-size: 26px;
}

.content-card p {
    margin: 0;
    font-size: 16px;
}

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

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

.footer-inner {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 36px;
    padding: 48px 0;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    font-size: 20px;
}

.footer-brand p {
    max-width: 460px;
}

.footer-links h2 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: 18px;
}

.footer-links div {
    display: grid;
    gap: 8px;
}

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

.footer-bottom {
    padding: 18px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

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

    .two-column-layout,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .ranking-panel {
        position: static;
    }
}

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

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

    .site-header-inner {
        height: 64px;
    }

    .hero {
        min-height: 560px;
    }

    .hero-control {
        display: none;
    }

    .search-panel,
    .detail-content,
    .footer-inner {
        grid-template-columns: 1fr;
    }

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

    .page-hero {
        padding: 28px;
    }
}

@media (max-width: 560px) {
    .brand-text small {
        display: none;
    }

    .hero-content {
        padding-top: 60px;
    }

    .hero-actions,
    .search-form-large {
        flex-direction: column;
        align-items: stretch;
    }

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

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

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