:root {
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.86);
    --panel-solid: #0f172a;
    --panel-soft: rgba(30, 41, 59, 0.72);
    --line: rgba(148, 163, 184, 0.18);
    --line-strong: rgba(34, 211, 238, 0.36);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --cyan: #22d3ee;
    --cyan-dark: #0891b2;
    --pink: #f472b6;
    --amber: #f59e0b;
    --radius: 22px;
    --shadow: 0 24px 80px rgba(2, 6, 23, 0.46);
}

* {
    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.22), transparent 34rem),
        radial-gradient(circle at 80% 10%, rgba(244, 114, 182, 0.16), transparent 28rem),
        linear-gradient(180deg, #020617 0%, #07111f 44%, #020617 100%);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(148, 163, 184, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.04) 1px, transparent 1px);
    background-size: 38px 38px;
    mask-image: linear-gradient(to bottom, black, transparent 78%);
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.86);
    backdrop-filter: blur(18px);
    box-shadow: 0 16px 48px rgba(2, 6, 23, 0.28);
}

.header-shell,
.footer-shell,
.main-shell {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
}

.header-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
    gap: 24px;
}

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

.brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 14px;
    color: #001018;
    font-weight: 900;
    background: linear-gradient(135deg, #22d3ee, #67e8f9 48%, #f472b6);
    box-shadow: 0 0 28px rgba(34, 211, 238, 0.42);
}

.brand-text {
    display: grid;
    line-height: 1.12;
}

.brand-text strong,
.footer-brand strong {
    font-size: 1.08rem;
    letter-spacing: 0.02em;
}

.brand-text small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.78rem;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    color: var(--soft);
    font-size: 0.95rem;
    font-weight: 600;
}

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

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

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: var(--text);
    background: var(--panel-soft);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    border-radius: 10px;
    background: var(--text);
}

.mobile-nav {
    display: none;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.96);
}

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

.mobile-nav a {
    padding: 12px 14px;
    border-radius: 12px;
    color: var(--soft);
}

.mobile-nav a:hover {
    background: rgba(34, 211, 238, 0.08);
}

main {
    position: relative;
    z-index: 1;
}

.main-shell {
    padding: 32px 0 68px;
}

.hero {
    position: relative;
    width: min(1280px, calc(100% - 32px));
    min-height: 640px;
    margin: 28px auto 42px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 34px;
    background: var(--panel-solid);
    box-shadow: var(--shadow);
}

.hero::after {
    content: "";
    position: absolute;
    inset: auto 8% -18% 28%;
    height: 220px;
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.22);
    filter: blur(70px);
}

.hero-slides {
    position: relative;
    min-height: 640px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.04fr) minmax(320px, 0.56fr);
    gap: 34px;
    align-items: center;
    padding: clamp(34px, 6vw, 78px);
    opacity: 0;
    transform: translateX(18px) scale(1.015);
    transition: opacity 0.62s ease, transform 0.62s ease;
    pointer-events: none;
}

.hero-slide.active {
    opacity: 1;
    transform: translateX(0) scale(1);
    pointer-events: auto;
}

.hero-backdrop {
    position: absolute;
    inset: 0;
    opacity: 0.34;
    background-size: cover;
    background-position: center;
    transform: scale(1.05);
    filter: saturate(1.05);
}

.hero-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.78) 46%, rgba(2, 6, 23, 0.38) 100%),
        linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.78));
}

.hero-copy,
.hero-poster {
    position: relative;
    z-index: 2;
}

.eyebrow {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    padding: 7px 12px;
    border: 1px solid rgba(34, 211, 238, 0.3);
    border-radius: 999px;
    color: var(--cyan);
    background: rgba(8, 145, 178, 0.12);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    color: var(--text);
    font-size: clamp(2.4rem, 6vw, 5.8rem);
    line-height: 0.96;
    letter-spacing: -0.08em;
}

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

.hero p {
    max-width: 720px;
    margin: 22px 0 0;
    color: var(--soft);
    font-size: clamp(1rem, 2vw, 1.18rem);
    line-height: 1.9;
}

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

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

.hero-tags span,
.tag-row span,
.meta-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    color: #dbeafe;
    background: rgba(15, 23, 42, 0.68);
    font-size: 0.78rem;
    white-space: nowrap;
}

.hero-actions,
.detail-actions,
.form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 30px;
}

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

.primary-btn {
    color: #001018;
    background: linear-gradient(135deg, #22d3ee, #67e8f9);
    box-shadow: 0 16px 42px rgba(34, 211, 238, 0.34);
}

.secondary-btn,
.ghost-btn,
.section-more {
    border: 1px solid var(--line);
    color: var(--soft);
    background: rgba(15, 23, 42, 0.76);
}

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

.secondary-btn:hover,
.ghost-btn:hover,
.section-more:hover {
    border-color: var(--line-strong);
    color: var(--cyan);
}

.hero-poster {
    min-height: 470px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.6);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
    transform: rotate(2deg);
}

