:root {
    color-scheme: dark;
    --bg: #0f172a;
    --bg-deep: #020617;
    --panel: rgba(15, 23, 42, 0.86);
    --panel-strong: #111827;
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --accent: #fbbf24;
    --accent-soft: rgba(251, 191, 36, 0.18);
    --danger: #f97316;
    --radius: 18px;
    --shadow: 0 26px 70px rgba(2, 6, 23, 0.42);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(251, 191, 36, 0.12), transparent 34rem),
        radial-gradient(circle at 80% 0%, rgba(59, 130, 246, 0.14), transparent 30rem),
        var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

main {
    min-height: 70vh;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.82);
    backdrop-filter: blur(18px);
}

.header-inner {
    width: min(1240px, calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

.brand-icon {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent), #f97316);
    color: #111827;
    font-weight: 900;
    box-shadow: 0 14px 34px rgba(251, 191, 36, 0.28);
}

.brand-name {
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

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

.nav-link {
    color: var(--muted-strong);
    font-size: 14px;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--accent);
}

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

.header-search input,
.mobile-search input,
.filter-panel input,
.filter-panel select {
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: rgba(15, 23, 42, 0.86);
    color: var(--text);
    border-radius: 12px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search input {
    width: 210px;
    padding: 10px 12px;
}

.header-search button,
.mobile-search button {
    border: 0;
    border-radius: 12px;
    padding: 10px 14px;
    background: var(--accent);
    color: #111827;
    font-weight: 800;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
    border-color: rgba(251, 191, 36, 0.72);
    box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.12);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.9);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    border-radius: 99px;
    background: var(--text);
}

.mobile-panel {
    display: none;
    border-top: 1px solid var(--line);
    padding: 16px;
    background: rgba(2, 6, 23, 0.96);
}

.mobile-panel.is-open {
    display: block;
}

.mobile-nav {
    display: grid;
    gap: 12px;
    margin-bottom: 16px;
}

.mobile-search input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 10px 12px;
}

.hero {
    position: relative;
    height: 590px;
    overflow: hidden;
    background: var(--bg-deep);
}

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
    transition: transform 7s linear;
}

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

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(15, 23, 42, 0.62) 42%, rgba(15, 23, 42, 0.16) 100%),
        linear-gradient(0deg, var(--bg) 0%, rgba(15, 23, 42, 0.1) 42%);
}

.hero-content {
    position: absolute;
    left: max(24px, calc((100vw - 1180px) / 2));
    bottom: 76px;
    width: min(720px, calc(100% - 48px));
}

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

.hero-kicker span,
.detail-meta span,
.card-meta span,
.eyebrow {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(251, 191, 36, 0.34);
    border-radius: 999px;
    padding: 5px 10px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 13px;
    font-weight: 700;
}

.hero h1 {
    margin: 18px 0 14px;
    font-size: clamp(38px, 7vw, 72px);
    line-height: 1.02;
    letter-spacing: -0.055em;
}

.hero p {
    max-width: 680px;
    margin: 0 0 22px;
    color: var(--muted-strong);
    font-size: clamp(16px, 2.2vw, 21px);
}

.hero-tags,
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.tag-list span {
    border-radius: 999px;
    padding: 6px 10px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.22);
    color: var(--muted-strong);
    font-size: 13px;
}

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

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    min-height: 46px;
    padding: 0 20px;
    font-weight: 900;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-button {
    background: var(--accent);
    color: #111827;
    box-shadow: 0 18px 36px rgba(251, 191, 36, 0.22);
}

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

.primary-button:hover {
    background: #fcd34d;
}

.ghost-button {
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(15, 23, 42, 0.42);
    color: var(--text);
}

.hero-dots {
    position: absolute;
    right: max(24px, calc((100vw - 1180px) / 2));
    bottom: 82px;
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 34px;
    height: 4px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.32);
    padding: 0;
}

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

.home-sections {
    padding: 54px 0 20px;
}

.content-section {
    margin-bottom: 64px;
}

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(24px, 3vw, 36px);
    line-height: 1.15;
    letter-spacing: -0.03em;
}

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

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

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

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

