:root {
    --bg: #fff7ed;
    --bg-soft: #fffbeb;
    --text: #1f2937;
    --muted: #6b7280;
    --line: rgba(251, 146, 60, 0.26);
    --brand: #f97316;
    --brand-dark: #c2410c;
    --brand-soft: #fed7aa;
    --amber: #f59e0b;
    --card: rgba(255, 255, 255, 0.88);
    --shadow: 0 22px 55px rgba(194, 65, 12, 0.14);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at 10% 5%, rgba(251, 146, 60, 0.18), transparent 28rem),
        radial-gradient(circle at 88% 10%, rgba(245, 158, 11, 0.18), transparent 24rem),
        linear-gradient(135deg, #fff7ed 0%, #fffbeb 52%, #fef3c7 100%);
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 247, 237, 0.88);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
    box-shadow: 0 10px 30px rgba(154, 52, 18, 0.08);
}

.site-nav {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 14px 0;
    display: flex;
    align-items: center;
    gap: 18px;
}

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

.brand-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: white;
    border-radius: 14px;
    background: linear-gradient(135deg, #f97316, #d97706);
    box-shadow: 0 14px 28px rgba(249, 115, 22, 0.32);
}

.brand strong {
    display: block;
    font-size: 21px;
    line-height: 1.1;
    background: linear-gradient(90deg, #ea580c, #b45309);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand small {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
}

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

.nav-link {
    padding: 10px 14px;
    border-radius: 12px;
    color: #4b5563;
    font-weight: 700;
    transition: 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
    color: white;
    background: linear-gradient(90deg, #f97316, #d97706);
    box-shadow: 0 12px 25px rgba(249, 115, 22, 0.24);
}

.menu-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    border-radius: 12px;
    background: #ffedd5;
    color: #9a3412;
    padding: 10px 12px;
    font-size: 20px;
}

.top-search {
    position: relative;
    width: 260px;
}

.top-search input,
.filter-bar input,
.filter-bar select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.86);
    color: var(--text);
    outline: none;
}

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

.search-panel {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    width: min(420px, 92vw);
    max-height: 520px;
    overflow: auto;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow);
}

.search-panel.open {
    display: block;
}

.search-result {
    display: flex;
    gap: 12px;
    padding: 10px;
    border-radius: 14px;
    transition: 0.2s ease;
}

.search-result:hover {
    background: #fff7ed;
}

.search-result img {
    width: 50px;
    height: 68px;
    object-fit: cover;
    border-radius: 10px;
    background: linear-gradient(135deg, #fed7aa, #f59e0b);
}

.search-result strong {
    display: block;
    margin-bottom: 3px;
}

.search-result span {
    color: var(--muted);
    font-size: 13px;
}

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

.hero-section {
    position: relative;
    margin-top: 28px;
    min-height: 590px;
    overflow: hidden;
    border-radius: 34px;
    color: white;
    background: linear-gradient(135deg, #ea580c, #d97706 52%, #fbbf24);
    box-shadow: var(--shadow);
}

.hero-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.14;
    background-image: radial-gradient(circle at 1px 1px, white 1px, transparent 0);
    background-size: 34px 34px;
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    align-items: center;
    gap: 44px;
    padding: 62px;
    opacity: 0;
    pointer-events: none;
    transform: translateX(36px);
    transition: 0.65s ease;
}

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

.hero-image {
    position: relative;
    min-height: 430px;
    border-radius: 30px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(255, 237, 213, 0.45), rgba(255, 255, 255, 0.12));
    box-shadow: 0 30px 70px rgba(124, 45, 18, 0.36);
}

.hero-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.28));
}

.hero-image img {
    width: 100%;
    height: 100%;
    min-height: 430px;
    object-fit: cover;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    gap: 6px;
    margin-bottom: 14px;
    padding: 8px 12px;
    border-radius: 999px;
    color: #fff7ed;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-weight: 700;
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
    margin: 0 0 18px;
    font-size: clamp(38px, 7vw, 72px);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.hero-copy p,
.page-hero p,
.detail-info .lead {
    margin: 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 18px;
    line-height: 1.85;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 13px 22px;
    font-weight: 800;
    transition: 0.25s ease;
    border: 1px solid transparent;
}

.btn.small {
    padding: 10px 16px;
    font-size: 14px;
}

.btn-primary {
    color: #c2410c;
    background: white;
    box-shadow: 0 16px 34px rgba(124, 45, 18, 0.22);
}

.btn-primary:hover {
    transform: translateY(-2px);
    background: #fffbeb;
}

.btn-ghost {
    color: white;
    border-color: rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.12);
}

