:root {
    --bg: #07111f;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.86);
    --panel-light: #ffffff;
    --text: #f8fafc;
    --muted: #94a3b8;
    --dark-text: #111827;
    --brand: #f59e0b;
    --brand-deep: #d97706;
    --accent: #38bdf8;
    --line: rgba(148, 163, 184, 0.22);
    --shadow: 0 24px 80px rgba(2, 6, 23, 0.42);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at 14% 5%, rgba(245, 158, 11, 0.20), transparent 30%),
        radial-gradient(circle at 82% 0%, rgba(56, 189, 248, 0.18), transparent 34%),
        linear-gradient(180deg, #08111f 0%, #0f172a 42%, #f8fafc 42%, #f8fafc 100%);
    color: var(--dark-text);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 48px 48px;
    opacity: 0.5;
    z-index: -1;
}

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

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.92));
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(18px);
}

.nav-shell {
    width: min(1240px, calc(100% - 28px));
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    color: white;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.brand-mark {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    box-shadow: 0 12px 30px rgba(245, 158, 11, 0.35);
}

.brand-text {
    font-size: 1.12rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 0.94rem;
    color: rgba(255, 255, 255, 0.86);
}

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

.nav-links a:hover {
    color: #fbbf24;
    transform: translateY(-1px);
}

.nav-divider {
    width: 1px;
    height: 18px;
    background: rgba(255, 255, 255, 0.18);
}

.nav-toggle {
    display: none;
    color: white;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 12px;
    padding: 8px 10px;
}

.hero {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    background: #020617;
    color: white;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 360px;
    align-items: center;
    gap: 48px;
    padding: 70px max(32px, calc((100vw - 1180px) / 2)) 88px;
    opacity: 0;
    transform: scale(1.015);
    transition: opacity 0.65s ease, transform 0.65s ease;
    pointer-events: none;
}

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

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

.hero-bg::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 48%;
    background: linear-gradient(0deg, #020617 0%, transparent 100%);
}

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

.eyebrow {
    margin: 0 0 12px;
    color: #fbbf24;
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero h1 {
    margin: 0;
    max-width: 760px;
    font-size: clamp(2.7rem, 7vw, 5.8rem);
    line-height: 0.98;
    font-weight: 950;
    text-shadow: 0 20px 55px rgba(0, 0, 0, 0.52);
}

.hero-summary {
    max-width: 700px;
    margin: 22px 0 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 1.12rem;
    line-height: 1.8;
}

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

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

.hero-tags span,
.tag-row span {
    border-radius: 999px;
    padding: 6px 11px;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.78rem;
    border: 1px solid rgba(255, 255, 255, 0.13);
}

.tag-row span {
    background: #f1f5f9;
    color: #475569;
    border-color: #e2e8f0;
}

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

.btn,
.search-form button,
.video-play {
    cursor: pointer;
    border: 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 13px 22px;
    font-weight: 800;
}

.btn:hover,
.search-form button:hover,
.video-play:hover {
    transform: translateY(-2px);
}

.btn-primary {
    color: #111827;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    box-shadow: 0 18px 45px rgba(249, 115, 22, 0.34);
}

.btn-ghost {
    color: white;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-poster {
    display: block;
    border-radius: 30px;
    overflow: hidden;
    background: linear-gradient(135deg, #111827, #334155);
    box-shadow: var(--shadow);
    aspect-ratio: 3 / 4.2;
}

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

.hero-poster span {
    position: absolute;
    right: 18px;
    bottom: 18px;
    display: grid;
    width: 62px;
    height: 62px;
    place-items: center;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.92);
    color: #111827;
    font-weight: 900;
}

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

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

.hero-dots button.is-active {
    width: 34px;
    background: #fbbf24;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.58);
    color: white;
    font-size: 2rem;
    transform: translateY(-50%);
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

.glass-panel,
.quick-search {
    position: relative;
    z-index: 5;
    margin-top: -44px;
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    align-items: center;
    gap: 28px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 22px 70px rgba(15, 23, 42, 0.16);
    backdrop-filter: blur(18px);
}

.quick-search h2,
.quick-search p {
    margin: 0;
}

.quick-search p {
    margin-top: 6px;
    color: #64748b;
}

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

.search-form input,
.filter-row input,
.filter-row select {
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 14px 16px;
    outline: none;
    background: #ffffff;
    font: inherit;
}

.search-form input:focus,
.filter-row input:focus,
.filter-row select:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.14);
}

.search-form button {
    min-width: 108px;
    border-radius: 16px;
    background: #111827;
    color: white;
    font-weight: 800;
}

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

.category-chip {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    border-radius: 18px;
    padding: 18px;
    background: #ffffff;
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
}

.category-chip span {
    color: #d97706;
    font-weight: 800;
}

.content-section,
.feature-layout,
.page-main {
    margin-top: 48px;
}

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

.section-head h2 {
    margin: 0;
    font-size: clamp(1.55rem, 3vw, 2.25rem);
    color: #0f172a;
}

.section-head p {
    margin: 6px 0 0;
    color: #64748b;
}

.section-more,
.text-link {
    color: #d97706;
    font-weight: 900;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.16);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 3 / 4.05;
    background: linear-gradient(135deg, #111827, #334155);
}

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

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

.poster-mask {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    opacity: 0;
    background: rgba(2, 6, 23, 0.55);
    color: white;
    font-weight: 900;
    transition: opacity 0.2s ease;
}

.movie-card:hover .poster-mask {
    opacity: 1;
}

.order-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    border-radius: 999px;
    padding: 5px 10px;
    background: rgba(245, 158, 11, 0.94);
    color: #111827;
    font-style: normal;
    font-weight: 900;
}

.movie-info {
    padding: 15px;
}

.movie-info h3 {
    margin: 0;
    font-size: 1rem;
    color: #0f172a;
    line-height: 1.4;
}

.meta-line {
    margin: 7px 0 0;
    color: #64748b;
    font-size: 0.82rem;
}

.card-desc {
    display: -webkit-box;
    min-height: 48px;
    margin: 10px 0 12px;
    color: #475569;
    font-size: 0.9rem;
    line-height: 1.7;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.feature-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 26px;
}

.rank-panel {
    align-self: start;
    position: sticky;
    top: 92px;
    border-radius: var(--radius);
    padding: 22px;
    background: linear-gradient(180deg, #111827, #1e293b);
    color: white;
    box-shadow: var(--shadow);
}

.rank-panel h2,
.rank-panel p {
    margin: 0;
}

.rank-panel p {
    margin-top: 6px;
    color: rgba(255, 255, 255, 0.68);
}

.rank-list {
    display: grid;
    gap: 12px;
    margin-top: 20px;
}

.rank-item {
    display: grid;
    grid-template-columns: 66px 1fr;
    align-items: center;
    gap: 12px;
    border-radius: 16px;
    padding: 9px;
    background: rgba(255, 255, 255, 0.08);
}

.rank-item img {
    width: 66px;
    height: 80px;
    border-radius: 12px;
    object-fit: cover;
    background: #334155;
}

.rank-item strong,
.rank-item small {
    display: block;
}

.rank-item small {
    margin-top: 5px;
    color: rgba(255, 255, 255, 0.62);
    line-height: 1.45;
}

.site-footer {
    margin-top: 70px;
    padding: 42px 0;
    background: #020617;
    color: rgba(255, 255, 255, 0.78);
}

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

.footer-inner strong {
    display: block;
    margin-bottom: 8px;
    color: white;
    font-size: 1.2rem;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
}

.page-hero,
.detail-hero {
    border-radius: 30px;
    overflow: hidden;
    background: linear-gradient(135deg, #111827, #0f172a 55%, #78350f);
    color: white;
    box-shadow: var(--shadow);
}

.page-hero {
    padding: 50px;
}

.page-hero h1,
.detail-info h1 {
    margin: 0;
    font-size: clamp(2rem, 5vw, 4.2rem);
    line-height: 1.06;
}

.page-hero p:not(.eyebrow) {
    max-width: 780px;
    color: rgba(255, 255, 255, 0.76);
    line-height: 1.8;
}

.category-overview {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.category-card {
    display: grid;
    grid-template-columns: 190px 1fr;
    gap: 18px;
    align-items: center;
    border-radius: 24px;
    padding: 16px;
    background: #ffffff;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
}

.category-cover {
    display: flex;
    align-items: flex-end;
    min-height: 148px;
    border-radius: 20px;
    background-size: cover;
    background-position: center;
    padding: 14px;
    color: white;
    font-weight: 900;
}

.category-card h2 {
    margin: 0;
}

.category-card p {
    color: #64748b;
    line-height: 1.7;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: #64748b;
    font-size: 0.92rem;
}

.breadcrumb a {
    color: #d97706;
    font-weight: 800;
}

.filter-panel {
    margin-top: 28px;
}

.filter-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 12px;
    margin-bottom: 14px;
}

.filter-count {
    color: #64748b;
}

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

.detail-poster img {
    width: 100%;
    aspect-ratio: 3 / 4.2;
    object-fit: cover;
    border-radius: 24px;
    background: #334155;
    box-shadow: 0 20px 52px rgba(0, 0, 0, 0.28);
}

.detail-one-line {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    line-height: 1.8;
}

.detail-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 22px 0;
}

.detail-meta span {
    border-radius: 14px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.09);
    color: rgba(255, 255, 255, 0.82);
}

.big-tags span {
    background: rgba(255, 255, 255, 0.12);
    color: white;
}

.player-section {
    margin-top: 28px;
}

.video-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #020617;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

.video-shell video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #020617;
}

