:root {
    color-scheme: dark;
    --bg: #0c0a09;
    --bg-soft: #1c1917;
    --bg-card: #292524;
    --bg-card-strong: #44403c;
    --text: #ffffff;
    --muted: #d6d3d1;
    --soft: #a8a29e;
    --line: rgba(214, 211, 209, 0.14);
    --accent: #f59e0b;
    --accent-light: #fbbf24;
    --accent-dark: #d97706;
    --shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.45);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(12, 10, 9, 0.9);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(16px);
}

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

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.logo-mark {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #1c1917;
    background: linear-gradient(135deg, var(--accent-light), var(--accent-dark));
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.35);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.site-nav a {
    padding: 9px 14px;
    border-radius: 999px;
    color: var(--muted);
    transition: color 0.2s ease, background 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
    color: var(--accent-light);
    background: rgba(251, 191, 36, 0.1);
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--text);
    background: var(--bg-card);
    cursor: pointer;
}

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

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

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

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

.hero-shade,
.detail-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--bg) 0%, rgba(12, 10, 9, 0.72) 44%, rgba(12, 10, 9, 0.12) 100%);
}

.hero-content {
    position: absolute;
    left: 50%;
    bottom: 70px;
    transform: translateX(-50%);
    max-width: 1180px;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
    margin: 14px 0;
    color: var(--text);
    font-size: clamp(36px, 5vw, 62px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.hero-content p,
.page-hero p,
.detail-one-line {
    max-width: 680px;
    margin: 0 0 22px;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.75;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 12px;
    border-radius: 8px;
    color: #1c1917;
    background: var(--accent);
    font-size: 14px;
    font-weight: 800;
}

.hero-meta,
.detail-meta,
.movie-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    color: var(--soft);
}

.hero-meta span:first-child,
.detail-meta span:first-child {
    color: var(--accent-light);
    font-weight: 800;
}

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

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 22px;
    border-radius: 12px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

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

.button-primary {
    color: #1c1917;
    background: var(--accent);
}

.button-primary:hover {
    background: var(--accent-light);
}

.button-ghost {
    color: var(--text);
    border: 1px solid var(--line);
    background: rgba(0, 0, 0, 0.42);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    color: var(--text);
    background: rgba(0, 0, 0, 0.55);
    cursor: pointer;
    transform: translateY(-50%);
    transition: background 0.2s ease, transform 0.2s ease;
}

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

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

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

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

.page-main {
    padding-top: 54px;
}

.page-hero {
    padding: 58px 0 26px;
}

.section-block {
    padding: 42px 0;
}

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

.section-heading h2,
.section-block h2 {
    margin: 0;
    font-size: 28px;
    line-height: 1.2;
}

.section-heading a {
    color: var(--accent-light);
    font-weight: 700;
}

.intro-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
    align-items: center;
    gap: 28px;
}

.intro-search h2 {
    margin: 0 0 12px;
    font-size: 32px;
}

.intro-search p {
    margin: 0;
    color: var(--muted);
    line-height: 1.8;
}

.quick-search,
.filter-bar {
    display: flex;
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(41, 37, 36, 0.9);
}

.quick-search input,
.filter-bar input,
.filter-bar select {
    width: 100%;
    min-height: 44px;
    border: 1px solid transparent;
    border-radius: 12px;
    color: var(--text);
    background: #1c1917;
    outline: none;
    padding: 0 14px;
}

.quick-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
    border-color: rgba(251, 191, 36, 0.65);
}

.quick-search button {
    min-width: 86px;
    border: 0;
    border-radius: 12px;
    color: #1c1917;
    background: var(--accent);
    font-weight: 800;
    cursor: pointer;
}

.filter-bar {
    margin-bottom: 24px;
}

.advanced-filter {
    grid-template-columns: 1fr 180px 160px;
}

.movie-grid {
    display: grid;
    gap: 20px;
}

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    background: var(--bg-card);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

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

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

.movie-cover {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: #1c1917;
}

.movie-card-wide .movie-cover {
    aspect-ratio: 16 / 9;
}

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

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

.movie-cover::after {
    content: "";
    position: absolute;
    inset: 35% 0 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75), transparent);
}

.movie-score {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    padding: 4px 8px;
    border-radius: 999px;
    color: var(--accent-light);
    background: rgba(0, 0, 0, 0.72);
    font-size: 12px;
    font-weight: 800;
}

.movie-info {
    padding: 15px;
}

.movie-info h3 {
    margin: 0 0 8px;
    overflow: hidden;
    color: var(--text);
    font-size: 16px;
    line-height: 1.35;
    white-space: nowrap;
    text-overflow: ellipsis;
    transition: color 0.2s ease;
}

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

