* {
    box-sizing: border-box;
}

:root {
    color-scheme: dark;
    --bg: #0a0a0a;
    --panel: #171717;
    --panel-soft: #1f1f1f;
    --line: #2a2a2a;
    --text: #ffffff;
    --muted: #a3a3a3;
    --dim: #737373;
    --accent: #f59e0b;
    --accent-dark: #d97706;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.12), transparent 34rem), var(--bg);
    color: var(--text);
    font-family: 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 {
    max-width: 100%;
    display: block;
}

button,
input,
select {
    font: inherit;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 80;
    background: rgba(23, 23, 23, 0.94);
    border-bottom: 1px solid rgba(64, 64, 64, 0.68);
    backdrop-filter: blur(16px);
}

.header-inner {
    max-width: 1280px;
    height: 64px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.brand-mark {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #171717;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    font-weight: 900;
    box-shadow: 0 10px 24px rgba(245, 158, 11, 0.24);
}

.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand-copy strong,
.footer-brand strong {
    font-size: 20px;
    letter-spacing: 0.04em;
}

.brand-copy small {
    color: var(--muted);
    font-size: 12px;
}

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

.nav-link,
.mobile-nav-link {
    color: #d4d4d4;
    border-radius: 10px;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link {
    padding: 9px 14px;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover {
    color: var(--accent);
    background: rgba(245, 158, 11, 0.08);
}

.menu-toggle {
    width: 42px;
    height: 42px;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: white;
    cursor: pointer;
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    background: currentColor;
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    border-top: 1px solid var(--line);
    padding: 10px 20px 16px;
}

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

.mobile-nav-link {
    padding: 12px;
}

.main {
    min-height: 70vh;
}

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

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

.hero-track,
.hero-slide,
.hero-slide img,
.hero-shade {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    transition: opacity 1s ease;
}

.hero-slide.is-active {
    opacity: 1;
    z-index: 2;
}

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

.hero-shade {
    z-index: 1;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.96), rgba(0, 0, 0, 0.58) 45%, rgba(0, 0, 0, 0.18)), linear-gradient(0deg, rgba(10, 10, 10, 0.88), transparent 42%);
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 1280px;
    height: 100%;
    margin: 0 auto;
    padding: 84px 24px 64px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.hero-content h1,
.hero-content h2 {
    max-width: 760px;
    margin: 0 0 18px;
    font-size: clamp(42px, 7vw, 78px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.hero-content p {
    max-width: 680px;
    margin: 0 0 34px;
    color: #d4d4d4;
    font-size: 19px;
}

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

.hero-tags {
    margin-bottom: 18px;
}

.hero-tags span,
.tag-row span,
.detail-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.9);
    color: #171717;
    font-size: 13px;
    font-weight: 700;
}

.tag-row span,
.detail-tags span {
    min-height: auto;
    background: rgba(245, 158, 11, 0.12);
    color: var(--accent);
    border-radius: 8px;
    font-weight: 600;
}

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

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

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

.primary-button:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
}

.ghost-button {
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(0, 0, 0, 0.24);
    color: #ffffff;
    backdrop-filter: blur(10px);
}

.ghost-button:hover {
    border-color: rgba(245, 158, 11, 0.7);
    color: var(--accent);
    transform: translateY(-2px);
}

.text-button {
    min-height: 40px;
    padding: 0;
    color: var(--accent);
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 10;
    width: 50px;
    height: 50px;
    border: 0;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.5);
    color: #ffffff;
    font-size: 36px;
    line-height: 1;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-control:hover {
    background: rgba(0, 0, 0, 0.72);
    transform: translateY(-2px);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

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

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

.content-section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 56px 24px;
}

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

.section-heading h2,
.article-section h2 {
    margin: 0 0 6px;
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.15;
}

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

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

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

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

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(64, 64, 64, 0.88);
    border-radius: 18px;
    background: var(--panel);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.18);
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    border-color: rgba(245, 158, 11, 0.62);
    transform: translateY(-6px);
    box-shadow: var(--shadow);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #111111;
}

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

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

.poster-glow {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.8), transparent 55%);
    opacity: 0;
    transition: opacity 0.24s ease;
}

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

.poster-type,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
}

.poster-type {
    right: 12px;
    bottom: 12px;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.72);
    color: #ffffff;
}

.rank-badge {
    left: 12px;
    top: 12px;
    min-width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: #171717;
}

.card-body {
    padding: 16px;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: var(--dim);
    font-size: 13px;
}

.card-body h3 {
    margin: 8px 0 8px;
    font-size: 18px;
    line-height: 1.35;
}

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

.card-body p {
    min-height: 48px;
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 14px;
}

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

.category-card {
    position: relative;
    min-height: 174px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--panel);
}

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

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

.category-card span {
    position: absolute;
    inset: auto 18px 18px;
    z-index: 2;
}

.category-card strong {
    display: block;
    font-size: 22px;
}

.category-card em {
    display: block;
    margin-top: 6px;
    color: #d4d4d4;
    font-size: 13px;
    font-style: normal;
}

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

