:root {
    --bg: #070917;
    --bg-soft: #101427;
    --card: rgba(255, 255, 255, 0.075);
    --card-strong: rgba(255, 255, 255, 0.12);
    --line: rgba(255, 255, 255, 0.14);
    --text: #f8fbff;
    --muted: #aeb9d4;
    --accent: #8b5cf6;
    --accent-two: #06b6d4;
    --accent-three: #f97316;
    --radius: 24px;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(139, 92, 246, 0.28), transparent 34rem),
        radial-gradient(circle at top right, rgba(6, 182, 212, 0.2), transparent 30rem),
        linear-gradient(180deg, #060711 0%, #0a0d1e 48%, #070917 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    min-height: 100vh;
}

body.nav-open {
    overflow: hidden;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(7, 9, 23, 0.78);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

.header-inner {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 76px;
    display: flex;
    align-items: center;
    gap: 22px;
}

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

.logo-mark {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent), var(--accent-two));
    box-shadow: 0 14px 35px rgba(139, 92, 246, 0.35);
}

.logo-text {
    font-size: 19px;
    white-space: nowrap;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.site-nav a {
    color: var(--muted);
    padding: 10px 14px;
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
    color: var(--text);
    background: rgba(255, 255, 255, 0.11);
    transform: translateY(-1px);
}

.header-search {
    width: 292px;
    display: flex;
    gap: 8px;
    padding: 7px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
}

.header-search input {
    min-width: 0;
    flex: 1;
    color: var(--text);
    border: 0;
    outline: 0;
    background: transparent;
    padding: 6px 8px 6px 12px;
}

.header-search input::placeholder {
    color: rgba(248, 251, 255, 0.48);
}

.header-search button,
.primary-button,
.secondary-button,
.hero-control,
.search-button,
.player-cover,
.nav-toggle {
    border: 0;
    cursor: pointer;
}

.header-search button,
.primary-button,
.search-button {
    color: white;
    border-radius: 999px;
    padding: 10px 16px;
    background: linear-gradient(135deg, var(--accent), var(--accent-two));
    box-shadow: 0 12px 28px rgba(6, 182, 212, 0.18);
}

.secondary-button {
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.08);
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    border-radius: 9px;
    background: var(--text);
}

.page-shell {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0 68px;
}

.hero-section {
    width: min(1320px, calc(100% - 24px));
    margin: 22px auto 0;
}

.hero-carousel {
    position: relative;
    overflow: hidden;
    min-height: 620px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 34px;
    background: linear-gradient(145deg, rgba(139, 92, 246, 0.18), rgba(6, 182, 212, 0.08));
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.72fr);
    gap: 28px;
    align-items: center;
    padding: 78px clamp(28px, 6vw, 82px);
    opacity: 0;
    transform: scale(1.015);
    transition: opacity 0.55s ease, transform 0.55s ease;
    pointer-events: none;
}

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

.hero-backdrop {
    position: absolute;
    inset: 0;
    z-index: -2;
    opacity: 0.28;
}

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

.hero-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(7, 9, 23, 0.95), rgba(7, 9, 23, 0.64), rgba(7, 9, 23, 0.92)),
        radial-gradient(circle at 25% 20%, rgba(139, 92, 246, 0.42), transparent 26rem);
}

.hero-kicker,
.section-kicker,
.breadcrumb,
.card-meta,
.detail-meta,
.category-count,
.rank-score {
    color: var(--muted);
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    margin-bottom: 16px;
    padding: 8px 13px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.hero-title {
    margin: 0;
    max-width: 790px;
    font-size: clamp(40px, 6vw, 78px);
    line-height: 1.04;
    letter-spacing: -0.05em;
}

.hero-text {
    max-width: 760px;
    margin: 22px 0 0;
    color: #d8e2ff;
    font-size: clamp(16px, 2vw, 20px);
}

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

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 26px;
}

.hero-meta span,
.tag-row span,
.detail-tags span,
.pill-link {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    color: #dce7ff;
    background: rgba(255, 255, 255, 0.08);
}

.hero-meta span {
    padding: 8px 12px;
}

.hero-poster {
    position: relative;
    overflow: hidden;
    min-height: 450px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background:
        radial-gradient(circle at top, rgba(249, 115, 22, 0.28), transparent 18rem),
        rgba(255, 255, 255, 0.08);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.42);
}

.hero-poster img,
.poster-shell img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-poster .poster-shell {
    height: 100%;
}

.hero-floating-card {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 20px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 22px;
    background: rgba(7, 9, 23, 0.72);
    backdrop-filter: blur(14px);
}

.hero-controls {
    position: absolute;
    left: clamp(26px, 5vw, 82px);
    bottom: 28px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hero-control {
    width: 42px;
    height: 42px;
    color: var(--text);
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.1);
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
}

.hero-dot.active {
    width: 26px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent), var(--accent-two));
}

.section-block {
    margin-top: 52px;
}

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

.section-head h2,
.page-title,
.detail-title {
    margin: 0;
    letter-spacing: -0.03em;
}

.section-head h2,
.page-title {
    font-size: clamp(28px, 4vw, 46px);
}

.section-head p,
.page-intro,
.category-card p,
.detail-lead,
.detail-section p,
.footer-inner p {
    color: var(--muted);
}

.section-head p,
.page-intro {
    margin: 8px 0 0;
    max-width: 760px;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--card);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.16);
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(139, 92, 246, 0.45);
    background: var(--card-strong);
}

.card-poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(139, 92, 246, 0.45), rgba(6, 182, 212, 0.18)),
        #14182e;
}