.movie-info p {
    display: -webkit-box;
    min-height: 44px;
    margin: 0 0 12px;
    overflow: hidden;
    color: var(--soft);
    font-size: 13px;
    line-height: 1.65;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-meta {
    justify-content: space-between;
    gap: 8px;
    color: var(--soft);
    font-size: 12px;
}

.category-panel,
.accent-panel {
    padding: 32px;
    border-radius: 26px;
    background: linear-gradient(135deg, rgba(28, 25, 23, 0.96), rgba(41, 37, 36, 0.92));
    box-shadow: inset 0 0 0 1px var(--line);
}

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

.category-tile,
.category-card-large {
    display: block;
    min-height: 148px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(12, 10, 9, 0.38);
    transition: transform 0.2s ease, border 0.2s ease, background 0.2s ease;
}

.category-tile:hover,
.category-card-large:hover {
    transform: translateY(-4px);
    border-color: rgba(251, 191, 36, 0.45);
    background: rgba(68, 64, 60, 0.56);
}

.category-tile strong,
.category-card-large h2 {
    display: block;
    margin: 0 0 10px;
    color: var(--text);
    font-size: 20px;
}

.category-tile span,
.category-card-large p {
    display: -webkit-box;
    overflow: hidden;
    color: var(--soft);
    font-size: 13px;
    line-height: 1.7;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

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

.category-card-large {
    min-height: 220px;
}

.category-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.category-card-head span,
.category-preview-links a {
    color: var(--accent-light);
}

.category-preview-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.category-preview-links a {
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(251, 191, 36, 0.08);
    font-size: 13px;
}

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

.compact-rank-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rank-item {
    display: grid;
    grid-template-columns: auto 96px minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(12, 10, 9, 0.45);
}

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

.compact-rank-list .rank-number {
    display: none;
}

.rank-number {
    width: 38px;
    color: var(--accent-light);
    font-size: 24px;
    font-weight: 900;
    text-align: center;
}

.rank-cover {
    overflow: hidden;
    border-radius: 12px;
    aspect-ratio: 3 / 4;
}

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

.rank-content h3 {
    margin: 0 0 8px;
    font-size: 18px;
}

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

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

.detail-hero {
    position: relative;
    overflow: hidden;
    min-height: 620px;
    display: flex;
    align-items: flex-end;
    padding: 120px 0 62px;
    background: #000000;
}

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

.detail-hero-inner {
    position: relative;
    z-index: 2;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 26px;
    color: var(--soft);
    font-size: 14px;
}

.breadcrumb a {
    color: var(--accent-light);
}

.detail-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 34px;
    align-items: end;
}

.detail-poster {
    overflow: hidden;
    border-radius: 20px;
    box-shadow: var(--shadow);
    aspect-ratio: 3 / 4;
}

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

.detail-info h1 {
    max-width: 820px;
}

.detail-meta {
    margin: 0 0 20px;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}

.tag-list span {
    padding: 7px 10px;
    border-radius: 999px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.08);
    font-size: 13px;
}

.player-section h2 {
    margin-bottom: 18px;
}

.player-frame {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: #000000;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

.movie-player {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #000000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: #1c1917;
    background: radial-gradient(circle at center, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.68));
    cursor: pointer;
}

.player-overlay span {
    width: 84px;
    height: 84px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-left: 6px;
    border-radius: 999px;
    background: var(--accent);
    box-shadow: 0 18px 40px rgba(245, 158, 11, 0.35);
    font-size: 36px;
}

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

.detail-text {
    display: grid;
    gap: 14px;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.9;
}

.detail-text h2 {
    color: var(--text);
}

.detail-text p {
    margin: 0;
}

.site-footer {
    margin-top: 44px;
    border-top: 1px solid var(--line);
    background: #0a0807;
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 32px;
    align-items: center;
    padding: 34px 0;
}

.footer-logo {
    margin-bottom: 14px;
}

.site-footer p {
    max-width: 720px;
    margin: 0;
    color: var(--soft);
    line-height: 1.8;
}

.footer-links {
    display: flex;
    gap: 16px;
}

.footer-links a {
    color: var(--muted);
}

.footer-links a:hover {
    color: var(--accent-light);
}

.footer-bottom {
    padding: 18px;
    border-top: 1px solid var(--line);
    color: var(--soft);
    text-align: center;
    font-size: 14px;
}

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

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

@media (max-width: 820px) {
    .mobile-menu-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .site-nav {
        position: absolute;
        top: 72px;
        left: 16px;
        right: 16px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        border: 1px solid var(--line);
        border-radius: 18px;
        background: rgba(12, 10, 9, 0.98);
    }

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

    .site-nav a {
        border-radius: 12px;
    }

    .hero-carousel {
        height: 560px;
    }

    .hero-content {
        bottom: 64px;
    }

    .intro-search,
    .footer-grid,
    .detail-layout,
    .category-page-grid {
        grid-template-columns: 1fr;
    }

    .detail-layout {
        align-items: start;
    }

    .detail-poster {
        width: min(240px, 70vw);
    }

    .featured-grid,
    .compact-rank-list {
        grid-template-columns: 1fr;
    }

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

    .filter-bar,
    .quick-search {
        flex-direction: column;
    }
}

@media (max-width: 560px) {
    .site-container,
    .site-header-inner {
        width: min(100% - 22px, 1180px);
    }

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

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

    .hero-arrow {
        display: none;
    }

    .hero-content h1,
    .page-hero h1,
    .detail-info h1 {
        font-size: 34px;
    }

    .category-panel,
    .accent-panel {
        padding: 18px;
    }

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

    .rank-number {
        display: none;
    }

    .footer-links {
        flex-direction: column;
    }
}
