:root {
    color-scheme: dark;
    --bg: #050505;
    --bg-soft: #0f1117;
    --panel: #171923;
    --panel-strong: #1f2430;
    --text: #f8fafc;
    --muted: #9ca3af;
    --muted-strong: #d1d5db;
    --line: rgba(255, 255, 255, 0.08);
    --amber: #fbbf24;
    --amber-strong: #f59e0b;
    --red: #ef4444;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: radial-gradient(circle at 18% -10%, rgba(251, 191, 36, 0.18), transparent 28%), linear-gradient(180deg, #111827 0%, #050505 42%, #111827 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;
}

body.menu-open {
    overflow: hidden;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(16px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.38);
    border-bottom: 1px solid var(--line);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 70px;
    gap: 22px;
}

.logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: 0.02em;
}

.logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    color: #111827;
    background: linear-gradient(135deg, var(--amber), #fde68a);
    box-shadow: 0 0 30px rgba(251, 191, 36, 0.38);
    transition: transform 0.45s ease;
}

.logo:hover .logo-mark,
.footer-logo:hover .logo-mark {
    transform: rotate(180deg);
}

.logo-text {
    font-size: clamp(1.2rem, 2vw, 1.65rem);
    background: linear-gradient(135deg, #fbbf24, #fef3c7);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

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

.nav-link,
.mobile-link {
    color: #f9fafb;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    color: var(--amber);
}

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

.header-search input,
.mobile-search input,
.control-bar input,
.control-bar select,
.search-panel input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #1f2937;
    color: var(--text);
    outline: none;
    padding: 11px 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
    width: 230px;
    padding-right: 82px;
}

.header-search input:focus,
.mobile-search input:focus,
.control-bar input:focus,
.control-bar select:focus,
.search-panel input:focus {
    border-color: var(--amber);
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.18);
}

.header-search button,
.mobile-search button,
.search-panel button {
    border: 0;
    border-radius: 999px;
    padding: 10px 16px;
    background: var(--amber);
    color: #111827;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.header-search button {
    position: absolute;
    right: 3px;
    top: 3px;
    bottom: 3px;
    padding: 0 14px;
}

.header-search button:hover,
.mobile-search button:hover,
.search-panel button:hover,
.button-primary:hover,
.button-ghost:hover {
    transform: translateY(-1px) scale(1.02);
}

.menu-button {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #111827;
    color: var(--text);
    cursor: pointer;
}

.mobile-panel {
    display: none;
    padding: 0 16px 18px;
    border-top: 1px solid var(--line);
    background: #050505;
}

.mobile-panel.is-open {
    display: grid;
    gap: 14px;
}

.hero {
    position: relative;
    min-height: 600px;
    overflow: hidden;
    isolation: isolate;
}

.hero-media {
    position: absolute;
    inset: 0;
    z-index: -2;
}

.hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08) contrast(1.04);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.94) 0%, rgba(0, 0, 0, 0.74) 46%, rgba(0, 0, 0, 0.16) 100%), linear-gradient(180deg, rgba(17, 24, 39, 0.15), #050505 98%);
}

.hero-content {
    min-height: 600px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    align-items: center;
    gap: 48px;
    padding: 72px 0;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--amber);
    font-weight: 900;
    letter-spacing: 0.06em;
    margin-bottom: 18px;
}

.eyebrow span:first-child {
    width: 28px;
    height: 28px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(251, 191, 36, 0.14);
    box-shadow: 0 0 22px rgba(251, 191, 36, 0.28);
}

.hero h1 {
    margin: 0 0 20px;
    font-size: clamp(2.8rem, 7vw, 5.6rem);
    line-height: 0.96;
    letter-spacing: -0.05em;
}

.hero p {
    margin: 0 0 28px;
    color: #d1d5db;
    font-size: clamp(1rem, 1.7vw, 1.28rem);
    max-width: 680px;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 32px;
}

.hero-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.72);
    border: 1px solid var(--line);
    color: #e5e7eb;
    padding: 8px 14px;
    backdrop-filter: blur(10px);
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}

.button-primary,
.button-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border-radius: 13px;
    padding: 14px 22px;
    font-weight: 900;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.button-primary {
    background: var(--amber);
    color: #111827;
    box-shadow: 0 16px 38px rgba(251, 191, 36, 0.28);
}

