* {
    box-sizing: border-box;
}

:root {
    --bg: #f8fafc;
    --panel: #ffffff;
    --text: #111827;
    --muted: #64748b;
    --line: rgba(15, 23, 42, 0.08);
    --cyan: #06b6d4;
    --blue: #3b82f6;
    --purple: #8b5cf6;
    --emerald: #10b981;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
    --radius: 28px;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.65;
}

body.no-scroll {
    overflow: hidden;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, var(--cyan), var(--blue), var(--purple));
    box-shadow: 0 12px 32px rgba(37, 99, 235, 0.22);
}

.nav-shell {
    max-width: 1280px;
    height: 68px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: 22px;
    font-weight: 800;
    white-space: nowrap;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.nav-search {
    flex: 1;
    max-width: 430px;
}

.nav-search input,
.filter-controls input,
.filter-controls select {
    width: 100%;
    border: 0;
    outline: 0;
    color: #0f172a;
    border-radius: 999px;
    padding: 12px 18px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.14);
}

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

.nav-link {
    color: rgba(255, 255, 255, 0.86);
    font-weight: 700;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #fff;
    transform: translateY(-1px);
}

.mobile-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    width: 42px;
    height: 42px;
    border-radius: 14px;
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) 360px;
    align-items: center;
    gap: 52px;
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    padding: 86px 24px 72px;
    opacity: 0;
    transform: translateX(24px);
    pointer-events: none;
    z-index: 3;
    transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.hero-backdrop {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 100vw;
    transform: translateX(-50%);
    z-index: 0;
    background-position: center;
    background-size: cover;
    filter: saturate(1.1);
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-position: center;
    background-size: cover;
    filter: saturate(1.1);
}

.hero::before,
.detail-hero::before,
.sub-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 14% 24%, rgba(34, 211, 238, 0.22), transparent 30%),
        radial-gradient(circle at 72% 18%, rgba(139, 92, 246, 0.18), transparent 32%),
        linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(248, 250, 252, 0.98));
    pointer-events: none;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: #fff;
}

.eyebrow,
.section-kicker {
    margin: 0 0 12px;
    color: #22d3ee;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero h1,
.detail-info h1,
.sub-hero h1 {
    margin: 0;
    font-size: clamp(42px, 6vw, 82px);
    line-height: 1.02;
    letter-spacing: -0.06em;
}

.hero-summary,
.detail-one,
.sub-hero p {
    max-width: 780px;
    margin: 24px 0 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 19px;
}

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

.primary-btn,
.ghost-btn,
.watch-link,
.section-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
    min-height: 48px;
    padding: 0 26px;
    color: #fff;
    background: linear-gradient(90deg, var(--cyan), var(--blue));
    box-shadow: 0 16px 34px rgba(59, 130, 246, 0.34);
}

.ghost-btn {
    min-height: 48px;
    padding: 0 24px;
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(14px);
}

.primary-btn:hover,
.ghost-btn:hover,
.watch-link:hover,
.section-link:hover {
    transform: translateY(-2px);
}

.hero-poster,
.detail-poster {
    position: relative;
    z-index: 2;
    min-height: 500px;
    border-radius: 36px;
    overflow: hidden;
    box-shadow: 0 35px 80px rgba(2, 6, 23, 0.42);
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 52px;
    height: 52px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    font-size: 38px;
    line-height: 1;
    background: rgba(15, 23, 42, 0.38);
    backdrop-filter: blur(12px);
}

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

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

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

.hero-dot {
    width: 38px;
    height: 8px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.38);
}

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

.page-section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 56px 24px;
}

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

.section-heading h2,
.filter-panel h2,
.article-card h2,
.rank-board h2,
.category-overview-card h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 40px);
    line-height: 1.15;
    letter-spacing: -0.04em;
}

.section-heading p {
    max-width: 760px;
    margin: 10px 0 0;
    color: var(--muted);
}

.section-link,
.watch-link {
    color: #fff;
    background: linear-gradient(90deg, var(--cyan), var(--blue));
    padding: 10px 18px;
    box-shadow: 0 12px 24px rgba(14, 165, 233, 0.2);
}

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: var(--panel);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
}

.poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background:
        radial-gradient(circle at 24% 18%, rgba(34, 211, 238, 0.36), transparent 32%),
        linear-gradient(135deg, #0f172a, #1e40af 48%, #581c87);
}

.poster-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 35%, rgba(2, 6, 23, 0.78));
    z-index: 2;
}

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

.movie-card:hover .poster-img,
.hero-poster:hover .poster-img,
.detail-poster:hover .poster-img {
    transform: scale(1.05);
}

.quality,
.score {
    position: absolute;
    z-index: 3;
    top: 12px;
    border-radius: 999px;
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    padding: 5px 9px;
    background: rgba(14, 165, 233, 0.88);
    backdrop-filter: blur(8px);
}

.quality {
    left: 12px;
}

.score {
    right: 12px;
    background: rgba(245, 158, 11, 0.9);
}

.movie-card-body {
    padding: 18px;
}

