:root {
    --bg: #f7f7fb;
    --surface: #ffffff;
    --surface-soft: #fff7ed;
    --text: #20202a;
    --muted: #6f7280;
    --line: rgba(20, 24, 36, 0.09);
    --primary: #f97316;
    --primary-2: #f59e0b;
    --dark: #111827;
    --shadow: 0 20px 55px rgba(15, 23, 42, 0.12);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background: radial-gradient(circle at top left, rgba(249, 115, 22, 0.12), transparent 32rem), var(--bg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.86);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

.nav-shell {
    width: min(1180px, calc(100% - 32px));
    height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.brand-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    color: #ffffff;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    box-shadow: 0 12px 24px rgba(249, 115, 22, 0.35);
}

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

.site-nav a {
    padding: 10px 16px;
    color: var(--muted);
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover,
.site-nav a.is-active {
    color: var(--dark);
    background: rgba(249, 115, 22, 0.12);
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
}

.hero-slider {
    position: relative;
    min-height: 650px;
    overflow: hidden;
    color: #ffffff;
    background: #111827;
}

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

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

.hero-slide img {
    height: 100%;
    object-fit: cover;
    opacity: 0.72;
}

.hero-slide img.is-hidden {
    opacity: 0;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.25), rgba(3, 7, 18, 0.82)), radial-gradient(circle at center, rgba(249, 115, 22, 0.25), transparent 36rem);
}

.hero-content {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    padding: 96px 20px 80px;
    text-align: center;
}

.hero-copy {
    width: min(900px, 100%);
}

.kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 8px 14px;
    color: #ffedd5;
    border: 1px solid rgba(255, 237, 213, 0.38);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
}

.hero-copy h1 {
    margin: 0;
    font-size: clamp(44px, 8vw, 84px);
    line-height: 1.04;
    font-weight: 950;
    text-shadow: 0 16px 36px rgba(0, 0, 0, 0.42);
}

.hero-copy p {
    width: min(760px, 100%);
    margin: 24px auto 32px;
    font-size: clamp(17px, 2vw, 24px);
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 10px 24px rgba(0, 0, 0, 0.4);
}

.hero-actions,
.section-actions,
.detail-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
}

.primary-btn,
.secondary-btn,
.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 12px 20px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
    color: #ffffff;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    box-shadow: 0 16px 34px rgba(249, 115, 22, 0.32);
}

.secondary-btn,
.ghost-btn {
    color: var(--dark);
    font-weight: 700;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--line);
}

.primary-btn:hover,
.secondary-btn:hover,
.ghost-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: var(--shadow);
}

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

.hero-dots button {
    width: 14px;
    height: 14px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.54);
    transition: width 0.2s ease, background 0.2s ease;
}

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

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

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

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

.section-head h2,
.page-title h1,
.detail-copy h1 {
    margin: 0;
    color: var(--dark);
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.15;
    font-weight: 950;
}

.section-head p,
.page-title p,
.category-card p,
.detail-copy p,
.article-card p {
    margin: 10px 0 0;
    color: var(--muted);
}

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

.movie-card {
    display: flex;
    min-width: 0;
    height: 100%;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-8px);
    border-color: rgba(249, 115, 22, 0.38);
    box-shadow: var(--shadow);
}

.poster-frame {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, #1f2937, #fb923c);
}

.poster-frame img {
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease, opacity 0.2s ease;
}

.poster-frame img.is-hidden {
    opacity: 0;
}

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

.poster-shade {
    position: absolute;
    inset: auto 0 0;
    height: 52%;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.72));
}

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

.year-badge {
    left: 12px;
}

.type-badge {
    right: 12px;
}

.play-float {
    position: absolute;
    left: 16px;
    bottom: 14px;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    color: #ffffff;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    box-shadow: 0 10px 22px rgba(249, 115, 22, 0.38);
}

.movie-info {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 8px;
    padding: 18px;
}

.movie-info strong {
    display: -webkit-box;
    overflow: hidden;
    min-height: 3.1em;
    color: var(--dark);
    font-size: 18px;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-info small,
.movie-info em {
    display: -webkit-box;
    overflow: hidden;
    color: var(--muted);
    font-size: 14px;
    font-style: normal;
    -webkit-box-orient: vertical;
}

.movie-info em {
    -webkit-line-clamp: 2;
}

.tag-row,
.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}

