:root {
    --bg: #f8fafc;
    --paper: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --cyan: #06b6d4;
    --blue: #2563eb;
    --deep: #020617;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background: var(--bg);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.86);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    backdrop-filter: blur(18px);
}

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

.site-logo {
    display: inline-flex;
    align-items: center;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: -0.04em;
    color: #0e7490;
}

.site-logo::before {
    content: "";
    width: 34px;
    height: 34px;
    margin-right: 10px;
    border-radius: 11px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 12px 28px rgba(6, 182, 212, 0.35);
}

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

.site-nav a {
    padding: 10px 16px;
    border-radius: 999px;
    color: #334155;
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover {
    color: #0369a1;
    background: #ecfeff;
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    color: var(--text);
    background: #e0f2fe;
    font-size: 22px;
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.65s ease, transform 0.65s ease;
    pointer-events: none;
}

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

.hero-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: radial-gradient(circle at 20% 10%, #164e63, #020617 64%);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(15, 23, 42, 0.68) 45%, rgba(15, 23, 42, 0.20) 100%);
}

.hero-content {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.hero-copy {
    width: min(680px, 100%);
    padding-top: 24px;
    color: #fff;
}

.eyebrow {
    margin: 0 0 12px;
    color: #a5f3fc;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.eyebrow.dark {
    color: #0891b2;
}

.hero h1,
.hero h2 {
    margin: 0;
    color: #fff;
    font-size: clamp(42px, 7vw, 76px);
    line-height: 1.02;
    letter-spacing: -0.07em;
}

.hero-desc {
    max-width: 650px;
    margin: 22px 0 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 20px;
}

.hero-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.hero-meta span,
.detail-meta span {
    padding: 8px 14px;
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(10px);
    font-size: 14px;
}

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

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

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

.btn.primary {
    color: #fff;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 18px 35px rgba(37, 99, 235, 0.28);
}

.btn.glass {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(12px);
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(12px);
    font-size: 36px;
    line-height: 1;
    cursor: pointer;
}

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

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

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

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

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

.quick-search {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 34px;
    padding: 24px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.quick-search h2,
.quick-search p {
    margin: 0;
}

.quick-search p {
    color: var(--muted);
}

.sticky-search {
    position: sticky;
    top: 88px;
    z-index: 20;
}

.search-input {
    width: min(460px, 100%);
    min-height: 52px;
    padding: 0 18px;
    border: 1px solid #cbd5e1;
    border-radius: 18px;
    outline: 0;
    color: var(--text);
    background: #f8fafc;
    font-size: 16px;
}

.search-input:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.12);
}

.section {
    padding: 56px 0;
}

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

.section-head.slim {
    align-items: center;
}

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

.text-link {
    color: #0891b2;
    font-weight: 900;
}

.panel-section {
    padding: 34px;
    background: var(--paper);
    border-radius: calc(var(--radius) + 6px);
    box-shadow: var(--shadow);
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 390px;
    gap: 28px;
    align-items: start;
}

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

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

.movie-card {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: var(--paper);
    border: 1px solid rgba(226, 232, 240, 0.88);
    border-radius: 20px;
    box-shadow: 0 16px 35px rgba(15, 23, 42, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(6, 182, 212, 0.42);
    box-shadow: 0 24px 55px rgba(15, 23, 42, 0.14);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: radial-gradient(circle at 20% 20%, #67e8f9, #0f172a 68%);
}

.poster-link img,
.rank-cover img,
.category-card img,
.detail-poster img,
.player-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.poster-link img {
    transition: transform 0.35s ease;
}

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

.poster-play {
    position: absolute;
    right: 14px;
    bottom: 14px;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #fff;
    background: rgba(6, 182, 212, 0.92);
    box-shadow: 0 12px 26px rgba(6, 182, 212, 0.35);
}

.movie-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 18px;
}

.movie-meta {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.movie-info h3,
.rank-content h3 {
    margin: 0;
    color: var(--text);
    font-size: 18px;
    line-height: 1.35;
}

.movie-info h3 a:hover,
.rank-content h3 a:hover {
    color: #0891b2;
}

.movie-desc,
.rank-content p {
    margin: 0;
    color: #475569;
    font-size: 14px;
}

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

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

.tag-row.large span {
    padding: 7px 12px;
    font-size: 13px;
}

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

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

.category-card {
    position: relative;
    min-height: 210px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: end;
    padding: 24px;
    border-radius: 24px;
    color: #fff;
    background: #0f172a;
    box-shadow: var(--shadow);
}

.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.05), rgba(15, 23, 42, 0.88));
}

