:root {
    --amber-50: #fffbeb;
    --amber-100: #fef3c7;
    --amber-500: #f59e0b;
    --amber-600: #d97706;
    --amber-700: #b45309;
    --orange-500: #f97316;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
    --black: #000000;
    --radius: 18px;
    --shadow: 0 10px 30px rgba(17, 24, 39, 0.12);
    --shadow-strong: 0 24px 70px rgba(17, 24, 39, 0.28);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--gray-900);
    background: linear-gradient(180deg, var(--gray-50), var(--gray-100));
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: var(--white);
    background: linear-gradient(90deg, var(--amber-600), var(--orange-500));
    box-shadow: 0 10px 22px rgba(146, 64, 14, 0.24);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: var(--amber-700);
    background: var(--white);
    box-shadow: inset 0 0 0 2px rgba(245, 158, 11, 0.18);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 32px;
    font-weight: 700;
}

.nav-link {
    position: relative;
    padding: 8px 0;
    color: rgba(255, 255, 255, 0.92);
    transition: color 0.25s ease;
}

.nav-link::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 2px;
    border-radius: 999px;
    background: var(--white);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--white);
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: scaleX(1);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    padding: 9px;
    border: 0;
    border-radius: 12px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.12);
}

.menu-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    border-radius: 999px;
    background: currentColor;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 14px;
}

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

.mobile-link {
    padding: 10px 14px;
    border-radius: 12px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.1);
}

.mobile-link.active,
.mobile-link:hover {
    background: rgba(180, 83, 9, 0.55);
}

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

.hero-track,
.hero-slide {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    transition: opacity 1s ease;
}

.hero-slide.active {
    opacity: 1;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(0deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.54) 46%, rgba(0, 0, 0, 0.06)),
        radial-gradient(circle at 20% 70%, rgba(245, 158, 11, 0.42), transparent 32%);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 100%;
    padding-bottom: 74px;
    color: var(--white);
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--amber-100);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero h1 {
    max-width: 760px;
    margin: 0 0 16px;
    font-size: clamp(32px, 6vw, 60px);
    line-height: 1.05;
    font-weight: 900;
    text-shadow: 0 8px 26px rgba(0, 0, 0, 0.36);
}

.hero-summary {
    max-width: 680px;
    margin: 0 0 18px;
    font-size: clamp(16px, 2.5vw, 21px);
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.9);
}

.hero-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 12px;
    border: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: 999px;
    color: var(--white);
    background: rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(10px);
}

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

.primary-button,
.ghost-button,
.section-more,
.quick-search button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.primary-button,
.quick-search button {
    color: var(--white);
    background: var(--amber-600);
    box-shadow: 0 12px 28px rgba(217, 119, 6, 0.35);
}

.primary-button:hover,
.quick-search button:hover {
    transform: translateY(-2px);
    background: var(--amber-700);
}

.ghost-button {
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.34);
    background: rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(10px);
}

.ghost-button.light {
    background: rgba(255, 255, 255, 0.14);
}

.ghost-button:hover {
    transform: translateY(-2px);
    background: rgba(0, 0, 0, 0.56);
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 4;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    color: var(--white);
    font-size: 38px;
    line-height: 1;
    background: rgba(0, 0, 0, 0.45);
    transform: translateY(-50%);
    transition: background 0.25s ease;
}

.hero-control:hover {
    background: rgba(0, 0, 0, 0.72);
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

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

.hero-dot {
    width: 9px;
    height: 9px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.55);
    transition: width 0.25s ease, background 0.25s ease;
}

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

.home-search {
    position: relative;
    z-index: 5;
    margin-top: -38px;
}

.search-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 480px);
    gap: 24px;
    align-items: center;
    padding: 24px;
    border: 1px solid rgba(245, 158, 11, 0.18);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow-strong);
    backdrop-filter: blur(18px);
}

.search-panel h2 {
    margin: 0 0 8px;
    font-size: 24px;
}

.search-panel p {
    margin: 0;
    color: var(--gray-600);
    line-height: 1.7;
}

.quick-search,
.filter-bar {
    display: flex;
    gap: 10px;
}

.quick-search input,
.filter-bar input,
.filter-bar select {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--gray-300);
    border-radius: 999px;
    padding: 0 16px;
    color: var(--gray-900);
    background: var(--white);
    outline: none;
    transition: border 0.25s ease, box-shadow 0.25s ease;
}

.quick-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
    border-color: var(--amber-500);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16);
}

.page-section {
    margin-top: 64px;
}

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

.section-head h2 {
    margin: 0;
    font-size: clamp(24px, 4vw, 34px);
    line-height: 1.2;
}

.section-more {
    min-height: 38px;
    color: var(--amber-700);
    background: var(--amber-100);
}

.section-more:hover {
    color: var(--white);
    background: var(--amber-600);
}

