* {
    box-sizing: border-box;
}

:root {
    --bg: #020617;
    --panel: #0f172a;
    --panel-soft: rgba(15, 23, 42, 0.72);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --accent: #14b8a6;
    --accent-2: #06b6d4;
    --danger: #f97316;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background: radial-gradient(circle at top left, rgba(20, 184, 166, 0.16), transparent 34rem), var(--bg);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.7;
}

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

img {
    display: block;
    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;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(15, 23, 42, 0.94);
    backdrop-filter: blur(16px);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand-icon {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 14px;
    color: white;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 16px 30px rgba(20, 184, 166, 0.25);
}

.brand strong,
.footer-brand strong {
    display: block;
    font-size: 20px;
    line-height: 1.1;
}

.brand em {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    color: #cbd5e1;
    font-size: 15px;
    font-weight: 600;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.footer-links a:hover {
    color: var(--accent);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: currentColor;
}

.mobile-nav {
    display: none;
    flex-direction: column;
    gap: 12px;
    padding: 0 16px 16px;
    color: #cbd5e1;
}

.mobile-nav.open {
    display: flex;
}

.hero {
    position: relative;
    height: 650px;
    overflow: hidden;
    background: #020617;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 680ms ease;
}

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

.hero-bg {
    position: absolute;
    inset: 0;
    background-position: center;
    background-size: cover;
    transform: scale(1.04);
    filter: saturate(1.12);
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 76% 28%, rgba(20, 184, 166, 0.28), transparent 20rem), linear-gradient(0deg, #020617, transparent 42%);
}

.hero-content,
.detail-hero-inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 56px;
    align-items: center;
}

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

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--accent);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.05em;
}

.eyebrow span,
.section-kicker {
    padding: 6px 10px;
    border: 1px solid rgba(20, 184, 166, 0.28);
    border-radius: 999px;
    background: rgba(20, 184, 166, 0.1);
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
    margin: 18px 0 18px;
    font-size: clamp(38px, 7vw, 72px);
    line-height: 1.04;
    letter-spacing: -0.05em;
}

.hero p,
.page-hero p,
.detail-copy p {
    max-width: 760px;
    color: #cbd5e1;
    font-size: clamp(16px, 2vw, 20px);
}

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

.hero-tags span,
.detail-meta span,
.movie-meta-row span {
    border-radius: 999px;
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.08);
    padding: 6px 12px;
    font-size: 13px;
}

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

.primary-button,
.ghost-button,
.search-box button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border: 0;
    border-radius: 14px;
    font-weight: 800;
    cursor: pointer;
}

.primary-button,
.search-box button {
    color: white;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 16px 32px rgba(20, 184, 166, 0.28);
}

.ghost-button {
    border: 1px solid rgba(226, 232, 240, 0.18);
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.06);
}

.primary-button:hover,
.ghost-button:hover,
.search-box button:hover {
    transform: translateY(-2px);
}

.hero-poster,
.detail-poster {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 30px;
    background: linear-gradient(145deg, rgba(20, 184, 166, 0.28), rgba(6, 182, 212, 0.08));
    box-shadow: var(--shadow);
}

.hero-poster img,
.detail-poster img {
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.hero-poster span,
.detail-poster span,
.rank-badge,
.score-pill {
    position: absolute;
    border-radius: 999px;
    font-weight: 900;
}

.hero-poster span,
.detail-poster span {
    left: 18px;
    bottom: 18px;
    padding: 8px 14px;
    color: #082f49;
    background: #67e8f9;
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 32px;
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 16px;
    transform: translateX(-50%);
}

.hero-controls button {
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 14px;
    color: white;
    background: rgba(15, 23, 42, 0.72);
    cursor: pointer;
}

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

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

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

.search-strip,
.search-box,
.filter-panel {
    display: flex;
    align-items: center;
    gap: 16px;
}

.search-strip {
    justify-content: space-between;
    margin-top: 34px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: rgba(15, 23, 42, 0.7);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.24);
}

.search-strip h2 {
    margin: 0;
    font-size: 24px;
}

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

.search-box {
    min-width: min(460px, 100%);
}

.search-box input,
.filter-panel input,
.filter-panel select {
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: var(--text);
    background: rgba(2, 6, 23, 0.68);
    outline: none;
}

.search-box input {
    width: 100%;
    padding: 0 16px;
}

.content-section {
    margin-top: 54px;
}

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

.section-heading h2 {
    margin: 8px 0 0;
    font-size: clamp(26px, 4vw, 38px);
    line-height: 1.1;
}

.section-heading a {
    color: var(--accent);
    font-weight: 800;
}

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

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

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

.five-cols {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.74);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.24);
    transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.movie-card:hover {
    border-color: rgba(20, 184, 166, 0.52);
    background: rgba(15, 23, 42, 0.94);
    transform: translateY(-4px);
}

