:root {
    --page-bg: #070914;
    --panel-bg: rgba(15, 23, 42, 0.76);
    --panel-strong: rgba(15, 23, 42, 0.94);
    --line: rgba(148, 163, 184, 0.22);
    --text: #f8fafc;
    --muted: #a8b3cf;
    --soft: #cbd5e1;
    --brand: #ff4d8d;
    --brand-2: #7c3aed;
    --brand-3: #22d3ee;
    --gold: #facc15;
    --radius-lg: 28px;
    --radius-md: 18px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 16% 8%, rgba(124, 58, 237, 0.32), transparent 30%),
        radial-gradient(circle at 84% 10%, rgba(34, 211, 238, 0.2), transparent 26%),
        linear-gradient(180deg, #080a18 0%, #0b1020 42%, #070914 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

img {
    max-width: 100%;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(7, 9, 20, 0.74);
    backdrop-filter: blur(20px);
}

.navbar {
    width: min(1440px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: -0.04em;
    font-size: clamp(20px, 2vw, 30px);
}

.logo-mark {
    width: 40px;
    height: 40px;
    border-radius: 15px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 12px 30px rgba(255, 77, 141, 0.35);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--soft);
    font-size: 15px;
}

.nav-links a {
    padding: 10px 14px;
    border-radius: 999px;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    border: 1px solid var(--line);
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.main-wrap {
    width: min(1440px, calc(100% - 32px));
    margin: 0 auto;
}

.hero {
    position: relative;
    margin: 26px auto 52px;
    min-height: clamp(620px, 82vh, 820px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 36px;
    overflow: hidden;
    background: #111827;
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease;
}

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

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: saturate(1.1) contrast(1.05);
    transform: scale(1.02);
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(7, 9, 20, 0.96) 0%, rgba(7, 9, 20, 0.76) 46%, rgba(7, 9, 20, 0.3) 100%),
        linear-gradient(0deg, rgba(7, 9, 20, 0.92) 0%, rgba(7, 9, 20, 0.04) 48%, rgba(7, 9, 20, 0.34) 100%);
}

.hero-content {
    position: relative;
    z-index: 3;
    min-height: clamp(620px, 82vh, 820px);
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.62fr);
    align-items: end;
    gap: clamp(24px, 4vw, 64px);
    padding: clamp(28px, 5vw, 72px);
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    width: max-content;
    gap: 8px;
    color: #ffdce9;
    background: linear-gradient(135deg, rgba(255, 77, 141, 0.22), rgba(124, 58, 237, 0.18));
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    padding: 8px 13px;
    font-size: 13px;
    font-weight: 800;
}

.hero-title {
    max-width: 860px;
    margin: 20px 0 16px;
    font-size: clamp(42px, 7vw, 90px);
    line-height: 0.94;
    letter-spacing: -0.08em;
    font-weight: 950;
}

.hero-desc {
    max-width: 780px;
    color: var(--soft);
    font-size: clamp(16px, 1.5vw, 20px);
    line-height: 1.9;
}

.meta-row,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.meta-row {
    margin: 20px 0 24px;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 11px;
    border-radius: 999px;
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 13px;
}

.cta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-top: 28px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 46px;
    padding: 12px 18px;
    border-radius: 999px;
    font-weight: 900;
    border: 1px solid transparent;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 16px 34px rgba(255, 77, 141, 0.32);
}

.btn-ghost {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.14);
}

.btn:hover {
    transform: translateY(-2px);
}

.hero-panel {
    align-self: center;
    border-radius: 30px;
    padding: 18px;
    background: rgba(15, 23, 42, 0.58);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(20px);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.hero-poster {
    position: relative;
    aspect-ratio: 3 / 4;
    border-radius: 24px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(255, 77, 141, 0.62), rgba(124, 58, 237, 0.68), rgba(34, 211, 238, 0.36));
}

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

.poster-title {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 14px;
    z-index: 2;
    color: #fff;
    font-weight: 900;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.56);
}

.hero-controls {
    position: absolute;
    left: clamp(28px, 5vw, 72px);
    right: clamp(28px, 5vw, 72px);
    bottom: 24px;
    z-index: 6;
    display: flex;
    gap: 10px;
}

.hero-dot {
    flex: 1;
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    overflow: hidden;
}

.hero-dot span {
    display: block;
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--brand), var(--brand-3));
}

.hero-dot.active span {
    width: 100%;
    transition: width 5.5s linear;
}

.section {
    margin: 0 0 54px;
}

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

.section-title {
    margin: 12px 0 0;
    font-size: clamp(28px, 3.8vw, 48px);
    line-height: 1.05;
    letter-spacing: -0.06em;
    font-weight: 950;
}

.section-desc {
    max-width: 720px;
    color: var(--muted);
    line-height: 1.8;
}

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

.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border-radius: var(--radius-md);
    background: rgba(15, 23, 42, 0.74);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.18);
    transition: transform 0.22s ease, border 0.22s ease, background 0.22s ease;
}

