:root {
    --color-primary: 30 30 35;
    --color-secondary: 45 45 50;
    --color-accent: 70 130 180;
    --color-success: 46 125 50;
    --color-warning: 255 152 0;
    --color-error: 211 47 47;
    --color-text-primary: 240 240 245;
    --color-text-secondary: 180 180 190;
    --color-text-muted: 120 120 130;
    --color-bg-primary: 18 18 22;
    --color-bg-secondary: 25 25 30;
    --color-bg-tertiary: 35 35 40;
    --color-border: 50 50 60;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: rgb(var(--color-bg-primary));
    color: rgb(var(--color-text-primary));
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(var(--color-bg-secondary), 0.95);
    border-bottom: 1px solid rgb(var(--color-border));
    backdrop-filter: blur(16px);
}

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

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, rgb(var(--color-text-primary)), rgb(var(--color-accent)));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

.logo-mark {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(var(--color-accent), 0.18);
    color: rgb(var(--color-accent));
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.24);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-links a {
    position: relative;
    font-size: 14px;
    font-weight: 600;
    color: rgb(var(--color-text-secondary));
    transition: color 0.2s ease;
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -8px;
    height: 2px;
    transform: scaleX(0);
    transform-origin: left;
    background: rgb(var(--color-accent));
    transition: transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: rgb(var(--color-text-primary));
}

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

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgb(var(--color-bg-tertiary));
    color: rgb(var(--color-text-primary));
    cursor: pointer;
}

.mobile-panel {
    display: none;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 12px 0 18px;
    border-top: 1px solid rgb(var(--color-border));
}

.mobile-panel a {
    display: block;
    padding: 12px 14px;
    border-radius: 12px;
    color: rgb(var(--color-text-secondary));
    font-weight: 600;
}

.mobile-panel a:hover {
    background: rgb(var(--color-bg-tertiary));
    color: rgb(var(--color-text-primary));
}

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

.section-container.compact {
    padding-top: 24px;
}

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

.section-title {
    margin: 0;
    font-size: clamp(26px, 4vw, 38px);
    line-height: 1.15;
    font-weight: 800;
    background: linear-gradient(90deg, rgb(var(--color-text-primary)), rgb(var(--color-text-secondary)));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: rgb(var(--color-accent));
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.06em;
}

.section-desc {
    margin: 8px 0 0;
    max-width: 720px;
    color: rgb(var(--color-text-secondary));
    line-height: 1.8;
}

.hero {
    width: min(1280px, calc(100% - 32px));
    margin: 28px auto 0;
}

.hero-shell {
    position: relative;
    min-height: 600px;
    overflow: hidden;
    border-radius: 28px;
    background: rgb(var(--color-bg-secondary));
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.34);
}

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.84), rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.1)),
        linear-gradient(0deg, rgba(0, 0, 0, 0.86), transparent 55%);
}

.hero-content {
    position: absolute;
    inset: auto 0 0;
    width: min(760px, 100%);
    padding: 56px;
}

.hero-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 30px;
    padding: 5px 11px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    font-weight: 700;
    backdrop-filter: blur(10px);
}

.hero h1,
.hero h2 {
    margin: 0 0 18px;
    font-size: clamp(34px, 6vw, 66px);
    line-height: 1.06;
    color: #fff;
    text-shadow: 0 16px 42px rgba(0, 0, 0, 0.42);
}

.hero p {
    margin: 0 0 28px;
    color: rgba(255, 255, 255, 0.84);
    font-size: clamp(15px, 2vw, 18px);
    line-height: 1.8;
}

.hero-actions,
.card-actions,
.player-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border: 0;
    border-radius: 12px;
    background: rgb(var(--color-accent));
    color: #fff;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
    background: rgb(70 140 200);
}

.btn.secondary {
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
}

.btn.secondary:hover {
    background: rgba(255, 255, 255, 0.18);
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 48px;
    height: 48px;
    transform: translateY(-50%);
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.48);
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease, background 0.2s ease;
    backdrop-filter: blur(10px);
}

.hero-shell:hover .hero-control {
    opacity: 1;
}

.hero-control:hover {
    background: rgba(0, 0, 0, 0.7);
}

.hero-control.prev {
    left: 20px;
}

.hero-control.next {
    right: 20px;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
    width: 34px;
    background: #fff;
}

.hero-search {
    width: min(1280px, calc(100% - 32px));
    margin: 22px auto 0;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 14px;
    border: 1px solid rgb(var(--color-border));
    border-radius: 18px;
    background: rgba(var(--color-bg-secondary), 0.78);
    backdrop-filter: blur(14px);
}