.btn-ghost:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.22);
}

.hero-dots {
    position: absolute;
    left: 62px;
    bottom: 34px;
    display: flex;
    gap: 10px;
    z-index: 4;
}

.hero-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    transition: 0.25s ease;
}

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

.search-hero-panel,
.content-section,
.page-hero,
.detail-hero,
.player-section,
.detail-content {
    margin-top: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: 0 14px 40px rgba(154, 52, 18, 0.08);
}

.search-hero-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 24px;
}

.search-hero-panel strong {
    font-size: 24px;
}

.search-hero-panel p {
    margin: 6px 0 0;
    color: var(--muted);
}

.content-section {
    padding: 26px;
}

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

.section-heading.compact {
    align-items: center;
}

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

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(251, 146, 60, 0.2);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.94);
    transition: 0.28s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 42px rgba(194, 65, 12, 0.16);
}

.poster-link {
    display: block;
}

.poster-ratio {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, #fed7aa, #f59e0b);
}

.poster-ratio img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.35s ease;
}

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

.poster-glow {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 42%, rgba(0, 0, 0, 0.48));
}

.poster-play {
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: #f97316;
    background: rgba(255, 255, 255, 0.9);
}

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

.movie-card-meta,
.overview-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
}

.movie-card h3,
.rank-card h2 {
    margin: 8px 0 8px;
    font-size: 18px;
    line-height: 1.35;
}

.movie-card p,
.rank-card p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}

.mini-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.mini-tags span,
.tag {
    display: inline-flex;
    padding: 5px 8px;
    border-radius: 999px;
    background: #ffedd5;
    color: #9a3412;
    font-size: 12px;
    font-weight: 700;
}

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

.category-tile {
    position: relative;
    min-height: 190px;
    overflow: hidden;
    padding: 18px;
    border-radius: 22px;
    color: white;
    background: linear-gradient(135deg, #f97316, #d97706);
    box-shadow: 0 16px 32px rgba(249, 115, 22, 0.2);
}

.category-tile img {
    position: absolute;
    right: -24px;
    bottom: -36px;
    width: 118px;
    height: 160px;
    object-fit: cover;
    border-radius: 16px;
    opacity: 0.48;
    transform: rotate(8deg);
}

.category-tile strong,
.category-tile em,
.category-count {
    position: relative;
    z-index: 2;
}

.category-tile strong {
    display: block;
    margin: 24px 0 8px;
    font-size: 24px;
}

.category-tile em {
    display: block;
    color: rgba(255, 255, 255, 0.82);
    font-style: normal;
    line-height: 1.55;
}

.category-count {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.18);
}

.split-layout {
    display: grid;
    grid-template-columns: 0.78fr 1.22fr;
    gap: 24px;
    background: transparent;
    padding: 0;
    border: 0;
    box-shadow: none;
}

.split-layout > div {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--card);
    padding: 26px;
}

.split-layout .content-section {
    margin-top: 0;
    padding: 0;
    border: 0;
    box-shadow: none;
    background: transparent;
}

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

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

.rank-row {
    display: grid;
    grid-template-columns: 48px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 13px;
    border-radius: 16px;
    background: rgba(255, 247, 237, 0.82);
    border: 1px solid rgba(251, 146, 60, 0.18);
}

.rank-num {
    color: #ea580c;
    font-weight: 900;
}

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

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

.page-hero,
.detail-hero {
    padding: 38px;
    color: white;
    background: linear-gradient(135deg, #ea580c, #d97706 62%, #f59e0b);
}

.small-hero {
    min-height: auto;
}

.page-hero h1 {
    font-size: clamp(36px, 6vw, 58px);
}

.breadcrumb {
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.82);
    font-weight: 700;
}

.breadcrumb a:hover {
    color: white;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.filter-bar.wide input {
    max-width: 420px;
}

.filter-bar select {
    width: auto;
    min-width: 220px;
}

.filter-bar button {
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 14px;
    padding: 12px 16px;
    color: white;
    background: rgba(255, 255, 255, 0.14);
    font-weight: 800;
}

.overview-grid {
    display: grid;
    gap: 20px;
    margin-top: 28px;
}

.category-overview-card {
    display: grid;
    grid-template-columns: 270px 1fr;
    gap: 22px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: 0 14px 38px rgba(154, 52, 18, 0.08);
}

.category-overview-cover {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    min-height: 160px;
}

.category-overview-cover img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 16px;
    background: linear-gradient(135deg, #fed7aa, #f59e0b);
}

.category-overview-body h2 {
    margin: 4px 0 8px;
    font-size: 28px;
}

.category-overview-body p {
    color: var(--muted);
    line-height: 1.7;
}

.rank-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 28px;
}

