
:root {
    --bg: #0f1419;
    --bg-soft: #151b22;
    --bg-card: #1f2933;
    --bg-card-2: #263443;
    --line: rgba(255, 255, 255, 0.08);
    --text: #ffffff;
    --muted: #9aa5b1;
    --muted-2: #cbd2d9;
    --accent: #9333ea;
    --accent-2: #7e22ce;
    --accent-soft: rgba(147, 51, 234, 0.18);
    --glow: 0 0 28px rgba(147, 51, 234, 0.32);
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.36);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(147, 51, 234, 0.16), transparent 36rem),
        radial-gradient(circle at top right, rgba(126, 34, 206, 0.12), transparent 32rem),
        var(--bg);
    line-height: 1.6;
}

body.nav-open {
    overflow: hidden;
}

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

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

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(15, 20, 25, 0.82);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

.header-inner {
    width: min(1180px, calc(100% - 32px));
    min-height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: var(--glow);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand-text strong {
    font-size: 22px;
    letter-spacing: 0.02em;
}

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

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    font-size: 15px;
    color: var(--muted-2);
}

.nav-link {
    position: relative;
    padding: 26px 0;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: #ffffff;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 18px;
    height: 2px;
    border-radius: 999px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.2s ease;
}

.nav-link:hover::after,
.nav-link.is-active::after {
    transform: scaleX(1);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    border-radius: 999px;
    background: #ffffff;
}

.mobile-nav {
    display: none;
}

.hero {
    position: relative;
    height: min(72vh, 640px);
    min-height: 520px;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}

.hero-viewport,
.hero-slide {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.7s ease;
}

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

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(15, 20, 25, 0.96) 0%, rgba(15, 20, 25, 0.78) 42%, rgba(15, 20, 25, 0.18) 100%),
        linear-gradient(0deg, var(--bg) 0%, rgba(15, 20, 25, 0.28) 52%, rgba(15, 20, 25, 0.15) 100%),
        var(--hero-image) center / cover no-repeat;
    transform: scale(1.06);
    filter: saturate(1.08);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    height: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 52px;
    align-items: center;
}

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

.eyebrow {
    margin: 0 0 12px;
    color: #d8b4fe;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    font-size: clamp(38px, 6vw, 68px);
    line-height: 1;
    letter-spacing: -0.04em;
}

.hero-text {
    max-width: 680px;
    margin: 22px 0 0;
    color: var(--muted-2);
    font-size: 18px;
}

.hero-tags,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 22px 0 0;
}

.hero-tags span,
.detail-meta span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 11px;
    border: 1px solid rgba(216, 180, 254, 0.24);
    border-radius: 999px;
    background: rgba(147, 51, 234, 0.14);
    color: #e9d5ff;
    font-size: 13px;
}

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

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 700;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.primary-button {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #ffffff;
    box-shadow: var(--glow);
}

.ghost-button {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.06);
    color: var(--muted-2);
}

.primary-button:hover,
.ghost-button:hover {
    transform: translateY(-2px);
    color: #ffffff;
}

.ghost-button:hover {
    border-color: rgba(216, 180, 254, 0.32);
    background: rgba(147, 51, 234, 0.16);
}

.hero-poster {
    justify-self: end;
    width: min(360px, 100%);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow), var(--glow);
    transform: rotate(1.4deg);
}

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

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 48px;
    height: 48px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: rgba(15, 20, 25, 0.6);
    color: #ffffff;
    font-size: 36px;
    line-height: 1;
    transform: translateY(-50%);
    backdrop-filter: blur(12px);
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 28px;
    z-index: 6;
    display: flex;
    gap: 10px;
    transform: translateX(-50%);
}

.hero-dot {
    width: 28px;
    height: 6px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
    width: 48px;
    background: #ffffff;
}

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

.intro-card,
.page-hero,
.story-block,
.player-wrap,
.category-card,
.search-panel {
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(31, 41, 51, 0.88), rgba(21, 27, 34, 0.86));
    border-radius: var(--radius);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18);
}

.intro-card {
    padding: clamp(24px, 4vw, 42px);
}

.intro-card h2,
.section-head h2,
.story-block h2,
.category-card h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.12;
}

.intro-card p,
.section-head p,
.page-hero p,
.story-block p,
.category-card p,
.site-footer p {
    color: var(--muted-2);
}

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

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

.section-head p {
    margin: 8px 0 0;
}

.section-more {
    color: #d8b4fe;
    font-weight: 700;
}

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

.category-tile {
    min-height: 132px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background:
        radial-gradient(circle at top right, rgba(147, 51, 234, 0.28), transparent 12rem),
        var(--bg-card);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.category-tile strong,
.category-tile span {
    display: block;
}

.category-tile strong {
    font-size: 20px;
}

.category-tile span {
    margin-top: 8px;
    color: var(--muted);
    font-size: 14px;
}

.category-tile:hover,
.movie-card:hover,
.category-card:hover {
    transform: translateY(-5px);
    border-color: rgba(216, 180, 254, 0.28);
    box-shadow: var(--glow);
}

.search-panel {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    margin-bottom: 22px;
}

.search-box {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
}

.search-box span {
    color: #d8b4fe;
    font-weight: 700;
}

.search-box input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: #ffffff;
}

.search-box input::placeholder {
    color: #7b8794;
}

.clear-search {
    min-height: 48px;
    padding: 0 18px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--muted-2);
}

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--bg-card);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: #111820;
}

.poster-link img {
    width: 100%;
    aspect-ratio: 3 / 4.25;
    object-fit: cover;
    transition: transform 0.35s ease, opacity 0.2s ease;
}

