:root {
    --bg: #f8fafc;
    --text: #111827;
    --muted: #6b7280;
    --soft: #fef3c7;
    --amber: #d97706;
    --amber-dark: #b45309;
    --orange: #ea580c;
    --line: #e5e7eb;
    --card: #ffffff;
    --dark: #111827;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.10);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
    font: inherit;
}

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

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

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

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

.brand-mark {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(217, 119, 6, 0.28);
}

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

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

.nav-link {
    position: relative;
    padding: 9px 14px;
    color: #4b5563;
    font-weight: 700;
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--amber-dark);
    background: #fff7ed;
}

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

.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: var(--amber-dark);
}

.hero {
    position: relative;
    min-height: 72vh;
    overflow: hidden;
    background: linear-gradient(135deg, #fef3c7, #fff7ed 48%, #ffedd5);
}

.hero-stage {
    position: relative;
    min-height: 72vh;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transform: scale(1.02);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.hero-slide.active {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

.hero-slide > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.06);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(17, 24, 39, 0.92) 0%, rgba(17, 24, 39, 0.72) 38%, rgba(17, 24, 39, 0.16) 100%),
        radial-gradient(circle at 20% 30%, rgba(245, 158, 11, 0.45), transparent 28%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    color: #ffffff;
    padding: 96px 0 168px;
}

.hero-kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--amber);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.hero-content h1 {
    max-width: 820px;
    margin: 16px 0;
    font-size: clamp(42px, 7vw, 82px);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero-content p {
    max-width: 680px;
    margin: 0 0 28px;
    color: rgba(255, 255, 255, 0.82);
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.8;
}

.hero-actions,
.detail-actions,
.pager-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 16px 28px rgba(217, 119, 6, 0.32);
}

.btn-ghost {
    color: var(--amber-dark);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 12px 24px rgba(17, 24, 39, 0.12);
}

.btn-ghost.dark {
    color: #111827;
    border: 1px solid var(--line);
}

.hero-thumbs {
    position: absolute;
    left: 50%;
    bottom: 28px;
    z-index: 3;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    transform: translateX(-50%);
}

.hero-thumb {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 18px;
    color: #ffffff;
    background: rgba(17, 24, 39, 0.42);
    backdrop-filter: blur(14px);
    cursor: pointer;
    opacity: 0.76;
}

.hero-thumb.active,
.hero-thumb:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.18);
}

.hero-thumb img {
    width: 44px;
    height: 58px;
    object-fit: cover;
    border-radius: 12px;
}

.hero-thumb span {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-weight: 700;
}

.stats-strip {
    background: #ffffff;
    border-bottom: 1px solid var(--line);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    padding: 26px 0;
}

.stats-grid div {
    padding: 18px 20px;
    border-radius: var(--radius);
    background: #fffbeb;
}

.stats-grid strong {
    display: block;
    color: var(--amber-dark);
    font-size: 32px;
    line-height: 1;
}

.stats-grid span {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-weight: 700;
}

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

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

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

.section-heading h2 {
    margin: 8px 0 8px;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.section-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 17px;
}

.section-link,
.watch-link {
    display: inline-flex;
    color: var(--amber-dark);
    font-weight: 800;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(229, 231, 235, 0.88);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #f59e0b, #111827);
}

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

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

.poster-shade {
    position: absolute;
    inset: auto 0 0;
    height: 42%;
    background: linear-gradient(180deg, transparent, rgba(17, 24, 39, 0.88));
}

.poster-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 10px;
    color: #ffffff;
    background: rgba(17, 24, 39, 0.72);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(8px);
}

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

.movie-meta-line,
.rank-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.movie-card h3 {
    margin: 10px 0 8px;
    font-size: 20px;
    line-height: 1.25;
}

.movie-card p {
    min-height: 52px;
    margin: 0 0 12px;
    color: var(--muted);
    line-height: 1.65;
}

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

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

.movie-card-compact p {
    min-height: 44px;
    font-size: 14px;
}

