:root {
    --color-primary: 37 99 235;
    --color-primary-dark: 29 78 216;
    --color-secondary: 16 185 129;
    --color-accent: 245 158 11;
    --color-text-primary: 15 23 42;
    --color-text-secondary: 71 85 105;
    --color-text-muted: 148 163 184;
    --color-bg-primary: 255 255 255;
    --color-bg-secondary: 248 250 252;
    --color-bg-tertiary: 241 245 249;
    --color-border: 226 232 240;
    --shadow-soft: 0 16px 40px rgb(15 23 42 / 0.10);
    --shadow-card: 0 12px 30px rgb(15 23 42 / 0.08);
    --radius-md: 14px;
    --radius-lg: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: rgb(var(--color-bg-secondary));
    color: rgb(var(--color-text-primary));
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

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

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgb(255 255 255 / 0.94);
    border-bottom: 1px solid rgb(var(--color-border));
    box-shadow: 0 1px 6px rgb(15 23 42 / 0.05);
    backdrop-filter: blur(14px);
}

.nav-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    min-height: 68px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
}

.brand-icon {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 12px;
    background: rgb(var(--color-primary));
    color: white;
    box-shadow: 0 10px 22px rgb(37 99 235 / 0.28);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

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

.brand-text em {
    margin-top: 4px;
    color: rgb(var(--color-text-muted));
    font-size: 11px;
    font-style: normal;
    letter-spacing: 0.12em;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 26px;
}

.nav-link {
    border: 0;
    background: transparent;
    color: rgb(var(--color-text-secondary));
    font-weight: 650;
    transition: color 0.2s ease;
}

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

.nav-dropdown {
    position: relative;
}

.nav-drop-panel {
    position: absolute;
    top: calc(100% + 14px);
    left: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(90px, 1fr));
    gap: 8px;
    width: 280px;
    padding: 14px;
    border: 1px solid rgb(var(--color-border));
    border-radius: 16px;
    background: white;
    box-shadow: var(--shadow-soft);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.2s ease;
}

.nav-dropdown:hover .nav-drop-panel,
.nav-dropdown:focus-within .nav-drop-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-drop-panel a {
    padding: 9px 11px;
    border-radius: 10px;
    color: rgb(var(--color-text-secondary));
    font-size: 14px;
}

.nav-drop-panel a:hover {
    background: rgb(239 246 255);
    color: rgb(var(--color-primary));
}

.nav-search,
.mobile-search,
.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-search input,
.mobile-search input,
.search-box input,
.local-filter input {
    width: 220px;
    border: 1px solid rgb(var(--color-border));
    border-radius: 12px;
    background: rgb(var(--color-bg-tertiary));
    padding: 10px 12px;
    color: rgb(var(--color-text-primary));
    outline: none;
    transition: all 0.2s ease;
}

.nav-search input:focus,
.mobile-search input:focus,
.search-box input:focus,
.local-filter input:focus {
    border-color: rgb(var(--color-primary));
    background: white;
    box-shadow: 0 0 0 4px rgb(37 99 235 / 0.12);
}

.nav-search button,
.mobile-search button,
.search-box button,
.btn-primary {
    border: 0;
    border-radius: 12px;
    background: rgb(var(--color-primary));
    padding: 10px 16px;
    color: white;
    font-weight: 700;
    box-shadow: 0 10px 22px rgb(37 99 235 / 0.22);
    transition: transform 0.2s ease, background 0.2s ease;
}

.nav-search button:hover,
.mobile-search button:hover,
.search-box button:hover,
.btn-primary:hover {
    background: rgb(var(--color-primary-dark));
    transform: translateY(-1px);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgb(255 255 255 / 0.35);
    border-radius: 12px;
    background: rgb(255 255 255 / 0.12);
    padding: 10px 16px;
    color: white;
    font-weight: 700;
    backdrop-filter: blur(10px);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    border: 0;
    background: transparent;
    padding: 8px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    border-radius: 999px;
    background: rgb(var(--color-text-primary));
}

