:root {
    --bg: #f5f7fb;
    --panel: #ffffff;
    --panel-soft: rgba(255, 255, 255, 0.86);
    --text: #162033;
    --muted: #667085;
    --line: #e6ebf2;
    --blue: #2563eb;
    --teal: #14b8a6;
    --cyan: #06b6d4;
    --orange: #f97316;
    --shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), transparent 32rem), var(--bg);
}

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);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(18px);
}

.header-inner {
    max-width: 1240px;
    margin: 0 auto;
    min-height: 68px;
    padding: 0 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    font-size: 21px;
}

.brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--teal));
    box-shadow: 0 12px 28px rgba(20, 184, 166, 0.35);
}

.brand-text {
    background: linear-gradient(90deg, var(--blue), var(--teal));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.nav-link,
.dropdown-toggle {
    border: 0;
    background: transparent;
    color: #26364d;
    font: inherit;
    font-weight: 700;
    padding: 10px 13px;
    border-radius: 999px;
    cursor: pointer;
}

.nav-link:hover,
.nav-link.is-active,
.dropdown-toggle:hover {
    color: var(--blue);
    background: rgba(37, 99, 235, 0.08);
}

.nav-dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 45px;
    right: 0;
    width: 210px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown.is-open .dropdown-menu {
    display: grid;
    gap: 4px;
}

.dropdown-menu a {
    padding: 10px 12px;
    border-radius: 12px;
    color: #334155;
}

.dropdown-menu a:hover {
    background: #eef6ff;
    color: var(--blue);
}

.menu-toggle {
    display: none;
    border: 0;
    border-radius: 12px;
    padding: 8px 12px;
    font-size: 22px;
    background: #eef4ff;
    color: var(--blue);
}

.hero-carousel {
    position: relative;
    min-height: 640px;
    overflow: hidden;
    color: #ffffff;
    background: #0f172a;
}

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

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

.hero-bg,
.detail-bg {
    position: absolute;
    inset: 0;
    background-position: center;
    background-size: cover;
    transform: scale(1.04);
    filter: saturate(1.05);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.56), rgba(15, 23, 42, 0.16)),
        radial-gradient(circle at 20% 30%, rgba(37, 99, 235, 0.5), transparent 28rem),
        radial-gradient(circle at 80% 10%, rgba(20, 184, 166, 0.45), transparent 26rem);
}

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

.eyebrow {
    margin: 0 0 12px;
    color: var(--teal);
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-main h1 {
    margin: 0;
    font-size: clamp(38px, 6vw, 76px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-summary,
.page-hero p,
.detail-one-line {
    max-width: 720px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 19px;
    line-height: 1.8;
}

.hero-badges,
.tag-row,
.card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.hero-badges span,
.tag-row span,
.card-meta span,
.card-meta a {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.16);
    color: inherit;
    backdrop-filter: blur(10px);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 999px;
    font-weight: 900;
    border: 1px solid transparent;
    cursor: pointer;
}

.btn-primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--teal));
    box-shadow: 0 16px 35px rgba(37, 99, 235, 0.25);
}

.btn-ghost {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.32);
    background: rgba(255, 255, 255, 0.12);
}

.btn-light {
    color: #0f172a;
    background: rgba(255, 255, 255, 0.9);
}

.hero-poster {
    display: block;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 34px;
    overflow: hidden;
    box-shadow: 0 35px 80px rgba(0, 0, 0, 0.42);
    transform: rotate(2deg);
}

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

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 28px;
    z-index: 4;
    width: min(1196px, calc(100% - 44px));
    transform: translateX(-50%);
    display: grid;
    grid-template-columns: 48px 1fr 48px;
    align-items: center;
    gap: 12px;
}

.hero-arrow {
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    font-size: 32px;
    cursor: pointer;
    backdrop-filter: blur(8px);
}

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

.hero-dot {
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 16px;
    padding: 11px 12px;
    color: rgba(255, 255, 255, 0.72);
    background: rgba(255, 255, 255, 0.12);
    text-align: left;
    cursor: pointer;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    backdrop-filter: blur(10px);
}

