:root {
    --bg: #020617;
    --bg-soft: #0f172a;
    --card: rgba(15, 23, 42, 0.72);
    --card-strong: rgba(15, 23, 42, 0.94);
    --line: rgba(148, 163, 184, 0.16);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --emerald: #34d399;
    --emerald-strong: #10b981;
    --cyan: #22d3ee;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(16, 185, 129, 0.20), transparent 34rem),
        radial-gradient(circle at top right, rgba(34, 211, 238, 0.14), transparent 30rem),
        var(--bg);
    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.65;
}

body.menu-open {
    overflow: hidden;
}

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

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

button,
input,
select {
    font: inherit;
}

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

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

.site-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 68px;
}

.brand,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-icon {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    color: #052e2b;
    background: linear-gradient(135deg, var(--emerald), var(--cyan));
    border-radius: 12px;
    box-shadow: 0 10px 28px rgba(16, 185, 129, 0.26);
}

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

.nav-link,
.nav-more {
    color: var(--muted-strong);
    background: transparent;
    border: 0;
    cursor: pointer;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.nav-more:hover {
    color: var(--emerald);
}

.nav-dropdown {
    position: relative;
}

.dropdown-panel {
    position: absolute;
    top: calc(100% + 16px);
    right: 0;
    display: grid;
    min-width: 170px;
    padding: 12px;
    background: var(--card-strong);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: 0.2s ease;
}

.nav-dropdown:hover .dropdown-panel,
.nav-dropdown:focus-within .dropdown-panel {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.dropdown-panel a,
.mobile-panel a,
.footer-links a {
    padding: 8px 10px;
    color: var(--muted-strong);
    border-radius: 12px;
    transition: 0.2s ease;
}

.dropdown-panel a:hover,
.mobile-panel a:hover,
.footer-links a:hover {
    color: var(--emerald);
    background: rgba(16, 185, 129, 0.09);
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    padding: 10px;
    background: rgba(15, 23, 42, 0.86);
    border: 1px solid var(--line);
    border-radius: 14px;
}

.mobile-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: var(--text);
    border-radius: 999px;
}

.mobile-panel {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 12px;
    background: var(--card-strong);
    border: 1px solid var(--line);
    border-radius: 18px;
}

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

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

.hero {
    position: relative;
    min-height: 76vh;
    overflow: hidden;
    background: #020617;
}

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

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

.hero-bg,
.detail-hero::before,
.category-cover,
.media-thumb,
.cover-box {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(16, 185, 129, 0.26), rgba(34, 211, 238, 0.16)),
        #0f172a;
}

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

.hero-bg img,
.cover-box img,
.category-cover img,
.media-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to top, rgba(2, 6, 23, 1), rgba(2, 6, 23, 0.62), rgba(2, 6, 23, 0.14)),
        linear-gradient(to right, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.26));
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 250px;
    gap: 32px;
    align-items: end;
    min-height: 76vh;
    padding: 130px 0 72px;
}

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

.hero-kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    padding: 6px 12px;
    color: var(--emerald);
    background: rgba(16, 185, 129, 0.14);
    border: 1px solid rgba(16, 185, 129, 0.24);
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 700;
}

.hero h1,
.page-hero h1,
.detail-info-card h1 {
    margin: 0 0 18px;
    font-size: clamp(2.3rem, 6vw, 5rem);
    line-height: 1.05;
    letter-spacing: -0.055em;
}

.hero p,
.page-hero p,
.detail-info-card p {
    max-width: 720px;
    margin: 0 0 24px;
    color: var(--muted-strong);
    font-size: 1.05rem;
}

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

.hero-tags span,
.tag-row span,
.detail-tags a {
    padding: 5px 10px;
    color: var(--muted-strong);
    background: rgba(15, 23, 42, 0.66);
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 0.84rem;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-weight: 800;
    cursor: pointer;
    transition: 0.2s ease;
}

.btn.primary {
    color: #052e2b;
    background: linear-gradient(135deg, var(--emerald), var(--cyan));
    box-shadow: 0 16px 32px rgba(16, 185, 129, 0.24);
}

.btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 42px rgba(16, 185, 129, 0.30);
}

.btn.ghost {
    color: var(--text);
    background: rgba(15, 23, 42, 0.68);
    border-color: var(--line);
}

.btn.ghost:hover {
    border-color: rgba(52, 211, 153, 0.46);
    color: var(--emerald);
}

.btn.full {
    width: 100%;
    margin-top: 16px;
}

