:root {
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-soft: #f1f5f9;
    --text: #111827;
    --muted: #64748b;
    --line: #e5e7eb;
    --blue: #2563eb;
    --blue-dark: #1d4ed8;
    --cyan: #06b6d4;
    --red: #dc2626;
    --orange: #f97316;
    --shadow: 0 16px 38px rgba(15, 23, 42, 0.10);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background: var(--bg);
    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 {
    display: block;
    max-width: 100%;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

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

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

.brand-mark {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #ffffff;
    font-weight: 800;
    background: linear-gradient(135deg, var(--red), var(--orange));
    box-shadow: 0 10px 24px rgba(220, 38, 38, 0.28);
}

.brand-copy {
    display: grid;
    line-height: 1.2;
}

.brand-copy strong {
    font-size: 20px;
}

.brand-copy small {
    color: var(--muted);
    font-size: 12px;
}

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

.desktop-nav a {
    padding: 9px 14px;
    border-radius: 10px;
    color: #475569;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active {
    color: var(--blue);
    background: #eff6ff;
}

.top-search input,
.mobile-panel input,
.filter-search input {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    padding: 10px 16px;
    outline: none;
    background: #ffffff;
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.top-search input:focus,
.mobile-panel input:focus,
.filter-search input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.top-search {
    width: 240px;
}

.nav-toggle {
    display: none;
    border: 0;
    border-radius: 12px;
    padding: 9px 12px;
    color: #334155;
    background: #f1f5f9;
    font-size: 20px;
    cursor: pointer;
}

.mobile-panel {
    display: none;
    border-top: 1px solid var(--line);
    padding: 14px 24px 20px;
}

.mobile-panel.is-open {
    display: block;
}

.mobile-panel nav {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

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

.hero {
    position: relative;
    height: 560px;
    overflow: hidden;
    background: linear-gradient(120deg, #0f172a, #334155);
}

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-slide.is-active img {
    animation: heroZoom 9s ease both;
}

@keyframes heroZoom {
    from {
        transform: scale(1.02);
    }
    to {
        transform: scale(1.08);
    }
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.48), rgba(15, 23, 42, 0.16));
}

.hero-content {
    position: absolute;
    left: 50%;
    right: auto;
    bottom: 72px;
    width: min(1280px, calc(100% - 48px));
    transform: translateX(-50%);
    color: #ffffff;
}

.hero-site-title {
    margin: 0 0 8px;
    font-size: clamp(20px, 4vw, 30px);
    letter-spacing: 0.04em;
}

.eyebrow,
.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 7px 14px;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(90deg, var(--red), #db2777);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.hero-title {
    max-width: 820px;
    margin: 16px 0 12px;
    font-size: clamp(36px, 6vw, 64px);
    line-height: 1.05;
    font-weight: 900;
}

.hero-lead {
    max-width: 760px;
    margin: 0 0 22px;
    color: #e5e7eb;
    font-size: clamp(16px, 2vw, 20px);
}

.meta-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin: 18px 0;
}

.meta-row span,
.detail-meta span {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: inherit;
    font-size: 13px;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 11px 20px;
    border-radius: 12px;
    border: 1px solid transparent;
    font-weight: 800;
    transition: all 0.2s ease;
}

.btn-primary {
    color: #ffffff;
    background: var(--blue);
    box-shadow: 0 12px 26px rgba(37, 99, 235, 0.28);
}

.btn-primary:hover {
    background: var(--blue-dark);
    transform: translateY(-1px);
}

.btn-light {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(12px);
}

.btn-light:hover {
    background: rgba(255, 255, 255, 0.22);
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.5);
    font-size: 30px;
    cursor: pointer;
    transform: translateY(-50%);
    transition: all 0.2s ease;
}

.hero-control:hover {
    background: rgba(0, 0, 0, 0.75);
}

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

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

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

.hero-dots button {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.2s ease;
}

.hero-dots button.is-active {
    width: 34px;
    background: #ffffff;
}

.page-main {
    max-width: 1280px;
    margin: 0 auto;
    padding: 44px 24px 70px;
}

.page-main.wide {
    max-width: 1400px;
}

.content-section {
    margin-top: 46px;
}

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

.section-head span {
    color: var(--blue);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.section-head h2,
.page-title h1 {
    margin: 6px 0 0;
    color: #0f172a;
    font-size: clamp(26px, 4vw, 38px);
    line-height: 1.18;
}

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

.section-link {
    flex: 0 0 auto;
    color: var(--blue);
    font-weight: 800;
}

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #0f172a;
}

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

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

.poster-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    padding: 5px 9px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(37, 99, 235, 0.88);
    font-size: 12px;
    font-weight: 800;
}

