:root {
    --amber-900: #78350f;
    --amber-800: #92400e;
    --amber-700: #b45309;
    --amber-600: #d97706;
    --amber-500: #f59e0b;
    --orange-900: #7c2d12;
    --gray-950: #030712;
    --gray-900: #111827;
    --gray-800: #1f2937;
    --gray-700: #374151;
    --gray-600: #4b5563;
    --gray-500: #6b7280;
    --gray-300: #d1d5db;
    --gray-200: #e5e7eb;
    --gray-100: #f3f4f6;
    --gray-50: #f9fafb;
    --white: #ffffff;
    --radius: 18px;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --soft-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
}

html {
    scroll-behavior: smooth;
}

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

img {
    background: linear-gradient(135deg, #1f2937, #0f172a);
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    color: var(--white);
    background: linear-gradient(90deg, var(--amber-900), var(--amber-800), var(--orange-900));
    box-shadow: 0 10px 30px rgba(120, 53, 15, 0.22);
}

.header-inner {
    width: min(1180px, calc(100% - 32px));
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 auto;
}

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

.logo-icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: var(--amber-900);
    background: linear-gradient(135deg, #fde68a, #f59e0b);
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.55), 0 8px 18px rgba(0, 0, 0, 0.18);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 26px;
    font-size: 15px;
}

.nav-link,
.mobile-link {
    color: rgba(255, 255, 255, 0.82);
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
    color: #fde68a;
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    background: rgba(255, 255, 255, 0.12);
}

.mobile-menu-button span {
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: var(--white);
}

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

.mobile-nav.is-open {
    display: flex;
}

.hero-slider {
    position: relative;
    height: 70vh;
    min-height: 520px;
    overflow: hidden;
    background: var(--gray-950);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transform: scale(1.025);
    transition: opacity 0.7s ease, transform 1.1s ease, visibility 0.7s ease;
}

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

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

.hero-gradient {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 72% 30%, rgba(245, 158, 11, 0.18), transparent 28%),
        linear-gradient(90deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.18)),
        linear-gradient(0deg, rgba(0, 0, 0, 0.88), transparent 55%);
}

.hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 78px;
    left: 50%;
    transform: translateX(-50%);
}

.hero-copy {
    width: min(780px, 100%);
    color: var(--white);
}

.eyebrow {
    margin-bottom: 10px;
    color: #fde68a;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.16em;
    font-size: 12px;
}

.eyebrow.dark {
    color: var(--amber-700);
}

.hero-copy h1,
.page-hero h1,
.detail-card h1 {
    font-size: clamp(36px, 6vw, 72px);
    line-height: 1.05;
    font-weight: 900;
    margin-bottom: 18px;
}

.hero-copy p:not(.eyebrow) {
    font-size: clamp(17px, 2vw, 22px);
    color: rgba(255, 255, 255, 0.86);
    line-height: 1.8;
    margin-bottom: 24px;
}

.hero-tags,
.card-tags,
.category-pill-row,
.pill-list,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags span,
.card-tags span,
.category-pill-row span,
.pill-list span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 12px;
    line-height: 1;
    background: rgba(255, 255, 255, 0.16);
    color: inherit;
    backdrop-filter: blur(10px);
}

.card-tags span,
.category-pill-row span,
.pill-list span,
.detail-meta span {
    color: var(--gray-700);
    background: var(--gray-100);
}

.detail-meta span:first-child,
.card-tags span:first-child {
    color: #92400e;
    background: #fef3c7;
}

.hero-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 26px;
}

.primary-button,
.ghost-button,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.primary-button {
    min-height: 46px;
    padding: 0 22px;
    color: var(--white);
    background: linear-gradient(135deg, var(--amber-500), var(--amber-700));
    box-shadow: 0 14px 28px rgba(217, 119, 6, 0.28);
}

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

.primary-button.small {
    min-height: 40px;
    padding: 0 18px;
    font-size: 14px;
}

.primary-button.full,
.ghost-button.full {
    width: 100%;
}

.ghost-button {
    min-height: 46px;
    padding: 0 20px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.24);
    backdrop-filter: blur(12px);
}

.ghost-button.dark {
    color: var(--amber-800);
    background: #fff7ed;
    border-color: #fed7aa;
}

.text-link {
    color: var(--amber-700);
    font-size: 15px;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 999px;
    color: var(--white);
    font-size: 36px;
    line-height: 1;
    background: rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(12px);
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(0, 0, 0, 0.68);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.48);
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
    width: 32px;
    background: #fde68a;
}

.home-search-section {
    margin-top: -46px;
    position: relative;
    z-index: 10;
}