.hero-card,
.hero-stat,
.rank-panel,
.filter-panel,
.detail-info-card,
.detail-content,
.category-overview-card a {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.hero-card {
    padding: 22px;
}

.hero-card span,
.hero-card em,
.hero-stat span {
    display: block;
    color: var(--muted);
    font-style: normal;
}

.hero-card strong,
.hero-stat strong {
    display: block;
    margin: 4px 0;
    color: var(--emerald);
    font-size: 2.4rem;
    line-height: 1;
}

.hero-dots {
    position: absolute;
    right: 0;
    bottom: 30px;
    left: 0;
    z-index: 4;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.hero-dot {
    width: 30px;
    height: 4px;
    padding: 0;
    background: rgba(203, 213, 225, 0.35);
    border: 0;
    border-radius: 999px;
    cursor: pointer;
}

.hero-dot.is-active {
    background: var(--emerald);
}

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

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

.section-header h2,
.filter-heading h2,
.rank-panel h2,
.detail-content h2 {
    margin: 0 0 8px;
    font-size: clamp(1.45rem, 3vw, 2rem);
    line-height: 1.15;
}

.section-header p,
.filter-heading p,
.rank-panel p,
.detail-content p {
    margin: 0;
    color: var(--muted);
}

.section-header a {
    color: var(--emerald);
    font-weight: 800;
}

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

.category-card,
.category-overview-card a {
    display: grid;
    gap: 12px;
    padding: 16px;
    min-height: 100%;
    background: rgba(15, 23, 42, 0.58);
    border: 1px solid var(--line);
    border-radius: 20px;
    transition: 0.24s ease;
}

.category-card:hover,
.category-overview-card a:hover,
.movie-card:hover,
.ranking-row:hover {
    transform: translateY(-4px);
    border-color: rgba(52, 211, 153, 0.42);
    box-shadow: 0 18px 52px rgba(0, 0, 0, 0.26);
}

.category-cover {
    display: block;
    aspect-ratio: 16 / 9;
    border-radius: 16px;
}

.category-cover.large {
    aspect-ratio: 21 / 10;
}

.category-name {
    color: var(--text);
    font-weight: 900;
    font-size: 1.05rem;
}

.category-card strong,
.category-overview-card strong {
    color: var(--emerald);
    font-size: 1.35rem;
}

.category-card em,
.category-overview-card em,
.category-overview-card p {
    color: var(--muted);
    font-style: normal;
}

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

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

.filter-controls {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(150px, 190px));
    gap: 14px;
    align-items: end;
}

.filter-controls label {
    display: grid;
    gap: 6px;
    color: var(--muted-strong);
    font-weight: 700;
}

.filter-controls input,
.filter-controls select {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    color: var(--text);
    background: rgba(2, 6, 23, 0.7);
    border: 1px solid var(--line);
    border-radius: 14px;
    outline: none;
}

.filter-controls input:focus,
.filter-controls select:focus {
    border-color: rgba(52, 211, 153, 0.58);
    box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.12);
}

.filter-result {
    margin-top: 12px;
    color: var(--muted);
    font-size: 0.92rem;
}

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

.movie-card {
    overflow: hidden;
    background: rgba(15, 23, 42, 0.62);
    border: 1px solid var(--line);
    border-radius: 20px;
    transition: 0.24s ease;
}

.movie-card.is-hidden,
.ranking-row.is-hidden {
    display: none;
}

.movie-card-link {
    display: grid;
    min-height: 100%;
}

.cover-box {
    aspect-ratio: 16 / 9;
}

.cover-fallback {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 20px;
    color: var(--text);
    text-align: center;
    font-weight: 900;
    opacity: 0;
}

.cover-missing .cover-fallback {
    opacity: 1;
}

.year-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 3px 9px;
    color: #052e2b;
    background: var(--emerald);
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 900;
}

.play-hover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: white;
    font-size: 2.5rem;
    background: linear-gradient(to top, rgba(2, 6, 23, 0.78), transparent);
    opacity: 0;
    transition: 0.2s ease;
}

.movie-card:hover .play-hover {
    opacity: 1;
}

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

.cover-box img,
.category-cover img {
    transition: transform 0.5s ease;
}

.movie-card-body {
    display: grid;
    gap: 10px;
    padding: 15px;
}

.movie-card-body h3 {
    margin: 0;
    font-size: 1rem;
    line-height: 1.3;
}

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

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.card-meta span {
    padding: 3px 8px;
    color: var(--muted-strong);
    background: rgba(2, 6, 23, 0.45);
    border-radius: 999px;
    font-size: 0.78rem;
}

.rank-panel {
    padding: 22px;
}

.sticky-panel {
    position: sticky;
    top: 92px;
}

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

.media-item {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 8px;
    border-radius: 16px;
    transition: 0.2s ease;
}

.media-item:hover {
    background: rgba(16, 185, 129, 0.08);
}

.media-thumb {
    display: block;
    width: 96px;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
}

.media-info {
    display: grid;
    min-width: 0;
}

.media-info strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.media-info em,
.media-rank {
    color: var(--muted);
    font-size: 0.82rem;
    font-style: normal;
}