.poster-card,
.landscape-card {
    min-width: 0;
}

.poster-link,
.landscape-link {
    display: block;
    height: 100%;
}

.poster-cover,
.landscape-cover {
    position: relative;
    margin: 0;
    overflow: hidden;
    background: #111827;
    border: 1px solid rgba(148, 163, 184, 0.16);
    box-shadow: 0 18px 48px rgba(2, 6, 23, 0.28);
}

.poster-cover {
    aspect-ratio: 3 / 4;
    border-radius: 16px;
}

.landscape-cover {
    aspect-ratio: 16 / 9;
    border-radius: 16px;
}

.poster-cover img,
.landscape-cover img,
.detail-poster img,
.category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.55s ease;
}

.poster-card:hover img,
.landscape-card:hover img,
.category-card:hover img,
.detail-poster:hover img {
    transform: scale(1.08);
}

.poster-overlay {
    position: absolute;
    inset: auto 0 0 0;
    padding: 42px 12px 12px;
    min-height: 52%;
    display: flex;
    align-items: flex-end;
    color: #fff;
    font-size: 13px;
    line-height: 1.45;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.86), transparent);
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.poster-card:hover .poster-overlay {
    opacity: 1;
    transform: translateY(0);
}

.year-badge,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 12px;
    font-weight: 900;
}

.year-badge {
    top: 10px;
    right: 10px;
    background: rgba(2, 6, 23, 0.76);
    color: #fff;
}

.rank-badge {
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, var(--accent), var(--danger));
    color: #111827;
}

.poster-card h3,
.landscape-card h3 {
    margin: 12px 0 4px;
    color: #fff;
    font-size: 16px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.poster-card p,
.landscape-card p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.poster-card:hover h3,
.landscape-card:hover h3 {
    color: var(--accent);
}

.landscape-scroll {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(280px, 360px);
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 12px;
    scroll-snap-type: x proximity;
}

.landscape-scroll .landscape-card {
    scroll-snap-align: start;
}

.landscape-link {
    border-radius: 18px;
    padding: 12px;
    background: rgba(15, 23, 42, 0.58);
    border: 1px solid rgba(148, 163, 184, 0.14);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.landscape-card:hover .landscape-link {
    transform: translateY(-4px);
    background: rgba(15, 23, 42, 0.86);
    border-color: rgba(251, 191, 36, 0.22);
}

.landscape-body p {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 12px;
}

.play-mark {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 36px;
    background: rgba(0, 0, 0, 0.22);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.landscape-card:hover .play-mark {
    opacity: 1;
}

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

.ranking-page-list {
    margin-top: 22px;
}

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

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

.category-card {
    position: relative;
    min-height: 230px;
    overflow: hidden;
    border-radius: 22px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    box-shadow: var(--shadow);
    background: #111827;
}

.category-card img {
    position: absolute;
    inset: 0;
}

.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.22));
}

.category-glow {
    position: absolute;
    inset: auto 20px 18px 20px;
    height: 70px;
    border-radius: 999px;
    background: rgba(251, 191, 36, 0.24);
    filter: blur(28px);
    z-index: 1;
}

.category-card div {
    position: absolute;
    left: 22px;
    right: 22px;
    bottom: 20px;
    z-index: 2;
}

.category-card h2 {
    margin: 0 0 8px;
    font-size: 24px;
}

.category-card p {
    margin: 0;
    color: var(--muted-strong);
    font-size: 14px;
}

.filter-panel {
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 24px;
    padding: 18px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.62);
}

.filter-panel label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 44px;
    padding: 0 12px;
}

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

.sub-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    background: #020617;
}

.compact-hero {
    padding: 112px 0 72px;
    background:
        radial-gradient(circle at 20% 0%, rgba(251, 191, 36, 0.18), transparent 32rem),
        linear-gradient(135deg, #020617, #111827);
}

.compact-hero h1,
.category-hero h1 {
    margin: 16px 0 12px;
    font-size: clamp(36px, 5vw, 62px);
    line-height: 1.05;
}

.compact-hero p,
.category-hero p {
    max-width: 760px;
    margin: 0;
    color: var(--muted-strong);
    font-size: 18px;
}

.category-hero {
    min-height: 430px;
    display: flex;
    align-items: end;
    padding: 110px 0 60px;
}

.category-hero > img,
.detail-hero > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sub-hero-overlay,
.detail-hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.55), rgba(2, 6, 23, 0.24)),
        linear-gradient(0deg, #0f172a, transparent 58%);
}

