:root {
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: #111827;
    --panel-soft: rgba(15, 23, 42, 0.76);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --accent: #f59e0b;
    --accent-soft: #fbbf24;
    --danger: #ef4444;
    --radius: 22px;
    --shadow: 0 28px 70px rgba(0, 0, 0, 0.36);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 18% 8%, rgba(245, 158, 11, 0.12), transparent 32rem),
        radial-gradient(circle at 88% 18%, rgba(59, 130, 246, 0.10), transparent 28rem),
        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.65;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.nav-wrap {
    width: min(1220px, calc(100% - 32px));
    height: 70px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: fit-content;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: 0.02em;
}

.logo-mark {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    color: #111827;
    background: linear-gradient(135deg, var(--accent-soft), var(--accent));
    box-shadow: 0 12px 32px rgba(245, 158, 11, 0.30);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
    color: var(--muted-strong);
    font-size: 15px;
    font-weight: 700;
}

.nav-links a {
    transition: color 0.22s ease;
}

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

.header-search {
    position: relative;
    width: min(320px, 28vw);
}

.search-input,
.local-filter-input {
    width: 100%;
    border: 1px solid var(--line);
    outline: none;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.82);
    border-radius: 999px;
    padding: 12px 16px;
    transition: border-color 0.22s ease, box-shadow 0.22s ease;
}

.search-input:focus,
.local-filter-input:focus {
    border-color: rgba(245, 158, 11, 0.75);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.search-panel {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: min(420px, calc(100vw - 32px));
    max-height: 70vh;
    overflow: auto;
    display: none;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.98);
    box-shadow: var(--shadow);
}

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

.search-hit {
    display: grid;
    grid-template-columns: 54px 1fr;
    gap: 12px;
    padding: 10px;
    border-radius: 14px;
    transition: background 0.22s ease;
}

.search-hit:hover {
    background: rgba(148, 163, 184, 0.12);
}

.search-hit img {
    width: 54px;
    height: 72px;
    object-fit: cover;
    border-radius: 10px;
    background: #0f172a;
}

.search-hit strong {
    display: block;
    color: #ffffff;
    line-height: 1.3;
}

.search-hit span {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.82);
    cursor: pointer;
}

.mobile-panel {
    display: none;
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
}

.mobile-panel a {
    display: block;
    padding: 10px 0;
    color: var(--muted-strong);
    font-weight: 700;
}

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

.main {
    min-height: 70vh;
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.8s ease, transform 1.1s ease;
    pointer-events: none;
}

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

.hero-bg {
    position: absolute;
    inset: 0;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08) brightness(0.62);
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.72) 45%, rgba(2, 6, 23, 0.30) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0) 45%);
}

.hero-inner {
    position: relative;
    z-index: 2;
    width: min(1220px, calc(100% - 32px));
    min-height: min(790px, calc(100vh - 70px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.52fr);
    align-items: center;
    gap: 46px;
    padding: 70px 0 110px;
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    color: #111827;
    background: linear-gradient(135deg, var(--accent-soft), var(--accent));
    border-radius: 999px;
    padding: 7px 13px;
    font-size: 13px;
    font-weight: 900;
}

.hero h1 {
    max-width: 860px;
    margin: 20px 0 18px;
    color: #ffffff;
    font-size: clamp(40px, 7vw, 88px);
    line-height: 1.02;
    letter-spacing: -0.06em;
}

.hero-desc {
    max-width: 720px;
    margin: 0;
    color: #dbe4f0;
    font-size: clamp(16px, 2vw, 21px);
}

.hero-meta,
.movie-meta,
.card-meta,
.rank-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    align-items: center;
}

.hero-meta {
    margin: 24px 0;
}

.pill {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    color: #e5e7eb;
    border: 1px solid rgba(203, 213, 225, 0.22);
    background: rgba(15, 23, 42, 0.64);
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 13px;
    font-weight: 700;
}

.hero-actions,
.section-actions,
.player-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    border-radius: 999px;
    padding: 11px 18px;
    border: 1px solid transparent;
    cursor: pointer;
    font-weight: 900;
    transition: transform 0.22s ease, background 0.22s ease, border-color 0.22s ease, color 0.22s ease;
}

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

.btn-primary {
    color: #111827;
    background: linear-gradient(135deg, var(--accent-soft), var(--accent));
    box-shadow: 0 18px 42px rgba(245, 158, 11, 0.27);
}

