:root {
    --sky: #0284c7;
    --sky-dark: #0369a1;
    --sky-soft: #e0f2fe;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --surface: #ffffff;
    --soft: #f8fafc;
    --dark: #020617;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--ink);
    background: linear-gradient(180deg, #f8fafc 0%, #eff6ff 42%, #f8fafc 100%);
    line-height: 1.6;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    backdrop-filter: blur(16px);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.header-inner {
    max-width: 1320px;
    height: 70px;
    margin: 0 auto;
    padding: 0 22px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: #fff;
    font-weight: 900;
    background: linear-gradient(135deg, #0ea5e9, #2563eb 55%, #7c3aed);
    box-shadow: 0 12px 24px rgba(2, 132, 199, 0.28);
}

.brand-text {
    font-size: 20px;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.nav {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1 1 auto;
    overflow: hidden;
    white-space: nowrap;
}

.nav-link {
    color: #334155;
    font-size: 15px;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--sky);
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.header-search input,
.filter-line input,
.filter-line select,
.wide-search input {
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 999px;
    padding: 11px 15px;
    outline: none;
    color: var(--ink);
    min-width: 0;
}

.header-search input:focus,
.filter-line input:focus,
.filter-line select:focus,
.wide-search input:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.12);
}

.header-search button,
.wide-search button,
.primary-btn {
    border: none;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
    padding: 11px 18px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 14px 25px rgba(37, 99, 235, 0.22);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: none;
    background: #f1f5f9;
    border-radius: 14px;
    padding: 10px;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: var(--ink);
    border-radius: 999px;
}

.mobile-panel {
    display: none;
    padding: 12px 22px 20px;
    border-top: 1px solid var(--line);
    background: #fff;
}

.mobile-panel.open {
    display: grid;
    gap: 10px;
}

.mobile-panel a {
    padding: 10px 12px;
    border-radius: 12px;
    background: #f8fafc;
    color: #334155;
}

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

.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-bg,
.detail-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08);
}

.hero-shade,
.detail-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 70% 20%, rgba(14, 165, 233, 0.28), transparent 30%), linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(15, 23, 42, 0.74) 42%, rgba(15, 23, 42, 0.2) 100%), linear-gradient(0deg, rgba(2, 6, 23, 0.85), transparent 45%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1320px;
    margin: 0 auto;
    min-height: 650px;
    padding: 88px 22px 88px;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 380px;
    align-items: center;
    gap: 60px;
}

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

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 13px;
    font-weight: 800;
    color: #0369a1;
    background: #e0f2fe;
}

.hero-copy .eyebrow,
.detail-info .eyebrow,
.page-hero .eyebrow {
    color: #bae6fd;
    background: rgba(14, 165, 233, 0.2);
    border: 1px solid rgba(186, 230, 253, 0.28);
    backdrop-filter: blur(10px);
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
    margin: 18px 0 16px;
    font-size: clamp(38px, 6vw, 76px);
    line-height: 1.02;
    letter-spacing: -0.06em;
    font-weight: 950;
}

.hero-copy p,
.page-hero p,
.detail-one {
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
    max-width: 680px;
}

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

.hero-tags,
.detail-tags {
    margin: 22px 0;
}

.hero-tags span,
.detail-tags span,
.tag-row span {
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 700;
    color: #0f172a;
    background: rgba(255, 255, 255, 0.88);
}

.tag-row span {
    color: #0369a1;
    background: #e0f2fe;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.primary-btn,
.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    font-weight: 900;
    border-radius: 999px;
}

.ghost-btn {
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(12px);
}

.hero-poster {
    position: relative;
    display: block;
    border-radius: 30px;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    box-shadow: 0 40px 90px rgba(0, 0, 0, 0.45);
    transform: rotate(2deg);
}

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

.hero-poster span {
    position: absolute;
    left: 24px;
    bottom: 24px;
    width: 62px;
    height: 62px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: var(--sky);
    background: rgba(255, 255, 255, 0.92);
    font-weight: 900;
}

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

.hero-dot {
    width: 28px;
    height: 6px;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease;
}

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

.section {
    max-width: 1320px;
    margin: 0 auto;
    padding: 56px 22px;
}

.section-raised {
    margin-top: -34px;
    position: relative;
    z-index: 8;
}

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

.section-head h2 {
    margin: 10px 0 0;
    font-size: clamp(26px, 3vw, 38px);
    letter-spacing: -0.04em;
    line-height: 1.12;
}

.section-more {
    color: var(--sky-dark);
    font-weight: 900;
}

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

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

.category-chip {
    min-height: 130px;
    padding: 22px;
    border: 1px solid rgba(226, 232, 240, 0.86);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.category-chip:hover,
.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 22px 55px rgba(15, 23, 42, 0.16);
}

.category-chip strong {
    display: block;
    margin-bottom: 8px;
    font-size: 20px;
}

.category-chip span {
    color: var(--muted);
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.86);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 12px 35px rgba(15, 23, 42, 0.08);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.poster {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #e2e8f0;
}

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

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

.poster-mask {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    opacity: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.68), rgba(2, 6, 23, 0.1));
    transition: opacity 0.25s ease;
}

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

.play-dot {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: var(--sky);
    background: rgba(255, 255, 255, 0.92);
    font-weight: 900;
}

