:root {
    --amber: #f59e0b;
    --orange: #f97316;
    --yellow: #facc15;
    --red: #ef4444;
    --pink: #ec4899;
    --teal: #14b8a6;
    --cyan: #06b6d4;
    --green: #10b981;
    --slate: #0f172a;
    --slate-soft: #1e293b;
    --text: #1f2937;
    --muted: #6b7280;
    --paper: #ffffff;
    --line: rgba(15, 23, 42, 0.10);
    --shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
    --radius-lg: 28px;
    --radius-md: 18px;
    --radius-sm: 12px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    color: var(--text);
    background: linear-gradient(135deg, #fff7ed 0%, #fffbeb 52%, #fef3c7 100%);
}

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

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

img.image-off {
    opacity: 0;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, var(--amber), var(--orange), #d97706);
    box-shadow: 0 10px 30px rgba(180, 83, 9, 0.28);
}

.header-inner {
    max-width: 1280px;
    height: 66px;
    margin: 0 auto;
    padding: 0 22px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.brand-icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
    transition: transform 0.25s ease;
}

.brand:hover .brand-icon {
    transform: scale(1.08);
}

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

.desktop-nav a,
.mobile-nav a {
    color: #fff;
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active {
    color: #fffbeb;
}

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

.nav-search input {
    width: 190px;
    border: 0;
    outline: 0;
    border-radius: 999px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--text);
}

.nav-search button,
.primary-btn,
.filter-controls button {
    border: 0;
    border-radius: 999px;
    padding: 10px 18px;
    background: #111827;
    color: #fff;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.nav-search button:hover,
.primary-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(17, 24, 39, 0.22);
}

.nav-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 30px;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    padding: 14px 22px 22px;
    background: #d97706;
    border-top: 1px solid rgba(255, 255, 255, 0.25);
}

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

.mobile-nav a {
    padding: 10px 12px;
    border-radius: 10px;
}

.mobile-nav a:hover {
    background: rgba(255, 255, 255, 0.12);
}

.mobile-nav form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
}

.mobile-nav input {
    border: 0;
    border-radius: 10px;
    padding: 10px 12px;
}

.mobile-nav button {
    border: 0;
    border-radius: 10px;
    padding: 10px 14px;
    background: #111827;
    color: #fff;
    font-weight: 700;
}

.hero-carousel {
    position: relative;
    height: 600px;
    overflow: hidden;
    background: #111827;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 900ms ease;
}

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 6s ease;
    background: radial-gradient(circle at 20% 20%, #f59e0b, #111827 58%);
}

.hero-slide.is-active img {
    transform: scale(1.04);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.48) 44%, rgba(0, 0, 0, 0.16)), linear-gradient(0deg, rgba(0, 0, 0, 0.78), transparent 44%);
}

.hero-content {
    position: absolute;
    left: max(24px, calc((100vw - 1240px) / 2));
    right: 24px;
    bottom: 76px;
    max-width: 760px;
    color: #fff;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-bottom: 14px;
    padding: 7px 12px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.92), rgba(249, 115, 22, 0.92));
    color: #fff;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.hero-content h1 {
    margin: 0 0 16px;
    font-size: clamp(40px, 7vw, 76px);
    line-height: 1.02;
    letter-spacing: -0.04em;
}

.hero-content p {
    max-width: 690px;
    margin: 0 0 18px;
    color: #e5e7eb;
    font-size: 19px;
    line-height: 1.75;
}

.hero-meta,
.detail-meta,
.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.hero-meta span,
.detail-meta span {
    border-radius: 999px;
    padding: 7px 12px;
    background: rgba(255, 255, 255, 0.16);
    color: #f9fafb;
    font-size: 14px;
}

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

.primary-btn {
    background: linear-gradient(90deg, var(--amber), var(--orange));
}

.ghost-btn {
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 999px;
    padding: 10px 18px;
    color: #fff;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.36);
    color: #fff;
    font-size: 38px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(0, 0, 0, 0.58);
    transform: translateY(-50%) scale(1.04);
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

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

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

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

.main-wrap,
.detail-wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 64px 22px;
}

.section-block {
    margin-bottom: 78px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
}

.section-title h2 {
    margin: 0;
    color: #1f2937;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.1;
}

.section-line {
    flex: 1;
    height: 4px;
    border-radius: 99px;
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.35), transparent);
}

.section-icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #fff;
    font-weight: 900;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.14);
}

.section-icon.amber {
    background: linear-gradient(90deg, var(--amber), var(--orange));
}

.section-icon.red {
    background: linear-gradient(90deg, var(--red), var(--pink));
}