.search-input,
.filter-select {
    width: 100%;
    min-height: 46px;
    border: 1px solid rgb(var(--color-border));
    border-radius: 12px;
    background: rgb(var(--color-bg-tertiary));
    color: rgb(var(--color-text-primary));
    outline: none;
    padding: 0 14px;
}

.search-input:focus,
.filter-select:focus {
    border-color: rgb(var(--color-accent));
    box-shadow: 0 0 0 3px rgba(var(--color-accent), 0.16);
}

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

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

.movie-card {
    display: block;
    overflow: hidden;
    border-radius: 18px;
    background: rgb(var(--color-bg-secondary));
    transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.movie-card:hover {
    transform: translateY(-6px) scale(1.02);
    background: rgb(var(--color-bg-tertiary));
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.28);
}

.poster {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: rgb(var(--color-bg-tertiary));
}

.poster.wide {
    aspect-ratio: 16 / 9;
}

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

.movie-card:hover .poster img,
.ranking-item:hover img,
.related-card:hover img {
    transform: scale(1.08);
}

.gradient-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.12) 62%, transparent);
}

.poster-info {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 16px;
}

.poster-info h3 {
    margin: 0 0 8px;
    color: #fff;
    font-size: 16px;
    line-height: 1.35;
    text-shadow: 0 8px 18px rgba(0, 0, 0, 0.42);
}

.poster-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: rgb(209 213 219);
    font-size: 12px;
}

.card-body {
    padding: 15px;
}

.card-body h3 {
    margin: 0 0 8px;
    font-size: 17px;
}

.card-body p {
    margin: 0 0 12px;
    color: rgb(var(--color-text-secondary));
    font-size: 14px;
    line-height: 1.7;
}

.card-tags,
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(var(--color-accent), 0.16);
    color: rgb(var(--color-accent));
    font-size: 12px;
    font-weight: 700;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 190px;
    padding: 24px;
    border: 1px solid rgb(var(--color-border));
    border-radius: 22px;
    background:
        radial-gradient(circle at top right, rgba(var(--color-accent), 0.26), transparent 38%),
        rgb(var(--color-bg-secondary));
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.category-card:hover {
    transform: translateY(-6px);
    border-color: rgba(var(--color-accent), 0.7);
    background:
        radial-gradient(circle at top right, rgba(var(--color-accent), 0.35), transparent 42%),
        rgb(var(--color-bg-tertiary));
}

.category-card h2,
.category-card h3 {
    margin: 0 0 12px;
}

.category-card p {
    margin: 0;
    color: rgb(var(--color-text-secondary));
    line-height: 1.75;
}

.rank-list {
    display: grid;
    gap: 14px;
}

.ranking-item {
    display: grid;
    grid-template-columns: 72px 118px 1fr auto;
    align-items: center;
    gap: 18px;
    padding: 14px;
    border: 1px solid rgb(var(--color-border));
    border-radius: 18px;
    background: rgb(var(--color-bg-secondary));
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.ranking-item:hover {
    transform: translateY(-3px);
    border-color: rgba(var(--color-accent), 0.7);
    background: rgb(var(--color-bg-tertiary));
}

.rank-number {
    font-size: 28px;
    font-weight: 900;
    color: rgb(var(--color-accent));
    text-align: center;
}

.rank-cover {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 12px;
}

.rank-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.rank-content h2,
.rank-content h3 {
    margin: 0 0 8px;
    font-size: 20px;
}

.rank-content p {
    margin: 0;
    color: rgb(var(--color-text-secondary));
    line-height: 1.65;
}

.rank-meta {
    color: rgb(var(--color-text-muted));
    font-size: 13px;
    white-space: nowrap;
}

.filter-panel {
    display: grid;
    grid-template-columns: 1fr 160px 160px 160px;
    gap: 12px;
    margin-bottom: 24px;
    padding: 14px;
    border: 1px solid rgb(var(--color-border));
    border-radius: 18px;
    background: rgb(var(--color-bg-secondary));
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 24px auto 0;
    width: min(1280px, calc(100% - 32px));
    color: rgb(var(--color-text-muted));
    font-size: 14px;
}

.breadcrumb a {
    color: rgb(var(--color-accent));
}

.detail-hero {
    width: min(1280px, calc(100% - 32px));
    margin: 28px auto 0;
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 32px;
    align-items: stretch;
}

.detail-poster {
    overflow: hidden;
    border-radius: 24px;
    background: rgb(var(--color-bg-secondary));
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

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

.detail-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 520px;
    padding: 44px;
    border: 1px solid rgb(var(--color-border));
    border-radius: 24px;
    background:
        radial-gradient(circle at top right, rgba(var(--color-accent), 0.24), transparent 40%),
        rgb(var(--color-bg-secondary));
}

.detail-info h1 {
    margin: 0 0 18px;
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.1;
}

.detail-summary {
    margin: 0 0 24px;
    color: rgb(var(--color-text-secondary));
    font-size: 17px;
    line-height: 1.9;
}

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

.meta-box {
    padding: 13px;
    border: 1px solid rgb(var(--color-border));
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
}

.meta-box span {
    display: block;
    color: rgb(var(--color-text-muted));
    font-size: 12px;
    margin-bottom: 5px;
}

.meta-box strong {
    color: rgb(var(--color-text-primary));
    font-size: 14px;
}

.player-section {
    width: min(1280px, calc(100% - 32px));
    margin: 42px auto 0;
}

.video-frame {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 24px;
    background: #000;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
}

.video-frame video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
}