.category-card img {
    position: absolute;
    inset: 0;
    opacity: 0.7;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.category-card:hover img {
    opacity: 0.9;
    transform: scale(1.05);
}

.category-card span,
.category-card p {
    position: relative;
    z-index: 2;
}

.category-card span {
    font-size: 24px;
    font-weight: 900;
}

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

.rank-panel {
    padding: 24px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

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

.rank-item {
    display: grid;
    grid-template-columns: 96px 54px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 14px;
    border-radius: 18px;
}

.rank-list.small .rank-item {
    grid-template-columns: 42px minmax(0, 1fr);
}

.rank-list.small .rank-cover,
.rank-list.small .rank-action {
    display: none;
}

.rank-list.small .rank-number {
    width: 42px;
    height: 42px;
    font-size: 15px;
}

.rank-cover {
    height: 68px;
    overflow: hidden;
    border-radius: 14px;
    background: #0f172a;
}

.rank-number {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: #fff;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    font-size: 20px;
    font-weight: 900;
}

.rank-action {
    padding: 9px 14px;
    border-radius: 999px;
    color: #0891b2;
    background: #ecfeff;
    font-weight: 900;
}

.page-hero,
.detail-hero {
    padding: 78px 0;
    color: #fff;
    background: radial-gradient(circle at top left, rgba(6, 182, 212, 0.55), transparent 34%), linear-gradient(135deg, #020617, #0f172a 58%, #164e63);
}

.page-hero h1,
.detail-hero h1 {
    margin: 0 0 16px;
    font-size: clamp(36px, 6vw, 64px);
    line-height: 1.08;
    letter-spacing: -0.06em;
}

.page-hero p,
.detail-hero .lead {
    max-width: 780px;
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 19px;
}

.detail-hero-inner {
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    gap: 36px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    aspect-ratio: 3 / 4;
    border-radius: 28px;
    background: radial-gradient(circle at 20% 15%, #67e8f9, #0f172a 65%);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.34);
}

.breadcrumb {
    margin: 0 0 16px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 14px;
}

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

.detail-intro .btn {
    margin-top: 28px;
}

.player-section {
    padding: 56px 0 26px;
}

.player-frame {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000;
    box-shadow: 0 28px 75px rgba(2, 6, 23, 0.30);
}

.movie-video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    background: #000;
    cursor: pointer;
}

.player-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.74));
}

.player-cover.is-hidden {
    display: none;
}

.play-badge {
    position: relative;
    z-index: 2;
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 18px 45px rgba(6, 182, 212, 0.36);
    font-size: 32px;
}

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

.player-message.is-visible {
    display: block;
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding: 28px 0;
}

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

.content-card h2 {
    margin: 0 0 14px;
    font-size: 26px;
}

.content-card p {
    margin: 0;
    color: #334155;
}

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

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
}

.is-filtered-out {
    display: none !important;
}

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

    .split-section,
    .detail-hero-inner,
    .detail-content {
        grid-template-columns: 1fr;
    }

    .rank-panel {
        width: 100%;
    }
}

@media (max-width: 760px) {
    .site-header {
        position: sticky;
    }

    .header-inner {
        min-height: 64px;
    }

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

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

    .site-nav.is-open {
        display: flex;
    }

    .hero {
        height: 560px;
    }

    .hero-control {
        display: none;
    }

    .hero-desc {
        font-size: 16px;
    }

    .quick-search,
    .section-head {
        flex-direction: column;
        align-items: stretch;
    }

    .sticky-search {
        position: static;
    }

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

    .rank-item,
    .rank-list.small .rank-item {
        grid-template-columns: 42px minmax(0, 1fr);
    }

    .rank-cover,
    .rank-action {
        display: none;
    }

    .page-hero,
    .detail-hero {
        padding: 54px 0;
    }

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

    .panel-section {
        padding: 18px;
    }
}
