:root {
    --yellow-50: #fefce8;
    --yellow-100: #fef9c3;
    --yellow-300: #fde047;
    --yellow-400: #facc15;
    --amber-400: #f59e0b;
    --amber-500: #d97706;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
    --shadow-soft: 0 18px 45px rgba(17, 24, 39, 0.12);
    --shadow-card: 0 10px 25px rgba(17, 24, 39, 0.08);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 12px;
    --container: 1200px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Inter", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    color: var(--gray-900);
    background: linear-gradient(135deg, var(--yellow-50), var(--white) 38%, #fff7ed);
    line-height: 1.6;
}

body.nav-open {
    overflow: hidden;
}

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

img {
    display: block;
    width: 100%;
    height: auto;
}

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, var(--yellow-400), var(--yellow-300), var(--amber-400));
    box-shadow: 0 10px 30px rgba(217, 119, 6, 0.22);
}

.header-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.brand-icon {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--white);
    color: var(--amber-500);
    box-shadow: var(--shadow-card);
}

.brand-text {
    font-size: 22px;
}

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

.nav-link,
.mobile-nav-link {
    padding: 10px 16px;
    border-radius: 999px;
    color: rgba(17, 24, 39, 0.78);
    font-weight: 700;
    transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-nav-link:hover,
.mobile-nav-link.active {
    background: rgba(255, 255, 255, 0.86);
    color: var(--gray-900);
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.78);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle span {
    width: 22px;
    height: 2px;
    border-radius: 2px;
    background: var(--gray-900);
}

.mobile-nav {
    display: none;
    padding: 10px 20px 18px;
    background: rgba(250, 204, 21, 0.98);
}

main {
    min-height: 60vh;
}

.hero-section {
    position: relative;
    min-height: 650px;
    overflow: hidden;
    background: var(--gray-900);
}

.hero-track {
    position: relative;
    min-height: 650px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    transition: opacity 0.7s ease;
}

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

.hero-slide::before,
.page-hero::before,
.detail-hero::before {
    content: "";
    position: absolute;
    width: 180px;
    height: 180px;
    border: 5px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    top: 10%;
    right: 8%;
    animation: pulse-ring 3s ease-in-out infinite;
}

.hero-slide::after,
.page-hero::after,
.detail-hero::after {
    content: "";
    position: absolute;
    width: 120px;
    height: 120px;
    border: 5px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    left: 10%;
    bottom: 18%;
    animation: pulse-ring 4s ease-in-out infinite;
}

@keyframes pulse-ring {
    0%, 100% {
        transform: scale(1);
        opacity: 0.72;
    }
    50% {
        transform: scale(1.12);
        opacity: 0.35;
    }
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: var(--container);
    width: 100%;
    margin: 0 auto;
    padding: 120px 20px 170px;
    color: var(--white);
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    padding: 7px 13px;
    border-radius: 999px;
    background: rgba(250, 204, 21, 0.18);
    color: #fde68a;
    border: 1px solid rgba(250, 204, 21, 0.38);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.05em;
}

.hero-content h1,
.hero-content h2 {
    max-width: 800px;
    margin: 22px 0 18px;
    font-size: clamp(42px, 8vw, 86px);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.hero-content p {
    max-width: 720px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 20px;
}

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

.hero-tags {
    margin: 26px 0;
}

.hero-tags span,
.detail-tags span,
.tag-list span,
.rank-meta span {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 700;
}

.detail-tags span,
.tag-list span,
.rank-meta span {
    background: var(--yellow-100);
    color: #92400e;
    border-color: #fde68a;
}

.hero-actions,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.primary-button,
.ghost-button,
.section-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 22px;
    border-radius: 999px;
    font-weight: 900;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.primary-button {
    color: var(--white);
    background: var(--gray-900);
    box-shadow: 0 14px 28px rgba(17, 24, 39, 0.26);
}

.ghost-button {
    color: var(--gray-900);
    background: rgba(255, 255, 255, 0.9);
}

.primary-button:hover,
.ghost-button:hover,
.section-link:hover {
    transform: translateY(-2px) scale(1.02);
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 92px;
    z-index: 3;
    display: flex;
    gap: 10px;
    transform: translateX(-50%);
}

.hero-dot {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
}

.hero-dot.active {
    width: 34px;
    background: var(--yellow-300);
}

.hero-search {
    position: absolute;
    left: 50%;
    bottom: 28px;
    z-index: 4;
    width: min(760px, calc(100% - 40px));
    transform: translateX(-50%);
    display: flex;
    padding: 8px;
    gap: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow-soft);
}

.hero-search input,
.search-box input {
    flex: 1;
    border: 0;
    outline: none;
    background: transparent;
    color: var(--gray-900);
    padding: 0 18px;
}

.hero-search button,
.search-box button {
    border: 0;
    border-radius: 999px;
    padding: 12px 22px;
    background: var(--gray-900);
    color: var(--white);
    font-weight: 900;
}

.section-block,
.movie-grid,
.rank-list,
.category-grid,
.filter-panel,
.detail-layout {
    max-width: var(--container);
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

.intro-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    padding-top: 34px;
}

.intro-item,
.content-panel,
.category-card,
.movie-card,
.rank-item,
.filter-panel {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(229, 231, 235, 0.82);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
}

.intro-item {
    padding: 24px;
}

.intro-item strong {
    display: block;
    font-size: 24px;
    margin-bottom: 4px;
}

.intro-item span,
.section-heading-row p,
.movie-card p,
.rank-info p,
.category-card p,
.content-panel p,
.footer-inner p,
.detail-headline p,
.page-hero p {
    color: var(--gray-600);
}

.section-heading-row {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    padding-top: 76px;
    padding-bottom: 22px;
}

.section-heading-row h2,
.page-hero h1,
.content-panel h2,
.detail-headline h1 {
    margin: 12px 0 8px;
    line-height: 1.15;
    letter-spacing: -0.035em;
}

.section-heading-row h2 {
    font-size: clamp(30px, 4vw, 46px);
}

.section-link {
    color: var(--gray-900);
    background: var(--yellow-300);
    box-shadow: 0 12px 24px rgba(217, 119, 6, 0.16);
    white-space: nowrap;
}

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

.all-movie-grid,
.category-movie-grid {
    padding-top: 28px;
    padding-bottom: 80px;
}

.compact-grid {
    padding-bottom: 70px;
}

.movie-card {
    position: relative;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
}

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

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

.poster-badge {
    position: absolute;
    right: 12px;
    top: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.82);
    color: var(--white);
    font-weight: 900;
    font-size: 12px;
}

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

