:root {
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.82);
    --panel-solid: #0f172a;
    --panel-soft: rgba(30, 41, 59, 0.76);
    --line: rgba(59, 130, 246, 0.28);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --blue: #3b82f6;
    --cyan: #22d3ee;
    --purple: #8b5cf6;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.36);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(34, 211, 238, 0.18), transparent 34rem),
        radial-gradient(circle at 80% 0%, rgba(59, 130, 246, 0.22), transparent 30rem),
        linear-gradient(135deg, #020617 0%, #0f172a 48%, #111827 100%);
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(30, 58, 138, 0.92), rgba(2, 6, 23, 0.96));
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(16px);
}

.header-inner {
    max-width: 1280px;
    min-height: 68px;
    margin: 0 auto;
    padding: 0 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

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

.logo-mark {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: white;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 12px 30px rgba(34, 211, 238, 0.26);
}

.logo-text {
    font-size: 21px;
    background: linear-gradient(90deg, #60a5fa, #67e8f9);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

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

.nav-link {
    color: var(--soft);
    padding: 10px 2px;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-active {
    color: white;
    transform: translateY(-1px);
}

.header-search {
    display: flex;
    align-items: center;
    min-width: 290px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 999px;
    overflow: hidden;
}

.header-search input {
    width: 100%;
    color: white;
    background: transparent;
    border: 0;
    outline: 0;
    padding: 11px 16px;
}

.header-search button,
.search-box button,
.filter-panel button {
    border: 0;
    color: white;
    cursor: pointer;
    padding: 11px 18px;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.8);
    cursor: pointer;
}

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

.mobile-panel {
    display: none;
    padding: 16px 22px 22px;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(2, 6, 23, 0.98);
}

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

.mobile-panel a {
    padding: 10px 0;
    color: var(--soft);
}

.mobile-panel form {
    display: flex;
    gap: 8px;
}

.mobile-panel input {
    flex: 1;
    min-width: 0;
    color: white;
    background: rgba(15, 23, 42, 0.86);
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 14px;
    padding: 11px 13px;
}

.mobile-panel button {
    border: 0;
    border-radius: 14px;
    color: white;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    padding: 0 16px;
}

main {
    min-height: 62vh;
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.015);
    transition: opacity 0.8s ease, transform 1.2s ease;
}

.hero-slide.is-active {
    opacity: 1;
    transform: scale(1);
    z-index: 1;
}

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

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

.hero-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.72) 32%, rgba(2, 6, 23, 0.12) 100%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.18) 64%, rgba(2, 6, 23, 0.88));
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    min-height: 600px;
    margin: 0 auto;
    padding: 120px 22px 78px;
    display: flex;
    align-items: flex-end;
}

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

.eyebrow,
.card-tags span,
.detail-tags span,
.category-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    color: #e0f2fe;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.75), rgba(34, 211, 238, 0.55));
    border: 1px solid rgba(125, 211, 252, 0.28);
}

.eyebrow {
    padding: 7px 14px;
    font-size: 14px;
    font-weight: 700;
}

.hero h1 {
    margin: 18px 0 16px;
    font-size: clamp(40px, 6vw, 76px);
    line-height: 1.02;
    letter-spacing: -0.045em;
}

.hero p {
    margin: 0;
    max-width: 720px;
    color: #dbeafe;
    font-size: 18px;
    line-height: 1.78;
}

.hero-meta {
    margin-top: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: #bfdbfe;
}

.hero-meta span {
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.58);
    border: 1px solid rgba(148, 163, 184, 0.18);
}

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

.btn-primary,
.btn-secondary,
.section-more,
.empty-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    min-height: 46px;
    padding: 0 22px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary,
.empty-link {
    color: white;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 16px 38px rgba(37, 99, 235, 0.28);
}

.btn-secondary,
.section-more {
    color: white;
    background: rgba(15, 23, 42, 0.62);
    border: 1px solid rgba(148, 163, 184, 0.28);
}

.btn-primary:hover,
.btn-secondary:hover,
.section-more:hover,
.empty-link:hover {
    transform: translateY(-2px);
}

.hero-controls {
    position: absolute;
    right: max(22px, calc((100vw - 1280px) / 2 + 22px));
    bottom: 70px;
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hero-controls button {
    width: 46px;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: 50%;
    color: white;
    background: rgba(15, 23, 42, 0.62);
    cursor: pointer;
}

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

.hero-dots button {
    width: 34px;
    height: 5px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.34);
}

.hero-dots button.is-active {
    background: linear-gradient(90deg, var(--blue), var(--cyan));
}

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

.section-block {
    padding: 58px 0;
}

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

.section-heading h1,
.section-heading h2,
.page-title h1,
.detail-title h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.16;
    letter-spacing: -0.025em;
}

.section-heading p,
.page-title p {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.8;
}

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

.category-card {
    position: relative;
    min-height: 148px;
    padding: 22px;
    border-radius: var(--radius);
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(59, 130, 246, 0.24), rgba(34, 211, 238, 0.08)),
        rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(125, 211, 252, 0.2);
    box-shadow: var(--shadow);
}

.category-card::after {
    content: "";
    position: absolute;
    width: 130px;
    height: 130px;
    right: -46px;
    bottom: -56px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.42), transparent 70%);
}

.category-card h2,
.category-card h3 {
    position: relative;
    z-index: 1;
    margin: 0 0 10px;
    font-size: 22px;
}