.rail-list {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(230px, 280px);
    gap: 20px;
    overflow-x: auto;
    padding: 4px 4px 20px;
    scroll-snap-type: x proximity;
}

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

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

.movie-card {
    min-width: 0;
    border-radius: 16px;
    background: var(--white);
    box-shadow: 0 6px 18px rgba(17, 24, 39, 0.08);
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.movie-card-link {
    display: block;
    height: 100%;
}

.movie-cover,
.rank-cover,
.side-card.poster-card {
    position: relative;
    background:
        radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.36), transparent 32%),
        linear-gradient(135deg, var(--gray-800), var(--gray-900));
    overflow: hidden;
}

.movie-cover {
    aspect-ratio: 16 / 10;
}

.movie-cover img,
.rank-cover img,
.poster-card img,
.overview-thumbs img,
.category-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease, opacity 0.25s ease;
}

.movie-card:hover .movie-cover img,
.category-tile:hover img,
.category-overview-card:hover img {
    transform: scale(1.08);
}

.cover-image.hidden-image,
.hero-image.hidden-image,
.category-tile img.hidden-image,
.overview-thumbs img.hidden-image,
.poster-card img.hidden-image {
    opacity: 0;
}

.movie-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    color: var(--white);
    font-size: 12px;
    font-weight: 800;
    background: rgba(0, 0, 0, 0.58);
    backdrop-filter: blur(8px);
}

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

.movie-card-body h3 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.movie-card-body p {
    display: -webkit-box;
    min-height: 45px;
    margin: 0 0 12px;
    color: var(--gray-600);
    font-size: 14px;
    line-height: 1.6;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.movie-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--gray-500);
    font-size: 13px;
}

.movie-meta span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 2px 9px;
    border-radius: 999px;
    background: var(--gray-100);
}

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

.category-tile {
    position: relative;
    min-height: 178px;
    padding: 22px;
    border-radius: var(--radius);
    color: var(--white);
    background: linear-gradient(135deg, var(--gray-900), var(--gray-800));
    box-shadow: var(--shadow);
    overflow: hidden;
}

.category-tile strong,
.category-tile small {
    position: relative;
    z-index: 2;
    display: block;
}

.category-tile strong {
    margin-bottom: 10px;
    font-size: 22px;
}

.category-tile small {
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.55;
}

.category-tile img {
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: 0.32;
}

.category-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.9), rgba(217, 119, 6, 0.58));
}

.category-glow {
    position: absolute;
    right: -30px;
    bottom: -30px;
    z-index: 2;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.45);
    filter: blur(12px);
}

.sub-hero {
    color: var(--white);
    background:
        radial-gradient(circle at 15% 20%, rgba(245, 158, 11, 0.42), transparent 28%),
        linear-gradient(120deg, var(--gray-900), #2b1b0b 54%, var(--amber-700));
}

.sub-hero .container {
    padding: 72px 0;
}

.sub-hero h1 {
    max-width: 820px;
    margin: 0 0 14px;
    font-size: clamp(34px, 6vw, 58px);
    line-height: 1.1;
}

.sub-hero p:not(.eyebrow) {
    max-width: 760px;
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
    line-height: 1.7;
}

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

.category-overview-card {
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.category-overview-card a {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    min-height: 210px;
}

.overview-thumbs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 2px;
    background: var(--gray-900);
    overflow: hidden;
}

.overview-body {
    padding: 26px;
}

.overview-body h2 {
    margin: 0 0 10px;
    font-size: 26px;
}

.overview-body p {
    min-height: 78px;
    margin: 0 0 16px;
    color: var(--gray-600);
    line-height: 1.65;
}

.overview-body span {
    color: var(--amber-700);
    font-weight: 800;
}

.filter-bar {
    margin-bottom: 26px;
    padding: 18px;
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow);
}

.filter-bar.large {
    grid-template-columns: minmax(0, 1fr) 190px 170px;
}

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