.ranking-panel {
    position: sticky;
    top: 88px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(23, 23, 23, 0.88);
}

.compact-heading {
    margin-bottom: 18px;
}

.compact-list {
    display: grid;
    gap: 12px;
}

.compact-card {
    display: grid;
    grid-template-columns: auto 76px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    transition: background 0.2s ease, transform 0.2s ease;
}

.compact-card:hover {
    background: rgba(245, 158, 11, 0.1);
    transform: translateX(4px);
}

.compact-card img {
    width: 76px;
    height: 48px;
    border-radius: 10px;
    object-fit: cover;
}

.compact-card strong,
.compact-card em {
    display: block;
}

.compact-card strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.compact-card em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.compact-rank {
    width: 26px;
    color: var(--accent);
    font-weight: 900;
    text-align: center;
}

.page-hero {
    max-width: 1280px;
    margin: 0 auto;
    padding: 54px 24px 18px;
}

.page-hero > div,
.detail-hero,
.article-section,
.player-shell {
    border: 1px solid var(--line);
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(23, 23, 23, 0.96) 36%, rgba(23, 23, 23, 0.94));
    box-shadow: var(--shadow);
}

.page-hero > div {
    padding: clamp(28px, 5vw, 54px);
}

.page-hero h1 {
    max-width: 850px;
    margin: 0 0 14px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.page-hero p:last-child {
    max-width: 780px;
    margin: 0;
    color: #d4d4d4;
    font-size: 18px;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--accent);
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 20px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--panel);
}

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

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

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

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

.category-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.category-preview span {
    padding: 4px 8px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: #d4d4d4;
    font-size: 12px;
}

.filter-wrap {
    padding-top: 28px;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 180px 180px;
    gap: 14px;
    margin-bottom: 24px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(23, 23, 23, 0.88);
}

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

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 44px;
    border: 1px solid #3f3f46;
    border-radius: 12px;
    padding: 0 14px;
    background: #0f0f0f;
    color: #ffffff;
    outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--accent);
}

.breadcrumb {
    max-width: 1280px;
    margin: 0 auto;
    padding: 18px 24px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 14px;
}

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

.detail-main {
    background: radial-gradient(circle at 20% 12%, rgba(245, 158, 11, 0.12), transparent 30rem);
}

.detail-hero {
    max-width: 1280px;
    margin: 22px auto 0;
    padding: 28px;
    display: grid;
    grid-template-columns: 380px minmax(0, 1fr);
    gap: 32px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border-radius: 20px;
    aspect-ratio: 16 / 10;
    box-shadow: 0 18px 52px rgba(0, 0, 0, 0.4);
}

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

.detail-copy h1 {
    margin: 0 0 16px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.detail-one-line {
    max-width: 760px;
    margin: 0 0 18px;
    color: #d4d4d4;
    font-size: 18px;
}

.detail-tags {
    margin-bottom: 24px;
}

.player-section {
    padding-bottom: 28px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    padding: 0;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.movie-video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.74), rgba(0, 0, 0, 0.18));
    cursor: pointer;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-symbol {
    width: 82px;
    height: 82px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-left: 6px;
    border-radius: 999px;
    background: var(--accent);
    color: #171717;
    font-size: 36px;
    box-shadow: 0 20px 60px rgba(245, 158, 11, 0.28);
}

.player-overlay strong {
    font-size: 22px;
}

.article-section {
    padding: 32px;
}

.article-section h2:not(:first-child) {
    margin-top: 28px;
}

.article-section p {
    color: #d4d4d4;
    font-size: 17px;
}

.detail-info-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 28px;
}

.detail-info-grid div {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
}

.detail-info-grid span,
.detail-info-grid strong {
    display: block;
}

.detail-info-grid span {
    margin-bottom: 6px;
    color: var(--dim);
    font-size: 13px;
}

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

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 34px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.footer-brand p {
    max-width: 560px;
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    color: var(--muted);
}

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

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

.is-filtered-out {
    display: none !important;
}

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

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

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

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

    .ranking-panel {
        position: static;
    }

    .detail-poster {
        max-width: 560px;
    }
}

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

    .menu-toggle {
        display: inline-flex;
    }

    .hero {
        min-height: 620px;
    }

    .hero-content {
        padding: 90px 20px 72px;
    }

    .hero-control {
        display: none;
    }

    .content-section,
    .page-hero,
    .breadcrumb {
        padding-left: 18px;
        padding-right: 18px;
    }

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

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

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

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

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

@media (max-width: 560px) {
    .header-inner {
        padding: 0 16px;
    }

    .brand-copy strong {
        font-size: 17px;
    }

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

    .hero-content h1,
    .hero-content h2 {
        font-size: 42px;
    }

    .hero-content p,
    .page-hero p:last-child,
    .detail-one-line {
        font-size: 16px;
    }

    .detail-hero,
    .article-section {
        padding: 20px;
        border-radius: 18px;
    }

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

    .play-symbol {
        width: 68px;
        height: 68px;
        font-size: 30px;
    }
}