.category-hero .container,
.detail-hero .container {
    position: relative;
    z-index: 2;
}

.category-hero .primary-button {
    margin-top: 26px;
}

.detail-hero {
    min-height: 620px;
    padding: 110px 0 60px;
    display: flex;
    align-items: end;
}

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

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

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

.detail-poster {
    margin: 0;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: var(--shadow);
    background: #111827;
}

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

.detail-one-line {
    max-width: 820px;
    color: var(--muted-strong);
    font-size: 19px;
    margin: 0 0 20px;
}

.detail-info .primary-button {
    margin-top: 28px;
}

.detail-layout {
    padding: 48px 0 20px;
}

.player-section,
.detail-section {
    margin-bottom: 36px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 22px;
    padding: 24px;
    background: rgba(15, 23, 42, 0.66);
    box-shadow: 0 20px 55px rgba(2, 6, 23, 0.22);
}

.player-section h2,
.detail-section h2 {
    margin: 0 0 16px;
    font-size: 24px;
}

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

.video-player {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    aspect-ratio: 16 / 9;
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.video-player video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    background: #000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 16px;
    border: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.18));
    color: #fff;
    text-align: center;
    transition: opacity 0.2s ease;
}

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

.player-button {
    width: 76px;
    height: 76px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: #111827;
    font-size: 32px;
    box-shadow: 0 20px 54px rgba(251, 191, 36, 0.34);
}

.player-overlay strong {
    max-width: min(90%, 680px);
    font-size: clamp(20px, 3vw, 34px);
}

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

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

.neighbor-links a {
    padding: 16px;
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.5);
    border: 1px solid rgba(148, 163, 184, 0.14);
    color: var(--muted-strong);
    transition: color 0.2s ease, border-color 0.2s ease;
}

.neighbor-links a:hover {
    color: var(--accent);
    border-color: rgba(251, 191, 36, 0.28);
}

.site-footer {
    margin-top: 70px;
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.92);
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 44px 0;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 36px;
}

.footer-brand p {
    margin: 16px 0 0;
    color: var(--muted);
    max-width: 440px;
}

.footer-links {
    display: grid;
    gap: 8px;
    align-content: start;
}

.footer-links h2 {
    margin: 0 0 8px;
    font-size: 16px;
}

.footer-links a {
    color: var(--muted);
    font-size: 14px;
}

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

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

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

    .header-search {
        margin-left: auto;
    }

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

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

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

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

    .hero {
        height: 540px;
    }

    .hero-content {
        bottom: 64px;
    }

    .hero-dots {
        left: 24px;
        right: auto;
        bottom: 28px;
    }

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

    .ranking-list,
    .filter-panel,
    .detail-grid,
    .split-tags,
    .neighbor-links,
    .footer-inner {
        grid-template-columns: 1fr;
    }

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

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

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

@media (max-width: 560px) {
    .header-inner {
        height: 62px;
        width: min(100% - 24px, 1240px);
    }

    .brand-name {
        font-size: 18px;
    }

    .brand-icon {
        width: 32px;
        height: 32px;
        border-radius: 10px;
    }

    .hero {
        height: 520px;
    }

    .hero-content {
        left: 16px;
        width: calc(100% - 32px);
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

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

    .home-sections {
        padding-top: 36px;
    }

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

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

    .landscape-scroll {
        grid-auto-columns: minmax(250px, 86vw);
    }

    .category-card {
        min-height: 190px;
    }

    .player-section,
    .detail-section {
        padding: 18px;
        border-radius: 18px;
    }

    .detail-hero {
        min-height: 620px;
        padding-top: 86px;
    }

    .detail-info h1,
    .compact-hero h1,
    .category-hero h1 {
        font-size: 34px;
    }
}
