:root {
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.92);
    --panel-soft: rgba(30, 41, 59, 0.58);
    --panel-strong: #0f172a;
    --line: rgba(51, 65, 85, 0.78);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --teal: #14b8a6;
    --teal-dark: #0f766e;
    --cyan: #06b6d4;
    --amber: #f59e0b;
    --rose: #f43f5e;
    --purple: #a855f7;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: radial-gradient(circle at 20% 0%, rgba(20, 184, 166, 0.15), transparent 30%), var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(30, 41, 59, 0.9);
    background: rgba(2, 6, 23, 0.86);
    backdrop-filter: blur(18px);
}

.header-inner,
.footer-inner,
.section-wrap,
.search-band,
.page-main,
.detail-main,
.breadcrumb {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
}

.header-inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: #fff;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, var(--teal), var(--cyan));
    box-shadow: 0 12px 30px rgba(20, 184, 166, 0.28);
}

.desktop-nav {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.nav-link {
    padding: 10px 14px;
    border-radius: 12px;
    color: var(--soft);
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #fff;
    background: rgba(20, 184, 166, 0.16);
}

.header-search,
.mobile-search,
.search-large {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.78);
    padding: 7px;
}

.header-search input,
.mobile-search input,
.search-large input {
    min-width: 0;
    color: #fff;
    border: 0;
    outline: 0;
    background: transparent;
    padding: 8px 10px;
}

.header-search button,
.mobile-search button,
.search-large button,
.primary-btn,
.secondary-btn,
.filter-bar button {
    border: 0;
    border-radius: 12px;
    color: #fff;
    background: var(--teal);
    padding: 9px 16px;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.search-large button:hover,
.primary-btn:hover,
.filter-bar button:hover {
    background: var(--teal-dark);
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.9);
}

.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: #fff;
}

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

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

.mobile-nav {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 12px;
}

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

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

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

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

.hero-shade,
.detail-backdrop::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(to top, #020617 0%, rgba(2, 6, 23, 0.82) 38%, rgba(2, 6, 23, 0.18) 100%);
}

.hero-content {
    position: absolute;
    left: max(16px, calc((100vw - 1280px) / 2));
    bottom: 88px;
    width: min(720px, calc(100% - 32px));
}

.eyebrow {
    color: var(--teal);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0 0 14px;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(2.4rem, 5vw, 4.7rem);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero p,
.page-hero p,
.detail-info .lead {
    max-width: 680px;
    margin: 18px 0 0;
    color: #dbe5f0;
    font-size: 1.08rem;
    line-height: 1.75;
}

.hero-tags,
.movie-meta,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.hero-tags {
    margin-top: 24px;
}

.hero-tags span,
.movie-tags span,
.type-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    color: #fff;
    background: rgba(20, 184, 166, 0.82);
    padding: 6px 11px;
    font-size: 0.88rem;
    font-weight: 700;
}

.hero-tags span:nth-child(n + 2) {
    background: rgba(15, 23, 42, 0.88);
    border: 1px solid rgba(148, 163, 184, 0.24);
}

.hero-keywords,
.movie-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.movie-tags span {
    color: #9fe8de;
    background: rgba(20, 184, 166, 0.12);
    border: 1px solid rgba(20, 184, 166, 0.22);
    font-size: 0.78rem;
}

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

.primary-btn,
.secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    font-weight: 800;
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(10px);
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.18);
}

.hero-controls {
    position: absolute;
    right: max(16px, calc((100vw - 1280px) / 2));
    bottom: 34px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.hero-arrow,
.hero-dot {
    border: 0;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    cursor: pointer;
}

.hero-arrow {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    font-size: 2rem;
    line-height: 1;
}

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

.hero-dot {
    width: 11px;
    height: 11px;
    border-radius: 999px;
}

.hero-dot.active {
    width: 30px;
    background: var(--teal);
}

.search-band,
.page-hero,
.detail-hero,
.player-section,
.detail-content {
    margin-top: 42px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.12), rgba(15, 23, 42, 0.74));
    box-shadow: var(--shadow);
}

.search-band {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: 24px;
    padding: 28px;
}

.search-band h2,
.section-title h2,
.side-rank h2,
.player-section h2,
.detail-content h2 {
    margin: 0;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    color: #fff;
}