.media-rank {
    color: var(--emerald);
    font-weight: 900;
}

.page-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 48px;
    background:
        linear-gradient(135deg, rgba(16, 185, 129, 0.16), rgba(34, 211, 238, 0.08)),
        rgba(15, 23, 42, 0.64);
    border: 1px solid var(--line);
    border-radius: 30px;
    box-shadow: var(--shadow);
}

.compact-hero {
    margin-top: 16px;
}

.channel-hero {
    margin-top: 16px;
}

.hero-stat {
    min-width: 180px;
    padding: 24px;
    text-align: center;
}

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

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

.ranking-row {
    background: rgba(15, 23, 42, 0.62);
    border: 1px solid var(--line);
    border-radius: 18px;
    transition: 0.24s ease;
}

.ranking-row a {
    display: grid;
    grid-template-columns: 70px 130px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 12px;
}

.ranking-number {
    color: var(--emerald);
    font-size: 1.3rem;
    font-weight: 900;
    text-align: center;
}

.ranking-main {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.ranking-main strong {
    font-size: 1.05rem;
}

.ranking-main em,
.ranking-main small {
    color: var(--muted);
    font-style: normal;
}

.ranking-main small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ranking-heat {
    padding: 6px 12px;
    color: #052e2b;
    background: var(--emerald);
    border-radius: 999px;
    font-weight: 900;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--muted);
    padding-bottom: 18px;
}

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

.detail-hero {
    position: relative;
    overflow: hidden;
    padding: 26px 0 34px;
}

.detail-hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    gap: 24px;
    align-items: stretch;
}

.player-card {
    position: relative;
    overflow: hidden;
    min-height: 430px;
    background: #000;
    border: 1px solid var(--line);
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.player-card video {
    width: 100%;
    height: 100%;
    min-height: 430px;
    object-fit: cover;
    background: #000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 10px;
    color: var(--text);
    background:
        radial-gradient(circle, rgba(16, 185, 129, 0.28), transparent 18rem),
        linear-gradient(to top, rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.22));
    border: 0;
    cursor: pointer;
}

.player-card.is-playing .player-overlay {
    opacity: 0;
    pointer-events: none;
}

.play-circle {
    display: grid;
    place-items: center;
    width: 78px;
    height: 78px;
    color: #052e2b;
    background: linear-gradient(135deg, var(--emerald), var(--cyan));
    border-radius: 50%;
    font-size: 2rem;
    box-shadow: 0 20px 60px rgba(16, 185, 129, 0.36);
}

.player-overlay strong {
    font-size: 1.25rem;
}

.player-overlay em,
.player-message {
    color: var(--muted-strong);
    font-style: normal;
}

.player-message {
    position: absolute;
    right: 18px;
    bottom: 12px;
    left: 18px;
    margin: 0;
    text-align: center;
    font-size: 0.9rem;
}

.detail-info-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 30px;
}

.detail-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 24px 0 0;
}

.detail-meta div {
    padding: 12px;
    background: rgba(2, 6, 23, 0.48);
    border: 1px solid var(--line);
    border-radius: 14px;
}

.detail-meta dt {
    color: var(--muted);
    font-size: 0.82rem;
}

.detail-meta dd {
    margin: 2px 0 0;
    color: var(--text);
    font-weight: 800;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 28px;
}

.detail-content {
    padding: 28px;
}

.detail-content h2 + p {
    margin-bottom: 28px;
}

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

.site-footer {
    margin-top: 48px;
    padding: 48px 0 18px;
    background: rgba(2, 6, 23, 0.78);
    border-top: 1px solid var(--line);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 0.8fr;
    gap: 36px;
}

.footer-grid h3 {
    margin: 0 0 12px;
}

.footer-grid p,
.copyright {
    color: var(--muted);
}

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

.copyright {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 34px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    font-size: 0.92rem;
}

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

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

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

    .sticky-panel {
        position: static;
    }

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

    .hero-card {
        max-width: 260px;
    }
}

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

    .mobile-toggle {
        display: block;
    }

    .hero,
    .hero-content {
        min-height: 86vh;
    }

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

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

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

    .page-hero {
        display: grid;
        padding: 28px;
    }

    .ranking-row a {
        grid-template-columns: 48px 96px minmax(0, 1fr);
    }

    .ranking-heat {
        grid-column: 2 / -1;
        justify-self: start;
    }

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

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

    .hero h1,
    .page-hero h1,
    .detail-info-card h1 {
        font-size: 2.35rem;
    }

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

    .section-header,
    .copyright {
        display: grid;
    }

    .media-item {
        grid-template-columns: 88px minmax(0, 1fr) auto;
    }

    .media-thumb {
        width: 88px;
    }

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

    .player-card,
    .player-card video {
        min-height: 260px;
    }
}