.section-icon.cyan {
    background: linear-gradient(90deg, var(--teal), var(--cyan));
}

.section-icon.green {
    background: linear-gradient(90deg, var(--green), #22c55e);
}

.section-more {
    margin-left: auto;
    color: #fbbf24;
    font-weight: 800;
}

.surface-card {
    border-radius: var(--radius-lg);
    padding: 32px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: var(--shadow);
}

.dark-section {
    border-radius: var(--radius-lg);
    padding: 34px;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    box-shadow: var(--shadow);
}

.dark-section .section-title h2 {
    color: #fff;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius-md);
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
    transform: translateY(0);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 22px 44px rgba(15, 23, 42, 0.20);
}

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

.card-cover {
    position: relative;
    height: 224px;
    overflow: hidden;
    background: linear-gradient(135deg, #fed7aa, #f59e0b, #0f172a);
}

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

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

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

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

.card-type {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    padding: 5px 9px;
    border-radius: 8px;
    background: var(--amber);
    color: #fff;
    font-size: 12px;
    font-weight: 900;
}

.card-play {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 3;
    width: 54px;
    height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--amber);
    color: #fff;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.74);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.card-body {
    padding: 18px;
}

.card-body h3 {
    margin: 0 0 8px;
    color: #111827;
    font-size: 18px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.card-meta {
    justify-content: space-between;
    color: #6b7280;
    font-size: 12px;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 12px;
}

.tag {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 9px;
    background: #f3f4f6;
    color: #4b5563;
    font-size: 12px;
    font-weight: 700;
}

.hero-tags .tag {
    background: rgba(245, 158, 11, 0.92);
    color: #fff;
}

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

.category-tile,
.category-overview-card {
    display: block;
    overflow: hidden;
    border-radius: var(--radius-md);
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover,
.category-overview-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18);
}

.category-covers {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    height: 160px;
    background: linear-gradient(135deg, #fef3c7, #fb923c);
}

.category-covers.large {
    height: 210px;
}

.category-covers img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-tile h3,
.category-overview-card h2 {
    margin: 18px 18px 8px;
    color: #111827;
}

.category-tile p,
.category-overview-card p {
    margin: 0 18px 20px;
    color: var(--muted);
    line-height: 1.7;
}

.category-card-head {
    display: block;
}

.category-card-head .eyebrow {
    margin: 18px 18px 0;
}

.compact-grid {
    display: grid;
    gap: 10px;
    padding: 0 18px 18px;
}

.compact-card {
    display: grid;
    grid-template-columns: 54px 1fr;
    column-gap: 12px;
    align-items: center;
    padding: 8px;
    border-radius: 12px;
    background: #f9fafb;
}

.compact-card img {
    grid-row: span 2;
    width: 54px;
    height: 68px;
    border-radius: 10px;
    object-fit: cover;
    background: #f59e0b;
}

.compact-title {
    color: #111827;
    font-weight: 900;
}

.compact-meta {
    color: var(--muted);
    font-size: 12px;
}

.page-hero {
    min-height: 320px;
    display: flex;
    align-items: center;
    background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.42), transparent 28%), linear-gradient(135deg, #111827, #1f2937 58%, #f97316);
    color: #fff;
}

.page-hero > div {
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    padding: 70px 22px;
}

.page-hero h1 {
    margin: 0 0 16px;
    font-size: clamp(40px, 7vw, 68px);
    line-height: 1.08;
}

.page-hero p {
    max-width: 800px;
    margin: 0;
    color: #e5e7eb;
    font-size: 18px;
    line-height: 1.8;
}

.filter-panel {
    margin-bottom: 32px;
    border-radius: var(--radius-lg);
    padding: 26px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.10);
}

.filter-heading h2 {
    margin: 0 0 8px;
    font-size: 28px;
}

.filter-heading p {
    margin: 0 0 20px;
    color: var(--muted);
}

.filter-controls {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 12px;
}

.filter-controls input,
.filter-controls select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px 14px;
    background: #fff;
    color: var(--text);
    outline: 0;
}

.empty-state {
    margin: 18px 0 0;
    padding: 18px;
    border-radius: 14px;
    background: #fffbeb;
    color: #92400e;
    font-weight: 800;
}

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

.rank-row {
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.10);
    overflow: hidden;
}

.dark-section .rank-row {
    background: rgba(255, 255, 255, 0.08);
    box-shadow: none;
}

.rank-link {
    display: grid;
    grid-template-columns: 54px 74px 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
}

.rank-number {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(90deg, var(--amber), var(--orange));
    color: #fff;
    font-weight: 900;
}

.rank-link img {
    width: 74px;
    height: 92px;
    border-radius: 12px;
    object-fit: cover;
    background: #f59e0b;
}

