:root {
    --primary: #2980b9;
    --primary-dark: #1e618c;
    --primary-light: #5dade2;
    --accent: #2ecc71;
    --warning: #f1c40f;
    --text: #172033;
    --muted: #667085;
    --line: #e5e7eb;
    --soft: #f7fafc;
    --card: #ffffff;
    --dark: #050b16;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(229, 231, 235, 0.92);
    backdrop-filter: blur(16px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    color: var(--primary-dark);
    white-space: nowrap;
}

.brand-mark {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(41, 128, 185, 0.28);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.main-nav a {
    padding: 10px 16px;
    color: #344054;
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary-dark);
    background: rgba(41, 128, 185, 0.1);
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 10px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 12px;
}

.nav-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: var(--text);
    border-radius: 4px;
}

.hero {
    position: relative;
    height: 600px;
    overflow: hidden;
    background: var(--dark);
}

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

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

.hero-bg,
.detail-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(5, 11, 22, 0.92), rgba(5, 11, 22, 0.62), rgba(5, 11, 22, 0.2)), linear-gradient(0deg, rgba(5, 11, 22, 0.94), transparent 55%);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    align-items: center;
    height: 100%;
    gap: 48px;
}

.hero-copy {
    max-width: 760px;
    color: #ffffff;
}

.hero-kicker,
.kicker {
    display: inline-flex;
    align-items: center;
    margin-bottom: 14px;
    color: var(--primary-light);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero h1 {
    margin: 0 0 14px;
    font-size: clamp(34px, 5vw, 64px);
    line-height: 1.08;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero h2 {
    margin: 0 0 16px;
    color: var(--primary-light);
    font-size: clamp(24px, 3vw, 40px);
    line-height: 1.15;
}

.hero p {
    max-width: 700px;
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 18px;
}

.hero-tags,
.detail-meta,
.movie-meta,
.card-bottom {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.hero-tags span,
.detail-meta span {
    display: inline-flex;
    padding: 7px 11px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    backdrop-filter: blur(12px);
}

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

.primary-btn,
.ghost-btn,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    font-weight: 800;
    border-radius: 999px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    box-shadow: 0 12px 28px rgba(41, 128, 185, 0.3);
}

.ghost-btn {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

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

.hero-poster {
    position: relative;
    display: block;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 28px;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.hero-poster span,
.poster-play {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    width: 64px;
    height: 64px;
    place-items: center;
    color: #ffffff;
    background: rgba(41, 128, 185, 0.9);
    border-radius: 999px;
    transform: translate(-50%, -50%);
    box-shadow: 0 18px 45px rgba(41, 128, 185, 0.36);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 44px;
    height: 44px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.38);
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 999px;
    transform: translateY(-50%);
}

.hero-arrow.prev {
    left: 22px;
}

.hero-arrow.next {
    right: 22px;
}

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

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

.hero-dots button.active {
    background: #ffffff;
}

.filter-panel {
    position: sticky;
    top: 72px;
    z-index: 40;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
}

.filter-inner {
    display: grid;
    grid-template-columns: minmax(240px, 420px) 1fr;
    gap: 16px;
    align-items: center;
    padding: 14px 0;
}

.search-box {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.search-box input {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    color: var(--text);
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 14px;
    outline: none;
}

.search-box input:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 4px rgba(41, 128, 185, 0.12);
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.filter-buttons button {
    min-height: 38px;
    padding: 0 13px;
    color: #344054;
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 999px;
}

.filter-buttons button.active,
.filter-buttons button:hover {
    color: #ffffff;
    background: var(--primary);
    border-color: var(--primary);
}

.content-section {
    padding: 64px 0;
}

.muted-section {
    background: var(--soft);
}

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

.section-heading h2,
.page-hero h1,
.article-body h2,
.side-card h2 {
    margin: 0;
    font-size: clamp(26px, 3.2vw, 40px);
    line-height: 1.15;
    font-weight: 900;
    letter-spacing: -0.03em;
}

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

.section-more,
.text-link {
    color: var(--primary-dark);
    background: rgba(41, 128, 185, 0.1);
}

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

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

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

.movie-card {
    overflow: hidden;
    background: var(--card);
    border: 1px solid rgba(229, 231, 235, 0.88);
    border-radius: var(--radius);
    box-shadow: 0 6px 22px rgba(15, 23, 42, 0.06);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, #d7eaf8, #f2f7fb);
}

.poster-link img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.poster-link::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), transparent 52%);
    opacity: 0;
    transition: opacity 0.2s ease;
}

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

.poster-play {
    z-index: 2;
    width: 48px;
    height: 48px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

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

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 4;
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    color: #ffffff;
    font-weight: 900;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    border-radius: 12px;
}

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

.movie-meta,
.card-bottom {
    color: var(--muted);
    font-size: 13px;
}

.movie-meta span:not(:last-child)::after,
.card-bottom span:not(:last-child)::after {
    margin-left: 8px;
    color: #cbd5e1;
    content: "•";
}

.movie-card h3 {
    display: -webkit-box;
    min-height: 48px;
    margin: 8px 0 8px;
    overflow: hidden;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 850;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.movie-card p {
    display: -webkit-box;
    min-height: 66px;
    margin: 0 0 12px;
    overflow: hidden;
    color: var(--muted);
    font-size: 14px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.rating {
    color: #d97706;
    font-weight: 900;
}

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

.tag-row span {
    display: inline-flex;
    padding: 4px 8px;
    color: var(--primary-dark);
    background: rgba(41, 128, 185, 0.1);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

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

.category-tile,
.category-card {
    display: grid;
    gap: 16px;
    padding: 20px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 6px 22px rgba(15, 23, 42, 0.06);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-tile:hover,
.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

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

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

.category-stack img,
.category-preview img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 12px;
}

.category-tile strong,
.category-card h2 {
    font-size: 22px;
    line-height: 1.25;
}

.category-tile span,
.category-card p {
    color: var(--muted);
}

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

.page-hero {
    position: relative;
    padding: 96px 0 72px;
    color: #ffffff;
    background: radial-gradient(circle at 20% 20%, rgba(93, 173, 226, 0.36), transparent 28%), linear-gradient(135deg, #07111f, #102840 52%, #1e618c);
}

.page-hero .kicker {
    color: #bfe3ff;
}

.page-hero p {
    color: rgba(255, 255, 255, 0.78);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
}

.breadcrumb a:hover {
    color: #ffffff;
}

.detail-hero {
    position: relative;
    min-height: 560px;
    overflow: hidden;
    color: #ffffff;
    background: var(--dark);
}

.detail-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(5, 11, 22, 0.94), rgba(5, 11, 22, 0.72), rgba(5, 11, 22, 0.36)), linear-gradient(0deg, #050b16, rgba(5, 11, 22, 0.2));
}

.detail-head {
    position: relative;
    z-index: 2;
    padding: 70px 0;
}

.detail-intro {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 34px;
    align-items: end;
}

.detail-poster {
    width: 260px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 24px;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
}

.detail-intro h1 {
    max-width: 900px;
    margin: 0 0 16px;
    font-size: clamp(34px, 5vw, 62px);
    line-height: 1.08;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.detail-intro p {
    max-width: 820px;
    margin: 0 0 18px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
}

.detail-tags span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
}

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

.detail-main,
.side-card,
.player-card {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 8px 26px rgba(15, 23, 42, 0.08);
}

.detail-main {
    overflow: hidden;
}

.player-card {
    position: relative;
    overflow: hidden;
    background: #000000;
    border-color: #000000;
    border-radius: var(--radius) var(--radius) 0 0;
    cursor: pointer;
}

.movie-player {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.42));
    border: 0;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-overlay span {
    display: grid;
    width: 86px;
    height: 86px;
    place-items: center;
    color: #ffffff;
    font-size: 34px;
    background: rgba(41, 128, 185, 0.92);
    border-radius: 999px;
    box-shadow: 0 22px 60px rgba(41, 128, 185, 0.42);
}

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

.article-body {
    padding: 28px;
}

.article-body h2 {
    margin-top: 28px;
    font-size: 28px;
}

.article-body h2:first-child {
    margin-top: 0;
}

.article-body p {
    margin: 12px 0 0;
    color: #344054;
    font-size: 17px;
}

.prev-next {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    background: var(--line);
}

.prev-next a {
    padding: 18px 22px;
    color: var(--primary-dark);
    background: #ffffff;
    font-weight: 800;
}

.side-card {
    position: sticky;
    top: 148px;
    padding: 24px;
}

.side-card h2 {
    margin-bottom: 16px;
    font-size: 24px;
}

.side-card dl {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 10px 12px;
    margin: 0 0 22px;
}

.side-card dt {
    color: var(--muted);
}

.side-card dd {
    margin: 0;
    font-weight: 750;
}

.full-btn {
    width: 100%;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 56px 92px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 14px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.05);
}

.row-rank {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    color: #ffffff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 14px;
}

.rank-thumb img {
    width: 92px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 14px;
}

.rank-info h3 {
    margin: 0 0 6px;
    font-size: 20px;
}

.rank-info p {
    margin: 0 0 8px;
    color: var(--muted);
}

.site-footer {
    color: rgba(255, 255, 255, 0.78);
    background: #07111f;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding: 36px 0;
}

.footer-inner strong {
    color: #ffffff;
    font-size: 20px;
}

.footer-inner p {
    max-width: 680px;
    margin: 8px 0 0;
}

.footer-links {
    display: flex;
    gap: 12px;
    align-items: center;
}

.footer-links a {
    color: #ffffff;
}

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

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

    .ranking-grid,
    .related-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;
    }

    .side-card {
        position: static;
    }
}

