:root {
    --color-bg: #fffbeb;
    --color-surface: #ffffff;
    --color-ink: #111827;
    --color-muted: #6b7280;
    --color-soft: #f9fafb;
    --color-line: #e5e7eb;
    --color-accent: #b45309;
    --color-accent-dark: #92400e;
    --color-accent-soft: #fef3c7;
    --shadow-soft: 0 10px 28px rgba(15, 23, 42, 0.08);
    --shadow-hover: 0 18px 48px rgba(15, 23, 42, 0.16);
    --radius: 18px;
    --max-width: 1200px;
}

* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--color-ink);
    background: linear-gradient(180deg, var(--color-bg) 0%, #ffffff 52%, #ffffff 100%);
    line-height: 1.65;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(229, 231, 235, 0.92);
    backdrop-filter: blur(10px);
}

.header-inner {
    width: min(100%, var(--max-width));
    min-height: 72px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 22px;
}

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

.brand {
    font-size: 1.18rem;
    flex-shrink: 0;
}

.brand-mark {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, #d97706, #92400e);
    box-shadow: 0 10px 24px rgba(180, 83, 9, 0.28);
}

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

.desktop-nav a,
.mobile-nav a {
    color: #374151;
    font-weight: 650;
    transition: color 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
    color: var(--color-accent);
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.header-search input,
.mobile-nav input,
.filter-bar input,
.filter-bar select,
.search-box input {
    border: 1px solid #d1d5db;
    border-radius: 12px;
    padding: 10px 13px;
    background: #ffffff;
    color: #111827;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
    width: 190px;
}

.header-search input:focus,
.mobile-nav input:focus,
.filter-bar input:focus,
.filter-bar select:focus,
.search-box input:focus {
    border-color: #d97706;
    box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.14);
}

.header-search button,
.mobile-nav button,
.search-box button,
.btn-primary,
.btn-ghost {
    border: 0;
    border-radius: 12px;
    padding: 10px 16px;
    cursor: pointer;
    font-weight: 750;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.header-search button,
.mobile-nav button,
.search-box button,
.btn-primary {
    color: #ffffff;
    background: var(--color-accent);
}

.header-search button:hover,
.mobile-nav button:hover,
.search-box button:hover,
.btn-primary:hover {
    background: var(--color-accent-dark);
    transform: translateY(-1px);
}

.btn-ghost {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.34);
    backdrop-filter: blur(6px);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.28);
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: #f3f4f6;
    padding: 10px;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    margin: 5px 0;
    background: #374151;
}

.mobile-nav {
    display: none;
    padding: 12px 20px 20px;
    border-top: 1px solid var(--color-line);
    background: #ffffff;
}

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

.mobile-nav form {
    display: flex;
    gap: 8px;
}

.mobile-nav input {
    flex: 1;
}

.hero {
    position: relative;
    min-height: 70vh;
    overflow: hidden;
    background: #111827;
}

.hero-slides {
    position: absolute;
    inset: 0;
}

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-layer {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 78% 18%, rgba(217, 119, 6, 0.34), transparent 32%),
        linear-gradient(90deg, rgba(0, 0, 0, 0.86) 0%, rgba(0, 0, 0, 0.62) 44%, rgba(0, 0, 0, 0.06) 100%),
        linear-gradient(0deg, rgba(17, 24, 39, 0.78), transparent 44%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(100%, var(--max-width));
    min-height: 70vh;
    margin: 0 auto;
    padding: 92px 20px 72px;
    display: flex;
    align-items: center;
}

.hero-copy {
    width: min(680px, 100%);
    color: #ffffff;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 750;
    color: #ffffff;
    background: rgba(180, 83, 9, 0.92);
    box-shadow: 0 12px 30px rgba(180, 83, 9, 0.28);
}

.hero h1,
.hero h2 {
    margin: 18px 0 14px;
    font-size: clamp(2.55rem, 6vw, 5.35rem);
    line-height: 1.04;
    letter-spacing: -0.06em;
}

.hero p {
    max-width: 650px;
    margin: 0;
    color: #e5e7eb;
    font-size: clamp(1rem, 2vw, 1.28rem);
}

.hero-facts,
.detail-facts {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin: 24px 0;
}

.hero-facts span,
.detail-facts span,
.movie-meta span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
}

.hero-facts span {
    padding: 6px 10px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

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

.hero-dots button {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.46);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

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

.main {
    width: min(100%, var(--max-width));
    margin: 0 auto;
    padding: 48px 20px 64px;
}

.section {
    margin-top: 54px;
}

.section:first-child {
    margin-top: 0;
}

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

.section-title h2,
.page-title h1 {
    margin: 0;
    font-size: clamp(1.75rem, 4vw, 2.7rem);
    line-height: 1.16;
    letter-spacing: -0.04em;
}

.section-title p,
.page-title p {
    margin: 8px 0 0;
    max-width: 760px;
    color: var(--color-muted);
}

.text-link {
    color: var(--color-accent);
    font-weight: 800;
    white-space: nowrap;
}

.text-link:hover {
    color: var(--color-accent-dark);
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--color-surface);
    box-shadow: var(--shadow-soft);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #111827;
}

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    opacity: 0;
    background: linear-gradient(180deg, transparent 20%, rgba(0, 0, 0, 0.78) 100%);
    transition: opacity 0.25s ease;
}

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

.play-mark {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 56px;
    height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(180, 83, 9, 0.92);
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.25s ease;
}

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

