:root {
    --amber: #f59e0b;
    --amber-dark: #d97706;
    --orange: #f97316;
    --blue: #3b82f6;
    --indigo: #6366f1;
    --text: #1f2937;
    --muted: #6b7280;
    --bg: #fffaf0;
    --line: #e5e7eb;
    --shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background: linear-gradient(180deg, #fffbeb 0%, #ffffff 320px, #f9fafb 100%);
}

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

img {
    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: 100;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(14px);
}

.header-inner {
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 26px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    font-size: 22px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--blue), var(--indigo));
    box-shadow: 0 12px 24px rgba(59, 130, 246, 0.32);
    transition: transform .2s ease;
}

.brand:hover .brand-mark,
.footer-brand:hover .brand-mark {
    transform: scale(1.08);
}

.brand-text {
    display: grid;
    line-height: 1.2;
}

.brand-text strong {
    font-size: 24px;
    color: #111827;
}

.brand-text em {
    font-size: 12px;
    color: var(--muted);
    font-style: normal;
    margin-top: 3px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 26px;
    color: #374151;
    font-weight: 700;
}

.main-nav > a,
.nav-drop > a {
    padding: 28px 0;
    transition: color .2s ease;
}

.main-nav a:hover,
.nav-drop:hover > a {
    color: var(--amber-dark);
}

.nav-drop {
    position: relative;
}

.nav-drop-menu {
    position: absolute;
    left: 50%;
    top: 100%;
    width: 280px;
    max-height: 70vh;
    overflow: auto;
    transform: translateX(-50%) translateY(12px);
    padding: 10px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transition: all .2s ease;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
}

.nav-drop:hover .nav-drop-menu {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    visibility: visible;
}

.nav-drop-menu a {
    padding: 10px 12px;
    border-radius: 12px;
    color: #4b5563;
}

.nav-drop-menu a:hover {
    color: var(--amber-dark);
    background: #fffbeb;
}

.header-search,
.mobile-search,
.page-search,
.search-panel {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search input,
.mobile-search input,
.page-search input,
.search-panel input,
.search-panel select {
    border: 1px solid #d1d5db;
    background: #ffffff;
    border-radius: 999px;
    min-height: 42px;
    padding: 0 16px;
    outline: none;
}

.header-search input:focus,
.mobile-search input:focus,
.page-search input:focus,
.search-panel input:focus,
.search-panel select:focus {
    border-color: var(--amber);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.18);
}

.header-search button,
.mobile-search button,
.page-search button,
.search-panel button,
.btn {
    border: 0;
    border-radius: 999px;
    padding: 11px 18px;
    background: var(--amber);
    color: #ffffff;
    font-weight: 800;
    cursor: pointer;
    transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.page-search button:hover,
.search-panel button:hover,
.btn:hover {
    background: var(--amber-dark);
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(245, 158, 11, 0.25);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: #f3f4f6;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    background: #374151;
    border-radius: 999px;
}

.mobile-panel {
    display: none;
    padding: 16px;
    border-top: 1px solid var(--line);
    background: #ffffff;
}

.mobile-panel a {
    display: block;
    padding: 12px 0;
    font-weight: 700;
    color: #374151;
}

.mobile-category-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px 12px;
    margin-top: 8px;
}

.hero-carousel {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    background: linear-gradient(135deg, #b45309 0%, var(--amber) 48%, var(--orange) 100%);
}

.hero-pattern {
    position: absolute;
    inset: 0;
    opacity: .15;
    background-image: radial-gradient(circle at 25% 25%, #ffffff 0 2px, transparent 2px), radial-gradient(circle at 70% 70%, #ffffff 0 2px, transparent 2px);
    background-size: 52px 52px;
}

.hero-carousel::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 90px;
    background: linear-gradient(0deg, #fffbeb, rgba(255, 251, 235, 0));
}

.hero-wrap {
    position: relative;
    min-height: 620px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(340px, .95fr);
    align-items: center;
    gap: 52px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(18px);
    transition: opacity .6s ease, transform .6s ease, visibility .6s ease;
    z-index: 2;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.hero-copy {
    color: #ffffff;
    max-width: 710px;
    padding: 64px 0 96px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: 999px;
    color: #fff7ed;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.38);
    backdrop-filter: blur(8px);
    font-weight: 800;
    margin-bottom: 18px;
}

.hero-copy h1 {
    margin: 0 0 14px;
    font-size: clamp(34px, 6vw, 66px);
    line-height: 1.08;
    letter-spacing: -0.04em;
    text-shadow: 0 18px 36px rgba(0, 0, 0, 0.24);
}

.hero-copy h2 {
    margin: 0 0 14px;
    font-size: clamp(24px, 3vw, 38px);
    color: #fff7ed;
}

.hero-copy p {
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.92);
    font-size: 18px;
    line-height: 1.8;
}

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

.hero-tags span,
.tag-list span,
.detail-tags a {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 13px;
    font-weight: 700;
    color: #92400e;
    background: #fef3c7;
}

.hero-tags span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.28);
}

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