.rank-item {
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: 0 6px 20px rgba(17, 24, 39, 0.08);
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.rank-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.rank-item a {
    display: grid;
    grid-template-columns: 72px 150px minmax(0, 1fr) 92px;
    gap: 18px;
    align-items: center;
    padding: 14px 18px;
}

.rank-num {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    color: var(--white);
    font-weight: 900;
    background: linear-gradient(135deg, var(--amber-600), var(--orange-500));
}

.rank-cover {
    aspect-ratio: 16 / 10;
    border-radius: 14px;
}

.rank-info h2 {
    margin: 0 0 8px;
    font-size: 21px;
}

.rank-info p {
    margin: 0 0 10px;
    color: var(--gray-600);
    line-height: 1.6;
}

.rank-action {
    justify-self: end;
    color: var(--amber-700);
}

.detail-wrap {
    padding: 36px 0 0;
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
}

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

.breadcrumb a {
    color: var(--amber-700);
    font-weight: 700;
}

.player-card,
.detail-card,
.side-card {
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.video-box {
    position: relative;
    aspect-ratio: 16 / 9;
    background:
        radial-gradient(circle at 50% 45%, rgba(245, 158, 11, 0.26), transparent 26%),
        var(--black);
}

.site-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: var(--black);
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 84px;
    height: 84px;
    border: 0;
    border-radius: 50%;
    color: var(--white);
    background: rgba(217, 119, 6, 0.92);
    box-shadow: 0 20px 42px rgba(0, 0, 0, 0.32);
    transform: translate(-50%, -50%);
    transition: transform 0.25s ease, background 0.25s ease, opacity 0.25s ease;
}

.play-button span {
    margin-left: 6px;
    font-size: 36px;
    line-height: 1;
}

.play-button:hover {
    transform: translate(-50%, -50%) scale(1.06);
    background: var(--amber-700);
}

.video-box.playing .play-button {
    opacity: 0;
    pointer-events: none;
}

.detail-card {
    margin-top: 22px;
    padding: 28px;
}

.detail-card h1 {
    margin: 0 0 14px;
    font-size: clamp(30px, 5vw, 46px);
    line-height: 1.16;
}

.detail-meta {
    margin-bottom: 18px;
}

.one-line {
    margin: 0 0 20px;
    padding: 18px;
    border-left: 4px solid var(--amber-600);
    border-radius: 12px;
    color: var(--gray-700);
    background: var(--amber-50);
    font-size: 18px;
    line-height: 1.7;
}

.detail-card h2,
.side-card h2 {
    margin: 28px 0 12px;
    font-size: 24px;
}

.detail-card p {
    color: var(--gray-700);
    font-size: 16px;
    line-height: 1.9;
}

.detail-tags span {
    color: var(--amber-800);
    border-color: rgba(245, 158, 11, 0.22);
    background: var(--amber-50);
}

.detail-side {
    display: grid;
    align-content: start;
    gap: 20px;
}

.poster-card {
    aspect-ratio: 4 / 5;
}

.side-card {
    padding: 18px;
}

.side-card.poster-card {
    padding: 0;
}

.side-card h2 {
    margin-top: 0;
}

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

.simple-card {
    display: grid;
    gap: 4px;
    padding: 12px;
    border-radius: 14px;
    background: var(--gray-50);
    transition: background 0.25s ease, transform 0.25s ease;
}

.simple-card:hover {
    transform: translateX(3px);
    background: var(--amber-50);
}

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

.simple-meta {
    color: var(--gray-500);
    font-size: 13px;
}

.related-section {
    margin-top: 32px;
}

.site-footer {
    margin-top: 80px;
    color: var(--gray-300);
    background: var(--gray-900);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 34px;
    padding: 48px 0;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: var(--white);
    font-size: 20px;
}

.site-footer p {
    margin: 0;
    color: var(--gray-400);
    line-height: 1.75;
}

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

.footer-links a {
    color: var(--gray-300);
}

.footer-links a:hover {
    color: var(--amber-500);
}

.footer-bottom {
    padding: 20px 16px;
    border-top: 1px solid var(--gray-800);
    color: var(--gray-500);
    text-align: center;
}

.back-top {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 40;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    color: var(--white);
    font-size: 24px;
    font-weight: 900;
    background: var(--amber-600);
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity 0.25s ease, transform 0.25s ease, background 0.25s ease;
}

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

.back-top:hover {
    background: var(--amber-700);
}

.is-filtered-out {
    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));
    }

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

    .detail-side {
        grid-template-columns: 260px minmax(0, 1fr);
    }
}

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

    .menu-toggle {
        display: block;
    }

    .hero {
        height: 460px;
    }

    .hero-content {
        padding-bottom: 70px;
    }

    .hero-control {
        width: 38px;
        height: 38px;
        font-size: 30px;
    }

    .search-panel,
    .filter-bar.large,
    .footer-grid,
    .category-overview-card a {
        grid-template-columns: 1fr;
    }

    .quick-search,
    .filter-bar {
        flex-direction: column;
    }

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

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

    .rank-item a {
        grid-template-columns: 48px 96px minmax(0, 1fr);
    }

    .rank-action {
        display: none;
    }

    .overview-thumbs {
        min-height: 220px;
    }

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

@media (max-width: 540px) {
    .container {
        width: min(100% - 24px, 1180px);
    }

    .brand {
        font-size: 21px;
    }

    .hero {
        height: 430px;
    }

    .hero h1 {
        font-size: 34px;
    }

    .hero-summary {
        font-size: 15px;
    }

    .hero-actions {
        gap: 9px;
    }

    .primary-button,
    .ghost-button,
    .section-more,
    .quick-search button {
        min-height: 40px;
        padding: 0 14px;
        font-size: 14px;
    }

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

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

    .rank-cover {
        display: none;
    }

    .detail-card {
        padding: 20px;
    }

    .play-button {
        width: 70px;
        height: 70px;
    }
}
