:root {
    --orange: #f97316;
    --orange-dark: #ea580c;
    --amber: #f59e0b;
    --red: #ef4444;
    --ink: #1f2937;
    --muted: #6b7280;
    --line: #f2d6b8;
    --soft: #fff7ed;
    --card: #ffffff;
    --shadow: 0 18px 45px rgba(124, 45, 18, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, #f59e0b, #fb923c, #f59e0b);
    box-shadow: 0 10px 30px rgba(194, 65, 12, 0.25);
}

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

.brand,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: 0.5px;
}

.brand-mark,
.footer-logo span {
    width: 46px;
    height: 46px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--orange);
    background: #fff;
    box-shadow: inset 0 0 0 4px rgba(249, 115, 22, 0.1);
    transition: transform 0.25s ease;
}

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

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

.desktop-nav a,
.mobile-nav a {
    color: #fff;
    font-weight: 700;
    position: relative;
    padding: 8px 0;
}

.desktop-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 100%;
    bottom: 2px;
    height: 2px;
    border-radius: 99px;
    background: #fff;
    transition: right 0.25s ease;
}

.desktop-nav a:hover::after,
.desktop-nav a.active::after {
    right: 0;
}

.mobile-toggle {
    display: none;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 30px;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    background: #fff;
    padding: 12px 24px 18px;
    box-shadow: 0 12px 20px rgba(124, 45, 18, 0.15);
}

.mobile-nav a {
    display: block;
    color: var(--ink);
    padding: 12px 0;
    border-bottom: 1px solid #fed7aa;
}

.hero-carousel {
    width: min(1240px, calc(100% - 32px));
    min-height: 640px;
    margin: 28px auto 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 24px;
}

.hero-slides {
    position: relative;
    overflow: hidden;
    border-radius: 34px;
    background: radial-gradient(circle at 20% 20%, #fed7aa, #fb923c 42%, #dc2626 100%);
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.45s ease, transform 0.55s ease;
    transform: scale(1.02);
}

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

.hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.05) contrast(1.08);
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(124, 45, 18, 0.92), rgba(194, 65, 12, 0.72), rgba(0, 0, 0, 0.1));
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(720px, 86%);
    padding: 92px 58px;
    color: #fff;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--orange);
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-content .eyebrow,
.rank-hero .eyebrow,
.page-hero .eyebrow {
    color: #ffedd5;
}

.hero-content h1,
.page-hero h1,
.rank-hero h1 {
    margin: 0;
    font-size: clamp(36px, 6vw, 72px);
    line-height: 1.05;
    font-weight: 950;
    text-shadow: 0 8px 30px rgba(0, 0, 0, 0.28);
}

.hero-summary {
    margin: 24px 0 22px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 18px;
    line-height: 1.85;
}

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

.hero-tags span,
.tag-row span,
.detail-meta span {
    border-radius: 999px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    backdrop-filter: blur(10px);
}

.tag-row span,
.detail-meta span {
    color: #9a3412;
    background: #ffedd5;
}

.hero-actions,
.section-heading,
.filter-panel,
.detail-info .primary-btn {
    margin-top: 28px;
}

.primary-btn,
.ghost-btn,
.section-more,
.hero-search-card a,
.detail-poster a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    min-height: 46px;
    padding: 0 22px;
    font-weight: 900;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.primary-btn,
.section-more,
.hero-search-card a,
.detail-poster a {
    color: #fff;
    background: linear-gradient(90deg, var(--orange), var(--amber));
    box-shadow: 0 14px 24px rgba(249, 115, 22, 0.25);
}

.ghost-btn {
    margin-left: 10px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.55);
    background: rgba(255, 255, 255, 0.14);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-more:hover,
.hero-search-card a:hover,
.detail-poster a:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 30px rgba(249, 115, 22, 0.35);
}