.tag-row,
.tag-cloud div,
.quick-tags,
.year-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-row span,
.tag-cloud a,
.quick-tags a,
.year-filters button {
    padding: 5px 9px;
    border-radius: 999px;
    color: #92400e;
    background: #fffbeb;
    font-size: 12px;
    font-weight: 800;
}

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

.category-card {
    position: relative;
    min-height: 210px;
    overflow: hidden;
    border-radius: var(--radius);
    color: #ffffff;
    background: #111827;
    box-shadow: var(--shadow);
}

.category-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.category-card-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent, rgba(17, 24, 39, 0.9));
}

.category-card strong,
.category-card small {
    position: absolute;
    left: 18px;
    right: 18px;
}

.category-card strong {
    bottom: 42px;
    font-size: 22px;
}

.category-card small {
    bottom: 20px;
    color: rgba(255, 255, 255, 0.78);
    font-weight: 700;
}

.two-column {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 32px;
    align-items: start;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr) 82px;
    gap: 16px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

.rank-cover {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    aspect-ratio: 2 / 3;
}

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

.rank-cover span {
    position: absolute;
    left: 8px;
    top: 8px;
    padding: 3px 7px;
    color: #ffffff;
    background: var(--amber);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.rank-title {
    display: inline-block;
    margin-bottom: 6px;
    font-size: 18px;
    font-weight: 900;
}

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

.rank-score {
    text-align: center;
    color: var(--amber-dark);
}

.rank-score strong {
    display: block;
    font-size: 30px;
    line-height: 1;
}

.rank-score span {
    font-size: 12px;
    font-weight: 800;
}

.large-rank-list .rank-item {
    grid-template-columns: 110px minmax(0, 1fr) 100px;
}

.home-search-panel,
.filter-panel,
.detail-text-card,
.info-table,
.tag-cloud,
.category-overview-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

.home-search-panel {
    position: sticky;
    top: 92px;
    padding: 28px;
}

.home-search-panel h2 {
    margin: 0 0 10px;
    font-size: 28px;
}

.home-search-panel p {
    margin: 0 0 18px;
    color: var(--muted);
    line-height: 1.7;
}

.quick-search {
    display: grid;
    gap: 12px;
}

.quick-search input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    outline: 0;
    background: #ffffff;
}

.quick-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--amber);
    box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.12);
}

.quick-tags {
    margin-top: 18px;
}

.page-hero {
    padding: 82px 0;
    color: #ffffff;
    background:
        radial-gradient(circle at 18% 10%, rgba(245, 158, 11, 0.42), transparent 30%),
        linear-gradient(135deg, #111827, #78350f 55%, #111827);
}

.page-hero h1 {
    max-width: 820px;
    margin: 12px 0;
    font-size: clamp(42px, 6vw, 68px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

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

.category-overview-grid {
    display: grid;
    gap: 22px;
}

.category-overview-card {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 24px;
    padding: 18px;
}

.category-overview-cover {
    overflow: hidden;
    border-radius: 18px;
    aspect-ratio: 16 / 11;
}

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

.category-overview-card h2 {
    margin: 6px 0 8px;
    font-size: 30px;
}

.category-overview-card p {
    margin: 0 0 12px;
    color: var(--muted);
}

.category-overview-card ul {
    display: grid;
    gap: 6px;
    margin: 0 0 14px;
    padding: 0;
    list-style: none;
}

.category-overview-card li {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    color: #374151;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto;
    gap: 14px;
    align-items: center;
    margin-bottom: 28px;
    padding: 16px;
}

.search-panel {
    grid-template-columns: minmax(220px, 1fr) 190px 190px auto;
}

.year-filters button {
    border: 0;
    cursor: pointer;
}

.year-filters button.active {
    color: #ffffff;
    background: var(--amber);
}

.filter-count {
    color: var(--muted);
    font-weight: 800;
}

.detail-hero {
    position: relative;
    min-height: 560px;
    overflow: hidden;
    color: #ffffff;
    background: #111827;
}

.detail-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(22px) saturate(1.15);
    transform: scale(1.08);
    opacity: 0.48;
}

.detail-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(17, 24, 39, 0.96), rgba(17, 24, 39, 0.68));
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 36px;
    align-items: center;
    padding: 78px 0;
}