.rank-main strong,
.rank-main em {
    display: block;
}

.rank-main strong {
    color: #111827;
    font-size: 18px;
    margin-bottom: 6px;
}

.dark-section .rank-main strong,
.dark-section .rank-extra {
    color: #fff;
}

.rank-main em {
    color: var(--muted);
    font-style: normal;
    line-height: 1.6;
}

.dark-section .rank-main em {
    color: #d1d5db;
}

.rank-extra {
    color: #6b7280;
    font-weight: 800;
    white-space: nowrap;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 24px;
    color: #6b7280;
    font-size: 14px;
}

.breadcrumb a {
    color: #d97706;
    font-weight: 800;
}

.detail-wrap {
    padding-top: 32px;
}

.detail-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.85fr);
    gap: 28px;
    align-items: stretch;
    margin-bottom: 34px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    min-height: 440px;
    border-radius: var(--radius-lg);
    background: #000;
    box-shadow: var(--shadow);
}

.player-shell video {
    width: 100%;
    height: 100%;
    min-height: 440px;
    object-fit: contain;
    background: #000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.24), rgba(0, 0, 0, 0.72));
    color: #fff;
    cursor: pointer;
    transition: opacity 0.22s ease;
}

.play-overlay span {
    width: 86px;
    height: 86px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(90deg, var(--amber), var(--orange));
    font-size: 38px;
    box-shadow: 0 18px 38px rgba(245, 158, 11, 0.35);
}

.play-overlay strong {
    font-size: 18px;
}

.player-shell.is-playing .play-overlay {
    opacity: 0;
    pointer-events: none;
}

.detail-info-card {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 20px;
    align-content: start;
    border-radius: var(--radius-lg);
    padding: 24px;
    background: #fff;
    box-shadow: var(--shadow);
}

.detail-info-card img {
    width: 150px;
    height: 220px;
    border-radius: 18px;
    object-fit: cover;
    background: #f59e0b;
}

.detail-info-card h1 {
    margin: 0 0 12px;
    color: #111827;
    font-size: 34px;
    line-height: 1.18;
}

.detail-info-card p {
    margin: 0 0 18px;
    color: var(--muted);
    line-height: 1.7;
}

.detail-meta span {
    background: #f3f4f6;
    color: #4b5563;
}

.detail-content {
    margin-bottom: 58px;
}

.detail-content h2 {
    margin: 8px 0 16px;
    color: #111827;
    font-size: 30px;
}

.detail-content p {
    color: #374151;
    font-size: 17px;
    line-height: 2;
}

.site-footer {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    color: #d1d5db;
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 48px 22px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 32px;
}

.footer-inner h2,
.footer-inner h3 {
    margin: 0 0 14px;
    color: #fff;
}

.footer-inner p {
    margin: 0;
    color: #9ca3af;
    line-height: 1.8;
}

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

.footer-inner a {
    color: #cbd5e1;
}

.footer-inner a:hover {
    color: #fbbf24;
}

[hidden] {
    display: none !important;
}

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

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

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

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

    .nav-toggle {
        display: block;
    }

    .brand {
        font-size: 20px;
    }

    .hero-carousel {
        height: 560px;
    }

    .hero-content {
        left: 22px;
        bottom: 64px;
    }

    .hero-arrow {
        display: none;
    }

    .main-wrap,
    .detail-wrap {
        padding: 42px 16px;
    }

    .surface-card,
    .dark-section,
    .filter-panel {
        padding: 22px;
    }

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

    .filter-controls {
        grid-template-columns: 1fr;
    }

    .rank-link {
        grid-template-columns: 42px 62px 1fr;
    }

    .rank-extra {
        display: none;
    }

    .detail-info-card {
        grid-template-columns: 110px 1fr;
    }

    .detail-info-card img {
        width: 110px;
        height: 158px;
    }

    .detail-info-card h1 {
        font-size: 26px;
    }

    .player-shell,
    .player-shell video {
        min-height: 260px;
    }

    .footer-inner {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .header-inner {
        height: 60px;
        padding: 0 14px;
    }

    .brand-icon {
        width: 30px;
        height: 30px;
    }

    .hero-carousel {
        height: 520px;
    }

    .hero-content h1 {
        font-size: 40px;
    }

    .hero-content p {
        font-size: 16px;
    }

    .hero-actions {
        flex-wrap: wrap;
    }

    .section-title {
        align-items: flex-start;
    }

    .section-title h2 {
        font-size: 28px;
    }

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

    .card-cover {
        height: 248px;
    }

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

    .detail-info-card img {
        width: 150px;
        height: 220px;
    }
}