.card-body {
    padding: 16px;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 26px;
}

.tag {
    display: inline-flex;
    padding: 4px 8px;
    border-radius: 999px;
    color: #1d4ed8;
    background: #eff6ff;
    font-size: 12px;
    line-height: 1.2;
}

.card-title {
    margin: 10px 0 7px;
    font-size: 18px;
    line-height: 1.3;
}

.card-title a:hover {
    color: var(--blue);
}

.card-desc {
    display: -webkit-box;
    min-height: 44px;
    margin: 0 0 12px;
    overflow: hidden;
    color: #64748b;
    font-size: 14px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #64748b;
    font-size: 12px;
}

.card-meta span {
    padding: 4px 8px;
    border-radius: 8px;
    background: #f1f5f9;
}

.movie-card-list {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
}

.movie-card-list .poster-wrap {
    aspect-ratio: 4 / 3;
}

.feature-panel {
    margin: 46px -12px 0;
    padding: 34px;
    border-radius: 28px;
    background: linear-gradient(135deg, #eff6ff, #ecfeff);
}

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

.rank-item {
    display: grid;
    grid-template-columns: 48px 76px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #ffffff;
    transition: all 0.2s ease;
}

.rank-item:hover {
    border-color: #bfdbfe;
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
}

.rank-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    font-weight: 900;
}

.rank-item img {
    width: 76px;
    height: 92px;
    border-radius: 12px;
    object-fit: cover;
}

