:root {
    --bg: #0a0e1a;
    --panel: rgba(255, 255, 255, 0.05);
    --panel-strong: rgba(255, 255, 255, 0.09);
    --border: rgba(255, 255, 255, 0.1);
    --gold: #f59e0b;
    --gold-soft: rgba(245, 158, 11, 0.18);
    --orange: #f97316;
    --text: #f3f4f6;
    --muted: #9ca3af;
    --soft: #d1d5db;
    --shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.45);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.12), transparent 32rem),
        radial-gradient(circle at top right, rgba(249, 115, 22, 0.1), transparent 30rem),
        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,
video {
    display: block;
    max-width: 100%;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.glass {
    border: 1px solid var(--border);
    background: var(--panel);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(245, 158, 11, 0.2);
    background: rgba(10, 14, 26, 0.82);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

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

.brand-mark {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--gold), var(--orange));
    color: #111827;
    box-shadow: 0 10px 28px rgba(245, 158, 11, 0.24);
}

.brand-text,
.footer-brand span:last-child {
    background: linear-gradient(90deg, var(--gold), var(--orange));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: 20px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 30px;
    color: var(--soft);
}

.desktop-nav a,
.mobile-nav a {
    transition: color 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
    color: var(--gold);
}

.menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--panel);
}

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

.mobile-nav {
    display: none;
    padding: 0 16px 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

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

.hero-carousel {
    position: relative;
    min-height: 600px;
    overflow: hidden;
    background: #05070d;
}

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

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

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

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(10, 14, 26, 0.95), rgba(10, 14, 26, 0.55), rgba(10, 14, 26, 0.15)),
        linear-gradient(0deg, var(--bg), rgba(10, 14, 26, 0.25) 42%, transparent);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    min-height: 600px;
    padding-bottom: 82px;
}

.hero-text {
    max-width: 680px;
}

.hero-text h1,
.hero-text h2 {
    margin: 18px 0 16px;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.05;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.36);
}

.hero-text p {
    max-width: 620px;
    color: var(--soft);
    font-size: 18px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 28px;
}

.primary-btn,
.ghost-btn,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 12px;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.primary-btn {
    padding: 0 26px;
    background: linear-gradient(90deg, var(--gold), var(--orange));
    color: #111827;
    box-shadow: 0 14px 30px rgba(245, 158, 11, 0.24);
}

.ghost-btn {
    padding: 0 22px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
}

.primary-btn:hover,
.ghost-btn:hover,
.text-link:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    font-size: 34px;
    line-height: 1;
    backdrop-filter: blur(12px);
}

.hero-prev {
    left: 18px;
}

.hero-next {
    right: 18px;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.42);
}

.hero-dot.active {
    width: 32px;
    background: var(--gold);
}

.section-space {
    padding: 72px 0 0;
}

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

.section-head h2 {
    margin: 0;
    font-size: clamp(26px, 4vw, 36px);
}

.section-head.slim h2 {
    font-size: 26px;
}

.section-link,
.text-link {
    color: var(--gold);
}

.category-grid,
.movie-grid,
.channel-grid {
    display: grid;
    gap: 22px;
}

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

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

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

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

.category-card,
.movie-card,
.channel-card,
.rank-card,
.compact-card {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--panel);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

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

.category-card {
    position: relative;
    min-height: 210px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.category-card img {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.42;
}

.category-card::after {
    position: absolute;
    inset: 0;
    z-index: 1;
    content: "";
    background: linear-gradient(0deg, rgba(10, 14, 26, 0.94), rgba(10, 14, 26, 0.2));
}

.category-card span,
.category-card p {
    position: relative;
    z-index: 2;
}

.category-card span {
    color: var(--gold);
    font-size: 24px;
    font-weight: 800;
}

.category-card p {
    margin: 8px 0 0;
    color: var(--soft);
}

.movie-cover,
.channel-cover,
.compact-cover,
.rank-cover {
    position: relative;
    display: block;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.04);
}

.movie-cover {
    aspect-ratio: 3 / 4;
}

.movie-cover img,
.channel-cover img,
.compact-cover img,
.rank-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.movie-card:hover img,
.channel-card:hover img,
.compact-card:hover img,
.rank-card:hover img {
    transform: scale(1.06);
}

.cover-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.68);
    color: var(--text);
    font-size: 12px;
}

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

.movie-card h3 {
    margin: 10px 0 8px;
    font-size: 19px;
    line-height: 1.35;
}

.movie-card h3 a:hover,
.rank-title:hover,
.compact-title:hover,
.channel-card h2 a:hover {
    color: var(--gold);
}

.movie-card p,
.rank-body p,
.compact-content p,
.channel-card p,
.page-hero p,
.footer-grid p {
    color: var(--muted);
}

.movie-card p,
.rank-body p,
.compact-content p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--gold-soft);
    color: var(--gold);
    font-size: 12px;
}

.movie-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    color: #6b7280;
    font-size: 13px;
}

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

.ranking-panel,
.side-box,
.detail-info,
.player-card {
    border-radius: 18px;
}

.ranking-panel {
    position: sticky;
    top: 86px;
    padding: 24px;
}

.ranking-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 15px;
}

.ranking-list li {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    color: var(--soft);
}