.poster-frame {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 20px 20px 0 0;
    background: linear-gradient(145deg, rgba(20, 184, 166, 0.35), rgba(51, 65, 85, 0.85));
}

.poster-frame img {
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: transform 260ms ease, opacity 180ms ease;
}

.poster-frame img.image-missing,
.hero-poster img.image-missing,
.detail-poster img.image-missing {
    opacity: 0;
}

.movie-card:hover .poster-frame img {
    transform: scale(1.06);
}

.rank-badge {
    left: 12px;
    top: 12px;
    display: grid;
    min-width: 34px;
    height: 34px;
    place-items: center;
    color: white;
    background: linear-gradient(135deg, #f97316, #ef4444);
}

.score-pill {
    right: 12px;
    bottom: 12px;
    padding: 4px 10px;
    color: white;
    background: rgba(2, 6, 23, 0.82);
}

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

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

.movie-card p {
    min-height: 56px;
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.tag-row span {
    padding: 4px 9px;
    border-radius: 999px;
    color: #99f6e4;
    background: rgba(20, 184, 166, 0.12);
    font-size: 12px;
}

.category-cloud,
.hot-panel,
.category-overview-card {
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.86), rgba(20, 184, 166, 0.08));
}

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

.category-tile {
    min-height: 140px;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.06);
}

.category-tile span {
    display: block;
    margin-bottom: 10px;
    font-size: 20px;
    font-weight: 900;
}

.category-tile em {
    color: var(--muted);
    font-size: 14px;
    font-style: normal;
}

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

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    border-radius: 0 0 34px 34px;
}

.page-hero {
    padding: 56px;
    border: 1px solid var(--line);
    border-radius: 34px;
    background: radial-gradient(circle at top right, rgba(20, 184, 166, 0.22), transparent 22rem), rgba(15, 23, 42, 0.82);
}

.small-hero h1,
.channel-hero h1 {
    font-size: clamp(36px, 6vw, 62px);
}

.filter-panel {
    position: sticky;
    top: 82px;
    z-index: 20;
    margin: 28px 0;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(12px);
}

.filter-panel input,
.filter-panel select {
    flex: 1;
    padding: 0 14px;
}

.empty-state {
    display: none;
    margin: 30px 0;
    padding: 22px;
    border-radius: 18px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.06);
    text-align: center;
}

.empty-state.show {
    display: block;
}

.category-overview-list {
    display: grid;
    gap: 28px;
    margin-top: 32px;
}

.category-overview-head {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.category-overview-head h2 {
    margin: 10px 0;
    font-size: 32px;
}

.category-overview-head p {
    max-width: 760px;
    color: var(--muted);
}

.detail-hero {
    min-height: 560px;
    display: grid;
    align-items: center;
    background-position: center;
    background-size: cover;
}

.detail-poster {
    max-width: 320px;
}

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

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

.player-section {
    margin-top: -70px;
    position: relative;
    z-index: 5;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 28px;
    background: black;
    box-shadow: var(--shadow);
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 12px;
    border: 0;
    color: white;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.76), rgba(2, 6, 23, 0.22));
    cursor: pointer;
}

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

.play-overlay span {
    display: grid;
    width: 76px;
    height: 76px;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 18px 42px rgba(20, 184, 166, 0.35);
}

.detail-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
    margin-top: 46px;
}

.detail-article,
.detail-side {
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.74);
    padding: 28px;
}

.detail-article h2 {
    margin: 18px 0 12px;
    font-size: 28px;
}

.detail-article p {
    color: #cbd5e1;
    font-size: 17px;
}

.detail-side h2 {
    margin-top: 0;
}

.detail-side dl {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px 16px;
}

.detail-side dt {
    color: var(--muted);
}

.detail-side dd {
    margin: 0;
    color: #e2e8f0;
}

.site-footer {
    margin-top: 70px;
    border-top: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.86);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 40px;
    padding: 42px 0;
}

.site-footer p,
.footer-links {
    color: var(--muted);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
}

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

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

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

    .hero-poster,
    .detail-poster {
        max-width: 260px;
    }
}

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

    .menu-toggle {
        display: block;
    }

    .hero {
        height: 760px;
    }

    .hero-content {
        gap: 28px;
        padding-top: 34px;
    }

    .hero h1,
    .page-hero h1,
    .detail-copy h1 {
        font-size: 40px;
    }

    .search-strip,
    .search-box,
    .filter-panel,
    .category-overview-head,
    .section-heading {
        align-items: stretch;
        flex-direction: column;
    }

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

    .page-hero,
    .category-cloud,
    .hot-panel,
    .category-overview-card {
        padding: 22px;
    }

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

    .filter-panel {
        position: static;
    }
}

@media (max-width: 520px) {
    .six-cols,
    .five-cols,
    .four-cols,
    .three-cols,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .movie-card p {
        min-height: auto;
    }
}