.movie-title {
    display: -webkit-box;
    overflow: hidden;
    color: #0f172a;
    font-size: 18px;
    font-weight: 900;
    line-height: 1.25;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-meta,
.movie-desc {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 14px;
}

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

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.tag-row span {
    border-radius: 999px;
    color: #0369a1;
    font-size: 12px;
    font-weight: 800;
    padding: 5px 9px;
    background: #e0f2fe;
}

.hero-tags span,
.detail-tags span {
    color: #cffafe;
    background: rgba(8, 145, 178, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.watch-link {
    margin-top: 16px;
    width: 100%;
}

.card-compact .movie-desc {
    display: none;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 28px;
}

.rank-panel,
.category-panel,
.filter-panel,
.article-card,
.rank-board,
.category-overview-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.rank-panel,
.category-panel,
.article-card,
.rank-board {
    padding: 28px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 54px;
    padding: 10px 12px;
    border-radius: 18px;
    background: #f8fafc;
    transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
    transform: translateX(4px);
    background: #e0f2fe;
}

.rank-no {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #fff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
}

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

.rank-score {
    color: #f97316;
    font-weight: 900;
}

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

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

.category-tile {
    position: relative;
    overflow: hidden;
    min-height: 180px;
    padding: 20px;
    border-radius: 24px;
    color: #fff;
    background: linear-gradient(135deg, #0891b2, #2563eb 55%, #7c3aed);
}

.category-thumbs {
    position: absolute;
    inset: 0;
    opacity: 0.22;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
}

.category-thumbs span,
.category-cover span {
    background-position: center;
    background-size: cover;
}

.category-tile h3,
.category-tile p {
    position: relative;
    z-index: 2;
}

.category-tile h3 {
    margin: 0 0 8px;
    font-size: 24px;
}

.category-tile p {
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 20px;
    align-items: center;
    margin-bottom: 32px;
    padding: 28px;
}

.filter-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 170px;
    gap: 14px;
}

.filter-controls input,
.filter-controls select {
    border: 1px solid var(--line);
    background: #f8fafc;
    box-shadow: none;
}

.filter-buttons {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-buttons button {
    border: 0;
    border-radius: 999px;
    color: #0f172a;
    font-weight: 800;
    padding: 9px 15px;
    background: #e2e8f0;
}

.filter-buttons button.active,
.filter-buttons button:hover {
    color: #fff;
    background: linear-gradient(90deg, var(--cyan), var(--blue));
}

.sub-hero {
    position: relative;
    overflow: hidden;
    padding: 96px 24px 72px;
    color: #fff;
    background: linear-gradient(135deg, #020617, #075985 48%, #4c1d95);
}

.sub-hero > * {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
}

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

.category-overview-card {
    overflow: hidden;
}

.category-cover {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    min-height: 210px;
    background: linear-gradient(135deg, #0f172a, #1e40af, #581c87);
}

.category-overview-card > div {
    padding: 24px;
}

.category-overview-card p {
    color: var(--muted);
}

.category-links {
    display: grid;
    gap: 8px;
    margin: 16px 0;
}

.category-links a {
    overflow: hidden;
    color: #0369a1;
    font-weight: 800;
    white-space: nowrap;
    text-overflow: ellipsis;
}

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

.detail-hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    background: #020617;
}

.detail-layout {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    min-height: 620px;
    margin: 0 auto;
    padding: 76px 24px;
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 48px;
    align-items: center;
}

.detail-poster {
    min-height: 480px;
}

.detail-meta,
.detail-stats {
    color: rgba(255, 255, 255, 0.76);
    font-weight: 700;
}

.detail-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

.detail-stats span {
    border-radius: 999px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.12);
}

.video-shell {
    position: relative;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 32px;
    background: #020617;
    box-shadow: 0 24px 64px rgba(2, 6, 23, 0.28);
}

.main-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.video-poster {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    color: #fff;
    text-align: center;
    background-position: center;
    background-size: cover;
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.video-poster.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.play-icon {
    width: 78px;
    height: 78px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 30px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 18px 42px rgba(14, 165, 233, 0.35);
}

.video-poster strong {
    font-size: clamp(24px, 4vw, 42px);
}

.video-poster em {
    font-style: normal;
    color: rgba(255, 255, 255, 0.82);
}

.article-card {
    max-width: 980px;
    margin: 0 auto;
}

.article-card p {
    color: #334155;
    font-size: 18px;
}

.site-footer {
    margin-top: 48px;
    color: #cbd5e1;
    background: linear-gradient(135deg, #0f172a, #111827 62%, #164e63);
}

.footer-grid {
    max-width: 1280px;
    margin: 0 auto;
    padding: 48px 24px;
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr;
    gap: 34px;
}

.footer-grid h3 {
    color: #67e8f9;
    margin: 0 0 12px;
}

.footer-grid a {
    display: block;
    margin-top: 8px;
}

.footer-brand {
    margin-bottom: 12px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 18px 24px;
    text-align: center;
    color: #94a3b8;
}

[data-card].is-hidden {
    display: none;
}

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

    .hero-slide {
        grid-template-columns: minmax(0, 1fr) 300px;
    }

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

@media (max-width: 820px) {
    .nav-shell {
        height: auto;
        min-height: 64px;
        flex-wrap: wrap;
        padding: 12px 16px;
    }

    .nav-search {
        display: none;
    }

    .mobile-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        padding: 12px 0 4px;
    }

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

    .nav-link {
        padding: 10px 12px;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.1);
    }

    .hero {
        min-height: 780px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        align-content: center;
        gap: 28px;
        padding: 72px 18px 90px;
    }

    .hero-poster {
        min-height: 360px;
        max-width: 260px;
    }

    .hero-control {
        display: none;
    }

    .movie-grid,
    .all-grid,
    .featured-grid,
    .category-grid,
    .category-grid.small,
    .split-section,
    .filter-panel,
    .boards-grid,
    .detail-layout,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

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

    .detail-layout {
        min-height: auto;
        padding: 56px 18px;
    }

    .detail-poster {
        max-width: 270px;
        min-height: 390px;
    }

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

@media (max-width: 560px) {
    .brand {
        font-size: 18px;
    }

    .page-section {
        padding: 38px 16px;
    }

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

    .movie-card-body {
        padding: 12px;
    }

    .movie-title {
        font-size: 15px;
    }

    .movie-desc,
    .tag-row {
        display: none;
    }

    .video-shell {
        border-radius: 18px;
    }
}