.hero-poster img {
    width: 100%;
    height: 100%;
    min-height: 470px;
    object-fit: cover;
}

.hero-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 42%, rgba(2, 6, 23, 0.82));
}

.hero-stats {
    position: absolute;
    right: 26px;
    bottom: 24px;
    z-index: 3;
    display: grid;
    gap: 4px;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.64);
    backdrop-filter: blur(16px);
}

.hero-stats strong {
    color: var(--cyan);
    font-size: 1.32rem;
}

.hero-stats span {
    color: var(--muted);
    font-size: 0.8rem;
}

.hero-controls {
    position: absolute;
    left: clamp(34px, 6vw, 78px);
    bottom: 28px;
    z-index: 4;
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 42px;
    height: 6px;
    border: 0;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.32);
    cursor: pointer;
}

.hero-dot.active {
    background: linear-gradient(90deg, #22d3ee, #f472b6);
}

.section,
.page-hero,
.search-panel,
.detail-hero,
.player-section,
.content-panel {
    margin-bottom: 36px;
}

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

.section-heading h2,
.content-panel h2,
.player-section h2,
.related-section h2 {
    margin: 0;
    color: var(--text);
    font-size: clamp(1.55rem, 3vw, 2.35rem);
    letter-spacing: -0.04em;
}

.section-heading p,
.page-hero p,
.content-panel p,
.detail-info p,
.category-card p,
.movie-card p {
    color: var(--muted);
    line-height: 1.76;
}

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.7);
    box-shadow: 0 18px 60px rgba(2, 6, 23, 0.18);
    transition: transform 0.22s ease, border 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: var(--line-strong);
    background: rgba(30, 41, 59, 0.78);
    box-shadow: 0 24px 70px rgba(2, 6, 23, 0.36);
}

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

.movie-grid.compact .poster-link,
.related-grid .poster-link {
    aspect-ratio: 3 / 4;
}

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

.movie-card:hover .poster-link img {
    transform: scale(1.06);
    filter: saturate(1.12);
}

.poster-glow {
    position: absolute;
    inset: auto 0 0;
    height: 44%;
    background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.82));
}

.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    display: inline-grid;
    min-width: 38px;
    height: 32px;
    place-items: center;
    border-radius: 12px;
    color: #001018;
    font-weight: 900;
    background: linear-gradient(135deg, #f59e0b, #fef08a);
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.3);
}

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

.movie-title {
    display: -webkit-box;
    min-height: 2.9em;
    overflow: hidden;
    color: var(--text);
    font-size: 1.02rem;
    font-weight: 850;
    line-height: 1.42;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-title:hover {
    color: var(--cyan);
}

.movie-meta {
    margin-top: 8px;
    color: var(--cyan);
    font-size: 0.82rem;
    font-weight: 700;
}

.movie-card p {
    display: -webkit-box;
    min-height: 4.8em;
    margin: 10px 0 12px;
    overflow: hidden;
    font-size: 0.9rem;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.tag-row span {
    min-height: 24px;
    padding: 4px 8px;
    font-size: 0.72rem;
}

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

.category-card {
    position: relative;
    min-height: 220px;
    padding: 24px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 26px;
    background:
        radial-gradient(circle at top right, rgba(34, 211, 238, 0.2), transparent 13rem),
        rgba(15, 23, 42, 0.76);
    box-shadow: 0 20px 60px rgba(2, 6, 23, 0.18);
}

.category-card:hover {
    border-color: var(--line-strong);
}

.category-card h2,
.category-card h3 {
    margin: 0 0 12px;
    color: var(--text);
    font-size: 1.45rem;
}

.category-card p {
    margin: 0 0 18px;
}

.category-mini-list {
    display: grid;
    gap: 8px;
    margin: 18px 0 0;
}

.category-mini-list a {
    color: var(--soft);
    font-size: 0.92rem;
}

.category-mini-list a:hover {
    color: var(--cyan);
}

.search-panel {
    display: grid;
    grid-template-columns: 0.52fr 1fr;
    gap: 18px;
    align-items: center;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 18px 60px rgba(2, 6, 23, 0.22);
}

.search-copy {
    display: grid;
    gap: 6px;
}

.search-copy span {
    color: var(--cyan);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.search-copy strong {
    font-size: 1.2rem;
}

.search-box {
    display: block;
}

.search-box input {
    width: 100%;
    min-height: 54px;
    padding: 0 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    outline: 0;
    color: var(--text);
    background: rgba(2, 6, 23, 0.62);
}

.search-box input:focus {
    border-color: var(--line-strong);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.1);
}

.filter-chips {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.filter-chips button {
    min-height: 36px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--soft);
    background: rgba(15, 23, 42, 0.7);
    cursor: pointer;
}

.filter-chips button.active,
.filter-chips button:hover {
    border-color: rgba(34, 211, 238, 0.48);
    color: #001018;
    background: var(--cyan);
}

.page-hero {
    padding: clamp(30px, 5vw, 58px);
    border: 1px solid var(--line);
    border-radius: 32px;
    background:
        radial-gradient(circle at top right, rgba(244, 114, 182, 0.14), transparent 20rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.72));
    box-shadow: var(--shadow);
}

.page-hero h1 {
    max-width: 920px;
    font-size: clamp(2.2rem, 5vw, 4.4rem);
}

.page-hero p {
    max-width: 860px;
    margin: 18px 0 0;
    font-size: 1.06rem;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    align-items: center;
    margin-bottom: 18px;
    color: var(--muted);
    font-size: 0.9rem;
}

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

.detail-hero {
    display: grid;
    grid-template-columns: minmax(260px, 360px) 1fr;
    gap: 30px;
    align-items: stretch;
    padding: clamp(20px, 4vw, 34px);
    border: 1px solid var(--line);
    border-radius: 32px;
    background:
        radial-gradient(circle at top right, rgba(34, 211, 238, 0.18), transparent 20rem),
        rgba(15, 23, 42, 0.74);
    box-shadow: var(--shadow);
}

.detail-cover {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 26px;
    background: #0f172a;
    box-shadow: 0 20px 60px rgba(2, 6, 23, 0.32);
}

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

.detail-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.detail-info h1 {
    font-size: clamp(2rem, 5vw, 4.6rem);
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

.detail-meta span {
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--soft);
    background: rgba(2, 6, 23, 0.38);
}

.player-section,
.content-panel,
.related-section {
    padding: clamp(20px, 4vw, 32px);
    border: 1px solid var(--line);
    border-radius: 30px;
    background: rgba(15, 23, 42, 0.74);
    box-shadow: 0 20px 70px rgba(2, 6, 23, 0.22);
}

.player-card {
    position: relative;
    margin-top: 20px;
    overflow: hidden;
    border: 1px solid rgba(34, 211, 238, 0.24);
    border-radius: 28px;
    background: #000;
    aspect-ratio: 16 / 9;
}

.movie-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    gap: 12px;
    border: 0;
    color: var(--text);
    background:
        radial-gradient(circle at center, rgba(34, 211, 238, 0.28), transparent 15rem),
        rgba(2, 6, 23, 0.34);
    cursor: pointer;
}