.mobile-menu {
    display: none;
    border-top: 1px solid rgb(var(--color-border));
    background: white;
    padding: 14px 20px 18px;
}

.mobile-menu.open {
    display: block;
}

.mobile-link {
    display: block;
    padding: 12px 4px;
    color: rgb(var(--color-text-secondary));
    font-weight: 700;
}

.mobile-link.active {
    color: rgb(var(--color-primary));
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.7s ease, transform 1.2s ease;
    pointer-events: none;
}

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

.hero-bg {
    position: absolute;
    inset: 0;
}

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

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 72% 45%, rgb(37 99 235 / 0.28), transparent 38%),
        linear-gradient(90deg, rgb(15 23 42 / 0.96) 0%, rgb(15 23 42 / 0.78) 44%, rgb(15 23 42 / 0.22) 100%),
        linear-gradient(0deg, rgb(15 23 42 / 0.88), transparent 48%);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.58fr);
    gap: 46px;
    align-items: center;
    padding: 74px 0 96px;
    color: white;
}

.hero-kicker {
    display: inline-flex;
    width: max-content;
    align-items: center;
    gap: 8px;
    border: 1px solid rgb(255 255 255 / 0.22);
    border-radius: 999px;
    background: rgb(255 255 255 / 0.12);
    padding: 8px 13px;
    color: rgb(219 234 254);
    font-size: 14px;
    font-weight: 700;
    backdrop-filter: blur(10px);
}

.hero-content h1 {
    margin: 20px 0 18px;
    max-width: 820px;
    font-size: clamp(40px, 7vw, 78px);
    line-height: 1.04;
    letter-spacing: -0.055em;
}

.hero-content p {
    max-width: 740px;
    margin: 0;
    color: rgb(226 232 240);
    font-size: 18px;
}

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

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 26px;
}

.hero-tags a,
.tag-row span,
.detail-tags span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: rgb(255 255 255 / 0.13);
    padding: 6px 10px;
    color: rgb(226 232 240);
    font-size: 13px;
    font-weight: 700;
}

.hero-panel {
    border: 1px solid rgb(255 255 255 / 0.16);
    border-radius: 24px;
    background: rgb(255 255 255 / 0.13);
    padding: 18px;
    box-shadow: 0 24px 60px rgb(0 0 0 / 0.28);
    backdrop-filter: blur(18px);
}

.hero-panel img {
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: 18px;
    object-fit: cover;
}

.hero-panel h2 {
    margin: 16px 0 8px;
    font-size: 22px;
}

.hero-panel p {
    color: rgb(226 232 240);
    font-size: 14px;
}

