* {
    box-sizing: border-box;
}

:root {
    --bg: #fffaf0;
    --surface: #ffffff;
    --surface-soft: #fff7ed;
    --surface-strong: #ffedd5;
    --text: #1f2937;
    --muted: #6b7280;
    --line: #fed7aa;
    --primary: #ea580c;
    --primary-dark: #c2410c;
    --accent: #f59e0b;
    --shadow: 0 24px 70px rgba(194, 65, 12, 0.14);
    --shadow-soft: 0 16px 40px rgba(194, 65, 12, 0.10);
    --radius: 24px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Inter", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(251, 146, 60, 0.18), transparent 34rem),
        linear-gradient(180deg, #fff7ed 0%, #ffffff 38%, #fffaf0 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, 255, 255, 0.86);
    border-bottom: 1px solid rgba(254, 215, 170, 0.86);
    backdrop-filter: blur(18px);
}

.site-header-inner {
    width: min(1180px, calc(100% - 32px));
    min-height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 26px;
}

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    color: var(--primary-dark);
    letter-spacing: -0.02em;
}

.logo-mark {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, #f97316, #f59e0b);
    border-radius: 15px;
    box-shadow: 0 12px 24px rgba(234, 88, 12, 0.26);
}

.logo-text {
    white-space: nowrap;
    font-size: 20px;
}

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

.nav-link {
    padding: 10px 14px;
    border-radius: 999px;
    color: #374151;
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-dark);
    background: #ffedd5;
    transform: translateY(-1px);
}

.top-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-search input,
.inline-filter input,
.search-box-large input {
    border: 2px solid var(--line);
    border-radius: 999px;
    outline: none;
    background: #ffffff;
    color: var(--text);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.top-search input {
    width: 230px;
    padding: 11px 16px;
}

.top-search input:focus,
.inline-filter input:focus,
.search-box-large input:focus {
    border-color: #fb923c;
    box-shadow: 0 0 0 5px rgba(251, 146, 60, 0.16);
}

.top-search button,
.primary-button,
.ghost-button,
.panel-link,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    font-weight: 800;
    cursor: pointer;
}

.top-search button,
.primary-button {
    color: #ffffff;
    background: linear-gradient(135deg, #f97316, #ea580c);
    box-shadow: 0 14px 30px rgba(234, 88, 12, 0.26);
}

.top-search button {
    padding: 11px 18px;
}

.primary-button,
.ghost-button {
    min-height: 46px;
    padding: 0 22px;
}

.ghost-button {
    color: var(--primary-dark);
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(251, 146, 60, 0.35);
}

.menu-button {
    display: none;
    margin-left: auto;
    border: 0;
    border-radius: 12px;
    padding: 10px 12px;
    color: var(--primary-dark);
    background: #ffedd5;
    font-size: 22px;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #ffffff;
}

.mobile-nav a {
    display: block;
    padding: 12px;
    border-radius: 12px;
    font-weight: 800;
}

.mobile-nav a:hover {
    background: #fff7ed;
    color: var(--primary-dark);
}

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

.hero-section {
    position: relative;
    overflow: hidden;
    min-height: 650px;
    padding: 74px 0 52px;
    background: linear-gradient(135deg, #ffedd5 0%, #fef3c7 45%, #fff7ed 100%);
}

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

.hero-glow-one {
    width: 360px;
    height: 360px;
    left: 5%;
    top: 10%;
    background: #fb923c;
}

.hero-glow-two {
    width: 320px;
    height: 320px;
    right: 10%;
    bottom: 8%;
    background: #facc15;
}

.hero-shell {
    position: relative;
    z-index: 1;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
    align-items: stretch;
}

.hero-slider,
.hero-panel,
.page-hero,
.detail-hero,
.story-card,
.rank-panel,
.category-overview-card,
.search-box-large {
    border: 1px solid rgba(254, 215, 170, 0.86);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.78);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.hero-slider {
    position: relative;
    min-height: 520px;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: 42% 58%;
    gap: 34px;
    align-items: center;
    padding: 40px;
    opacity: 0;
    transform: translateX(28px);
    pointer-events: none;
    transition: opacity 0.45s ease, transform 0.45s ease;
}

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

.hero-image-wrap {
    position: relative;
    overflow: hidden;
    height: 430px;
    border-radius: 28px;
    box-shadow: 0 28px 56px rgba(146, 64, 14, 0.24);
}

.hero-image-wrap::after,
.poster-link::after,
.detail-poster::after,
.category-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 42%, rgba(0, 0, 0, 0.52));
    pointer-events: none;
}

.hero-image-wrap img,
.poster-link img,
.detail-poster img,
.category-tile img,
.page-hero-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: linear-gradient(135deg, #fed7aa, #fef3c7);
}