@media (max-width: 860px) {
    .nav-toggle {
        display: block;
    }

    .main-nav {
        position: fixed;
        left: 16px;
        right: 16px;
        top: 82px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        background: #ffffff;
        border: 1px solid var(--line);
        border-radius: 18px;
        box-shadow: var(--shadow);
    }

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

    .hero {
        height: auto;
        min-height: 720px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 74px 0 88px;
    }

    .hero-poster {
        max-width: 240px;
    }

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

    .filter-buttons {
        justify-content: flex-start;
    }

    .movie-grid,
    .featured-grid,
    .ranking-grid,
    .related-grid,
    .category-grid,
    .category-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

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

    .detail-poster {
        width: 190px;
    }

    .rank-row {
        grid-template-columns: 44px 72px minmax(0, 1fr);
    }

    .rank-row .text-link {
        grid-column: 2 / 4;
        justify-self: start;
    }

    .rank-thumb img {
        width: 72px;
    }

    .prev-next {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .container {
        width: min(100% - 24px, 1280px);
    }

    .hero h1 {
        font-size: 34px;
    }

    .hero p,
    .detail-intro p {
        font-size: 16px;
    }

    .hero-arrow {
        display: none;
    }

    .movie-grid,
    .featured-grid,
    .ranking-grid,
    .related-grid,
    .category-grid,
    .category-list {
        grid-template-columns: 1fr;
    }

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

    .content-section {
        padding: 46px 0;
    }

    .page-hero {
        padding: 72px 0 56px;
    }

    .detail-head {
        padding: 48px 0;
    }

    .article-body {
        padding: 22px;
    }
}
