:root {
    --bg: #0f172a;
    --bg-soft: #111827;
    --panel: rgba(15, 23, 42, 0.78);
    --panel-strong: rgba(30, 41, 59, 0.92);
    --line: rgba(148, 163, 184, 0.16);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --accent: #e2e8f0;
    --accent-dark: #0f172a;
    --radius: 18px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 20% 5%, rgba(71, 85, 105, 0.28), transparent 34rem),
        radial-gradient(circle at 80% 10%, rgba(30, 41, 59, 0.72), transparent 32rem),
        linear-gradient(180deg, #0f172a 0%, #111827 48%, #0f172a 100%);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.94);
    backdrop-filter: blur(16px);
}

.header-inner {
    width: min(1180px, calc(100% - 32px));
    height: 68px;
    margin-inline: auto;
    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;
    white-space: nowrap;
}

.brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8fafc, #94a3b8);
    color: #0f172a;
    box-shadow: 0 10px 30px rgba(226, 232, 240, 0.18);
}

.brand-text {
    font-size: 20px;
    background: linear-gradient(90deg, #ffffff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.nav-link {
    padding: 9px 14px;
    border-radius: 12px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 650;
    transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text);
    background: rgba(51, 65, 85, 0.72);
}

.header-search {
    margin-left: auto;
    display: flex;
    align-items: center;
    width: min(330px, 33vw);
    border: 1px solid var(--line);
    border-radius: 999px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.64);
}

.header-search input {
    min-width: 0;
    flex: 1;
    height: 40px;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
    padding: 0 14px;
}

.header-search button {
    border: 0;
    padding: 0 16px;
    height: 40px;
    color: #0f172a;
    background: #e2e8f0;
    font-weight: 800;
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(30, 41, 59, 0.72);
}

.nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: #e2e8f0;
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.94);
}

.mobile-nav a {
    display: block;
    padding: 10px 12px;
    color: var(--muted-strong);
    border-radius: 10px;
}

.mobile-nav a:hover {
    background: rgba(51, 65, 85, 0.72);
    color: var(--text);
}

.mobile-nav.open {
    display: block;
}

.hero-slider {
    position: relative;
    min-height: 70vh;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}

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

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

.hero-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.05) contrast(1.06);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(15, 23, 42, 0.98) 0%, rgba(15, 23, 42, 0.78) 48%, rgba(15, 23, 42, 0.2) 100%),
        linear-gradient(0deg, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.18) 42%);
}

.hero-content {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.6fr);
    align-items: center;
    gap: 44px;
    padding-top: 42px;
}

.hero-copy {
    max-width: 700px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 6px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(30, 41, 59, 0.78);
    color: #cbd5e1;
    font-size: 13px;
    font-weight: 750;
}

.hero-copy h1,
.hero-copy h2,
.page-hero h1,
.detail-copy h1 {
    margin: 0 0 18px;
    color: #fff;
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1.02;
}

.hero-copy h1,
.hero-copy h2 {
    font-size: clamp(42px, 6vw, 76px);
}

.hero-copy p,
.page-hero p,
.detail-one-line {
    margin: 0;
    color: var(--muted-strong);
    font-size: clamp(16px, 2vw, 20px);
}

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

.hero-meta,
.detail-meta {
    margin: 22px 0 28px;
}

.hero-meta span,
.detail-meta span,
.movie-meta-line span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.58);
    border: 1px solid rgba(148, 163, 184, 0.16);
}

.hero-meta span,
.detail-meta span {
    padding: 6px 10px;
}

.movie-meta-line span {
    padding: 4px 8px;
}

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

.primary-button,
.ghost-button,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 12px;
    font-weight: 850;
    transition: 0.2s ease;
}

.primary-button {
    padding: 0 24px;
    color: var(--accent-dark);
    background: linear-gradient(135deg, #ffffff, #cbd5e1);
    box-shadow: 0 16px 34px rgba(226, 232, 240, 0.18);
}

.primary-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 46px rgba(226, 232, 240, 0.24);
}