.hero-side {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.hero-search-card,
.hero-thumbs,
.filter-panel,
.content-section,
.detail-article,
.detail-poster,
.rank-hero-card,
.category-tile {
    border: 1px solid rgba(251, 146, 60, 0.24);
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.hero-search-card {
    padding: 28px;
    background: linear-gradient(135deg, rgba(255, 247, 237, 0.96), rgba(255, 255, 255, 0.9));
}

.hero-search-card h2 {
    margin: 0 0 10px;
    color: var(--ink);
    font-size: 27px;
    font-weight: 950;
}

.hero-search-card p {
    color: var(--muted);
    line-height: 1.7;
}

.hero-thumbs {
    padding: 14px;
    display: grid;
    gap: 12px;
}

.hero-thumb {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 12px;
    align-items: center;
    border: 0;
    border-radius: 18px;
    padding: 10px;
    color: var(--ink);
    background: transparent;
    text-align: left;
    font-weight: 900;
    cursor: pointer;
}

.hero-thumb.active,
.hero-thumb:hover {
    background: #ffedd5;
    color: #9a3412;
}

.hero-thumb img {
    width: 56px;
    height: 74px;
    border-radius: 12px;
    object-fit: cover;
    background: linear-gradient(135deg, #fed7aa, #f97316);
}

.filter-panel {
    width: min(1180px, calc(100% - 32px));
    margin: 30px auto 0;
    padding: 26px;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 22px;
    align-items: end;
}

.filter-panel h2 {
    margin: 0 0 8px;
    font-size: 26px;
    font-weight: 950;
}

.filter-panel p {
    margin: 0;
    color: var(--muted);
}

.filter-controls {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, minmax(120px, 1fr));
    gap: 12px;
}

.filter-controls input,
.filter-controls select {
    min-height: 46px;
    border: 1px solid #fed7aa;
    border-radius: 999px;
    padding: 0 16px;
    color: var(--ink);
    background: #fff;
    outline: none;
}

.filter-controls input:focus,
.filter-controls select:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.15);
}

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

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

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

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

.movie-card {
    overflow: hidden;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(124, 45, 18, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 42px rgba(124, 45, 18, 0.18);
}

.poster-link,
.poster-frame {
    display: block;
}

.poster-frame {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #fed7aa, #fb923c 55%, #ef4444);
}

.poster-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

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

.poster-shine {
    position: absolute;
    inset: 0;
    opacity: 0;
    background: linear-gradient(180deg, transparent 35%, rgba(0, 0, 0, 0.6));
    transition: opacity 0.25s ease;
}

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

.poster-type,
.rank-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    border-radius: 999px;
    padding: 5px 9px;
    color: #fff;
    background: rgba(249, 115, 22, 0.92);
    font-size: 12px;
    font-weight: 900;
}

.rank-badge {
    left: 10px;
    right: auto;
    background: rgba(239, 68, 68, 0.92);
}

.poster-play {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 3;
    width: 56px;
    height: 56px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--orange);
    background: #fff;
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .poster-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

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

.movie-card-body h2 {
    margin: 0 0 8px;
    font-size: 16px;
    line-height: 1.35;
    font-weight: 950;
}

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

.movie-meta,
.movie-desc {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.65;
}

.movie-desc {
    min-height: 42px;
    margin-top: 7px;
}

.tag-row {
    margin-top: 12px;
}

.tag-row span {
    padding: 4px 8px;
    font-size: 12px;
}

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

.category-tile {
    display: grid;
    gap: 10px;
    padding: 24px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 45px rgba(124, 45, 18, 0.18);
}

.category-icon {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(90deg, var(--orange), var(--amber));
}

.category-tile strong {
    font-size: 21px;
    font-weight: 950;
}

.category-tile em {
    color: var(--muted);
    font-style: normal;
    line-height: 1.65;
}

.category-samples {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: #9a3412;
    font-size: 13px;
}

.page-hero,
.rank-hero {
    width: min(1180px, calc(100% - 32px));
    margin: 28px auto 0;
    border-radius: 34px;
    padding: 66px 52px;
    color: #fff;
    background: radial-gradient(circle at 18% 16%, rgba(254, 215, 170, 0.7), transparent 28%), linear-gradient(135deg, #f97316, #f59e0b 45%, #ef4444);
    box-shadow: var(--shadow);
}

.page-hero p,
.rank-hero p {
    max-width: 760px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 18px;
    line-height: 1.85;
}

.compact-hero {
    padding: 46px 46px;
}

.rank-hero {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 28px;
    align-items: center;
}

.rank-hero-card {
    overflow: hidden;
    display: grid;
    padding: 14px;
    color: var(--ink);
}

.rank-hero-card img {
    width: 100%;
    aspect-ratio: 2 / 3;
    border-radius: 18px;
    object-fit: cover;
    background: linear-gradient(135deg, #fed7aa, #fb923c);
}

.rank-hero-card strong {
    margin-top: 12px;
    font-size: 20px;
    font-weight: 950;
}

.rank-hero-card span {
    color: var(--muted);
}

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

.rank-line {
    min-height: 72px;
    display: grid;
    grid-template-columns: 48px 1fr;
    align-items: center;
    gap: 12px;
    border-radius: 18px;
    padding: 12px 16px;
    background: #fff7ed;
    transition: transform 0.2s ease, background 0.2s ease;
}

.rank-line:hover {
    transform: translateX(5px);
    background: #ffedd5;
}

.rank-number {
    grid-row: span 2;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(90deg, var(--red), var(--orange));
    font-weight: 950;
}

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

.rank-info {
    color: var(--muted);
    font-size: 13px;
}

.breadcrumb {
    width: min(1180px, calc(100% - 32px));
    margin: 28px auto 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--muted);
    font-size: 14px;
}

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

.detail-hero {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.55fr);
    gap: 26px;
    align-items: stretch;
}