.search-band p {
    margin: 8px 0 0;
    color: var(--muted);
}

.search-large {
    width: 100%;
}

.search-large input {
    flex: 1;
}

.section-wrap {
    margin-top: 72px;
}

.first-section {
    margin-top: 34px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 26px;
}

.section-title span {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--teal), var(--cyan));
}

.section-title.hot span {
    background: linear-gradient(135deg, #f97316, var(--rose));
}

.section-title.purple span {
    background: linear-gradient(135deg, var(--purple), #ec4899);
}

.section-title.amber span {
    background: linear-gradient(135deg, #f59e0b, #eab308);
}

.section-title a {
    margin-left: auto;
    color: var(--teal);
    font-weight: 700;
}

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(51, 65, 85, 0.72);
    border-radius: 18px;
    background: rgba(30, 41, 59, 0.5);
    transition: transform 0.22s ease, background 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-5px) scale(1.015);
    border-color: rgba(20, 184, 166, 0.54);
    background: rgba(30, 41, 59, 0.86);
    box-shadow: 0 20px 46px rgba(0, 0, 0, 0.28);
}

.movie-cover {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #0f172a;
}

.movie-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease, filter 0.35s ease;
}

.movie-card:hover .movie-cover img,
.category-tile:hover img,
.rank-row:hover img {
    transform: scale(1.07);
    filter: brightness(0.78);
}

.play-badge {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    margin: auto;
    border-radius: 50%;
    color: #fff;
    background: rgba(20, 184, 166, 0.88);
    opacity: 0;
    transform: scale(0.88);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-badge {
    opacity: 1;
    transform: scale(1);
}

.type-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    border-radius: 8px;
    padding: 5px 9px;
}

.movie-info {
    padding: 16px;
}

.movie-info h3,
.rank-content h3 {
    margin: 0;
    color: #fff;
    font-size: 1.02rem;
    line-height: 1.35;
}

.movie-info h3 a,
.rank-content h3 a {
    transition: color 0.2s ease;
}

.movie-info h3 a:hover,
.rank-content h3 a:hover {
    color: var(--teal);
}

.movie-info p,
.rank-content p {
    display: -webkit-box;
    min-height: 44px;
    margin: 8px 0 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.55;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-meta {
    margin-top: 12px;
    color: var(--soft);
    font-size: 0.82rem;
}

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

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

.category-tile {
    display: grid;
    gap: 14px;
    min-height: 220px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.82);
    padding: 16px;
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.category-tile:hover {
    transform: translateY(-4px);
    border-color: rgba(20, 184, 166, 0.55);
    background: rgba(30, 41, 59, 0.85);
}

.category-stack {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    grid-template-rows: 78px 78px;
    gap: 8px;
}

.category-stack img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 14px;
    overflow: hidden;
    transition: transform 0.28s ease, filter 0.28s ease;
}

.category-stack img:first-child {
    grid-row: span 2;
}

.category-tile h3 {
    margin: 0;
    color: #fff;
}

.category-tile p {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.65;
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 30px;
}

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

.rank-row {
    display: grid;
    grid-template-columns: auto 150px minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(30, 41, 59, 0.46);
    padding: 12px;
    transition: border-color 0.22s ease, background 0.22s ease;
}

.rank-row:hover {
    border-color: rgba(20, 184, 166, 0.52);
    background: rgba(30, 41, 59, 0.82);
}

.rank-num {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    color: #fff;
    background: linear-gradient(135deg, var(--teal), var(--cyan));
    font-weight: 900;
}

.rank-thumb {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 14px;
    background: #0f172a;
}

.rank-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.28s ease, filter 0.28s ease;
}

.rank-content p {
    min-height: auto;
}

.side-rank {
    position: sticky;
    top: 94px;
    align-self: start;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.74);
    padding: 20px;
}

.rank-list.compact .rank-row {
    grid-template-columns: auto 86px minmax(0, 1fr);
}

.rank-list.compact .rank-content p {
    display: none;
}

.page-main {
    padding-bottom: 80px;
}

.page-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 440px);
    align-items: end;
    gap: 32px;
    padding: 42px;
}

.page-hero.slim {
    min-height: 260px;
}