.hero-controls {
    position: absolute;
    right: max(20px, calc((100vw - 1280px) / 2));
    bottom: 34px;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hero-controls button,
.hero-dot {
    border: 1px solid rgb(255 255 255 / 0.26);
    border-radius: 999px;
    background: rgb(255 255 255 / 0.12);
    color: white;
    backdrop-filter: blur(8px);
}

.hero-controls button {
    width: 42px;
    height: 42px;
    font-size: 24px;
}

.hero-dots {
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 11px;
    height: 11px;
    padding: 0;
    font-size: 0;
}

.hero-dot.is-active {
    width: 28px;
    background: white;
}

.section {
    padding: 68px 0;
}

.section-white {
    background: white;
}

.section-blue {
    background: linear-gradient(135deg, rgb(239 246 255), rgb(248 250 252));
}

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

.section-heading h1,
.section-heading h2,
.page-title h1 {
    margin: 0;
    color: rgb(var(--color-text-primary));
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.18;
    letter-spacing: -0.035em;
}

.section-heading p,
.page-title p {
    max-width: 760px;
    margin: 8px 0 0;
    color: rgb(var(--color-text-secondary));
}

.section-more {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: rgb(var(--color-primary));
    font-weight: 800;
}

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

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

.movie-card,
.category-card,
.horizontal-card,
.content-card {
    overflow: hidden;
    border: 1px solid rgb(var(--color-border));
    border-radius: var(--radius-md);
    background: white;
    box-shadow: 0 1px 3px rgb(15 23 42 / 0.04);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover,
.category-card:hover,
.horizontal-card:hover,
.content-card:hover {
    border-color: rgb(203 213 225);
    box-shadow: var(--shadow-card);
    transform: translateY(-4px);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: rgb(var(--color-bg-tertiary));
}

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

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

.type-badge,
.score-badge,
.rank-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    color: white;
    font-size: 12px;
    font-weight: 800;
}

.type-badge {
    left: 10px;
    top: 10px;
    background: rgb(15 23 42 / 0.78);
    padding: 5px 9px;
}

.score-badge {
    right: 10px;
    bottom: 10px;
    background: rgb(245 158 11 / 0.95);
    padding: 5px 8px;
}

.rank-badge {
    left: 10px;
    bottom: 10px;
    background: rgb(var(--color-primary));
    padding: 5px 9px;
}

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

.movie-title,
.horizontal-title {
    display: -webkit-box;
    overflow: hidden;
    color: rgb(var(--color-text-primary));
    font-size: 17px;
    font-weight: 800;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.movie-title:hover,
.horizontal-title:hover {
    color: rgb(var(--color-primary));
}

.movie-card-body p,
.horizontal-card p,
.content-card p {
    display: -webkit-box;
    overflow: hidden;
    min-height: 44px;
    margin: 8px 0 12px;
    color: rgb(var(--color-text-secondary));
    font-size: 14px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    color: rgb(var(--color-text-muted));
    font-size: 13px;
    font-weight: 650;
}

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

.tag-row span,
.detail-tags span {
    background: rgb(239 246 255);
    color: rgb(var(--color-primary));
}

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

.category-card {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 16px;
    padding: 16px;
}

.category-stack {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    min-height: 112px;
}

.category-stack img {
    width: 100%;
    height: 112px;
    border-radius: 12px;
    object-fit: cover;
}

.category-card h3 {
    margin: 2px 0 8px;
    font-size: 20px;
}

.category-card p {
    margin: 0;
    color: rgb(var(--color-text-secondary));
    font-size: 14px;
}

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

.horizontal-card {
    display: grid;
    grid-template-columns: 170px 1fr;
    gap: 16px;
    padding: 14px;
}

.horizontal-cover {
    overflow: hidden;
    border-radius: 12px;
}

.horizontal-cover img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.rank-mark {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 6px;
}

.rank-mark strong {
    display: grid;
    min-width: 36px;
    height: 30px;
    place-items: center;
    border-radius: 9px;
    background: rgb(var(--color-primary));
    color: white;
    font-size: 14px;
}

.rank-mark span {
    color: rgb(var(--color-accent));
    font-weight: 850;
}

.page-banner {
    background: linear-gradient(135deg, rgb(37 99 235), rgb(15 23 42));
    color: white;
    padding: 74px 0;
}

.page-banner .page-title h1,
.page-banner .page-title p {
    color: white;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: rgb(219 234 254);
    font-size: 14px;
    font-weight: 700;
}

.breadcrumb a:hover {
    color: white;
}

.filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
}

.local-filter input {
    width: min(420px, 100%);
    background: white;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    color: white;
    background: #0f172a;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
}

.detail-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.38;
}

.detail-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgb(15 23 42 / 0.95), rgb(15 23 42 / 0.66), rgb(15 23 42 / 0.88));
}

.detail-layout {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 36px;
    align-items: end;
    padding: 54px 0 66px;
}

.detail-poster {
    overflow: hidden;
    border: 1px solid rgb(255 255 255 / 0.18);
    border-radius: 22px;
    box-shadow: 0 24px 60px rgb(0 0 0 / 0.35);
}

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