.btn-ghost {
    color: #ffffff;
    border-color: rgba(203, 213, 225, 0.22);
    background: rgba(15, 23, 42, 0.62);
}

.btn-ghost:hover {
    border-color: rgba(245, 158, 11, 0.55);
    color: var(--accent-soft);
}

.hero-poster {
    position: relative;
    justify-self: end;
    width: min(390px, 100%);
    border-radius: 32px;
    overflow: hidden;
    background: #0f172a;
    box-shadow: var(--shadow);
    transform: rotate(2deg);
}

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

.hero-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.76), transparent 42%);
}

.hero-poster-caption {
    position: absolute;
    z-index: 2;
    left: 18px;
    right: 18px;
    bottom: 18px;
}

.hero-poster-caption strong {
    display: block;
    color: #ffffff;
    font-size: 22px;
}

.hero-poster-caption span {
    color: #cbd5e1;
    font-size: 13px;
}

.hero-dots {
    position: absolute;
    z-index: 4;
    left: 50%;
    bottom: 30px;
    width: min(1220px, calc(100% - 32px));
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateX(-50%);
}

.hero-dot {
    width: 54px;
    height: 6px;
    border: 0;
    border-radius: 999px;
    background: rgba(203, 213, 225, 0.26);
    cursor: pointer;
    transition: width 0.22s ease, background 0.22s ease;
}

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

.section {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    padding: 70px 0;
}

.section + .section {
    border-top: 1px solid rgba(148, 163, 184, 0.10);
}

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

.section-title {
    margin: 12px 0 6px;
    color: #ffffff;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.section-subtitle {
    max-width: 760px;
    margin: 0;
    color: var(--muted);
}

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

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

.movie-card {
    position: relative;
    display: block;
    overflow: hidden;
    min-width: 0;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.78);
    box-shadow: 0 18px 52px rgba(0, 0, 0, 0.20);
    transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

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

.card-cover {
    position: relative;
    overflow: hidden;
    background: #0f172a;
}

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

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

.card-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.90), rgba(2, 6, 23, 0.10) 48%, transparent);
    opacity: 0.88;
}

.play-chip {
    position: absolute;
    z-index: 2;
    left: 50%;
    top: 50%;
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #111827;
    background: var(--accent);
    transform: translate(-50%, -50%) scale(0.78);
    opacity: 0;
    transition: transform 0.24s ease, opacity 0.24s ease;
}

.movie-card:hover .play-chip {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.badge {
    position: absolute;
    z-index: 2;
    top: 12px;
    right: 12px;
    border-radius: 999px;
    padding: 4px 9px;
    color: #111827;
    background: var(--accent);
    font-size: 12px;
    font-weight: 900;
}

.card-body {
    padding: 15px 15px 17px;
}

.card-title {
    min-height: 46px;
    margin: 0 0 9px;
    color: #ffffff;
    font-size: 17px;
    line-height: 1.35;
    transition: color 0.22s ease;
}

.movie-card:hover .card-title {
    color: var(--accent-soft);
}

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

.card-meta {
    color: #cbd5e1;
    font-size: 12px;
}

.card-meta span {
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.10);
    padding: 3px 8px;
}

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