.home-search-card,
.search-panel,
.detail-card,
.side-card,
.category-card,
.category-feature-card {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(229, 231, 235, 0.82);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.home-search-card {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 28px;
    align-items: center;
    padding: 28px;
}

.home-search-card h2,
.section-head h2,
.rank-intro h2,
.category-feature-card h3,
.category-card h2,
.side-card h2,
.detail-card h2 {
    font-size: clamp(24px, 3vw, 36px);
    font-weight: 900;
    line-height: 1.2;
}

.home-search-card p,
.category-feature-card p,
.category-card p,
.rank-intro p,
.page-hero p,
.detail-card p,
.side-card p {
    color: var(--gray-600);
    line-height: 1.8;
}

.search-panel {
    display: grid;
    grid-template-columns: minmax(240px, 1.7fr) repeat(3, minmax(120px, 1fr));
    gap: 14px;
    padding: 16px;
    box-shadow: var(--soft-shadow);
}

.search-panel label {
    display: grid;
    gap: 8px;
    color: var(--gray-600);
    font-size: 12px;
    font-weight: 800;
}

.search-panel input,
.search-panel select {
    width: 100%;
    height: 44px;
    border-radius: 12px;
    border: 1px solid var(--gray-200);
    background: var(--white);
    padding: 0 14px;
    color: var(--gray-800);
    outline: none;
}

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

.section {
    padding: 72px 0;
}

.soft-section {
    background: linear-gradient(135deg, #fff7ed, #fffbeb);
}

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

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

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

.compact-grid {
    gap: 18px;
}

.movie-card {
    display: block;
    overflow: hidden;
    border-radius: 16px;
    background: var(--white);
    box-shadow: var(--soft-shadow);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.movie-card.is-hidden,
.rank-card.is-hidden {
    display: none;
}

.poster-link {
    display: block;
}

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: var(--gray-900);
}

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

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

.poster-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.74));
    opacity: 0;
    transition: opacity 0.24s ease;
}

.movie-card:hover .poster-mask {
    opacity: 1;
}

.year-badge,
.type-badge {
    position: absolute;
    z-index: 2;
    border-radius: 8px;
    padding: 5px 8px;
    color: var(--white);
    font-size: 12px;
    font-weight: 800;
}

.year-badge {
    top: 10px;
    right: 10px;
    background: var(--amber-500);
}

.type-badge {
    left: 10px;
    bottom: 10px;
    background: rgba(0, 0, 0, 0.68);
    backdrop-filter: blur(8px);
}

.movie-info {
    padding: 14px;
}

.movie-info h3 {
    min-height: 44px;
    margin-bottom: 8px;
    color: var(--gray-900);
    font-weight: 850;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.movie-info p {
    min-height: 42px;
    margin-bottom: 12px;
    color: var(--gray-500);
    font-size: 13px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-small .movie-info h3 {
    min-height: 38px;
    font-size: 14px;
}

.card-small .movie-info p {
    display: none;
}

.card-small .card-tags span:nth-child(n+4) {
    display: none;
}

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

.category-feature-card {
    padding: 26px;
    display: grid;
    gap: 20px;
}

.mini-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.mini-card {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 14px;
    background: var(--gray-50);
    transition: background 0.2s ease, transform 0.2s ease;
}

.mini-card:hover {
    background: #fff7ed;
    transform: translateY(-2px);
}

.mini-card img {
    width: 70px;
    height: 90px;
    object-fit: cover;
    border-radius: 10px;
}

.mini-card strong,
.mini-card em,
.rank-list strong,
.rank-list em,
.rank-card strong,
.rank-card em,
.rank-card b {
    display: block;
}

.mini-card strong {
    color: var(--gray-900);
    font-size: 14px;
    line-height: 1.4;
}

.mini-card em {
    margin-top: 5px;
    color: var(--gray-500);
    font-size: 12px;
    font-style: normal;
}

.rank-section {
    color: var(--white);
    background: radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.25), transparent 30%), linear-gradient(135deg, #111827, #030712);
}

.rank-layout {
    display: grid;
    grid-template-columns: 0.78fr 1.22fr;
    gap: 40px;
    align-items: start;
}

.rank-intro {
    position: sticky;
    top: 96px;
}

.rank-intro h2 {
    font-size: clamp(32px, 5vw, 54px);
    margin-bottom: 18px;
}

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

.rank-list a {
    display: grid;
    grid-template-columns: 42px 70px 1fr;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    transition: transform 0.2s ease, background 0.2s ease;
}

.rank-list a:hover {
    transform: translateX(6px);
    background: rgba(255, 255, 255, 0.14);
}

.rank-list img {
    width: 70px;
    height: 92px;
    object-fit: cover;
    border-radius: 12px;
}

.rank-number {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: var(--gray-950);
    background: #fde68a;
    font-weight: 900;
}

.rank-number.large {
    width: 48px;
    height: 48px;
    border-radius: 14px;
}

.rank-list em,
.rank-card em {
    color: rgba(255, 255, 255, 0.62);
    font-style: normal;
    font-size: 13px;
    margin-top: 4px;
}

.page-main {
    min-height: 70vh;
}

.page-hero {
    padding: 72px 0;
    color: var(--white);
    background: radial-gradient(circle at 82% 12%, rgba(245, 158, 11, 0.22), transparent 28%), linear-gradient(90deg, var(--amber-900), var(--amber-800), var(--orange-900));
}

.page-hero h1 {
    margin-bottom: 14px;
}

.page-hero p {
    max-width: 760px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
}

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

.detail-primary .breadcrumb {
    color: var(--gray-600);
}

.breadcrumb a:hover {
    color: #fde68a;
}

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

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

.category-card {
    overflow: hidden;
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
}

.category-cover-stack {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    min-height: 310px;
    background: var(--gray-900);
}

.category-cover-stack img {
    width: 100%;
    height: 100%;
    min-height: 155px;
    object-fit: cover;
}

.category-card-body {
    padding: 28px;
    display: grid;
    align-content: center;
    gap: 16px;
}

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

.player-card {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: var(--gray-950);
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

.player-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: var(--gray-950);
}

.player-trigger {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: var(--white);
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.28));
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.play-icon {
    width: 74px;
    height: 74px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding-left: 5px;
    font-size: 30px;
    color: var(--gray-950);
    background: #fde68a;
    box-shadow: 0 0 0 14px rgba(253, 230, 138, 0.18);
}