.movie-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--amber-500);
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 8px;
}

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

.movie-card h2 a:hover,
.rank-info h2 a:hover,
.category-sample-links a:hover,
.footer-inner a:hover {
    color: var(--amber-500);
}

.movie-card p {
    margin: 0 0 12px;
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

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

.home-rank-list {
    padding-bottom: 10px;
}

.ranking-list {
    padding-top: 28px;
    padding-bottom: 80px;
}

.rank-item {
    display: grid;
    grid-template-columns: 66px 86px minmax(0, 1fr) 92px;
    gap: 16px;
    align-items: center;
    padding: 14px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.rank-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-soft);
}

.rank-number {
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--yellow-300), var(--amber-400));
    font-size: 20px;
    font-weight: 1000;
}

.rank-thumb {
    display: block;
    width: 86px;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 14px;
    background: #fde68a;
}

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

.rank-info h2 {
    margin: 0 0 6px;
    font-size: 19px;
}

.rank-info p {
    margin: 0 0 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rank-score {
    text-align: center;
    color: var(--amber-500);
}

.rank-score strong {
    display: block;
    font-size: 30px;
    line-height: 1;
}

.rank-score span {
    font-size: 12px;
    color: var(--gray-500);
}

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

.category-overview-grid {
    padding-top: 36px;
    padding-bottom: 80px;
}

.category-card {
    padding: 24px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.category-card-head span {
    font-size: 24px;
    font-weight: 900;
}

.category-card-head strong {
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--yellow-300);
}

.category-sample-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.category-sample-links a {
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--gray-100);
    color: var(--gray-700);
    font-size: 13px;
    font-weight: 700;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--yellow-400), var(--yellow-300), var(--amber-400));
}

.small-hero {
    max-width: none;
    padding: 76px max(20px, calc((100vw - var(--container)) / 2 + 20px));
}

.page-hero h1 {
    max-width: 850px;
    font-size: clamp(40px, 6vw, 70px);
}

.page-hero p {
    max-width: 760px;
    font-size: 18px;
}

.filter-panel {
    margin-top: 28px;
    padding: 18px;
}

.search-box {
    display: flex;
    min-height: 52px;
    gap: 10px;
    padding: 7px;
    border: 1px solid var(--gray-200);
    border-radius: 999px;
    background: var(--gray-50);
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 14px;
}