.button-ghost {
    background: rgba(17, 24, 39, 0.62);
    color: var(--text);
    border: 1px solid var(--line);
}

.button-ghost:hover {
    border-color: rgba(251, 191, 36, 0.5);
}

.hero-panel {
    background: rgba(17, 24, 39, 0.54);
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: 16px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.hero-panel img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 20px;
}

.hero-panel h2 {
    margin: 18px 6px 6px;
    font-size: 1.2rem;
}

.hero-panel p {
    margin: 0 6px 10px;
    color: var(--muted);
    font-size: 0.92rem;
}

.section {
    padding: 70px 0;
}

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

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.section-heading p,
.page-lead,
.category-copy,
.empty-message {
    margin: 8px 0 0;
    color: var(--muted);
}

.section-heading a {
    color: var(--amber);
    font-weight: 800;
    white-space: nowrap;
}

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

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

.movie-card,
.horizontal-card,
.category-card,
.info-panel,
.player-info,
.search-panel,
.breadcrumbs,
.rank-item {
    background: rgba(31, 41, 55, 0.78);
    border: 1px solid var(--line);
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.22);
}

.movie-card,
.category-card,
.info-panel,
.player-info,
.search-panel,
.breadcrumbs {
    border-radius: var(--radius);
}

.movie-card {
    overflow: hidden;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover,
.horizontal-card:hover,
.category-card:hover,
.rank-item:hover {
    transform: translateY(-4px);
    border-color: rgba(251, 191, 36, 0.34);
    box-shadow: 0 22px 58px rgba(251, 191, 36, 0.12);
}

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

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

.movie-card-large .poster-link img {
    aspect-ratio: 16 / 10;
}

.movie-card:hover .poster-link img,
.category-card:hover img,
.horizontal-card:hover img,
.rank-item:hover img {
    transform: scale(1.08);
}

.card-badge,
.card-time,
.rank-number {
    position: absolute;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 900;
    padding: 5px 10px;
}

.card-badge {
    top: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.72);
    color: #ffffff;
}

.card-time {
    right: 12px;
    bottom: 12px;
    background: rgba(0, 0, 0, 0.78);
    color: #ffffff;
}

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

.movie-card h3,
.horizontal-card h3,
.rank-item h3 {
    margin: 0 0 9px;
    font-size: 1.08rem;
    line-height: 1.35;
}

.movie-card h3 a,
.horizontal-card h3 a,
.rank-item h3 a {
    transition: color 0.2s ease;
}

.movie-card h3 a:hover,
.horizontal-card h3 a:hover,
.rank-item h3 a:hover {
    color: var(--amber);
}

.movie-card p,
.horizontal-card p,
.rank-item p {
    margin: 0 0 13px;
    color: var(--muted);
    font-size: 0.94rem;
}

.meta-row,
.tag-row,
.detail-tags,
.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.meta-row {
    color: var(--muted-strong);
    font-size: 0.86rem;
}

.tag-row span,
.detail-tags span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: rgba(251, 191, 36, 0.12);
    color: #fcd34d;
    padding: 5px 10px;
    font-size: 0.78rem;
    font-weight: 800;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    padding: 20px;
    min-height: 190px;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.category-card h2,
.category-card h3 {
    margin: 0 0 10px;
    font-size: 1.35rem;
}

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

.poster-strip {
    display: flex;
    gap: 8px;
    margin-top: 18px;
}

.poster-strip img {
    width: 25%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 10px;
    opacity: 0.88;
}

.feature-band {
    border-radius: 32px;
    background: linear-gradient(110deg, rgba(31, 41, 55, 0.92), rgba(251, 191, 36, 0.12), rgba(17, 24, 39, 0.88));
    border: 1px solid var(--line);
    padding: 36px;
    box-shadow: var(--shadow);
}

.feature-layout {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 26px;
    align-items: center;
}

.horizontal-stack {
    display: grid;
    gap: 16px;
}

.horizontal-card {
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr);
    gap: 16px;
    padding: 12px;
    border-radius: 16px;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.horizontal-thumb {
    display: block;
    overflow: hidden;
    border-radius: 12px;
    background: #111827;
}

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