.video-play {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(2, 6, 23, 0.36), rgba(15, 23, 42, 0.72));
    color: white;
    font: inherit;
}

.video-play span {
    display: grid;
    width: 84px;
    height: 84px;
    margin: 0 auto 8px;
    place-items: center;
    border-radius: 999px;
    background: #f59e0b;
    color: #111827;
    font-size: 2rem;
    box-shadow: 0 18px 45px rgba(245, 158, 11, 0.35);
}

.video-play strong {
    font-size: 1.2rem;
}

.video-play small {
    color: rgba(255, 255, 255, 0.75);
}

.video-shell.is-playing .video-play {
    opacity: 0;
    pointer-events: none;
}

.episode-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.episode-bar button {
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: 10px 15px;
    background: white;
    font-weight: 800;
}

.episode-bar button.is-active {
    background: #111827;
    color: white;
}

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

.text-panel {
    border-radius: 24px;
    padding: 24px;
    background: white;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
}

.text-panel h2 {
    margin: 0 0 12px;
}

.text-panel p {
    color: #475569;
    line-height: 1.9;
}

.rank-table-section,
.search-results {
    margin-top: 28px;
}

.table-wrap {
    overflow-x: auto;
    border-radius: 22px;
    background: white;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
}

.rank-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.rank-table th,
.rank-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
}