.ranking-list span,
.ranking-number {
    color: var(--gold);
    font-weight: 900;
}

.ranking-list a {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ranking-list a:hover {
    color: var(--gold);
}

.ranking-list em {
    color: #6b7280;
    font-style: normal;
    font-size: 13px;
}

.page-hero {
    padding: 70px 0;
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.18), rgba(249, 115, 22, 0.16));
    border-bottom: 1px solid rgba(245, 158, 11, 0.16);
}

.page-hero h1 {
    margin: 0 0 14px;
    font-size: clamp(34px, 5vw, 52px);
}

.page-hero p {
    max-width: 760px;
    font-size: 18px;
}

.channel-card {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 22px;
    padding: 18px;
}

.channel-cover {
    height: 150px;
    border-radius: 14px;
}

.channel-card h2 {
    margin: 8px 0 10px;
    color: var(--gold);
}

.filter-panel {
    margin-bottom: 28px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--panel);
}

.search-box input {
    width: 100%;
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    outline: none;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    padding: 0 16px;
}

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

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.filter-chip {
    min-height: 36px;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--soft);
}

.filter-chip.active,
.filter-chip:hover {
    border-color: rgba(245, 158, 11, 0.5);
    background: var(--gold-soft);
    color: var(--gold);
}

.ranking-page-list {
    display: grid;
    gap: 16px;
}

.ranking-row {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 16px;
    align-items: stretch;
}

.ranking-number {
    display: grid;
    place-items: center;
    min-height: 120px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--panel);
    font-size: 22px;
}

.rank-card {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 20px;
    padding: 14px;
}

.rank-cover {
    height: 120px;
    border-radius: 14px;
}

.rank-title,
.compact-title {
    display: inline-block;
    margin: 8px 0;
    font-weight: 800;
    font-size: 20px;
}

.detail-wrap {
    padding: 34px 0 0;
}

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

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

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

.detail-main {
    display: grid;
    gap: 24px;
}

.player-card {
    padding: 12px;
}

.player-frame {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 16px;
    background: #000;
}

.player-frame video {
    width: 100%;
    height: 100%;
    background: #000;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 3;
    padding: 0;
    border: 0;
    background: #000;
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

.player-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.54;
}

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

.play-circle {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    width: 82px;
    height: 82px;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--gold), var(--orange));
    color: #111827;
    font-size: 34px;
    font-weight: 900;
    transform: translate(-50%, -50%);
    box-shadow: 0 18px 42px rgba(245, 158, 11, 0.34);
}

.detail-info,
.side-box {
    padding: 26px;
}

.detail-info h1 {
    margin: 0 0 16px;
    font-size: clamp(30px, 5vw, 46px);
    line-height: 1.15;
}

.detail-info h2,
.side-box h2 {
    margin: 26px 0 12px;
    color: var(--gold);
    font-size: 24px;
}

.side-box h2:first-child {
    margin-top: 0;
}

.detail-info p {
    color: #d1d5db;
    white-space: pre-line;
}

.lead-text {
    margin-top: 18px;
    color: var(--text) !important;
    font-size: 18px;
}

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

.detail-side {
    position: sticky;
    top: 86px;
    display: grid;
    gap: 22px;
}

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

.compact-card {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 12px;
    padding: 10px;
}

.compact-cover {
    height: 74px;
    border-radius: 12px;
}

.compact-title {
    margin: 0 0 4px;
    font-size: 15px;
}

.compact-content p {
    margin: 0;
    font-size: 13px;
}

.compact-content span {
    display: block;
    margin-top: 5px;
    color: #6b7280;
    font-size: 12px;
}

.info-list {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 10px 12px;
    margin: 0;
}

.info-list dt {
    color: var(--gold);
}

.info-list dd {
    margin: 0;
    color: var(--soft);
}

.site-footer {
    margin-top: 88px;
    border-top: 1px solid rgba(245, 158, 11, 0.18);
    background: rgba(10, 14, 26, 0.92);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 34px;
    padding: 44px 0;
}

.footer-grid h3 {
    margin: 0 0 14px;
    color: var(--gold);
}

.footer-grid a {
    display: block;
    margin: 8px 0;
    color: var(--muted);
}

.footer-grid a:hover {
    color: var(--gold);
}

.footer-bottom {
    padding: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--muted);
    text-align: center;
    font-size: 14px;
}

.movie-item.hidden {
    display: none !important;
}

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

    .split-section,
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .ranking-panel,
    .detail-side {
        position: static;
    }
}

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

    .menu-toggle {
        display: flex;
    }

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

    .hero-text p {
        font-size: 16px;
    }

    .hero-arrow {
        display: none;
    }

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

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

    .rank-cover {
        height: 210px;
    }

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

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

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

    .hero-content {
        padding-bottom: 64px;
    }

    .hero-text h1,
    .hero-text h2 {
        font-size: 34px;
    }

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

    .category-grid,
    .movie-grid,
    .compact-grid,
    .channel-grid {
        grid-template-columns: 1fr;
    }

    .ranking-row {
        grid-template-columns: 1fr;
    }

    .ranking-number {
        min-height: 48px;
    }

    .compact-card {
        grid-template-columns: 96px minmax(0, 1fr);
    }

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