:root {
    --bg: #fffaf2;
    --surface: #ffffff;
    --surface-soft: #fff7ed;
    --text: #1f2937;
    --muted: #6b7280;
    --line: rgba(251, 146, 60, 0.22);
    --primary: #f97316;
    --primary-dark: #ea580c;
    --accent: #f59e0b;
    --shadow: 0 20px 60px rgba(154, 52, 18, 0.16);
    --radius: 24px;
    --max: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(18px);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.header-inner {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 14px;
    box-shadow: 0 12px 28px rgba(249, 115, 22, 0.35);
    transition: transform 0.2s ease;
}

.brand:hover .brand-mark {
    transform: scale(1.08) rotate(-3deg);
}

.brand-text {
    display: grid;
    line-height: 1.15;
}

.brand-text strong {
    font-size: 24px;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, var(--primary-dark), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

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

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

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -10px;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.2s ease;
}

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

.nav-link:hover::after,
.nav-link.active::after {
    transform: scaleX(1);
}

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

.hero-section {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: linear-gradient(135deg, #f97316 0%, #f59e0b 52%, #facc15 100%);
    min-height: 620px;
}

.hero-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.18;
    background-image:
        radial-gradient(circle at 12% 22%, rgba(255, 255, 255, 0.9) 0 2px, transparent 3px),
        radial-gradient(circle at 82% 12%, rgba(255, 255, 255, 0.8) 0 3px, transparent 4px),
        linear-gradient(135deg, transparent 0 48%, rgba(255, 255, 255, 0.35) 49% 51%, transparent 52% 100%);
    background-size: 86px 86px, 130px 130px, 70px 70px;
}

.hero-layout {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 520px);
    gap: 46px;
    align-items: center;
    padding: 86px 0;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
    margin: 14px 0 18px;
    font-size: clamp(38px, 6vw, 68px);
    line-height: 1.04;
    letter-spacing: -0.04em;
}

.hero-copy p {
    max-width: 620px;
    margin: 0 0 28px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 20px;
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 13px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    color: inherit;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.section-kicker {
    background: #fff1e6;
    color: var(--primary-dark);
}

.hero-search,
.inline-filter {
    display: flex;
    align-items: center;
    gap: 10px;
    width: min(100%, 620px);
    padding: 8px;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 999px;
    box-shadow: var(--shadow);
}

.hero-search input,
.inline-filter input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
    padding: 14px 18px;
}

.hero-search button,
.inline-filter button,
.primary-btn,
.ghost-btn {
    border: 0;
    border-radius: 999px;
    padding: 13px 22px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.hero-search button,
.inline-filter button,
.primary-btn {
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 16px 32px rgba(234, 88, 12, 0.28);
}

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

.primary-btn:hover,
.ghost-btn:hover,
.hero-search button:hover,
.inline-filter button:hover {
    transform: translateY(-2px);
}

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

.hero-carousel {
    position: relative;
    min-height: 470px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-rows: 1fr auto;
    overflow: hidden;
    border-radius: 34px;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: 0 28px 80px rgba(124, 45, 18, 0.3);
    opacity: 0;
    transform: translateX(28px) scale(0.96);
    pointer-events: none;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

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

.hero-image {
    min-height: 285px;
    overflow: hidden;
}

.hero-image img,
.poster-link img,
.detail-poster img,
.ranking-thumb img,
.category-covers img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-card-copy {
    padding: 24px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(18px);
}

.hero-rank {
    display: inline-flex;
    color: var(--primary-dark);
    font-size: 13px;
    font-weight: 800;
}

.hero-card-copy h2 {
    margin: 8px 0;
    font-size: 30px;
    line-height: 1.1;
}

.hero-card-copy p {
    margin: 0 0 14px;
    color: var(--muted);
}

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

.hero-tags span,
.tag-row span {
    padding: 5px 10px;
    color: var(--primary-dark);
    background: #fff1e6;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.text-link {
    display: inline-flex;
    margin-top: 16px;
    color: var(--primary-dark);
    font-weight: 800;
}

.hero-dots {
    position: absolute;
    left: 24px;
    bottom: -34px;
    display: flex;
    gap: 9px;
}

.hero-dot {
    width: 12px;
    height: 12px;
    border: 0;
    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: 34px;
    background: #ffffff;
}

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

.soft-block {
    background: linear-gradient(180deg, rgba(255, 247, 237, 0.92), rgba(255, 255, 255, 0.86));
}

.section-heading {
    margin-bottom: 28px;
    text-align: center;
}

.section-heading h2 {
    margin: 12px 0 8px;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.15;
}

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

.split-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    text-align: left;
    gap: 24px;
}

.left-heading {
    text-align: left;
}

.section-more {
    color: var(--primary-dark);
    font-weight: 800;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
}

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

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

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

.poster-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 5px 10px;
    color: #ffffff;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.72);
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(10px);
}

.movie-info {
    padding: 17px;
}

.movie-meta,
.ranking-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

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

.movie-info p {
    min-height: 58px;
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 14px;
}

.card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 15px;
    padding-top: 14px;
    border-top: 1px solid rgba(249, 115, 22, 0.15);
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.card-bottom a {
    color: var(--primary-dark);
}

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

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

.category-tile {
    min-height: 230px;
    display: grid;
    align-content: space-between;
    gap: 18px;
    padding: 22px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(135deg, #ffffff, #fff7ed);
    box-shadow: 0 14px 38px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.category-name {
    display: block;
    color: var(--primary-dark);
    font-size: 23px;
    font-weight: 900;
}

.category-desc {
    color: var(--muted);
    font-size: 14px;
}

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

.category-covers img {
    border-radius: 12px;
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.12);
}

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

.rank-panel,
.rank-page-wrap,
.side-card,
.watch-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 14px 38px rgba(15, 23, 42, 0.08);
}