.poster-badge,
.poster-time {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 12px;
    font-weight: 800;
    color: #fff;
    background: rgba(2, 6, 23, 0.72);
}

.poster-badge {
    left: 10px;
    top: 10px;
    background: rgba(2, 132, 199, 0.88);
}

.poster-time {
    right: 10px;
    bottom: 10px;
}

.card-body {
    padding: 18px;
}

.card-body h3 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.3;
}

.card-body h3 a:hover {
    color: var(--sky-dark);
}

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

.card-desc {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 15px;
    color: #334155;
    font-size: 14px;
    font-weight: 800;
}

.card-foot span {
    color: #f59e0b;
}

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

.rank-list {
    max-width: 1080px;
}

.rank-item {
    display: grid;
    grid-template-columns: 64px 110px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
}

.rank-num {
    font-size: 24px;
    font-weight: 950;
    color: var(--sky);
    text-align: center;
}

.rank-cover {
    display: block;
    aspect-ratio: 16 / 10;
    border-radius: 16px;
    overflow: hidden;
}

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

.rank-info h3,
.rank-info p {
    margin: 0;
}

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

.rank-info div {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: #475569;
    font-size: 13px;
    font-weight: 700;
}

.wide-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow);
}

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

.page-hero {
    min-height: 320px;
    padding: 88px 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: radial-gradient(circle at 20% 20%, rgba(14, 165, 233, 0.42), transparent 28%), linear-gradient(135deg, #020617, #0f172a 55%, #0c4a6e);
}

.page-hero > div {
    max-width: 840px;
}

.page-hero h1 {
    margin-bottom: 12px;
}

.category-hero {
    min-height: 360px;
}

.small-actions {
    margin-top: 24px;
    justify-content: center;
}

.filter-line {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px;
    gap: 12px;
    margin-bottom: 24px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #fff;
}

.search-panel {
    grid-template-columns: minmax(0, 1fr) repeat(3, 160px);
}

.detail-hero {
    min-height: 620px;
}

.detail-wrap {
    position: relative;
    z-index: 2;
    max-width: 1320px;
    min-height: 620px;
    margin: 0 auto;
    padding: 80px 22px;
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    align-items: center;
    gap: 48px;
}

.detail-poster {
    border-radius: 28px;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    box-shadow: 0 35px 90px rgba(0, 0, 0, 0.46);
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 18px;
}

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

.detail-info h1 {
    color: #fff;
}

.detail-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0 0 28px;
}

.detail-stats span {
    padding: 8px 12px;
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
}

.player-section {
    padding-top: 36px;
}

.player-box {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000;
    box-shadow: 0 32px 80px rgba(15, 23, 42, 0.28);
    aspect-ratio: 16 / 9;
}

.movie-video {
    width: 100%;
    height: 100%;
    background: #000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 14px;
    border: none;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.74), rgba(2, 6, 23, 0.18));
}

.play-overlay span {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: var(--sky);
    background: #fff;
    font-size: 30px;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.36);
}

.play-overlay strong {
    font-size: 22px;
}

.play-overlay.hidden {
    display: none;
}

.player-message {
    position: absolute;
    left: 18px;
    bottom: 18px;
    z-index: 5;
    color: #fff;
    background: rgba(15, 23, 42, 0.76);
    border-radius: 999px;
    padding: 8px 12px;
    display: none;
}

.player-message.show {
    display: block;
}

.content-card {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow);
}

.content-card h2 {
    margin: 22px 0 10px;
    font-size: 24px;
}

.content-card h2:first-child {
    margin-top: 0;
}

.content-card p {
    color: #334155;
    font-size: 17px;
}

.info-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 18px 0 0;
}

.info-list div {
    padding: 14px;
    border-radius: 16px;
    background: #f8fafc;
}

.info-list dt {
    color: var(--muted);
    font-size: 13px;
}

.info-list dd {
    margin: 4px 0 0;
    font-weight: 800;
}

.site-footer {
    margin-top: 40px;
    color: #cbd5e1;
    background: #020617;
}

.footer-inner {
    max-width: 1320px;
    margin: 0 auto;
    padding: 38px 22px;
    display: flex;
    justify-content: space-between;
    gap: 24px;
}

.footer-inner p {
    margin: 8px 0 0;
    color: #94a3b8;
}

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

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

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

    .menu-toggle {
        display: block;
    }

    .header-inner {
        gap: 12px;
    }

    .header-search {
        margin-left: auto;
    }

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

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

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

@media (max-width: 860px) {
    .header-search {
        display: none;
    }

    .hero,
    .hero-content {
        min-height: 620px;
    }

    .hero-content,
    .detail-wrap {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .hero-poster,
    .detail-poster {
        max-width: 240px;
        transform: none;
    }

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

    .search-panel,
    .filter-line,
    .wide-search {
        grid-template-columns: 1fr;
    }

    .rank-item {
        grid-template-columns: 48px 82px minmax(0, 1fr);
    }

    .footer-inner {
        flex-direction: column;
    }
}

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

    .hero-copy h1,
    .page-hero h1,
    .detail-info h1 {
        font-size: 38px;
    }

    .section {
        padding: 38px 16px;
    }

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

    .rank-info p,
    .rank-info div {
        display: none;
    }

    .info-list {
        grid-template-columns: 1fr;
    }
}