.hero-content h1,
.page-hero h1,
.detail-intro h1 {
    margin: 12px 0 16px;
    color: #111827;
    font-size: clamp(36px, 5vw, 68px);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.eyebrow,
.section-kicker,
.panel-title {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 8px 13px;
    border-radius: 999px;
    color: var(--primary-dark);
    background: #ffedd5;
    font-size: 13px;
    font-weight: 900;
}

.hero-content p,
.page-hero p,
.detail-intro p,
.section-heading p,
.story-card p,
.footer-inner p,
.category-overview-card p,
.hero-panel p {
    color: var(--muted);
    line-height: 1.85;
}

.hero-content p {
    max-width: 660px;
    font-size: 17px;
}

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

.hero-tags span,
.detail-tags span,
.tag-row span {
    padding: 7px 10px;
    border-radius: 999px;
    color: #92400e;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    font-size: 12px;
    font-weight: 800;
}

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

.hero-dots {
    position: absolute;
    left: 40px;
    bottom: 28px;
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 32px;
    height: 8px;
    border: 0;
    border-radius: 999px;
    background: #fed7aa;
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
    width: 54px;
    background: #f97316;
}

.hero-panel {
    padding: 30px;
}

.hero-panel h2,
.rank-panel h2,
.section-heading h2 {
    margin: 14px 0 12px;
    color: #111827;
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.12;
    letter-spacing: -0.03em;
}

.hero-rank-list,
.rank-list {
    display: grid;
    gap: 10px;
    margin: 22px 0;
}

.hero-rank-item,
.rank-row {
    display: grid;
    grid-template-columns: 40px 1fr;
    gap: 8px 12px;
    padding: 12px;
    border-radius: 18px;
    background: #fff7ed;
    transition: transform 0.2s ease, background 0.2s ease;
}

.hero-rank-item:hover,
.rank-row:hover,
.ranking-item:hover,
.movie-card:hover,
.category-tile:hover,
.category-overview-card:hover {
    transform: translateY(-3px);
}

.hero-rank-item span,
.rank-number {
    grid-row: span 2;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    color: #ffffff;
    background: linear-gradient(135deg, #f97316, #f59e0b);
    font-weight: 900;
}

.hero-rank-item strong,
.rank-name {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-weight: 900;
}

.hero-rank-item small,
.rank-meta {
    color: var(--muted);
    font-size: 12px;
}

.panel-link,
.text-link {
    color: var(--primary-dark);
    font-weight: 900;
}

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

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

.section-heading a {
    flex: 0 0 auto;
    color: var(--primary-dark);
    font-weight: 900;
}

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

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(254, 215, 170, 0.9);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
    box-shadow: var(--shadow);
}

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

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

.movie-card:hover .poster-link img,
.category-tile:hover img {
    transform: scale(1.05);
}

.card-badge,
.card-score {
    position: absolute;
    z-index: 2;
    top: 12px;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.card-badge {
    left: 12px;
    color: #9a3412;
    background: rgba(255, 237, 213, 0.95);
}

.card-score {
    right: 12px;
    color: #ffffff;
    background: rgba(234, 88, 12, 0.94);
}

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

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

.movie-card h3 a:hover {
    color: var(--primary-dark);
}

.movie-card p {
    min-height: 54px;
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    color: #9a3412;
    font-size: 12px;
    font-weight: 800;
}

.tag-row {
    gap: 6px;
}

.tag-row span {
    padding: 5px 8px;
}

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

.category-tile {
    position: relative;
    min-height: 240px;
    overflow: hidden;
    border-radius: 24px;
    background: #ffedd5;
    box-shadow: var(--shadow-soft);
}

.category-tile img {
    position: absolute;
    inset: 0;
}

.category-tile span,
.category-tile strong {
    position: relative;
    z-index: 2;
    display: block;
    color: #ffffff;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.38);
}

.category-tile span {
    padding: 128px 18px 8px;
    font-size: 24px;
    font-weight: 900;
}

.category-tile strong {
    padding: 0 18px 20px;
    font-size: 13px;
    line-height: 1.6;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
    align-items: start;
}

.rank-panel {
    position: sticky;
    top: 96px;
    padding: 28px;
}

.page-hero,
.detail-hero {
    width: min(1180px, calc(100% - 32px));
    margin: 34px auto 52px;
    padding: clamp(28px, 5vw, 56px);
}

.page-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 30px;
    align-items: center;
    min-height: 280px;
    background:
        radial-gradient(circle at 86% 12%, rgba(251, 146, 60, 0.22), transparent 18rem),
        rgba(255, 255, 255, 0.82);
}

.small-hero,
.category-hero,
.search-hero {
    grid-template-columns: minmax(0, 1fr);
}

.page-hero-poster {
    height: 300px;
    border-radius: 24px;
    box-shadow: var(--shadow-soft);
}

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

.category-overview-card {
    padding: 22px;
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 22px;
    transition: transform 0.2s ease;
}

.category-cover-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    height: 180px;
}