.hero-dot span {
    margin-right: 7px;
    color: var(--teal);
    font-weight: 900;
}

.hero-dot.is-active {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.82), rgba(20, 184, 166, 0.72));
}

.site-search-panel,
.content-section,
.player-section {
    max-width: 1240px;
    margin: 0 auto;
    padding: 42px 22px;
}

.quick-search,
.filter-bar {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.quick-search label {
    display: block;
    margin-bottom: 12px;
    color: #334155;
    font-weight: 900;
}

.quick-search div,
.filter-bar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

input,
select {
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0 16px;
    background: #ffffff;
    color: var(--text);
    font: inherit;
    outline: none;
}

input:focus,
select:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.quick-search input,
.filter-bar input {
    flex: 1 1 320px;
}

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

.section-head h2,
.rank-box h2,
.text-panel h2 {
    margin: 0;
    font-size: clamp(26px, 4vw, 42px);
    letter-spacing: -0.03em;
}

.section-more,
.text-link {
    color: var(--blue);
    font-weight: 900;
}

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

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

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

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

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

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

.poster-link {
    position: relative;
    display: block;
    height: 230px;
    overflow: hidden;
    background: linear-gradient(135deg, #dbeafe, #ccfbf1);
}

.all-grid .poster-link {
    height: 210px;
}

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

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

.poster-shade,
.tile-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.72), transparent 58%);
}

.poster-year,
.poster-play {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 900;
}

.poster-year {
    top: 12px;
    left: 12px;
    color: #ffffff;
    background: var(--blue);
}

.poster-play {
    right: 12px;
    bottom: 12px;
    color: #0f172a;
    background: #ffffff;
}

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

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

.movie-card p {
    min-height: 48px;
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
}

.movie-card .card-meta {
    margin-bottom: 10px;
}

.movie-card .card-meta span,
.movie-card .card-meta a,
.movie-card .tag-row span {
    background: #f1f5f9;
    color: #475569;
}

.movie-card .card-meta a {
    color: var(--blue);
}

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

.rank-box {
    position: sticky;
    top: 92px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px;
    background: linear-gradient(180deg, #ffffff, #eef8ff);
    box-shadow: var(--shadow);
}

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

.rank-row {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 6px 12px;
    align-items: center;
    padding: 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.72);
}

.rank-row:hover {
    background: #ffffff;
}

.rank-num,
.hot-rank {
    color: var(--orange);
    font-weight: 950;
}

.rank-meta {
    grid-column: 2;
    color: var(--muted);
    font-size: 13px;
}

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

.category-tile {
    position: relative;
    min-height: 210px;
    overflow: hidden;
    border-radius: 24px;
    background: #0f172a;
    color: #ffffff;
    box-shadow: var(--shadow);
}

.category-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.78;
    transition: transform 0.45s ease;
}

.category-tile:hover img {
    transform: scale(1.08);
}

.category-tile strong,
.category-tile small,
.category-tile em {
    position: absolute;
    z-index: 2;
    left: 18px;
    right: 18px;
}

.category-tile strong {
    bottom: 70px;
    font-size: 24px;
}

.category-tile small {
    bottom: 48px;
    color: var(--teal);
    font-weight: 900;
}

.category-tile em {
    bottom: 18px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 13px;
    font-style: normal;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: linear-gradient(135deg, #0f172a, #155e75 58%, #1d4ed8);
}

.compact-hero,
.category-hero {
    max-width: 1240px;
    margin: 32px auto 0;
    border-radius: 34px;
    padding: 64px 42px;
    box-shadow: var(--shadow);
}

.compact-hero p,
.category-hero p {
    color: rgba(255, 255, 255, 0.82);
}

.category-overview-card {
    grid-column: span 1;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--panel);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.category-overview-card .category-cover {
    position: relative;
    display: block;
    height: 190px;
    overflow: hidden;
}

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

.category-cover span {
    position: absolute;
    left: 14px;
    bottom: 14px;
    padding: 6px 10px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.72);
}

