:root {
    --color-orange: #f97316;
    --color-orange-dark: #ea580c;
    --color-amber: #f59e0b;
    --color-coral: #ff6b47;
    --color-text: #1f2937;
    --color-muted: #6b7280;
    --color-soft: #f9fafb;
    --color-line: #e5e7eb;
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 22px 50px rgb(15 23 42 / 0.18);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #fff;
    background: linear-gradient(90deg, var(--color-orange) 0%, var(--color-coral) 52%, var(--color-amber) 100%);
    box-shadow: var(--shadow-lg);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    color: var(--color-orange);
    background: #fff;
    box-shadow: 0 8px 18px rgb(0 0 0 / 0.15);
}

.brand-mark.small {
    width: 28px;
    height: 28px;
}

.brand-text {
    font-size: 20px;
    letter-spacing: 0.02em;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 30px;
    font-weight: 700;
}

.main-nav a {
    opacity: 0.96;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover {
    opacity: 1;
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgb(255 255 255 / 0.14);
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    border-radius: 99px;
    background: #fff;
}

.hero {
    position: relative;
    overflow: hidden;
    min-height: 660px;
    color: #fff;
    background: linear-gradient(120deg, #ea580c 0%, #f59e0b 50%, #fb923c 100%);
}

.hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 150px;
    background: linear-gradient(0deg, #f9fafb 0%, rgb(249 250 251 / 0) 100%);
}

.hero-glow {
    position: absolute;
    border-radius: 999px;
    filter: blur(22px);
    opacity: 0.45;
}

.hero-glow-one {
    width: 360px;
    height: 360px;
    top: 60px;
    left: -100px;
    background: #fff7ed;
}

.hero-glow-two {
    width: 460px;
    height: 460px;
    right: -150px;
    bottom: 70px;
    background: #fdba74;
}

.hero-shell {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 430px;
    gap: 36px;
    padding: 64px 0 88px;
}

.hero-slider {
    position: relative;
    min-height: 460px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 270px;
    gap: 32px;
    align-items: center;
    padding: 34px;
    border: 1px solid rgb(255 255 255 / 0.24);
    border-radius: 30px;
    background: linear-gradient(135deg, rgb(0 0 0 / 0.22), rgb(255 255 255 / 0.12));
    box-shadow: var(--shadow-xl);
    opacity: 0;
    pointer-events: none;
    transform: translateY(18px) scale(0.98);
    transition: opacity 0.45s ease, transform 0.45s ease;
    backdrop-filter: blur(14px);
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 28px;
    padding: 4px 12px;
    border-radius: 999px;
    color: #fff;
    background: rgb(0 0 0 / 0.20);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.06em;
}

.hero-copy h2,
.page-hero h1 {
    margin: 18px 0 16px;
    font-size: clamp(36px, 6vw, 64px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-copy p,
.page-hero p {
    max-width: 650px;
    color: rgb(255 255 255 / 0.92);
    font-size: 18px;
    line-height: 1.8;
}

.hero-meta,
.side-meta,
.movie-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.hero-meta span,
.side-meta span {
    padding: 7px 12px;
    border-radius: 999px;
    background: rgb(255 255 255 / 0.18);
    font-size: 14px;
    font-weight: 700;
}

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

.btn,
.hero-search button,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border: 0;
    border-radius: 999px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover,
.hero-search button:hover,
.section-more:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn.primary {
    color: var(--color-orange-dark);
    background: #fff;
}

.btn.ghost {
    color: #fff;
    background: rgb(255 255 255 / 0.16);
}

.hero-cover {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    border-radius: 26px;
    background: linear-gradient(135deg, #111827, #7c2d12);
    box-shadow: 0 26px 60px rgb(124 45 18 / 0.36);
}

.hero-cover img,
.poster img,
.rank-cover img,
.detail-poster img,
.category-thumbs img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-controls {
    position: absolute;
    left: 34px;
    bottom: 32px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.hero-arrow,
.hero-dot {
    border: 0;
    color: #fff;
    background: rgb(0 0 0 / 0.22);
    cursor: pointer;
}

.hero-arrow {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    font-size: 24px;
}

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

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

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

.hero-search {
    align-self: center;
    padding: 30px;
    border: 1px solid rgb(255 255 255 / 0.24);
    border-radius: 30px;
    background: rgb(0 0 0 / 0.18);
    box-shadow: var(--shadow-xl);
    backdrop-filter: blur(14px);
}

.hero-search h1 {
    margin: 0 0 14px;
    font-size: clamp(34px, 4vw, 48px);
    line-height: 1.12;
}

.hero-search p {
    margin: 0 0 22px;
    color: rgb(255 255 255 / 0.9);
    line-height: 1.75;
}

.hero-search form,
.filter-panel {
    display: grid;
    gap: 12px;
}

.hero-search input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
    border: 1px solid var(--color-line);
    border-radius: 16px;
    color: var(--color-text);
    background: #fff;
    outline: none;
}

.hero-search button {
    color: #fff;
    background: linear-gradient(90deg, var(--color-orange), var(--color-amber));
}

.hero-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.hero-categories a {
    padding: 8px 12px;
    border-radius: 999px;
    color: #fff;
    background: rgb(255 255 255 / 0.16);
    font-size: 13px;
    font-weight: 700;
}

.main-stack,
.page-shell,
.detail-shell {
    padding-bottom: 64px;
}

.content-section {
    margin-top: 44px;
}

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

.section-heading h2 {
    margin: 0 0 8px;
    font-size: clamp(26px, 3vw, 34px);
}

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

.section-more {
    flex: 0 0 auto;
    color: #fff;
    background: linear-gradient(90deg, var(--color-orange), var(--color-amber));
}

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

.movie-card {
    overflow: hidden;
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow-md);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster,
.rank-cover,
.detail-poster {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, #111827, #9a3412);
}

.poster {
    aspect-ratio: 16 / 10;
}

.movie-card-compact .poster {
    aspect-ratio: 3 / 4;
}

.poster::before,
.rank-cover::before,
.detail-poster::before,
.hero-cover::before,
.category-thumbs::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgb(255 255 255 / 0.16), transparent 36%), linear-gradient(135deg, #111827, #7c2d12);
}

.poster img,
.rank-cover img,
.detail-poster img,
.hero-cover img,
.category-thumbs img {
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease, opacity 0.2s ease;
}

.poster.no-image img,
.rank-cover.no-image img,
.detail-poster.no-image img,
.hero-cover.no-image img,
.category-thumbs.no-image img {
    opacity: 0;
}

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

.poster-badge {
    position: absolute;
    z-index: 3;
    top: 10px;
    right: 10px;
    padding: 5px 8px;
    border-radius: 8px;
    color: #fff;
    background: var(--color-orange);
    font-size: 12px;
    font-weight: 800;
}

.poster-shade {
    position: absolute;
    z-index: 2;
    inset: 0;
    background: linear-gradient(0deg, rgb(0 0 0 / 0.55), rgb(0 0 0 / 0));
    opacity: 0;
    transition: opacity 0.25s ease;
}

.movie-card:hover .poster-shade {
    opacity: 1;
}

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

.movie-title {
    display: -webkit-box;
    overflow: hidden;
    margin-bottom: 8px;
    color: #111827;
    font-size: 17px;
    font-weight: 850;
    line-height: 1.45;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-card:hover .movie-title,
.movie-title:hover {
    color: var(--color-orange-dark);
}

.movie-card p,
.rank-info p {
    display: -webkit-box;
    overflow: hidden;
    margin: 0 0 12px;
    color: var(--color-muted);
    font-size: 14px;
    line-height: 1.65;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.movie-tags span,
.tag-cloud span {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    padding: 3px 9px;
    border-radius: 999px;
    color: #9a3412;
    background: #ffedd5;
    font-size: 12px;
    font-weight: 750;
}

.movie-meta-row {
    justify-content: space-between;
    margin-top: 14px;
    color: #6b7280;
    font-size: 13px;
    font-weight: 700;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 48px 1fr auto;
    gap: 12px;
    align-items: center;
    min-height: 58px;
    padding: 10px 14px;
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--shadow-md);
}

.rank-item span,
.rank-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--color-orange), var(--color-amber));
    font-weight: 900;
}

.rank-item span {
    width: 40px;
    height: 40px;
}

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

.rank-item em,
.rank-score {
    color: var(--color-orange-dark);
    font-style: normal;
    font-weight: 900;
}

.page-hero {
    color: #fff;
    background: linear-gradient(110deg, #111827, #ea580c 54%, #f59e0b 100%);
}

.compact-hero .container {
    padding: 62px 0;
}

.page-hero h1 {
    margin-bottom: 12px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 18px;
    color: rgb(255 255 255 / 0.86);
    font-weight: 700;
}

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

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

.category-tile {
    display: grid;
    grid-template-columns: 190px 1fr;
    gap: 22px;
    align-items: center;
    padding: 18px;
    border-radius: 24px;
    background: #fff;
    box-shadow: var(--shadow-md);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-thumbs {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    overflow: hidden;
    min-height: 130px;
    border-radius: 18px;
    background: linear-gradient(135deg, #111827, #9a3412);
}

.category-thumbs img {
    aspect-ratio: 1;
}

.category-tile h2 {
    margin: 0 0 8px;
    font-size: 22px;
}

.category-tile p {
    margin: 0;
    color: var(--color-muted);
    line-height: 1.7;
}

.filter-panel {
    grid-template-columns: minmax(220px, 1fr) 170px 170px;
    margin-bottom: 24px;
    padding: 18px;
    border-radius: 22px;
    background: #fff;
    box-shadow: var(--shadow-md);
}

.filter-panel.wide {
    grid-template-columns: minmax(260px, 1fr) 160px 160px 160px;
}

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

.ranking-card {
    display: grid;
    grid-template-columns: 58px 96px minmax(0, 1fr) 90px;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border-radius: 20px;
    background: #fff;
    box-shadow: var(--shadow-md);
}

.rank-num {
    width: 44px;
    height: 44px;
}

.rank-cover {
    aspect-ratio: 3 / 4;
    border-radius: 14px;
}

.detail-hero {
    padding: 40px 0 34px;
    color: #fff;
    background: linear-gradient(120deg, #111827 0%, #7c2d12 52%, #ea580c 100%);
}

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

.player-card {
    overflow: hidden;
    border-radius: 26px;
    background: #000;
    box-shadow: var(--shadow-xl);
}

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

.video-player {
    width: 100%;
    height: 100%;
    background: #000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #fff;
    background: rgb(0 0 0 / 0.28);
    cursor: pointer;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.play-overlay span {
    display: grid;
    place-items: center;
    width: 84px;
    height: 84px;
    border-radius: 999px;
    background: var(--color-orange);
    box-shadow: 0 18px 45px rgb(249 115 22 / 0.35);
    font-size: 34px;
    transform: translateX(3px);
    transition: transform 0.22s ease, background 0.22s ease;
}

.play-overlay:hover span {
    background: var(--color-orange-dark);
    transform: translateX(3px) scale(1.08);
}

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

.detail-side {
    display: grid;
    gap: 14px;
}

.detail-poster {
    aspect-ratio: 3 / 4;
    border-radius: 24px;
    box-shadow: var(--shadow-xl);
}

.side-meta {
    justify-content: center;
}

.detail-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
    margin-top: 36px;
}

.detail-main,
.detail-recommend {
    padding: 28px;
    border-radius: 24px;
    background: #fff;
    box-shadow: var(--shadow-md);
}

.detail-main h1 {
    margin: 0 0 14px;
    font-size: clamp(32px, 5vw, 48px);
    line-height: 1.15;
}

.detail-main .lead {
    margin: 0 0 22px;
    color: var(--color-muted);
    font-size: 18px;
    line-height: 1.8;
}

.detail-main h2,
.detail-recommend h2 {
    margin: 28px 0 14px;
    font-size: 24px;
}

.detail-main p {
    color: #374151;
    font-size: 16px;
    line-height: 1.95;
}

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

.info-grid div {
    display: grid;
    gap: 6px;
    padding: 14px;
    border-radius: 16px;
    background: #fff7ed;
}

.info-grid strong {
    color: #9a3412;
    font-size: 13px;
}

.info-grid span,
.info-grid a {
    font-weight: 800;
}

.detail-recommend h2 {
    margin-top: 0;
}

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

.mini-list a {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border-radius: 14px;
    background: #fff7ed;
    font-weight: 800;
}

.mini-list span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mini-list em {
    color: var(--color-orange-dark);
    font-style: normal;
}

.site-footer {
    color: #d1d5db;
    background: linear-gradient(180deg, #111827 0%, #030712 100%);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr repeat(3, 1fr);
    gap: 32px;
    padding: 44px 0;
}

.footer-grid h2 {
    margin: 0 0 14px;
    color: #fff;
    font-size: 17px;
}

.footer-grid p {
    max-width: 360px;
    color: #9ca3af;
    line-height: 1.8;
}

.footer-grid a {
    display: block;
    margin: 10px 0;
    color: #9ca3af;
}

.footer-grid a:hover {
    color: var(--color-orange);
}

.footer-bottom {
    display: flex;
    justify-content: center;
    gap: 18px;
    padding: 18px;
    border-top: 1px solid #1f2937;
    color: #9ca3af;
    font-size: 14px;
}

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

@media (max-width: 1024px) {
    .hero-shell,
    .detail-layout,
    .detail-content,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero-search {
        align-self: stretch;
    }

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

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

    .filter-panel,
    .filter-panel.wide {
        grid-template-columns: 1fr 1fr;
    }

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

@media (max-width: 760px) {
    .header-inner {
        height: auto;
        min-height: 64px;
        flex-wrap: wrap;
        padding: 10px 0;
    }

    .main-nav {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 12px 0 6px;
    }

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

    .nav-toggle {
        display: block;
    }

    .hero {
        min-height: auto;
    }

    .hero-shell {
        display: block;
        padding: 34px 0 74px;
    }

    .hero-slider {
        min-height: 620px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        padding: 22px;
    }

    .hero-cover {
        max-width: 260px;
        margin: 0 auto;
    }

    .hero-controls {
        left: 22px;
        bottom: 22px;
    }

    .hero-search {
        margin-top: 20px;
        padding: 22px;
    }

    .section-heading {
        display: block;
    }

    .section-more {
        margin-top: 14px;
    }

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

    .ranking-strip,
    .filter-panel,
    .filter-panel.wide,
    .ranking-card,
    .category-tile {
        grid-template-columns: 1fr;
    }

    .ranking-card {
        align-items: start;
    }

    .rank-cover {
        width: 120px;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .detail-main,
    .detail-recommend {
        padding: 20px;
    }
}

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

    .movie-grid {
        grid-template-columns: 1fr;
    }

    .hero-slider {
        min-height: 650px;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: center;
    }
}