.poster-shell {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background:
        linear-gradient(145deg, rgba(139, 92, 246, 0.34), rgba(6, 182, 212, 0.2)),
        #151a31;
}

.poster-shell.poster-empty::after {
    content: attr(data-title);
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    font-weight: 800;
    line-height: 1.35;
    background:
        radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.14), transparent 12rem),
        linear-gradient(145deg, rgba(139, 92, 246, 0.48), rgba(6, 182, 212, 0.24));
}

.card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(7, 9, 23, 0.72);
    color: white;
    font-size: 12px;
    backdrop-filter: blur(12px);
}

.card-body {
    padding: 14px;
}

.card-title {
    display: -webkit-box;
    min-height: 44px;
    overflow: hidden;
    font-weight: 800;
    line-height: 1.38;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta,
.card-summary {
    margin: 8px 0 0;
    font-size: 13px;
}

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

.tag-row,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 12px;
}

.tag-row span,
.detail-tags span,
.pill-link {
    padding: 5px 9px;
    font-size: 12px;
}

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

.category-card {
    min-height: 210px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background:
        radial-gradient(circle at top right, rgba(6, 182, 212, 0.2), transparent 12rem),
        rgba(255, 255, 255, 0.075);
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(6, 182, 212, 0.38);
}

.category-card h2,
.category-card h3 {
    margin: 0;
    font-size: 23px;
}

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

.rank-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.rank-item {
    display: grid;
    grid-template-columns: 52px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.07);
}

.rank-item:hover {
    background: rgba(255, 255, 255, 0.12);
}

.rank-number {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    font-weight: 900;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.85), rgba(6, 182, 212, 0.85));
}

.rank-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 800;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    font-size: 14px;
}

.detail-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 26px;
    align-items: start;
}

.player-stage {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 30px;
    background: #050712;
    box-shadow: var(--shadow);
}

.player-stage video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #050712;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    background:
        linear-gradient(90deg, rgba(7, 9, 23, 0.86), rgba(7, 9, 23, 0.36), rgba(7, 9, 23, 0.86)),
        var(--poster-bg, linear-gradient(145deg, rgba(139, 92, 246, 0.45), rgba(6, 182, 212, 0.2)));
    background-size: cover;
    background-position: center;
}

.player-stage.is-playing .player-cover,
.player-cover[hidden] {
    display: none;
}

.play-circle {
    width: 86px;
    height: 86px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-two));
    box-shadow: 0 26px 70px rgba(6, 182, 212, 0.32);
    font-size: 32px;
}

.detail-panel,
.detail-section,
.search-panel {
    border: 1px solid var(--line);
    border-radius: 28px;
    background: var(--card);
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.16);
}

.detail-panel {
    overflow: hidden;
}

.detail-panel .poster-shell {
    aspect-ratio: 2 / 3;
}

.detail-info {
    padding: 20px;
}

.detail-title {
    font-size: clamp(30px, 5vw, 56px);
    line-height: 1.12;
}

.detail-lead {
    margin: 14px 0 0;
    max-width: 920px;
    font-size: 18px;
}

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

.detail-meta span {
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.detail-section {
    margin-top: 24px;
    padding: 24px;
}

.detail-section h2 {
    margin: 0 0 12px;
    font-size: 26px;
}

.detail-section p {
    margin: 0;
    white-space: pre-line;
}

.page-banner {
    padding: clamp(28px, 6vw, 56px);
    border: 1px solid var(--line);
    border-radius: 32px;
    background:
        radial-gradient(circle at top right, rgba(139, 92, 246, 0.24), transparent 22rem),
        linear-gradient(145deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.045));
    box-shadow: 0 22px 66px rgba(0, 0, 0, 0.24);
}

.pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.search-panel {
    padding: 20px;
    margin-top: 22px;
}

.search-panel form {
    display: flex;
    gap: 12px;
}

.search-panel input {
    flex: 1;
    min-width: 0;
    color: var(--text);
    border: 1px solid var(--line);
    outline: 0;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.07);
    padding: 13px 16px;
}

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

.no-results.show {
    display: block;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: rgba(6, 7, 17, 0.86);
}

.footer-inner {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 24px;
}

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

.footer-links a {
    color: var(--muted);
    padding: 8px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
}

.footer-links a:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.11);
}

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

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

    .hero-slide {
        grid-template-columns: 1fr;
        padding-bottom: 110px;
    }

    .hero-poster {
        display: none;
    }
}

@media (max-width: 920px) {
    .header-inner {
        flex-wrap: wrap;
        padding: 14px 0;
    }

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

    .site-nav {
        order: 3;
        width: 100%;
        display: none;
        flex-direction: column;
        align-items: stretch;
        margin-left: 0;
        padding: 10px 0;
    }

    body.nav-open .site-nav {
        display: flex;
    }

    .header-search {
        order: 4;
        width: 100%;
        display: none;
    }

    body.nav-open .header-search {
        display: flex;
    }

    .hero-carousel {
        min-height: 560px;
    }

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

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

@media (max-width: 720px) {
    .movie-grid,
    .category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .hero-slide {
        padding: 42px 22px 100px;
    }

    .hero-carousel {
        min-height: 520px;
        border-radius: 26px;
    }

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

    .section-head,
    .search-panel form {
        align-items: stretch;
        flex-direction: column;
    }

    .rank-item {
        grid-template-columns: 42px 1fr;
    }

    .rank-score {
        grid-column: 2;
    }
}

@media (max-width: 460px) {
    .movie-grid {
        grid-template-columns: 1fr;
    }

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

    .page-shell,
    .header-inner,
    .footer-inner {
        width: min(100% - 22px, 1240px);
    }
}