.category-overview-card div:not(.tag-row) {
    padding: 18px;
}

.category-overview-card h2 {
    margin: 0 0 8px;
}

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

.filter-bar {
    max-width: 1240px;
    margin: 28px auto 0;
    align-items: center;
}

.filter-count {
    margin-left: auto;
    color: var(--muted);
    font-weight: 900;
}

.hot-list {
    display: grid;
    gap: 16px;
}

.hot-list-item {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 18px;
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 14px;
    background: var(--panel);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.hot-poster {
    overflow: hidden;
    border-radius: 18px;
    height: 170px;
}

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

.hot-info h2 {
    margin: 5px 0 8px;
}

.hot-info p {
    color: var(--muted);
    line-height: 1.8;
}

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

.detail-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.62)),
        radial-gradient(circle at 75% 20%, rgba(20, 184, 166, 0.35), transparent 28rem);
}

.detail-inner {
    position: relative;
    z-index: 2;
    max-width: 1240px;
    margin: 0 auto;
    padding: 34px 22px 70px;
}

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

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

.detail-layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border-radius: 30px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
}

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

.detail-tags span {
    color: #ffffff;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #020617;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

.movie-video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000000;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 10px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.76), rgba(37, 99, 235, 0.35));
    cursor: pointer;
}

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

.play-icon {
    width: 84px;
    height: 84px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--teal));
    font-size: 30px;
    box-shadow: 0 18px 45px rgba(20, 184, 166, 0.34);
}

.player-note {
    color: var(--muted);
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.text-panel {
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 24px;
    background: var(--panel);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
}

.text-panel p {
    color: #475569;
    line-height: 2;
}

.meta-panel {
    grid-column: 1 / -1;
}

.meta-panel dl {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 12px 18px;
}

.meta-panel dt {
    color: var(--muted);
    font-weight: 900;
}

.meta-panel dd {
    margin: 0;
}

.site-footer {
    margin-top: 40px;
    padding: 44px 22px 26px;
    color: #dbeafe;
    background: #0f172a;
}

.footer-grid {
    max-width: 1240px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.4fr 0.7fr 1.2fr;
    gap: 30px;
}

.footer-logo {
    margin-bottom: 12px;
    font-size: 24px;
    font-weight: 950;
    color: #ffffff;
}

.site-footer p,
.site-footer a {
    color: #bfd0e8;
    line-height: 1.8;
}

.site-footer a {
    display: block;
}

.footer-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.footer-tags a {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.footer-bottom {
    max-width: 1240px;
    margin: 28px auto 0;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: #94a3b8;
}

[data-hidden="true"] {
    display: none !important;
}

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

    .hero-content,
    .two-column-layout {
        grid-template-columns: 1fr;
    }

    .rank-box {
        position: static;
    }
}

@media (max-width: 760px) {
    .header-inner {
        min-height: 62px;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .main-nav {
        display: none;
        position: absolute;
        left: 14px;
        right: 14px;
        top: 70px;
        padding: 12px;
        border: 1px solid var(--line);
        border-radius: 20px;
        background: var(--panel);
        box-shadow: var(--shadow);
        flex-direction: column;
        align-items: stretch;
    }

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

    .dropdown-menu {
        position: static;
        width: 100%;
        box-shadow: none;
    }

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

    .hero-content {
        padding-top: 46px;
        grid-template-columns: 1fr;
        gap: 26px;
    }

    .hero-poster img {
        height: 280px;
    }

    .hero-dots {
        display: none;
    }

    .hero-controls {
        grid-template-columns: 48px 1fr 48px;
    }

    .movie-grid,
    .feature-grid,
    .latest-grid,
    .all-grid,
    .category-grid,
    .overview-grid,
    .detail-content,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

    .detail-poster img {
        height: 360px;
    }

    .compact-hero,
    .category-hero {
        margin: 18px 14px 0;
        padding: 42px 22px;
        border-radius: 26px;
    }

    .filter-count {
        width: 100%;
        margin-left: 0;
    }

    .hot-list-item {
        grid-template-columns: 96px 1fr;
    }
}