.btn-light {
    background: #ffffff;
    color: var(--amber-dark);
}

.btn-light:hover {
    background: #fff7ed;
    color: #92400e;
}

.btn-ghost,
.btn-outline {
    background: rgba(255, 255, 255, 0.18);
    border: 2px solid rgba(255, 255, 255, 0.54);
    backdrop-filter: blur(6px);
}

.btn-outline {
    background: transparent;
}

.hero-poster {
    position: relative;
    width: min(430px, 100%);
    justify-self: center;
    aspect-ratio: 3 / 4;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 34px 70px rgba(69, 26, 3, 0.35);
    border: 8px solid rgba(255, 255, 255, 0.22);
    transform: rotate(2deg);
}

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

.hero-poster:hover img {
    transform: scale(1.06);
}

.hero-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0));
}

.hero-play,
.play-hover {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    transform: translate(-50%, -50%);
    width: 68px;
    height: 68px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    background: var(--amber);
    font-size: 30px;
    box-shadow: 0 20px 36px rgba(245, 158, 11, 0.34);
}

.hero-dots {
    position: absolute;
    left: 0;
    bottom: 72px;
    z-index: 6;
    display: flex;
    gap: 10px;
}

.hero-dots button {
    width: 34px;
    height: 8px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.44);
    cursor: pointer;
}

.hero-dots button.is-active {
    background: #ffffff;
}

.stats-strip {
    position: relative;
    z-index: 5;
    margin-top: -36px;
}

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

.stats-grid div {
    padding: 22px;
    border-radius: 22px;
    background: #ffffff;
    text-align: center;
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.12);
}

.stats-grid strong {
    display: block;
    color: var(--amber-dark);
    font-size: clamp(26px, 3vw, 38px);
}

.stats-grid span {
    color: var(--muted);
    font-weight: 700;
}

.content-section {
    padding: 56px 0;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 28px;
}

.section-heading h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    letter-spacing: -0.03em;
}

.section-heading a {
    color: var(--amber-dark);
    font-weight: 800;
}

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

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

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

.movie-card {
    border-radius: 24px;
    background: #ffffff;
    overflow: hidden;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    transition: transform .25s ease, box-shadow .25s ease;
}

.movie-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.16);
}

.movie-cover {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, #fef3c7, #fed7aa);
}

.movie-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .45s ease;
}

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

.movie-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0));
    transition: opacity .25s ease;
}

.movie-card:hover .movie-cover::after {
    opacity: 1;
}

.play-hover {
    opacity: 0;
    transition: opacity .25s ease, transform .25s ease;
    pointer-events: none;
    width: 58px;
    height: 58px;
    font-size: 24px;
}

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

.duration-badge,
.rank-badge {
    position: absolute;
    right: 12px;
    top: 12px;
    z-index: 3;
    border-radius: 999px;
    padding: 6px 10px;
    color: #ffffff;
    background: var(--amber);
    font-size: 12px;
    font-weight: 800;
}

.rank-badge {
    right: auto;
    left: 12px;
    background: #ef4444;
}

.movie-info {
    padding: 18px;
}

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

.movie-info h3 a:hover {
    color: var(--amber-dark);
}

.movie-info p {
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin-bottom: 12px;
    color: #6b7280;
    font-size: 13px;
    font-weight: 700;
}

.movie-card-compact .movie-info {
    padding: 14px;
}

.movie-card-compact .movie-info h3 {
    font-size: 16px;
}

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

.category-card,
.category-overview-card,
.detail-card,
.side-card,
.ranking-panel {
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.category-card {
    position: relative;
    overflow: hidden;
    padding: 22px;
    border-top: 5px solid var(--cat-color);
    transition: transform .25s ease, box-shadow .25s ease;
}

.category-card::after {
    content: "";
    position: absolute;
    top: -40px;
    right: -40px;
    width: 130px;
    height: 130px;
    border-radius: 999px;
    background: var(--cat-color);
    opacity: .08;
}

.category-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 44px rgba(15, 23, 42, 0.14);
}

.category-icon {
    width: 58px;
    height: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    background: var(--cat-color, var(--amber));
    font-size: 24px;
    font-weight: 900;
    margin-bottom: 14px;
}

.category-card h3,
.category-overview-card h2 {
    margin: 0 0 8px;
}

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

.category-samples {
    display: grid;
    gap: 8px;
    margin-top: 16px;
    color: #92400e;
    font-weight: 700;
    font-size: 14px;
}

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

.ranking-panel,
.side-card {
    padding: 22px;
}

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

.rank-row {
    display: grid;
    grid-template-columns: auto 72px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    background: #f9fafb;
    transition: background .2s ease, transform .2s ease;
}

.rank-row:hover {
    background: #fffbeb;
    transform: translateX(3px);
}

.rank-row img {
    width: 72px;
    height: 48px;
    border-radius: 12px;
    object-fit: cover;
    background: #fde68a;
}