.year-badge,
.rank-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 5px 9px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 800;
    background: rgba(0, 0, 0, 0.58);
    backdrop-filter: blur(6px);
}

.rank-badge {
    left: 12px;
    right: auto;
    background: rgba(180, 83, 9, 0.92);
}

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

.movie-card h3 {
    margin: 0 0 8px;
    font-size: 1rem;
    line-height: 1.35;
}

.movie-card h3 a:hover {
    color: var(--color-accent);
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 9px;
}

.movie-meta span {
    padding: 4px 8px;
    color: var(--color-accent);
    font-size: 0.78rem;
    font-weight: 700;
    background: #fffbeb;
}

.movie-card p {
    display: -webkit-box;
    min-height: 3.1em;
    margin: 0;
    overflow: hidden;
    color: var(--color-muted);
    font-size: 0.9rem;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 190px;
    padding: 22px;
    border-radius: var(--radius);
    color: #ffffff;
    background: linear-gradient(135deg, #d97706, #78350f);
    box-shadow: var(--shadow-soft);
}

.category-card:nth-child(2n) {
    background: linear-gradient(135deg, #111827, #92400e);
}

.category-card h2,
.category-card h3 {
    margin: 0 0 8px;
    font-size: 1.35rem;
}

.category-card p {
    margin: 0 0 18px;
    color: rgba(255, 255, 255, 0.82);
}

.category-card a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
}

.filter-panel,
.search-panel,
.page-title,
.detail-body,
.related-panel {
    border: 1px solid rgba(229, 231, 235, 0.86);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: var(--shadow-soft);
}

.filter-panel,
.search-panel {
    padding: 22px;
    margin-bottom: 26px;
}

.filter-bar,
.search-box {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.filter-bar input,
.search-box input {
    flex: 1 1 260px;
}

.filter-bar select {
    min-width: 160px;
}

.page-title {
    padding: 32px;
    margin-bottom: 28px;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 82px 52px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--color-line);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-row:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

.rank-cover {
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 12px;
    background: #111827;
}

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

.rank-number b {
    display: inline-flex;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, #d97706, #92400e);
}

.rank-info h3 {
    margin: 0 0 4px;
    font-size: 1.08rem;
}

.rank-info p {
    margin: 0 0 8px;
    color: var(--color-muted);
}

.detail-hero {
    background: #111827;
}

.player-wrap {
    width: min(100%, var(--max-width));
    margin: 0 auto;
    padding: 34px 20px 42px;
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.75fr);
    gap: 28px;
    align-items: center;
}

.video-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 24px;
    background: #030712;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

.video-shell video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000000;
}

.video-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at center, rgba(180, 83, 9, 0.22), transparent 30%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.78));
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.video-shell.is-playing .video-overlay {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.video-start {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    border: 0;
    border-radius: 999px;
    padding: 16px 22px;
    color: #ffffff;
    background: rgba(180, 83, 9, 0.96);
    cursor: pointer;
    font-weight: 850;
    box-shadow: 0 18px 42px rgba(180, 83, 9, 0.36);
}

.video-start span:first-child {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
}

.detail-copy {
    color: #ffffff;
}

.detail-copy h1 {
    margin: 16px 0 14px;
    font-size: clamp(2rem, 4vw, 3.6rem);
    line-height: 1.08;
    letter-spacing: -0.05em;
}

.detail-copy p {
    margin: 0;
    color: #d1d5db;
}

.detail-facts span {
    padding: 6px 10px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
}

.detail-body {
    padding: 30px;
}

.detail-body h2 {
    margin: 26px 0 10px;
    font-size: 1.5rem;
}

.detail-body h2:first-child {
    margin-top: 0;
}

.detail-body p {
    margin: 0 0 14px;
    color: #374151;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.tag-cloud span {
    display: inline-flex;
    padding: 7px 11px;
    border-radius: 999px;
    color: var(--color-accent);
    background: #fffbeb;
    font-weight: 750;
}

.related-panel {
    padding: 26px;
}

.no-results {
    display: none;
    padding: 30px;
    border-radius: 18px;
    color: var(--color-muted);
    background: #ffffff;
    text-align: center;
}

.no-results.is-visible {
    display: block;
}

.site-footer {
    color: #d1d5db;
    background: #111827;
}

.footer-inner {
    width: min(100%, var(--max-width));
    margin: 0 auto;
    padding: 42px 20px;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1.4fr;
    gap: 26px;
}

.footer-brand {
    margin-bottom: 8px;
    color: #ffffff;
    font-size: 1.18rem;
}

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

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    align-content: start;
}

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

.footer-bottom {
    padding: 16px 20px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #9ca3af;
    text-align: center;
}

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

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

    .desktop-nav,
    .header-search {
        display: none;
    }

    .menu-toggle {
        display: block;
        margin-left: auto;
    }
}

@media (max-width: 820px) {
    .hero,
    .hero-content {
        min-height: 640px;
    }

    .player-wrap {
        grid-template-columns: 1fr;
    }

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

    .rank-row {
        grid-template-columns: 72px minmax(0, 1fr);
    }

    .rank-number,
    .rank-row .text-link {
        display: none;
    }

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

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

    .hero h1,
    .hero h2 {
        font-size: 2.55rem;
    }

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

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

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

    .page-title,
    .detail-body,
    .related-panel,
    .filter-panel,
    .search-panel {
        padding: 20px;
        border-radius: 18px;
    }

    .player-wrap {
        padding-top: 20px;
    }

    .detail-copy h1 {
        font-size: 2.2rem;
    }
}