.play-layer {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    border: 0;
    background: rgba(0, 0, 0, 0.48);
    color: #fff;
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-layer.hide {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.play-icon {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgb(var(--color-accent));
    color: #fff;
    font-size: 34px;
    box-shadow: 0 18px 50px rgba(var(--color-accent), 0.35);
}

.content-panel {
    width: min(1280px, calc(100% - 32px));
    margin: 42px auto 0;
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 28px;
}

.article-box,
.side-box {
    border: 1px solid rgb(var(--color-border));
    border-radius: 22px;
    background: rgb(var(--color-bg-secondary));
    padding: 26px;
}

.article-box h2,
.side-box h2 {
    margin: 0 0 16px;
}

.article-box p {
    color: rgb(var(--color-text-secondary));
    line-height: 1.9;
}

.related-list {
    display: grid;
    gap: 14px;
}

.related-card {
    display: grid;
    grid-template-columns: 102px 1fr;
    gap: 14px;
    align-items: center;
    overflow: hidden;
    padding: 10px;
    border-radius: 16px;
    background: rgb(var(--color-bg-tertiary));
}

.related-card img {
    width: 102px;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 12px;
    transition: transform 0.3s ease;
}

.related-card h3 {
    margin: 0 0 6px;
    font-size: 15px;
}

.related-card p {
    margin: 0;
    color: rgb(var(--color-text-muted));
    font-size: 13px;
    line-height: 1.5;
}

.empty-state {
    display: none;
    padding: 34px;
    border: 1px solid rgb(var(--color-border));
    border-radius: 18px;
    background: rgb(var(--color-bg-secondary));
    color: rgb(var(--color-text-secondary));
    text-align: center;
}

.site-footer {
    margin-top: 72px;
    border-top: 1px solid rgb(var(--color-border));
    background: rgb(var(--color-bg-secondary));
}

.footer-inner {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    color: rgb(var(--color-text-secondary));
    font-size: 14px;
}

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

.line-clamp-1,
.line-clamp-2,
.line-clamp-3 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
}

.line-clamp-1 {
    -webkit-line-clamp: 1;
}

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

.line-clamp-3 {
    -webkit-line-clamp: 3;
}

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

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

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

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

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

    .mobile-toggle {
        display: inline-grid;
        place-items: center;
    }

    .mobile-panel.open {
        display: block;
    }

    .hero-shell {
        min-height: 520px;
        border-radius: 22px;
    }

    .hero-content {
        padding: 34px;
    }

    .hero-control {
        opacity: 1;
    }

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

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

    .detail-poster img {
        min-height: auto;
        max-height: 560px;
    }

    .detail-info {
        min-height: auto;
        padding: 28px;
    }

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

    .ranking-item {
        grid-template-columns: 54px 104px 1fr;
    }

    .rank-meta {
        grid-column: 3;
    }
}

@media (max-width: 680px) {
    .section-container,
    .hero,
    .hero-search,
    .breadcrumb,
    .detail-hero,
    .player-section,
    .content-panel,
    .footer-inner,
    .nav-inner,
    .mobile-panel {
        width: min(100% - 24px, 1280px);
    }

    .section-container {
        padding: 34px 0;
    }

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

    .hero-shell {
        min-height: 500px;
    }

    .hero-content {
        padding: 26px;
    }

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

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

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

    .poster-info {
        padding: 12px;
    }

    .ranking-item {
        grid-template-columns: 46px 86px 1fr;
        gap: 12px;
        padding: 10px;
    }

    .rank-number {
        font-size: 22px;
    }

    .rank-content h2,
    .rank-content h3 {
        font-size: 16px;
    }

    .rank-content p,
    .rank-meta {
        font-size: 12px;
    }

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

    .article-box,
    .side-box {
        padding: 20px;
    }

    .related-card {
        grid-template-columns: 90px 1fr;
    }

    .related-card img {
        width: 90px;
    }
}