.rank-card {
    display: grid;
    grid-template-columns: 116px 1fr;
    gap: 16px;
    padding: 14px;
}

.rank-card-cover {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    background: linear-gradient(135deg, #fed7aa, #f59e0b);
}

.rank-card-cover img {
    width: 100%;
    height: 154px;
    object-fit: cover;
}

.rank-badge {
    position: absolute;
    left: 8px;
    top: 8px;
    z-index: 2;
    padding: 4px 8px;
    border-radius: 999px;
    color: white;
    background: rgba(234, 88, 12, 0.92);
    font-weight: 900;
}

.detail-layout {
    display: grid;
    grid-template-columns: 330px 1fr;
    gap: 34px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border-radius: 28px;
    box-shadow: 0 30px 70px rgba(124, 45, 18, 0.35);
    background: linear-gradient(135deg, #fed7aa, #f59e0b);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.detail-tags .tag {
    color: white;
    background: rgba(255, 255, 255, 0.17);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.player-section {
    padding: 26px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #111827;
}

.movie-player {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #0f172a;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 12px;
    border: 0;
    color: white;
    cursor: pointer;
    background: radial-gradient(circle, rgba(249, 115, 22, 0.25), rgba(0, 0, 0, 0.48));
    transition: 0.25s ease;
}

.play-overlay span {
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    color: #ea580c;
    background: white;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.25);
    font-size: 28px;
}

.play-overlay strong {
    font-size: 20px;
}

.player-shell.playing .play-overlay {
    opacity: 0;
    pointer-events: none;
}

.player-note {
    position: absolute;
    left: 18px;
    bottom: 14px;
    margin: 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 13px;
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 22px;
    padding: 26px;
}

.story-block,
.info-table {
    padding: 22px;
    border-radius: 18px;
    background: rgba(255, 247, 237, 0.7);
}

.story-block + .story-block {
    margin-top: 18px;
}

.story-block h2,
.info-table h2 {
    margin: 0 0 12px;
}

.story-block p {
    color: #4b5563;
    line-height: 1.9;
}

.info-table dl {
    margin: 0;
    display: grid;
    grid-template-columns: 74px 1fr;
    gap: 12px;
}

.info-table dt {
    color: var(--muted);
}

.info-table dd {
    margin: 0;
    font-weight: 700;
}

.site-footer {
    margin-top: 40px;
    padding: 32px 0 44px;
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 26px;
    border-radius: 22px;
    color: #7c2d12;
    background: rgba(255, 237, 213, 0.72);
    border: 1px solid var(--line);
}

.footer-inner p {
    margin: 6px 0 0;
    color: var(--muted);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    font-weight: 800;
}

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

@media (max-width: 1000px) {
    .top-search {
        width: 210px;
    }

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

    .split-layout,
    .detail-content,
    .rank-grid {
        grid-template-columns: 1fr;
    }

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

    .hero-slide {
        padding: 38px;
    }

    .hero-image {
        min-height: 280px;
    }

    .hero-image img {
        min-height: 280px;
    }
}

@media (max-width: 760px) {
    .site-nav {
        flex-wrap: wrap;
    }

    .brand {
        min-width: 0;
    }

    .brand small {
        display: none;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .nav-links {
        display: none;
        width: 100%;
        order: 4;
        flex-direction: column;
        align-items: stretch;
    }

    .nav-links.open {
        display: flex;
    }

    .top-search {
        width: 100%;
        order: 5;
    }

    .hero-section,
    .hero-slider {
        min-height: 720px;
    }

    .hero-slide {
        align-content: start;
        gap: 24px;
        padding: 26px;
    }

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

    .hero-dots {
        left: 26px;
    }

    .search-hero-panel,
    .section-heading,
    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
    }

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

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

    .category-overview-cover {
        grid-template-columns: repeat(2, 1fr);
    }

    .rank-row {
        grid-template-columns: 38px 1fr;
    }

    .rank-meta {
        grid-column: 2;
    }
}

@media (max-width: 520px) {
    main {
        width: min(100% - 20px, 1180px);
    }

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

    .hero-section,
    .page-hero,
    .detail-hero,
    .content-section,
    .player-section,
    .detail-content {
        border-radius: 18px;
    }

    .page-hero,
    .detail-hero,
    .content-section,
    .player-section,
    .detail-content {
        padding: 18px;
    }

    .detail-layout {
        gap: 20px;
    }
}