.rank-panel {
    position: sticky;
    top: 98px;
    padding: 22px;
}

.ranking-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ranking-item {
    display: grid;
    grid-template-columns: 94px minmax(0, 1fr);
    gap: 16px;
    padding: 18px 0;
    border-bottom: 1px solid rgba(249, 115, 22, 0.16);
}

.ranking-item:last-child {
    border-bottom: 0;
}

.ranking-thumb {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 16px;
    background: #fed7aa;
}

.ranking-thumb span {
    position: absolute;
    left: 8px;
    top: 8px;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    color: #ffffff;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    font-weight: 900;
}

.ranking-copy h3 {
    margin: 6px 0;
    font-size: 20px;
    line-height: 1.25;
}

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

.ranking-meta strong {
    color: var(--primary-dark);
}

.rank-page-wrap {
    padding: 14px 26px;
}

.full-ranking .ranking-item {
    grid-template-columns: 116px minmax(0, 1fr);
}

.page-hero {
    padding: 74px 0;
    color: #ffffff;
    background:
        radial-gradient(circle at 12% 10%, rgba(255, 255, 255, 0.25), transparent 32%),
        linear-gradient(135deg, #f97316, #f59e0b);
}

.page-hero h1 {
    margin: 14px 0 10px;
    font-size: clamp(36px, 5vw, 62px);
    line-height: 1.06;
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 19px;
}

.page-hero .inline-filter {
    margin-top: 26px;
}

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

.detail-backdrop {
    position: absolute;
    inset: 0;
    opacity: 0.26;
    filter: blur(2px);
}

.detail-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(17, 24, 39, 0.92), rgba(17, 24, 39, 0.68));
}

.detail-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-head {
    position: relative;
    z-index: 2;
    padding: 34px 0 62px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 34px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
}

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

.detail-title-grid {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border: 5px solid rgba(255, 255, 255, 0.24);
    border-radius: 28px;
    aspect-ratio: 2 / 3;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.32);
}

.detail-copy p {
    max-width: 780px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 19px;
}

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

.detail-main {
    padding-top: 42px;
}

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

.watch-panel {
    overflow: hidden;
}

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

.movie-video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000000;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 12px;
    color: #ffffff;
    border: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.24), rgba(0, 0, 0, 0.64));
    cursor: pointer;
    text-align: center;
}

.player-cover.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.play-ring {
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 18px 44px rgba(249, 115, 22, 0.34);
    font-size: 28px;
}

.player-cover strong {
    max-width: min(80%, 560px);
    font-size: 22px;
}

.story-block {
    padding: 30px;
}

.story-block h2,
.side-card h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

.story-block p {
    margin: 0 0 28px;
    color: #4b5563;
    font-size: 17px;
}

.story-block p:last-child {
    margin-bottom: 0;
}

.detail-side {
    display: grid;
    gap: 18px;
    position: sticky;
    top: 98px;
}

.side-card {
    padding: 22px;
}

.detail-row {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(249, 115, 22, 0.14);
}

.detail-row:last-child {
    border-bottom: 0;
}

.detail-row span {
    color: var(--muted);
}

.detail-row strong {
    color: #111827;
}

.side-links {
    display: grid;
    gap: 12px;
}

.side-links a {
    display: block;
    padding: 12px 14px;
    border-radius: 14px;
    color: var(--primary-dark);
    background: #fff7ed;
    font-weight: 800;
}

.site-footer {
    padding: 38px 0;
    color: #6b7280;
    background: #111827;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.footer-inner strong {
    display: block;
    color: #ffffff;
    margin-bottom: 4px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.82);
}

.is-filter-hidden {
    display: none !important;
}

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

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

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

    .rank-panel,
    .detail-side {
        position: static;
    }
}

@media (max-width: 840px) {
    .site-nav {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 76px;
        display: none;
        padding: 18px;
        border: 1px solid var(--line);
        border-radius: 18px;
        background: #ffffff;
        box-shadow: var(--shadow);
        flex-direction: column;
        align-items: stretch;
    }

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

    .nav-toggle {
        display: inline-grid;
        place-items: center;
    }

    .hero-layout {
        grid-template-columns: 1fr;
        padding: 58px 0 88px;
    }

    .hero-carousel {
        min-height: 500px;
    }

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

    .detail-title-grid {
        grid-template-columns: 150px minmax(0, 1fr);
    }

    .detail-copy h1 {
        font-size: 36px;
    }
}

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

    .brand-text strong {
        font-size: 20px;
    }

    .brand-text small {
        display: none;
    }

    .hero-search,
    .inline-filter {
        border-radius: 24px;
        flex-direction: column;
        align-items: stretch;
    }

    .hero-search button,
    .inline-filter button {
        width: 100%;
    }

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

    .hero-carousel {
        min-height: 450px;
    }

    .movie-grid,
    .compact-grid,
    .category-grid,
    .large-category-grid {
        grid-template-columns: 1fr;
    }

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

    .ranking-item,
    .full-ranking .ranking-item {
        grid-template-columns: 86px minmax(0, 1fr);
        gap: 12px;
    }

    .detail-title-grid {
        grid-template-columns: 1fr;
    }

    .detail-poster {
        width: 190px;
    }
}