.category-cover-row img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 18px;
    background: #ffedd5;
}

.inline-filter,
.search-box-large {
    margin-bottom: 26px;
}

.inline-filter input,
.search-box-large input {
    width: 100%;
    padding: 16px 20px;
    font-size: 16px;
}

.search-box-large {
    padding: 20px;
}

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

.ranking-item {
    display: grid;
    grid-template-columns: 58px 84px minmax(0, 1fr) 72px;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease;
}

.ranking-index {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, #f97316, #f59e0b);
    border-radius: 16px;
    font-weight: 900;
}

.ranking-item img {
    width: 84px;
    height: 110px;
    object-fit: cover;
    border-radius: 16px;
    background: #ffedd5;
}

.ranking-info strong,
.ranking-info small {
    display: block;
}

.ranking-info strong {
    margin-bottom: 8px;
    font-size: 20px;
}

.ranking-info small {
    color: var(--muted);
    line-height: 1.6;
}

.ranking-score {
    color: var(--primary-dark);
    font-size: 24px;
    font-weight: 900;
    text-align: right;
}

.detail-hero {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 38px;
    align-items: center;
}

.detail-poster {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    border-radius: 30px;
    box-shadow: var(--shadow);
    background: #ffedd5;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: #9a3412;
    font-weight: 800;
}

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

.detail-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 22px 0;
}

.detail-stats span {
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    color: var(--muted);
    background: #fff7ed;
}

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

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

.player-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #111827;
    box-shadow: var(--shadow);
}

.player-wrap video {
    width: 100%;
    min-height: 520px;
    background: #111827;
    display: block;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 16px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.22), rgba(17, 24, 39, 0.68));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-circle {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, #f97316, #f59e0b);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    font-size: 30px;
}

.player-cover strong {
    font-size: clamp(22px, 3vw, 36px);
    text-shadow: 0 8px 28px rgba(0, 0, 0, 0.42);
}

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

.story-card {
    padding: 28px;
}

.story-card h2 {
    margin: 0 0 14px;
    font-size: 26px;
}

.site-footer {
    margin-top: 72px;
    padding: 46px 0 24px;
    color: #7c2d12;
    background: linear-gradient(180deg, #fff7ed, #ffedd5);
    border-top: 1px solid var(--line);
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 220px 220px;
    gap: 30px;
}

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

.footer-links strong {
    color: #431407;
}

.footer-links a:hover {
    color: var(--primary-dark);
}

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 28px auto 0;
    color: #9a3412;
    font-size: 14px;
}

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

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

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

@media (max-width: 960px) {
    .site-nav,
    .top-search {
        display: none;
    }

    .menu-button {
        display: block;
    }

    .hero-shell,
    .split-section,
    .page-hero,
    .detail-hero,
    .detail-content,
    .footer-inner,
    .category-overview-card {
        grid-template-columns: 1fr;
    }

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

    .hero-slide {
        grid-template-columns: 1fr;
        align-content: start;
    }

    .hero-image-wrap {
        height: 340px;
    }

    .hero-dots {
        left: 28px;
    }

    .rank-panel {
        position: static;
    }

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

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

    .detail-poster {
        max-width: 420px;
    }
}

@media (max-width: 640px) {
    .site-header-inner,
    .content-section,
    .page-hero,
    .detail-hero,
    .player-section,
    .footer-inner,
    .footer-bottom,
    .mobile-nav {
        width: min(100% - 22px, 1180px);
    }

    .logo-text {
        font-size: 17px;
    }

    .hero-section {
        padding: 28px 0;
    }

    .hero-shell {
        width: min(100% - 22px, 1180px);
    }

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

    .hero-slide {
        padding: 22px;
    }

    .hero-image-wrap {
        height: 300px;
    }

    .section-heading {
        display: block;
    }

    .movie-grid,
    .movie-grid-featured,
    .compact-grid,
    .all-grid,
    .category-grid,
    .category-overview-grid {
        grid-template-columns: 1fr;
    }

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

    .ranking-item img {
        width: 68px;
        height: 92px;
    }

    .ranking-score {
        grid-column: 3;
        text-align: left;
        font-size: 18px;
    }

    .player-wrap video {
        min-height: 300px;
    }

    .page-hero,
    .detail-hero,
    .story-card,
    .hero-panel,
    .rank-panel {
        padding: 22px;
    }
}