.category-card p {
    position: relative;
    z-index: 1;
    margin: 0;
    color: var(--soft);
    line-height: 1.65;
}

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

.movie-card {
    min-width: 0;
    overflow: hidden;
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.74);
    border: 1px solid rgba(148, 163, 184, 0.16);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.24);
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    background: rgba(30, 41, 59, 0.82);
    border-color: rgba(56, 189, 248, 0.5);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #0f172a;
}

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

.movie-card:hover .poster-link img {
    transform: scale(1.05);
    filter: brightness(0.78);
}

.play-hover {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 44px;
    opacity: 0;
    background: rgba(2, 6, 23, 0.18);
    transition: opacity 0.25s ease;
}

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

.card-badge {
    position: absolute;
    right: 10px;
    bottom: 10px;
    padding: 4px 9px;
    border-radius: 999px;
    color: white;
    font-size: 12px;
    background: rgba(0, 0, 0, 0.72);
}

.card-body {
    padding: 15px;
}

.card-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.card-tags span,
.detail-tags span {
    padding: 3px 8px;
    font-size: 12px;
}

.movie-card h3 {
    margin: 0 0 8px;
    font-size: 17px;
    line-height: 1.38;
}

.movie-card h3 a:hover,
.rank-card h3 a:hover,
.breadcrumb a:hover {
    color: #67e8f9;
}

.card-meta,
.rank-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
}

.card-body p {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rank-layout {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    gap: 24px;
}

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

.rank-card {
    display: grid;
    grid-template-columns: 126px 1fr;
    gap: 16px;
    padding: 14px;
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.16);
}

.rank-poster {
    position: relative;
    aspect-ratio: 2 / 3;
    border-radius: 15px;
    overflow: hidden;
}

.rank-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rank-num {
    position: absolute;
    left: 8px;
    top: 8px;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: white;
    font-weight: 900;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.rank-info h3 {
    margin: 2px 0 9px;
    font-size: 20px;
}

.rank-info p {
    margin: 0 0 12px;
    color: var(--soft);
    line-height: 1.7;
}

.page-hero {
    padding: 64px 0 28px;
}

.page-title {
    max-width: 850px;
}

.filter-panel,
.search-box {
    margin: 22px 0 30px;
    display: grid;
    grid-template-columns: 1.5fr 0.7fr 0.7fr auto;
    gap: 12px;
    padding: 16px;
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.74);
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.search-box {
    grid-template-columns: 1fr auto;
}

.filter-panel input,
.filter-panel select,
.search-box input {
    color: white;
    background: rgba(2, 6, 23, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 14px;
    outline: 0;
    padding: 12px 14px;
}

.filter-panel button,
.search-box button {
    border-radius: 14px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 28px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.detail-hero {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 34px;
    padding: 34px 0 34px;
}

.detail-poster {
    border-radius: 26px;
    overflow: hidden;
    background: var(--panel-solid);
    box-shadow: var(--shadow);
}

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

.detail-title h1 {
    margin-bottom: 14px;
}

.detail-title .one-line {
    color: #dbeafe;
    font-size: 18px;
    line-height: 1.8;
}

.detail-meta {
    margin: 16px 0;
    font-size: 15px;
}

.detail-meta span {
    padding: 7px 11px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.74);
    border: 1px solid rgba(148, 163, 184, 0.16);
}

.content-panel {
    padding: 28px;
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.16);
}

.content-panel h2 {
    margin: 0 0 14px;
    font-size: 25px;
}

.content-panel p {
    color: var(--soft);
    line-height: 1.9;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #000;
    box-shadow: var(--shadow);
    border: 1px solid rgba(125, 211, 252, 0.2);
}

.player-shell video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    cursor: pointer;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    cursor: pointer;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.68), rgba(2, 6, 23, 0.08));
    transition: opacity 0.25s ease;
}

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

.play-badge {
    width: 86px;
    height: 86px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: white;
    font-size: 36px;
    padding-left: 6px;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 18px 54px rgba(34, 211, 238, 0.38);
}

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

.empty-state {
    padding: 42px;
    text-align: center;
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.74);
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.empty-state p {
    color: var(--muted);
}

.site-footer {
    margin-top: 40px;
    padding: 44px 22px 26px;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(2, 6, 23, 0.74);
}

.footer-grid {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 32px;
}

.footer-grid p {
    color: var(--muted);
    line-height: 1.8;
}

.footer-grid h2 {
    margin: 0 0 14px;
    font-size: 18px;
}

.footer-links {
    display: grid;
    gap: 9px;
    color: var(--muted);
}

.footer-links a:hover {
    color: #67e8f9;
}

.footer-bottom {
    max-width: 1280px;
    margin: 28px auto 0;
    padding-top: 20px;
    color: #64748b;
    text-align: center;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

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

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

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

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

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

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

    .mobile-toggle {
        display: block;
    }

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

    .hero-controls {
        left: 22px;
        right: auto;
        bottom: 28px;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .filter-panel,
    .search-box {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 520px) {
    .header-inner,
    .container {
        width: 100%;
    }

    .header-inner {
        padding: 0 16px;
    }

    .logo-text {
        font-size: 18px;
    }

    .hero h1 {
        font-size: 38px;
    }

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

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

    .rank-card {
        grid-template-columns: 96px 1fr;
    }

    .content-panel {
        padding: 22px;
    }
}