.page-search {
    align-self: center;
}

.filter-bar {
    width: min(1280px, calc(100% - 32px));
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 28px auto 0;
}

.filter-bar button {
    border: 1px solid rgba(20, 184, 166, 0.24);
    background: rgba(20, 184, 166, 0.14);
    color: #bff7ef;
}

.filter-bar button.active {
    background: var(--teal);
    color: #fff;
}

.detail-main {
    padding-bottom: 80px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 26px;
    color: var(--muted);
    font-size: 0.95rem;
}

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

.detail-hero {
    position: relative;
    overflow: hidden;
    padding: 42px;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    opacity: 0.22;
}

.detail-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(10px) saturate(1.2);
    transform: scale(1.06);
}

.detail-grid {
    position: relative;
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 36px;
    align-items: center;
}

.poster-card {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

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

.detail-info .lead {
    font-size: 1.15rem;
}

.detail-keywords {
    max-width: 760px;
}

.jump-play {
    margin-top: 28px;
}

.player-section,
.detail-content {
    padding: 28px;
}

.player-box {
    position: relative;
    overflow: hidden;
    margin-top: 20px;
    border-radius: 24px;
    background: #000;
    aspect-ratio: 16 / 9;
    box-shadow: var(--shadow);
}

.movie-player {
    width: 100%;
    height: 100%;
    background: #000;
    object-fit: contain;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #fff;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.66), rgba(0, 0, 0, 0.18));
    cursor: pointer;
}

.player-overlay span {
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    border-radius: 50%;
    background: rgba(20, 184, 166, 0.92);
    font-size: 2rem;
    box-shadow: 0 20px 60px rgba(20, 184, 166, 0.25);
}

.player-overlay.hidden {
    display: none;
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 26px;
}

.detail-content article {
    border: 1px solid rgba(51, 65, 85, 0.7);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.62);
    padding: 24px;
}

.detail-content p {
    margin: 14px 0 0;
    color: var(--soft);
    line-height: 1.9;
}

.related-section {
    width: 100%;
}

.site-footer {
    margin-top: 90px;
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.92);
}

.footer-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding: 42px 0 28px;
}

.footer-inner p {
    max-width: 620px;
    color: var(--muted);
    line-height: 1.75;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px;
}

.footer-links a {
    color: var(--muted);
    padding: 8px 10px;
}

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

.footer-bottom {
    border-top: 1px solid rgba(30, 41, 59, 0.8);
    color: var(--muted);
    text-align: center;
    padding: 18px;
}

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

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

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

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

    .side-rank {
        position: static;
    }

    .poster-card {
        max-width: 360px;
    }
}

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

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

    .header-inner {
        min-height: 64px;
    }

    .hero {
        min-height: 560px;
    }

    .hero-content {
        bottom: 92px;
    }

    .hero-controls {
        left: 16px;
        right: auto;
    }

    .search-band,
    .footer-inner {
        grid-template-columns: 1fr;
    }

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

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

    .rank-row {
        grid-template-columns: auto 118px minmax(0, 1fr);
    }

    .footer-links {
        justify-content: flex-start;
    }
}

@media (max-width: 560px) {
    .header-inner,
    .footer-inner,
    .section-wrap,
    .search-band,
    .page-main,
    .detail-main,
    .breadcrumb,
    .filter-bar {
        width: min(100% - 22px, 1280px);
    }

    .brand {
        font-size: 0.96rem;
    }

    .hero {
        min-height: 620px;
    }

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

    .hero-actions,
    .search-large {
        flex-direction: column;
        align-items: stretch;
    }

    .search-band,
    .page-hero,
    .detail-hero,
    .player-section,
    .detail-content {
        border-radius: 22px;
        padding: 22px;
    }

    .movie-grid.six,
    .movie-grid.four {
        grid-template-columns: 1fr;
    }

    .rank-row,
    .rank-list.compact .rank-row {
        grid-template-columns: 82px minmax(0, 1fr);
    }

    .rank-num {
        grid-column: 1 / -1;
    }

    .rank-thumb {
        width: 82px;
    }

    .poster-card {
        max-width: none;
    }

    .mobile-nav {
        grid-template-columns: repeat(2, 1fr);
    }
}