.rank-table th {
    background: #f8fafc;
    color: #475569;
}

.rank-table a {
    color: #d97706;
    font-weight: 900;
}

.large-search {
    max-width: 760px;
    margin-top: 22px;
}

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

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

    .feature-layout,
    .detail-content {
        grid-template-columns: 1fr;
    }

    .rank-panel {
        position: static;
    }
}

@media (max-width: 820px) {
    .nav-toggle {
        display: inline-flex;
    }

    .nav-links {
        position: absolute;
        left: 14px;
        right: 14px;
        top: 72px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        border-radius: 20px;
        padding: 12px;
        background: rgba(15, 23, 42, 0.98);
        box-shadow: var(--shadow);
    }

    .nav-links.is-open {
        display: flex;
    }

    .nav-links a {
        padding: 12px;
    }

    .nav-divider {
        width: 100%;
        height: 1px;
        margin: 6px 0;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        min-height: 660px;
        padding: 54px 22px 86px;
    }

    .hero-poster {
        width: min(230px, 72vw);
    }

    .quick-search,
    .footer-inner,
    .detail-hero,
    .category-card {
        grid-template-columns: 1fr;
    }

    .filter-row {
        grid-template-columns: 1fr;
    }

    .page-hero {
        padding: 32px 24px;
    }
}

@media (max-width: 640px) {
    .movie-grid,
    .compact-grid,
    .category-overview,
    .category-strip {
        grid-template-columns: 1fr;
    }

    .search-form {
        flex-direction: column;
    }

    .search-form button {
        min-height: 48px;
    }

    .detail-meta {
        grid-template-columns: 1fr;
    }

    .hero-arrow {
        display: none;
    }
}