.detail-info h1 {
    margin: 0 0 16px;
    font-size: clamp(32px, 5vw, 58px);
    line-height: 1.08;
    letter-spacing: -0.045em;
}

.detail-one-line {
    max-width: 900px;
    margin: 0 0 20px;
    color: rgb(226 232 240);
    font-size: 18px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
}

.detail-meta span {
    border-radius: 999px;
    background: rgb(255 255 255 / 0.13);
    padding: 8px 12px;
    color: rgb(226 232 240);
    font-weight: 750;
}

.player-shell {
    border-radius: 24px;
    background: #020617;
    padding: 16px;
    box-shadow: var(--shadow-soft);
}

.video-frame {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    background: #000;
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    background: radial-gradient(circle at center, rgb(15 23 42 / 0.35), rgb(2 6 23 / 0.72));
    color: white;
    font-size: 18px;
    font-weight: 850;
}

.play-overlay span {
    display: grid;
    width: 74px;
    height: 74px;
    place-items: center;
    border-radius: 999px;
    background: rgb(var(--color-primary));
    box-shadow: 0 18px 40px rgb(37 99 235 / 0.35);
    font-size: 30px;
}

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

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

.content-card {
    padding: 26px;
}

.content-card h2 {
    margin: 0 0 12px;
    font-size: 25px;
}

.content-card p {
    display: block;
    min-height: 0;
    margin: 0 0 18px;
    color: rgb(var(--color-text-secondary));
    font-size: 16px;
    -webkit-line-clamp: initial;
}

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

.side-item {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 12px;
    align-items: center;
}

.side-item img {
    width: 90px;
    height: 62px;
    border-radius: 10px;
    object-fit: cover;
}

.side-item strong {
    display: -webkit-box;
    overflow: hidden;
    font-size: 14px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.side-item span {
    color: rgb(var(--color-text-muted));
    font-size: 12px;
}

.search-hero {
    padding: 70px 0 36px;
    background: linear-gradient(135deg, rgb(239 246 255), white);
}

.search-box {
    margin-top: 24px;
}

.search-box input {
    width: min(620px, 100%);
    background: white;
}

.search-results {
    min-height: 260px;
}

.empty-state {
    border: 1px dashed rgb(var(--color-border));
    border-radius: 20px;
    background: white;
    padding: 42px;
    text-align: center;
    color: rgb(var(--color-text-secondary));
}

.site-footer {
    background: #0f172a;
    color: rgb(203 213 225);
    padding: 42px 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(160px, 0.4fr) minmax(280px, 0.8fr);
    gap: 30px;
}

.footer-brand {
    color: white;
    font-size: 22px;
}

.site-footer p {
    max-width: 540px;
    margin: 10px 0 0;
    color: rgb(148 163 184);
}

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

.footer-links a {
    color: rgb(203 213 225);
}

.footer-links a:hover {
    color: white;
}

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

    .nav-toggle {
        display: flex;
    }

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

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

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

    .hero-panel {
        display: none;
    }
}

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

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

    .grid-cards,
    .grid-cards.large-grid,
    .category-grid,
    .horizontal-list,
    .content-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .category-card,
    .horizontal-card,
    .detail-layout {
        grid-template-columns: 1fr;
    }

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

    .filter-bar,
    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .local-filter,
    .local-filter input,
    .mobile-search input {
        width: 100%;
    }
}

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

    .brand-text em {
        display: none;
    }

    .brand-text strong {
        font-size: 18px;
    }

    .hero-content {
        padding: 58px 0 110px;
    }

    .hero-content p,
    .detail-one-line {
        font-size: 16px;
    }

    .section {
        padding: 48px 0;
    }

    .movie-card-body,
    .content-card {
        padding: 18px;
    }

    .hero-controls {
        left: 14px;
        right: auto;
    }
}