.tag-row span,
.meta-row span {
    padding: 5px 9px;
    color: #9a3412;
    font-size: 12px;
    font-weight: 700;
    border-radius: 999px;
    background: #ffedd5;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) minmax(180px, 240px) auto;
    gap: 14px;
    align-items: end;
    margin: 0 0 28px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.07);
}

.search-box,
.select-box {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.search-box input,
.select-box select {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    color: var(--dark);
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #ffffff;
    outline: none;
}

.search-box input:focus,
.select-box select:focus {
    border-color: rgba(249, 115, 22, 0.58);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

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

.category-card {
    display: grid;
    gap: 12px;
    min-height: 190px;
    padding: 22px;
    border: 1px solid rgba(249, 115, 22, 0.16);
    border-radius: var(--radius);
    background: linear-gradient(150deg, #ffffff, #fff7ed);
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.07);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-card strong {
    color: var(--dark);
    font-size: 22px;
    font-weight: 900;
}

.category-card span {
    align-self: end;
    color: var(--primary);
    font-weight: 900;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 64px 100px 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--surface);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.rank-num {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    color: #ffffff;
    font-size: 20px;
    font-weight: 950;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
}

.rank-cover {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 16px;
    background: linear-gradient(135deg, #111827, #fb923c);
}

.rank-cover img {
    height: 100%;
    object-fit: cover;
}

.rank-main strong {
    display: block;
    color: var(--dark);
    font-size: 18px;
    font-weight: 900;
}

.rank-main span {
    display: block;
    margin-top: 4px;
    color: var(--muted);
}

.page-hero {
    padding: 70px 0 34px;
}

.page-title {
    display: grid;
    gap: 8px;
}

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

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

.detail-hero {
    width: min(1180px, calc(100% - 32px));
    margin: 40px auto 0;
    display: grid;
    grid-template-columns: minmax(280px, 430px) 1fr;
    gap: 34px;
    align-items: center;
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: 32px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow);
}

.detail-poster {
    overflow: hidden;
    aspect-ratio: 16 / 11;
    border-radius: 26px;
    background: linear-gradient(135deg, #111827, #fb923c);
}

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

.detail-copy h1 {
    margin-bottom: 14px;
}

.detail-copy .meta-row {
    margin: 20px 0 24px;
}

.player-section,
.article-card,
.related-section {
    width: min(1180px, calc(100% - 32px));
    margin: 34px auto 0;
}

.player-box {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    background: #020617;
    box-shadow: 0 24px 70px rgba(2, 6, 23, 0.3);
}

.player-box video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.play-action {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.25), rgba(2, 6, 23, 0.72));
    cursor: pointer;
}

.play-action span {
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    box-shadow: 0 18px 36px rgba(249, 115, 22, 0.42);
}

.play-action span::before {
    content: "▶";
    margin-left: 6px;
    font-size: 34px;
}

.player-box.is-playing .play-action {
    display: none;
}

.article-card {
    display: grid;
    gap: 24px;
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: 30px;
    background: var(--surface);
    box-shadow: 0 14px 42px rgba(15, 23, 42, 0.08);
}

.article-card h2,
.related-section h2 {
    margin: 0;
    color: var(--dark);
    font-size: 28px;
    font-weight: 950;
}

.article-card p {
    font-size: 17px;
}

.related-section {
    padding-bottom: 70px;
}

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

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    gap: 16px;
    padding: 42px 0;
}

.footer-brand {
    color: #ffffff;
}

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

.footer-links a {
    color: #fed7aa;
    font-weight: 800;
}

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

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

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

@media (max-width: 820px) {
    .nav-shell {
        height: 64px;
    }

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

    .site-nav {
        position: absolute;
        top: 64px;
        right: 16px;
        left: 16px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        border: 1px solid var(--line);
        border-radius: 22px;
        background: #ffffff;
        box-shadow: var(--shadow);
    }

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

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

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

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

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

    .rank-item {
        grid-template-columns: 52px 82px 1fr;
    }

    .rank-item .secondary-btn {
        grid-column: 1 / -1;
    }

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

@media (max-width: 560px) {
    .hero-slider {
        min-height: 520px;
    }

    .hero-copy h1 {
        font-size: 40px;
    }

    .hero-actions,
    .section-actions,
    .detail-actions {
        align-items: stretch;
        flex-direction: column;
    }

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

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

    .movie-info strong {
        min-height: auto;
    }

    .detail-hero,
    .article-card {
        padding: 18px;
        border-radius: 24px;
    }
}