.filter-row label {
    display: grid;
    gap: 6px;
    font-size: 13px;
    color: var(--gray-600);
    font-weight: 800;
}

.filter-row select {
    width: 100%;
    border: 1px solid var(--gray-200);
    border-radius: 14px;
    background: var(--white);
    color: var(--gray-900);
    padding: 12px 14px;
    outline: none;
}

.breadcrumb {
    position: relative;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: rgba(17, 24, 39, 0.74);
    margin-bottom: 24px;
    font-weight: 800;
}

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

.detail-hero {
    padding: 42px max(20px, calc((100vw - var(--container)) / 2 + 20px)) 58px;
}

.detail-hero-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
}

.detail-poster-card {
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    background: #fde68a;
}

.detail-poster-card img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.detail-headline h1 {
    max-width: 820px;
    font-size: clamp(38px, 6vw, 72px);
}

.detail-headline p {
    max-width: 760px;
    font-size: 18px;
}

.detail-tags {
    margin: 22px 0;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 26px;
    padding-top: 40px;
}

.player-frame {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: var(--gray-900);
    aspect-ratio: 16 / 9;
    box-shadow: var(--shadow-soft);
}

.movie-player {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: var(--gray-900);
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    border: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.18), rgba(17, 24, 39, 0.78));
    color: var(--white);
    font-size: 18px;
    font-weight: 900;
}

.player-overlay.is-hidden {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.play-symbol {
    width: 86px;
    height: 86px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--yellow-300);
    color: var(--gray-900);
    font-size: 34px;
    box-shadow: 0 20px 40px rgba(250, 204, 21, 0.34);
}

.content-panel {
    padding: 26px;
    margin-top: 24px;
}

.content-panel h2 {
    font-size: 28px;
}

.content-panel p {
    margin: 0 0 14px;
    font-size: 16px;
}

.side-panel {
    margin-top: 0;
    position: sticky;
    top: 96px;
}

.side-panel table {
    width: 100%;
    border-collapse: collapse;
}

.side-panel th,
.side-panel td {
    border-bottom: 1px solid var(--gray-200);
    padding: 12px 0;
    vertical-align: top;
    text-align: left;
}

.side-panel th {
    width: 64px;
    color: var(--gray-500);
}

.related-heading {
    padding-top: 64px;
}

.site-footer {
    margin-top: 70px;
    background: linear-gradient(90deg, var(--gray-900), var(--gray-800), var(--gray-900));
    color: var(--white);
}

.footer-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 48px 20px;
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 0.8fr 1fr;
    gap: 28px;
}

.footer-brand {
    font-size: 22px;
    margin-bottom: 14px;
}

.footer-inner h2 {
    color: var(--yellow-300);
    font-size: 18px;
    margin: 0 0 14px;
}

.footer-inner ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.footer-inner a,
.footer-inner p {
    color: rgba(255, 255, 255, 0.72);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 18px 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.58);
}

.back-to-top {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 30;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    background: var(--yellow-300);
    color: var(--gray-900);
    font-size: 22px;
    font-weight: 900;
    box-shadow: var(--shadow-card);
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

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

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

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

    .side-panel {
        position: static;
    }
}

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

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

    body.nav-open .mobile-nav {
        display: grid;
        gap: 8px;
    }

    .hero-section,
    .hero-track {
        min-height: 620px;
    }

    .hero-content {
        padding-top: 92px;
    }

    .intro-strip,
    .filter-row,
    .footer-inner,
    .detail-hero-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

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

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

    .rank-item {
        grid-template-columns: 52px 70px minmax(0, 1fr);
    }

    .rank-score {
        grid-column: 3;
        text-align: left;
    }
}

@media (max-width: 560px) {
    .header-inner {
        min-height: 66px;
    }

    .brand-text {
        font-size: 19px;
    }

    .hero-content p,
    .page-hero p,
    .detail-headline p {
        font-size: 16px;
    }

    .hero-actions,
    .detail-actions,
    .hero-search,
    .search-box {
        flex-direction: column;
        border-radius: var(--radius-lg);
    }

    .hero-search input,
    .search-box input {
        width: 100%;
        min-height: 44px;
    }

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

    .rank-item {
        grid-template-columns: 44px 64px minmax(0, 1fr);
        gap: 10px;
    }

    .rank-number {
        width: 42px;
        height: 42px;
        font-size: 16px;
    }

    .rank-thumb {
        width: 64px;
    }

    .small-hero,
    .detail-hero {
        padding-left: 16px;
        padding-right: 16px;
    }
}