.channel-card {
    position: relative;
    overflow: hidden;
    min-height: 190px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 24px;
    padding: 20px;
    background:
        radial-gradient(circle at 100% 0, rgba(245, 158, 11, 0.22), transparent 42%),
        rgba(15, 23, 42, 0.78);
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.channel-card:hover {
    transform: translateY(-5px);
    border-color: rgba(245, 158, 11, 0.42);
}

.channel-card h3 {
    margin: 0 0 8px;
    color: #ffffff;
    font-size: 22px;
}

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

.channel-card span {
    color: var(--accent-soft);
    font-weight: 900;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 64px 72px 1fr auto;
    align-items: center;
    gap: 16px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 20px;
    padding: 12px;
    background: rgba(15, 23, 42, 0.70);
    transition: transform 0.24s ease, border-color 0.24s ease;
}

.rank-item:hover {
    transform: translateX(4px);
    border-color: rgba(245, 158, 11, 0.35);
}

.rank-no {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 15px;
    color: #111827;
    background: linear-gradient(135deg, var(--accent-soft), var(--accent));
    font-weight: 900;
}

.rank-item img {
    width: 72px;
    height: 96px;
    object-fit: cover;
    border-radius: 13px;
    background: #0f172a;
}

.rank-title {
    margin: 0 0 5px;
    color: #ffffff;
    font-size: 18px;
}

.rank-line {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.page-hero {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    padding: 72px 0 36px;
}

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

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

.page-title {
    max-width: 900px;
    margin: 0 0 14px;
    color: #ffffff;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.page-desc {
    max-width: 850px;
    margin: 0;
    color: var(--muted-strong);
    font-size: 18px;
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    margin: 28px 0;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.filter-btn {
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    color: var(--muted-strong);
    background: rgba(15, 23, 42, 0.78);
    padding: 9px 13px;
    cursor: pointer;
}

.filter-btn.is-active,
.filter-btn:hover {
    color: #111827;
    border-color: var(--accent);
    background: var(--accent);
}

.movie-layout {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0 70px;
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.42fr) minmax(280px, 0.58fr);
    gap: 28px;
    align-items: start;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 28px;
    background: #000000;
    box-shadow: var(--shadow);
}

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

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: grid;
    place-items: center;
    border: 0;
    color: #ffffff;
    background: rgba(2, 6, 23, 0.28);
    cursor: pointer;
    overflow: hidden;
}

.player-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.56) saturate(1.05);
}

.player-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.22), rgba(2, 6, 23, 0.58));
}

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

.big-play {
    position: relative;
    z-index: 2;
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #111827;
    background: linear-gradient(135deg, var(--accent-soft), var(--accent));
    box-shadow: 0 22px 62px rgba(245, 158, 11, 0.30);
    font-size: 34px;
}

.detail-panel,
.text-panel {
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 24px;
    padding: 22px;
    background: rgba(15, 23, 42, 0.72);
}

.detail-poster {
    overflow: hidden;
    border-radius: 22px;
    background: #0f172a;
    margin-bottom: 18px;
}

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

.detail-panel h2,
.text-panel h2 {
    margin: 0 0 13px;
    color: #ffffff;
}

.info-table {
    display: grid;
    gap: 10px;
    color: var(--muted-strong);
    font-size: 14px;
}

.info-table div {
    display: flex;
    gap: 12px;
    justify-content: space-between;
    border-bottom: 1px solid rgba(148, 163, 184, 0.10);
    padding-bottom: 9px;
}

.info-table b {
    color: #ffffff;
    white-space: nowrap;
}

.article-stack {
    display: grid;
    gap: 18px;
    margin-top: 24px;
}

.text-panel p {
    margin: 0;
    color: var(--muted-strong);
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.tag-cloud span {
    border-radius: 999px;
    color: #111827;
    background: rgba(245, 158, 11, 0.95);
    padding: 5px 10px;
    font-size: 13px;
    font-weight: 900;
}

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

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

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

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

.hide-by-filter {
    display: none !important;
}

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

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

    .hero-inner,
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .hero-poster {
        display: none;
    }

    .header-search {
        width: min(260px, 26vw);
    }
}

@media (max-width: 820px) {
    .nav-wrap {
        height: 64px;
    }

    .nav-links,
    .header-search {
        display: none;
    }

    .nav-toggle {
        display: inline-grid;
        place-items: center;
    }

    .hero,
    .hero-inner {
        min-height: 720px;
    }

    .hero-inner {
        padding: 58px 0 96px;
    }

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

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

    .section-head,
    .footer-inner,
    .filter-bar {
        display: block;
    }

    .section-actions,
    .filter-buttons {
        margin-top: 18px;
    }

    .rank-item {
        grid-template-columns: 46px 58px 1fr;
    }

    .rank-item .btn {
        display: none;
    }

    .rank-item img {
        width: 58px;
        height: 78px;
    }

    .footer-links {
        margin-top: 16px;
        flex-wrap: wrap;
    }
}

@media (max-width: 520px) {
    .grid,
    .grid-six {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .card-body {
        padding: 12px;
    }

    .card-title {
        font-size: 15px;
    }

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

    .hero-desc,
    .page-desc {
        font-size: 15px;
    }

    .hero-dot {
        width: 34px;
    }

    .hero-dot.is-active {
        width: 58px;
    }

    .page-hero,
    .section {
        width: min(100% - 24px, 1220px);
    }
}