.ghost-button,
.section-more {
    padding: 0 18px;
    color: var(--muted-strong);
    border: 1px solid var(--line);
    background: rgba(30, 41, 59, 0.62);
}

.ghost-button:hover,
.section-more:hover {
    color: var(--text);
    background: rgba(51, 65, 85, 0.9);
}

.hero-poster {
    justify-self: end;
    width: min(360px, 100%);
    border-radius: 28px;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.18);
    box-shadow: var(--shadow);
    transform: rotate(1deg);
}

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

.hero-controls {
    position: absolute;
    right: max(24px, calc((100% - 1180px) / 2));
    bottom: 28px;
    display: flex;
    align-items: center;
    gap: 14px;
    z-index: 3;
}

.hero-prev,
.hero-next,
.hero-dot {
    border: 1px solid var(--line);
    color: var(--text);
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(12px);
}

.hero-prev,
.hero-next {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    font-size: 30px;
    line-height: 1;
}

.hero-dots {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border-radius: 999px;
    opacity: 0.55;
}

.hero-dot.active {
    width: 28px;
    opacity: 1;
    background: #e2e8f0;
}

.quick-search {
    margin-top: -34px;
    position: relative;
    z-index: 4;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.86);
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow);
}

.quick-search form,
.filter-panel {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
}

.quick-search input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 14px;
    outline: 0;
    color: var(--text);
    background: rgba(15, 23, 42, 0.75);
    padding: 0 16px;
}

.quick-search button {
    border: 0;
    border-radius: 14px;
    padding: 0 24px;
    color: #0f172a;
    background: #e2e8f0;
    font-weight: 900;
}

.quick-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.quick-tags a {
    padding: 7px 12px;
    color: var(--muted-strong);
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(30, 41, 59, 0.56);
    font-size: 14px;
}

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

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

.section-heading h2,
.article-section h2 {
    margin: 0 0 8px;
    color: #fff;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.18;
    letter-spacing: -0.02em;
}

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

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

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

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

.movie-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.18);
    transition: 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(226, 232, 240, 0.3);
    background: rgba(30, 41, 59, 0.82);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: #020617;
}

.poster-link img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.play-chip,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    font-weight: 900;
}

.play-chip {
    right: 10px;
    bottom: 10px;
    padding: 5px 10px;
    color: #0f172a;
    background: rgba(248, 250, 252, 0.94);
    font-size: 12px;
}

.rank-badge {
    left: 10px;
    top: 10px;
    min-width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #0f172a;
    background: linear-gradient(135deg, #f8fafc, #94a3b8);
}

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

.movie-meta-line {
    gap: 6px;
    margin-bottom: 10px;
    font-size: 12px;
}

.movie-card h3 {
    margin: 0 0 8px;
    color: #fff;
    font-size: 16px;
    line-height: 1.28;
}

.movie-card h3 a:hover {
    color: #cbd5e1;
}

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

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.tag-row span {
    display: inline-flex;
    padding: 4px 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #cbd5e1;
    background: rgba(30, 41, 59, 0.62);
    font-size: 12px;
}

.tag-row.large span {
    padding: 7px 10px;
    font-size: 13px;
}

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

.category-card,
.category-overview-card {
    display: block;
    min-height: 176px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background:
        linear-gradient(135deg, rgba(51, 65, 85, 0.74), rgba(15, 23, 42, 0.68)),
        radial-gradient(circle at top right, rgba(226, 232, 240, 0.12), transparent 42%);
    transition: 0.22s ease;
}

.category-card:hover,
.category-overview-card:hover {
    transform: translateY(-4px);
    border-color: rgba(226, 232, 240, 0.28);
}

.category-title,
.category-overview-title {
    display: block;
    margin-bottom: 10px;
    color: #fff;
    font-size: 20px;
    font-weight: 900;
}

.category-desc,
.category-overview-card p {
    display: block;
    margin: 0 0 16px;
    color: var(--muted-strong);
}

.category-preview {
    display: block;
    color: var(--muted);
    font-size: 13px;
}

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

.mini-movie {
    display: grid;
    grid-template-columns: 42px 1fr;
    align-items: center;
    gap: 10px;
    color: var(--muted-strong);
    font-size: 13px;
}

.mini-movie img {
    width: 42px;
    aspect-ratio: 2 / 3;
    border-radius: 8px;
    object-fit: cover;
}

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

.ranking-item {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 12px;
    align-items: center;
    min-height: 72px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.66);
}