.movie-card:hover .poster-link img {
    transform: scale(1.07);
    opacity: 0.82;
}

.play-dot {
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(147, 51, 234, 0.9);
    color: #ffffff;
    box-shadow: var(--glow);
}

.rank-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    min-width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, #facc15, #f97316);
    color: #111820;
    font-weight: 900;
    font-style: normal;
}

.card-body {
    padding: 14px;
}

.card-body h3 {
    margin: 0;
    color: #ffffff;
    font-size: 16px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta,
.card-desc {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.card-desc {
    min-height: 40px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.tag-row span {
    min-height: 24px;
    padding: 3px 8px;
    font-size: 12px;
}

.empty-state {
    display: none;
    margin: 30px 0 0;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 20px;
    color: var(--muted);
    text-align: center;
    background: rgba(255, 255, 255, 0.04);
}

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

.page-hero {
    padding: clamp(28px, 5vw, 56px);
    background:
        radial-gradient(circle at top right, rgba(147, 51, 234, 0.25), transparent 22rem),
        linear-gradient(180deg, rgba(31, 41, 51, 0.94), rgba(21, 27, 34, 0.9));
}

.page-hero p {
    max-width: 780px;
}

.small-actions {
    margin-top: 22px;
}

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

.category-card {
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.category-covers {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--line);
}

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

.category-card div:last-child {
    padding: 22px;
}

.category-card h2 {
    font-size: 24px;
}

.detail-main {
    padding: 28px 0 0;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumb a:hover {
    color: #d8b4fe;
}

.detail-hero {
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
    padding: 34px 0 42px;
}

.detail-poster {
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--bg-card);
    box-shadow: var(--shadow), var(--glow);
}

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

.detail-one-line {
    margin: 18px 0 0;
    color: var(--muted-2);
    font-size: 18px;
}

.detail-tags {
    margin-bottom: 26px;
}

.player-section {
    padding: 0 0 42px;
}

.player-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #05070a;
}

.movie-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #05070a;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    background:
        radial-gradient(circle, rgba(147, 51, 234, 0.32), rgba(5, 7, 10, 0.62) 42%, rgba(5, 7, 10, 0.74)),
        rgba(5, 7, 10, 0.3);
    color: #ffffff;
    z-index: 3;
}

.player-overlay span {
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: var(--glow);
    font-size: 28px;
}

.player-overlay strong {
    font-size: 18px;
}

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

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    padding-bottom: 16px;
}

.story-block {
    padding: clamp(22px, 3vw, 34px);
}

.story-block h2 {
    margin-bottom: 16px;
    font-size: 26px;
}

.story-block p {
    margin: 0 0 14px;
}

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

.compact-card .card-desc {
    min-height: auto;
}

.site-footer {
    margin-top: 28px;
    border-top: 1px solid var(--line);
    background: rgba(15, 20, 25, 0.86);
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 36px 0;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 28px;
}

.footer-brand {
    margin-bottom: 10px;
    font-size: 22px;
    font-weight: 900;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    justify-content: flex-end;
    color: var(--muted-2);
}

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

.copyright {
    grid-column: 1 / -1;
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #1f2933;
}

::-webkit-scrollbar-thumb {
    background: #52606d;
    border-radius: 999px;
}

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

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

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

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

    .menu-toggle {
        display: block;
    }

    .mobile-nav {
        position: fixed;
        top: 72px;
        left: 16px;
        right: 16px;
        z-index: 60;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        padding: 16px;
        border: 1px solid var(--line);
        border-radius: 20px;
        background: rgba(15, 20, 25, 0.96);
        box-shadow: var(--shadow);
        transform: translateY(-14px);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease, transform 0.2s ease;
    }

    body.nav-open .mobile-nav {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .mobile-nav a {
        padding: 13px 14px;
        border: 1px solid var(--line);
        border-radius: 14px;
        color: var(--muted-2);
        background: rgba(255, 255, 255, 0.04);
    }

    .hero {
        height: auto;
        min-height: 0;
    }

    .hero,
    .hero-viewport,
    .hero-slide {
        position: relative;
    }

    .hero-slide {
        display: none;
        min-height: 720px;
    }

    .hero-slide.is-active {
        display: block;
    }

    .hero-content {
        min-height: 720px;
        grid-template-columns: 1fr;
        align-content: center;
        gap: 28px;
        padding: 56px 0 88px;
    }

    .hero-poster {
        justify-self: start;
        width: min(260px, 76vw);
    }

    .hero-arrow {
        top: auto;
        bottom: 24px;
        transform: none;
    }

    .hero-prev {
        left: 18px;
    }

    .hero-next {
        right: 18px;
    }

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

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

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

    .detail-poster {
        width: min(300px, 100%);
    }

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

@media (max-width: 560px) {
    .container-wide,
    .header-inner,
    .hero-content,
    .footer-inner {
        width: min(100% - 24px, 1180px);
    }

    .brand-text strong {
        font-size: 18px;
    }

    .brand-text small {
        display: none;
    }

    .hero h1,
    .page-hero h1,
    .detail-info h1 {
        font-size: 34px;
    }

    .hero-text,
    .detail-one-line {
        font-size: 16px;
    }

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

    .primary-button,
    .ghost-button {
        width: 100%;
    }

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

    .search-panel {
        align-items: stretch;
        flex-direction: column;
    }

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

    .movie-card {
        display: grid;
        grid-template-columns: 116px minmax(0, 1fr);
    }

    .poster-link img {
        height: 100%;
        min-height: 164px;
        aspect-ratio: auto;
    }

    .card-desc {
        min-height: 0;
    }
}