.detail-card {
    margin-top: 24px;
    padding: 30px;
}

.detail-card h1 {
    color: var(--gray-900);
    font-size: clamp(34px, 4vw, 58px);
}

.detail-card h2 {
    margin-top: 28px;
    margin-bottom: 10px;
    font-size: 24px;
}

.detail-card p {
    white-space: pre-line;
}

.one-line {
    margin-top: 22px;
    padding-left: 18px;
    border-left: 4px solid var(--amber-500);
    color: var(--gray-800) !important;
    font-size: 18px;
    font-weight: 650;
}

.detail-sidebar {
    display: grid;
    gap: 18px;
    align-content: start;
}

.side-card {
    padding: 22px;
}

.poster-side img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 18px;
}

.poster-side h2 {
    font-size: 24px;
    margin-bottom: 8px;
}

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

.info-list dt {
    color: var(--gray-500);
    font-size: 13px;
    font-weight: 800;
}

.info-list dd {
    margin: 4px 0 0;
    color: var(--gray-900);
    font-weight: 650;
}

.related-section {
    padding-top: 54px;
}

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

.rank-card {
    border-radius: 18px;
}

.rank-card-link {
    display: grid;
    grid-template-columns: 62px 92px 1fr;
    gap: 18px;
    align-items: center;
    padding: 14px;
}

.rank-card img {
    width: 92px;
    height: 122px;
    object-fit: cover;
    border-radius: 14px;
}

.rank-card strong {
    color: var(--gray-900);
    font-size: 19px;
    margin-bottom: 5px;
}

.rank-card em {
    color: var(--gray-500);
}

.rank-card b {
    margin-top: 8px;
    color: var(--gray-600);
    font-weight: 500;
    line-height: 1.6;
}

.empty-state {
    display: none;
    padding: 48px 16px;
    color: var(--gray-500);
    text-align: center;
}

.empty-state.is-visible {
    display: block;
}

.site-footer {
    margin-top: 60px;
    padding: 56px 0 24px;
    color: var(--gray-300);
    background: linear-gradient(180deg, var(--gray-900), #000000);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 0.9fr 1fr;
    gap: 32px;
}

.site-footer p,
.site-footer a,
.footer-bottom {
    color: rgba(255, 255, 255, 0.64);
    line-height: 1.8;
    font-size: 14px;
}

.site-footer a:hover {
    color: #fde68a;
}

.site-footer h3 {
    margin-bottom: 14px;
    color: var(--white);
    font-weight: 800;
}

.site-footer ul {
    display: grid;
    gap: 8px;
}

.footer-logo {
    margin-bottom: 16px;
    color: var(--white) !important;
}

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 32px auto 0;
    padding-top: 22px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

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

    .home-search-card,
    .rank-layout,
    .detail-layout,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .rank-intro {
        position: static;
    }
}

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

    .mobile-menu-button {
        display: flex;
    }

    .hero-slider {
        height: 78vh;
        min-height: 560px;
    }

    .hero-arrow {
        display: none;
    }

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

    .home-search-card,
    .search-panel,
    .category-grid,
    .category-card,
    .category-feature-grid {
        grid-template-columns: 1fr;
    }

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

    .section {
        padding: 50px 0;
    }

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

    .rank-card-link {
        grid-template-columns: 52px 78px 1fr;
    }

    .rank-card img {
        width: 78px;
        height: 104px;
    }

    .mini-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .container,
    .header-inner,
    .mobile-nav {
        width: min(100% - 24px, 1180px);
    }

    .hero-copy h1,
    .page-hero h1,
    .detail-card h1 {
        font-size: 34px;
    }

    .hero-tags span,
    .card-tags span,
    .category-pill-row span,
    .pill-list span,
    .detail-meta span {
        padding: 5px 9px;
    }

    .home-search-card,
    .detail-card,
    .side-card,
    .category-card-body,
    .category-feature-card {
        padding: 20px;
    }

    .movie-info {
        padding: 12px;
    }

    .rank-list a {
        grid-template-columns: 36px 58px 1fr;
        gap: 10px;
    }

    .rank-list img {
        width: 58px;
        height: 78px;
    }
}