.movie-player {
    position: relative;
    overflow: hidden;
    border-radius: 32px;
    min-height: 420px;
    background: #111827;
    box-shadow: var(--shadow);
}

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

.player-cover {
    position: absolute;
    inset: 0;
    border: 0;
    padding: 0;
    color: #fff;
    background: #111827;
    cursor: pointer;
}

.player-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.58;
}

.player-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.56), transparent);
}

.player-play {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    width: 84px;
    height: 84px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--orange);
    background: #fff;
    font-size: 34px;
    transform: translate(-50%, -50%);
    box-shadow: 0 18px 35px rgba(0, 0, 0, 0.3);
}

.movie-player.is-playing .player-cover {
    display: none;
}

.detail-info {
    border-radius: 32px;
    padding: 34px;
    color: #fff;
    background: linear-gradient(145deg, #7c2d12, #f97316 58%, #f59e0b);
    box-shadow: var(--shadow);
}

.detail-info h1 {
    margin: 0;
    font-size: clamp(30px, 4vw, 52px);
    line-height: 1.15;
    font-weight: 950;
}

.detail-line {
    color: rgba(255, 255, 255, 0.92);
    line-height: 1.8;
    font-size: 17px;
}

.detail-info .detail-meta span,
.detail-info .large-tags span {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.detail-layout {
    width: min(1180px, calc(100% - 32px));
    margin: 30px auto;
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 26px;
    align-items: start;
}

.detail-poster {
    padding: 18px;
    position: sticky;
    top: 100px;
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    border-radius: 20px;
    object-fit: cover;
    background: linear-gradient(135deg, #fed7aa, #fb923c);
}

.detail-poster a {
    width: 100%;
    margin-top: 16px;
}

.detail-article {
    padding: 34px;
}

.detail-article h2 {
    margin: 0 0 16px;
    font-size: 28px;
    font-weight: 950;
}

.detail-article h2:not(:first-child) {
    margin-top: 34px;
}

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

.site-footer {
    margin-top: 54px;
    color: #fff;
    background: linear-gradient(180deg, #374151, #111827);
}

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

.footer-brand p,
.footer-copy p,
.footer-links a {
    color: #d1d5db;
    line-height: 1.75;
}

.footer-links h2,
.footer-copy h2 {
    margin: 0 0 16px;
    color: #fdba74;
    font-size: 18px;
    font-weight: 950;
}

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

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

.copyright {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 18px 0;
    text-align: center;
    color: #9ca3af;
}

.cover-missing img {
    opacity: 0;
}

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

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

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

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

    .hero-side {
        display: none;
    }
}

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

    .mobile-toggle {
        display: block;
    }

    .mobile-nav.open {
        display: block;
    }

    .nav-shell {
        height: 68px;
    }

    .brand {
        font-size: 20px;
    }

    .brand-mark {
        width: 42px;
        height: 42px;
    }

    .hero-carousel {
        min-height: 560px;
        margin-top: 18px;
    }

    .hero-content {
        width: 100%;
        padding: 58px 28px;
    }

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

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

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

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

    .category-grid,
    .rank-list,
    .rank-hero,
    .detail-hero,
    .detail-layout,
    .footer-shell {
        grid-template-columns: 1fr;
    }

    .detail-poster {
        position: static;
    }

    .content-section,
    .filter-panel,
    .detail-article,
    .page-hero,
    .rank-hero {
        padding: 24px;
    }

    .movie-player,
    .movie-player video {
        min-height: 260px;
    }
}

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

    .movie-card-body h2 {
        font-size: 14px;
    }

    .movie-desc {
        display: none;
    }

    .hero-content h1,
    .page-hero h1,
    .rank-hero h1 {
        font-size: 34px;
    }

    .hero-actions {
        display: grid;
        gap: 10px;
    }

    .ghost-btn {
        margin-left: 0;
    }
}