.detail-poster {
    overflow: hidden;
    border: 6px solid rgba(255, 255, 255, 0.16);
    border-radius: 28px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.detail-info h1 {
    margin: 14px 0;
    font-size: clamp(40px, 6vw, 74px);
    line-height: 1.02;
    letter-spacing: -0.055em;
}

.detail-info p {
    max-width: 820px;
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 19px;
    line-height: 1.8;
}

.detail-meta span {
    color: rgba(255, 255, 255, 0.84);
    background: rgba(255, 255, 255, 0.12);
    padding: 7px 11px;
    border-radius: 999px;
}

.player-section {
    padding-top: 46px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000000;
    box-shadow: 0 30px 90px rgba(15, 23, 42, 0.22);
    aspect-ratio: 16 / 9;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 8px;
    border: 0;
    color: #ffffff;
    background: rgba(17, 24, 39, 0.48);
    cursor: pointer;
    transition: opacity 0.25s ease;
}

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

.play-icon {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 18px 36px rgba(217, 119, 6, 0.38);
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.detail-text-card {
    padding: 28px;
}

.detail-text-card h2,
.info-table h2,
.tag-cloud h2 {
    margin: 8px 0 14px;
    font-size: 28px;
}

.detail-text-card p {
    margin: 0;
    color: #374151;
    font-size: 17px;
    line-height: 1.9;
}

.detail-extra-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 24px;
}

.info-table,
.tag-cloud {
    padding: 26px;
}

.info-table dl {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 12px 18px;
    margin: 0;
}

.info-table dt {
    color: var(--muted);
    font-weight: 800;
}

.info-table dd {
    margin: 0;
    color: #111827;
}

.pager-row {
    justify-content: center;
    margin-top: 30px;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.7fr 1.1fr;
    gap: 34px;
    padding: 54px 0 34px;
}

.footer-brand {
    margin-bottom: 12px;
    color: #ffffff;
    font-size: 22px;
}

.site-footer p {
    max-width: 420px;
    color: #9ca3af;
    line-height: 1.8;
}

.site-footer h3 {
    margin: 0 0 14px;
    color: #ffffff;
}

.site-footer a {
    display: block;
    margin: 8px 0;
    color: #d1d5db;
}

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

.footer-categories {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 14px;
}

.footer-categories span {
    color: #fbbf24;
}

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

.is-hidden {
    display: none !important;
}

@media (max-width: 1060px) {
    .movie-grid,
    .compact-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

    .two-column,
    .detail-extra-grid {
        grid-template-columns: 1fr;
    }

    .home-search-panel {
        position: static;
    }

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

@media (max-width: 760px) {
    .menu-toggle {
        display: block;
    }

    .main-nav {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 74px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        border: 1px solid var(--line);
        border-radius: 20px;
        background: #ffffff;
        box-shadow: var(--shadow);
    }

    .main-nav.open {
        display: flex;
    }

    .hero,
    .hero-stage {
        min-height: 760px;
    }

    .hero-content {
        padding: 78px 0 300px;
    }

    .hero-thumbs {
        grid-template-columns: 1fr;
        bottom: 20px;
    }

    .stats-grid,
    .movie-grid,
    .compact-grid,
    .category-grid,
    .footer-grid,
    .detail-grid,
    .detail-hero-inner,
    .category-overview-card {
        grid-template-columns: 1fr;
    }

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

    .rank-score {
        grid-column: 1 / -1;
        text-align: left;
    }

    .detail-hero-inner {
        gap: 24px;
    }

    .detail-poster {
        width: min(260px, 72vw);
    }

    .section-heading {
        display: block;
    }
}