.card:hover {
    transform: translateY(-6px);
    border-color: rgba(255, 77, 141, 0.42);
    background: rgba(30, 41, 59, 0.82);
}

.poster {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(255, 77, 141, 0.55), rgba(124, 58, 237, 0.62), rgba(34, 211, 238, 0.32));
}

.poster::after,
.hero-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(7, 9, 20, 0.86) 0%, transparent 58%);
}

.card-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    min-height: 180px;
}

.card-title {
    font-size: 16px;
    line-height: 1.35;
    font-weight: 900;
}

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

.card-meta {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

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

.category-card,
.rank-item,
.info-panel {
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(15, 23, 42, 0.74);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
}

.category-card {
    padding: 22px;
    min-height: 180px;
    transition: transform 0.22s ease, border 0.22s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: rgba(34, 211, 238, 0.36);
}

.category-card h2,
.info-panel h2 {
    margin: 0 0 10px;
    font-size: 23px;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.category-card p,
.info-panel p {
    color: var(--muted);
    line-height: 1.8;
}

.search-panel {
    margin: 0 0 28px;
    padding: 18px;
    border-radius: 24px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.search-input {
    min-height: 50px;
    width: 100%;
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    outline: none;
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.search-input:focus {
    border-color: rgba(255, 77, 141, 0.72);
    box-shadow: 0 0 0 4px rgba(255, 77, 141, 0.1);
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 24px;
    align-items: start;
}

.detail-hero {
    position: relative;
    margin: 26px 0 34px;
    overflow: hidden;
    border-radius: 34px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(15, 23, 42, 0.78);
    box-shadow: var(--shadow);
}

.detail-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.22;
    filter: blur(20px) saturate(1.2);
    transform: scale(1.08);
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
    gap: clamp(20px, 4vw, 44px);
    padding: clamp(22px, 4vw, 46px);
    align-items: end;
    background: linear-gradient(90deg, rgba(7, 9, 20, 0.94), rgba(7, 9, 20, 0.58));
}

.detail-poster {
    border-radius: 24px;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    background: linear-gradient(135deg, rgba(255, 77, 141, 0.55), rgba(124, 58, 237, 0.62), rgba(34, 211, 238, 0.32));
    box-shadow: 0 20px 55px rgba(0, 0, 0, 0.32);
}

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

.breadcrumb {
    margin-bottom: 16px;
    color: var(--muted);
    font-size: 14px;
}

.detail-title {
    margin: 0;
    font-size: clamp(34px, 5vw, 68px);
    line-height: 1.02;
    letter-spacing: -0.07em;
    font-weight: 950;
}

.detail-intro {
    margin: 18px 0 0;
    max-width: 880px;
    color: var(--soft);
    line-height: 1.9;
    font-size: 17px;
}

.player-wrap {
    position: relative;
    border-radius: 28px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: #020617;
    box-shadow: var(--shadow);
}

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

.play-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at 50% 40%, rgba(255, 77, 141, 0.22), transparent 28%),
        linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.62));
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-cover.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.play-button {
    width: 94px;
    height: 94px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    font-size: 34px;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 20px 48px rgba(255, 77, 141, 0.36);
}

.content-block {
    margin-top: 24px;
    padding: clamp(20px, 3vw, 34px);
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(15, 23, 42, 0.7);
}

.content-block h2 {
    margin: 0 0 14px;
    font-size: clamp(24px, 3vw, 34px);
    font-weight: 950;
    letter-spacing: -0.05em;
}

.content-block p {
    margin: 0;
    color: var(--soft);
    line-height: 2;
    font-size: 16px;
}

.sidebar {
    position: sticky;
    top: 98px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.rank-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rank-item {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 12px;
    padding: 14px;
    align-items: center;
}

.rank-num {
    width: 42px;
    height: 42px;
    border-radius: 15px;
    display: grid;
    place-items: center;
    color: #111827;
    font-weight: 950;
    background: linear-gradient(135deg, var(--gold), #fb7185);
}

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

.rank-meta {
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
}

.footer {
    margin-top: 60px;
    padding: 34px 0 44px;
    color: var(--muted);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-inner {
    width: min(1440px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

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

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

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

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

    .sidebar {
        position: static;
    }
}

@media (max-width: 860px) {
    .mobile-toggle {
        display: inline-grid;
        place-items: center;
    }

    .nav-links {
        position: fixed;
        top: 74px;
        left: 16px;
        right: 16px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
        border-radius: 22px;
        background: rgba(7, 9, 20, 0.96);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

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

    .hero,
    .hero-content {
        min-height: auto;
    }

    .hero-content {
        grid-template-columns: 1fr;
        padding-bottom: 72px;
    }

    .hero-panel {
        max-width: 360px;
    }

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

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

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

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

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

@media (max-width: 520px) {
    .main-wrap,
    .navbar,
    .footer-inner {
        width: min(100% - 22px, 1440px);
    }

    .grid {
        gap: 12px;
    }

    .card-body {
        padding: 12px;
    }

    .card-title {
        font-size: 14px;
    }

    .card-line {
        -webkit-line-clamp: 2;
    }
}