.list-rank {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    background: var(--amber);
    font-weight: 900;
}

.rank-row-title {
    min-width: 0;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-row-title em {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-row-hot {
    color: #ef4444;
    font-weight: 900;
    font-size: 13px;
}

.page-hero {
    padding: 62px 0;
    color: #ffffff;
    background: linear-gradient(135deg, var(--hero-start, var(--amber)), var(--hero-end, var(--orange)));
}

.page-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(36px, 5vw, 56px);
}

.page-hero p {
    margin: 0;
    max-width: 780px;
    color: rgba(255, 255, 255, 0.92);
    font-size: 18px;
    line-height: 1.8;
}

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.86);
    font-weight: 700;
}

.detail-breadcrumb {
    color: #6b7280;
}

.detail-breadcrumb a:hover,
.breadcrumb a:hover {
    color: #ffffff;
}

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

.page-search {
    margin-top: 26px;
    max-width: 560px;
}

.page-search input {
    flex: 1;
}

.category-overview-list {
    display: grid;
    gap: 28px;
    padding: 44px 0 64px;
}

.category-overview-card {
    padding: 26px;
    border-top: 6px solid var(--cat-color);
}

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

.btn-small {
    padding: 9px 16px;
}

.btn-full {
    display: flex;
    justify-content: center;
    margin-top: 16px;
}

.search-panel {
    margin-top: 26px;
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 160px 140px auto;
}

.search-panel input,
.search-panel select {
    min-height: 52px;
}

.search-count {
    margin-top: 16px;
    font-weight: 800;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 30px;
    padding: 34px 0 70px;
}

.detail-main {
    min-width: 0;
}

.player-shell {
    position: relative;
    margin: 18px 0 22px;
    border-radius: 24px;
    overflow: hidden;
    background: #000000;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.28);
}

.player-shell video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #ffffff;
    background-size: cover;
    background-position: center;
    text-align: center;
    padding: 30px;
    cursor: pointer;
    transition: opacity .22s ease, visibility .22s ease;
}

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

.player-start {
    width: 82px;
    height: 82px;
    border: 0;
    border-radius: 999px;
    background: var(--amber);
    color: #ffffff;
    font-size: 34px;
    box-shadow: 0 20px 40px rgba(245, 158, 11, 0.36);
    cursor: pointer;
    transition: transform .2s ease, background .2s ease;
}

.player-start:hover {
    transform: scale(1.06);
    background: var(--amber-dark);
}

.player-overlay strong {
    font-size: clamp(24px, 3vw, 42px);
    text-shadow: 0 8px 20px rgba(0, 0, 0, 0.42);
}

.player-overlay span {
    color: rgba(255, 255, 255, 0.86);
    font-weight: 700;
}

.detail-card {
    padding: 28px;
}

.detail-card h1 {
    margin: 0 0 16px;
    font-size: clamp(30px, 4vw, 46px);
}

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

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.detail-meta span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 7px 12px;
    background: #f3f4f6;
    color: #374151;
    font-weight: 800;
}

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

.one-line {
    color: #92400e;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.8;
    padding: 16px 18px;
    border-radius: 18px;
    background: #fffbeb;
}

.summary-text p {
    margin: 0 0 16px;
    color: #374151;
    line-height: 1.92;
    font-size: 16px;
}

.detail-sidebar {
    display: grid;
    gap: 22px;
    align-content: start;
    position: sticky;
    top: 104px;
}

.poster-card img {
    width: 100%;
    border-radius: 18px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    background: #fde68a;
}

.related-section {
    padding-bottom: 0;
}

.large-rank-list .rank-row {
    grid-template-columns: 48px 96px minmax(0, 1fr) auto;
    padding: 12px;
}

.large-rank-list .rank-row img {
    width: 96px;
    height: 64px;
}

[hidden] {
    display: none !important;
}

@media (max-width: 1080px) {
    .header-search,
    .main-nav {
        display: none;
    }

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

    .mobile-panel.is-open {
        display: block;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .hero-poster {
        display: none;
    }

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

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

    .detail-sidebar {
        position: static;
    }
}

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

    .brand-text em {
        display: none;
    }

    .brand-text strong {
        font-size: 20px;
    }

    .hero-carousel,
    .hero-wrap {
        min-height: 640px;
    }

    .hero-copy {
        padding: 44px 0 120px;
    }

    .hero-actions,
    .stats-grid,
    .category-overview-head,
    .section-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .hero-dots {
        bottom: 58px;
    }

    .stats-grid,
    .movie-grid,
    .featured-grid,
    .compact-grid,
    .mini-grid,
    .ranking-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

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

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

    .detail-card,
    .side-card,
    .ranking-panel,
    .category-overview-card {
        padding: 18px;
    }

    .rank-row,
    .large-rank-list .rank-row {
        grid-template-columns: 34px 70px minmax(0, 1fr);
    }

    .rank-row-hot {
        grid-column: 3;
    }
}