.ranking-item span {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #0f172a;
    background: #e2e8f0;
    font-weight: 900;
}

.ranking-item strong,
.ranking-item em {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ranking-item strong {
    color: #fff;
}

.ranking-item em {
    color: var(--muted);
    font-style: normal;
    font-size: 13px;
}

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

.small-hero h1 {
    font-size: clamp(36px, 5vw, 58px);
}

.small-hero p {
    max-width: 820px;
}

.filter-panel {
    grid-template-columns: minmax(240px, 1fr) 170px 150px 170px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.72);
}

.detail-hero {
    position: relative;
    overflow: hidden;
    padding: 42px 0 56px;
    border-bottom: 1px solid var(--line);
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    opacity: 0.28;
    filter: blur(22px) saturate(1.1);
    transform: scale(1.08);
}

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

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #0f172a 0%, rgba(15, 23, 42, 0.9) 48%, rgba(15, 23, 42, 0.76) 100%);
}

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

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

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

.detail-layout {
    display: grid;
    grid-template-columns: minmax(210px, 300px) 1fr;
    gap: 36px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid rgba(226, 232, 240, 0.18);
    box-shadow: var(--shadow);
}

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

.detail-copy h1 {
    font-size: clamp(38px, 6vw, 72px);
}

.detail-one-line {
    max-width: 820px;
}

.player-section {
    padding: 56px 0 0;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.18);
    border-radius: 24px;
    background: #020617;
    box-shadow: var(--shadow);
}

.player-shell video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.26));
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-button {
    width: 78px;
    height: 78px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #0f172a;
    background: rgba(248, 250, 252, 0.96);
    box-shadow: 0 20px 54px rgba(0, 0, 0, 0.35);
    font-size: 30px;
    text-indent: 4px;
}

.player-message {
    position: absolute;
    left: 50%;
    bottom: 22px;
    transform: translateX(-50%);
    padding: 9px 14px;
    border-radius: 999px;
    color: #fecaca;
    background: rgba(127, 29, 29, 0.68);
}

.article-section {
    max-width: 900px;
}

.article-section h2 {
    margin-top: 32px;
}

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

.site-footer {
    margin-top: 72px;
    border-top: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.78);
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin-inline: auto;
    padding: 30px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    color: var(--muted);
}

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

.footer-inner p {
    margin: 0;
}

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

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

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

    .hero-content {
        grid-template-columns: 1fr;
    }

    .hero-poster {
        display: none;
    }
}

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

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

    .hero-slider {
        min-height: 620px;
    }

    .hero-content {
        padding-top: 24px;
    }

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

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

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

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

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

@media (max-width: 620px) {
    .container,
    .header-inner,
    .mobile-nav,
    .footer-inner {
        width: min(100% - 22px, 1180px);
    }

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

    .hero-slider {
        min-height: 590px;
    }

    .hero-controls {
        left: 16px;
        right: 16px;
        justify-content: space-between;
    }

    .hero-copy h1,
    .hero-copy h2,
    .detail-copy h1 {
        font-size: 38px;
    }

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

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

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

    .movie-card p {
        min-height: auto;
    }

    .mini-list {
        grid-template-columns: 1fr;
    }
}