.rank-copy {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.rank-copy strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-copy em {
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 220px;
    padding: 24px;
    border-radius: 24px;
    color: #ffffff;
    background: linear-gradient(135deg, #0f172a, #1d4ed8);
    box-shadow: var(--shadow);
}

.category-card:nth-child(3n+2) {
    background: linear-gradient(135deg, #7f1d1d, #ea580c);
}

.category-card:nth-child(3n+3) {
    background: linear-gradient(135deg, #064e3b, #0891b2);
}

.category-card h2,
.category-card h3 {
    margin: 0 0 10px;
    font-size: 26px;
}

.category-card p {
    max-width: 86%;
    margin: 0 0 20px;
    color: rgba(255, 255, 255, 0.82);
}

.category-card span {
    display: inline-flex;
    padding: 9px 14px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    font-weight: 800;
}

.category-thumbs {
    position: absolute;
    right: 16px;
    bottom: 16px;
    display: flex;
}

.category-thumbs img {
    width: 54px;
    height: 72px;
    margin-left: -12px;
    border: 2px solid rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    object-fit: cover;
    transform: rotate(-4deg);
}

.category-thumbs img:nth-child(2) {
    transform: rotate(5deg);
}

.category-thumbs img:nth-child(3) {
    transform: rotate(0deg);
}

.page-title {
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: linear-gradient(135deg, #ffffff, #eff6ff);
}

.breadcrumbs {
    margin-bottom: 18px;
    color: #64748b;
    font-size: 14px;
}

.breadcrumbs a {
    color: var(--blue);
    font-weight: 700;
}

.filter-scope {
    position: relative;
}

.filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #ffffff;
}

.filter-search {
    flex: 1 1 320px;
    display: grid;
    gap: 6px;
    color: #475569;
    font-size: 13px;
    font-weight: 800;
}

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

.filter-chip {
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    padding: 9px 14px;
    color: #475569;
    background: #ffffff;
    cursor: pointer;
    font-weight: 700;
}

.filter-chip:hover,
.filter-chip.is-active {
    color: #ffffff;
    border-color: var(--blue);
    background: var(--blue);
}

.empty-state {
    display: none;
    padding: 40px;
    text-align: center;
    color: #64748b;
    border: 1px dashed #cbd5e1;
    border-radius: 22px;
    background: #ffffff;
}

.empty-state.is-visible {
    display: block;
}

.detail-hero {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 34px;
    padding: 32px;
    border-radius: 30px;
    color: #ffffff;
    background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.7), transparent 34%), linear-gradient(135deg, #0f172a, #1e293b);
    box-shadow: var(--shadow);
}

.detail-hero img {
    width: 100%;
    aspect-ratio: 3 / 4;
    border-radius: 22px;
    object-fit: cover;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
}

.detail-copy h1 {
    margin: 10px 0 12px;
    font-size: clamp(32px, 5vw, 56px);
    line-height: 1.08;
}

.detail-copy p {
    color: #e2e8f0;
    font-size: 18px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 28px;
    margin-top: 34px;
}

.panel,
.side-panel {
    border: 1px solid var(--line);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.panel {
    padding: 26px;
    margin-bottom: 24px;
}

.panel h2,
.side-panel h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

.panel p {
    color: #334155;
}

.video-stage {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 22px;
    background: #000000;
}

.video-stage video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    cursor: pointer;
}

.play-cover {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: #ffffff;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.22));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.video-stage.is-playing .play-cover {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.play-symbol {
    width: 84px;
    height: 84px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    background: var(--blue);
    font-size: 34px;
    box-shadow: 0 18px 38px rgba(37, 99, 235, 0.35);
}

.play-message {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 24px;
    text-align: center;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 800;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.side-panel {
    padding: 20px;
}

.side-panel + .side-panel {
    margin-top: 20px;
}

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

.mini-card {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: 14px;
    transition: background 0.2s ease;
}

.mini-card:hover {
    background: #f1f5f9;
}

.mini-card img {
    width: 58px;
    height: 76px;
    border-radius: 10px;
    object-fit: cover;
}

.mini-card span {
    font-weight: 800;
}

.site-footer {
    color: #cbd5e1;
    background: #0f172a;
}

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

.footer-brand {
    align-items: flex-start;
}

.footer-brand strong,
.site-footer h3 {
    color: #ffffff;
}

.footer-brand p,
.site-footer p,
.site-footer li {
    color: #94a3b8;
    font-size: 14px;
}

.site-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 8px;
}

.site-footer a:hover {
    color: #60a5fa;
}

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

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

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

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

@media (max-width: 860px) {
    .desktop-nav,
    .top-search {
        display: none;
    }

    .nav-toggle {
        display: block;
        margin-left: auto;
    }

    .header-inner {
        padding: 0 18px;
    }

    .hero {
        height: 620px;
    }

    .hero-content {
        bottom: 78px;
        width: calc(100% - 36px);
    }

    .hero-control {
        top: auto;
        bottom: 20px;
        transform: none;
    }

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

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

    .hero-dots {
        bottom: 36px;
    }

    .section-head,
    .filter-bar {
        align-items: stretch;
        flex-direction: column;
    }

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

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

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

    .detail-hero img {
        max-width: 320px;
    }

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

@media (max-width: 560px) {
    .brand-copy small {
        display: none;
    }

    .page-main {
        padding: 30px 16px 54px;
    }

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

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

    .movie-card-list {
        grid-template-columns: 124px minmax(0, 1fr);
    }

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

    .rank-item img {
        width: 62px;
        height: 78px;
    }

    .detail-hero,
    .panel,
    .page-title,
    .feature-panel {
        padding: 20px;
        border-radius: 22px;
    }

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