.play-overlay span {
    display: grid;
    width: 84px;
    height: 84px;
    place-items: center;
    border-radius: 50%;
    color: #001018;
    font-size: 2rem;
    background: linear-gradient(135deg, #22d3ee, #67e8f9);
    box-shadow: 0 18px 56px rgba(34, 211, 238, 0.38);
}

.play-overlay strong {
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.62);
}

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

.content-panel {
    display: grid;
    gap: 24px;
}

.story-block h2 {
    margin-bottom: 10px;
}

.story-block p {
    margin: 0;
    font-size: 1rem;
}

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

.empty-state {
    display: none;
    padding: 26px;
    border: 1px dashed var(--line);
    border-radius: 18px;
    color: var(--muted);
    text-align: center;
}

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

.site-footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.84);
}

.footer-shell {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 0.8fr;
    gap: 30px;
    padding: 38px 0;
}

.footer-brand {
    align-items: flex-start;
}

.footer-brand p {
    max-width: 520px;
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.76;
}

.footer-links {
    display: grid;
    gap: 9px;
    align-content: start;
}

.footer-links h2 {
    margin: 0 0 8px;
    font-size: 1rem;
}

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

.footer-bottom {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 24px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.88rem;
}

@media (max-width: 1100px) {
    .desktop-nav {
        gap: 14px;
        font-size: 0.88rem;
    }

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

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

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

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

    .menu-toggle {
        display: block;
    }

    .hero,
    .hero-slides {
        min-height: 760px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        align-content: center;
        padding: 28px;
    }

    .hero-poster {
        min-height: 320px;
        transform: none;
    }

    .hero-poster img {
        min-height: 320px;
    }

    .hero-controls {
        left: 28px;
    }

    .search-panel,
    .detail-hero,
    .footer-shell {
        grid-template-columns: 1fr;
    }

    .detail-cover {
        max-height: 520px;
    }
}

@media (max-width: 640px) {
    .header-shell,
    .footer-shell,
    .main-shell,
    .footer-bottom,
    .mobile-nav,
    .hero {
        width: min(100% - 22px, 1240px);
    }

    .brand-text small {
        display: none;
    }

    .hero {
        border-radius: 24px;
        margin-top: 18px;
    }

    .hero,
    .hero-slides {
        min-height: 700px;
    }

    .hero h1 {
        font-size: 2.25rem;
        letter-spacing: -0.05em;
    }

    .hero p {
        font-size: 0.95rem;
    }

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

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

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

    .movie-title {
        font-size: 0.92rem;
    }

    .movie-card p {
        display: none;
    }

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

    .detail-info h1,
    .page-hero h1 {
        font-size: 2rem;
        letter-spacing: -0.05em;
    }

    .play-overlay span {
        width: 64px;
        height: 64px;
    }
}