.page-hero {
    padding: 64px 0 34px;
    background: linear-gradient(90deg, #050505, #1f2937);
    border-bottom: 1px solid var(--line);
}

.page-hero h1 {
    margin: 0;
    font-size: clamp(2.2rem, 5vw, 4rem);
    letter-spacing: -0.04em;
}

.page-hero p {
    max-width: 780px;
    color: var(--muted-strong);
    font-size: 1.08rem;
}

.control-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 190px;
    gap: 14px;
    margin: 28px 0;
}

.control-bar select {
    appearance: none;
}

.empty-message {
    display: none;
    padding: 24px;
    border-radius: 16px;
    background: rgba(31, 41, 55, 0.72);
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(320px, 0.9fr);
    gap: 30px;
    align-items: start;
}

.breadcrumbs {
    padding: 12px 16px;
    margin-bottom: 24px;
    color: var(--muted);
    font-size: 0.92rem;
}

.breadcrumbs a:hover {
    color: var(--amber);
}

.player-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #000000;
    box-shadow: var(--shadow);
    border: 1px solid var(--line);
}

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

.player-layer {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.55));
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-button {
    width: 88px;
    height: 88px;
    border: 0;
    border-radius: 999px;
    background: var(--amber);
    color: #111827;
    font-size: 2.4rem;
    cursor: pointer;
    box-shadow: 0 16px 50px rgba(251, 191, 36, 0.36);
    transition: transform 0.2s ease, background 0.2s ease;
}

.play-button:hover {
    transform: scale(1.08);
    background: #f59e0b;
}

.player-info {
    margin-top: 22px;
    padding: 26px;
}

.player-info h1 {
    margin: 0 0 14px;
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1.08;
}

.detail-tags {
    margin: 18px 0;
}

.info-panel {
    padding: 24px;
    margin-top: 22px;
}

.info-panel h2,
.player-info h2 {
    margin: 0 0 14px;
    font-size: 1.35rem;
}

.info-panel p,
.player-info p {
    margin: 0 0 14px;
    color: var(--muted-strong);
}

.sidebar {
    position: sticky;
    top: 94px;
}

.sidebar h2 {
    margin: 0 0 18px;
}

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

.rank-item {
    position: relative;
    display: grid;
    grid-template-columns: 66px 112px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border-radius: 18px;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.rank-number-static {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--amber), #fef3c7);
    color: #111827;
    font-weight: 900;
}

.rank-thumb {
    overflow: hidden;
    border-radius: 14px;
    background: #111827;
}

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

.rank-score {
    color: var(--amber);
    font-weight: 900;
    white-space: nowrap;
}

.search-panel {
    padding: 26px;
    margin-bottom: 28px;
}

.search-panel form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
}

.search-title {
    margin: 0 0 16px;
}

.site-footer {
    margin-top: 70px;
    background: #0b0f16;
    color: var(--muted);
    border-top: 1px solid var(--line);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 0.8fr 0.9fr 1fr;
    gap: 34px;
    padding: 46px 0;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: 1rem;
}

.site-footer p {
    margin: 12px 0 0;
}

.site-footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.site-footer a:hover {
    color: var(--amber);
}

.footer-bottom {
    padding: 18px 16px;
    border-top: 1px solid var(--line);
    text-align: center;
    color: #6b7280;
}

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

    .menu-button {
        display: inline-grid;
        place-items: center;
    }

    .hero-content,
    .feature-layout,
    .detail-layout,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero-panel {
        display: none;
    }

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

    .sidebar {
        position: static;
    }
}

@media (max-width: 700px) {
    .container {
        width: min(100% - 24px, 1180px);
    }

    .hero,
    .hero-content {
        min-height: 540px;
    }

    .hero-content {
        padding: 54px 0;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .button-row,
    .hero-meta,
    .section-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .movie-grid,
    .movie-grid.wide,
    .channel-grid,
    .control-bar,
    .search-panel form {
        grid-template-columns: 1fr;
    }

    .horizontal-card,
    .rank-item {
        grid-template-columns: 88px minmax(0, 1fr);
    }

    .rank-number-static,
    .rank-score {
        display: none;
    }

    .feature-band {
        padding: 22px;
        border-radius: 22px;
    }

    .footer-grid {
        gap: 24px;
    }
}
