:root {
    --primary: #0284c7;
    --primary-dark: #0369a1;
    --primary-soft: #e0f2fe;
    --bamboo: #16a34a;
    --mist-50: #f8fafc;
    --mist-100: #f1f5f9;
    --mist-200: #e2e8f0;
    --mist-300: #cbd5e1;
    --mist-500: #64748b;
    --mist-600: #475569;
    --mist-700: #334155;
    --mist-900: #0f172a;
    --white: #ffffff;
    --shadow-card: 0 18px 40px rgba(15, 23, 42, 0.12);
    --shadow-soft: 0 10px 28px rgba(15, 23, 42, 0.08);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: linear-gradient(180deg, var(--mist-50), var(--white));
    color: var(--mist-900);
    line-height: 1.6;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid var(--mist-200);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

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

.header-inner {
    height: 68px;
    display: flex;
    align-items: center;
    gap: 22px;
}

.brand,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    color: var(--mist-900);
}

.brand-mark {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: var(--white);
    background: linear-gradient(135deg, var(--primary), var(--bamboo));
    box-shadow: 0 10px 22px rgba(2, 132, 199, 0.25);
}

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

.nav-link {
    padding: 8px 11px;
    border-radius: 999px;
    color: var(--mist-700);
    font-size: 14px;
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--primary-dark);
    background: var(--primary-soft);
}

.header-search {
    display: flex;
    align-items: center;
    min-width: 280px;
    border: 1px solid var(--mist-300);
    border-radius: 12px;
    overflow: hidden;
    background: var(--white);
}

.header-search input,
.mobile-panel input,
.wide-search input,
.filter-bar input,
.filter-bar select {
    width: 100%;
    border: 0;
    outline: 0;
    padding: 11px 14px;
    font: inherit;
    color: var(--mist-900);
    background: transparent;
}

.header-search button,
.mobile-panel button,
.wide-search button {
    border: 0;
    padding: 11px 16px;
    color: var(--white);
    background: var(--primary);
    font-weight: 700;
    cursor: pointer;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: var(--mist-100);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    background: var(--mist-700);
}

.mobile-panel {
    display: none;
    border-top: 1px solid var(--mist-200);
    background: var(--white);
    padding: 14px 16px 18px;
}

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

.mobile-panel nav {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.mobile-panel form {
    display: flex;
    border: 1px solid var(--mist-300);
    border-radius: 12px;
    overflow: hidden;
}

.hero {
    position: relative;
    min-height: 580px;
    overflow: hidden;
    background: var(--mist-900);
}

.hero-slides,
.hero-slide {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
}

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

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.84), rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.1));
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    min-height: 580px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: var(--white);
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    width: fit-content;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(2, 132, 199, 0.12);
    color: var(--primary-dark);
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 0.04em;
}

.hero-kicker {
    background: var(--primary);
    color: var(--white);
}

.hero h1 {
    max-width: 720px;
    margin: 18px 0 14px;
    font-size: clamp(38px, 6vw, 68px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

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

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

.hero-tags {
    margin: 24px 0;
}

.hero-tags span,
.detail-meta span,
.card-meta span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.hero-tags span {
    padding: 7px 12px;
    background: rgba(255, 255, 255, 0.15);
    color: var(--white);
    backdrop-filter: blur(6px);
}

.hero-actions,
.section-title-row,
.quick-search-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn.primary {
    color: var(--white);
    background: linear-gradient(135deg, var(--primary), var(--bamboo));
    box-shadow: 0 14px 24px rgba(2, 132, 199, 0.28);
}

.btn.ghost {
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.12);
}

.btn.full {
    width: 100%;
}

.hero-nav {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    color: var(--white);
    background: rgba(0, 0, 0, 0.35);
    font-size: 36px;
    line-height: 1;
    cursor: pointer;
}

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

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

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

.hero-dots button {
    width: 28px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
}

.hero-dots button.is-active {
    background: var(--white);
}

.quick-search-section {
    background: var(--white);
    border-bottom: 1px solid var(--mist-200);
}

.quick-search-inner {
    padding: 28px 0;
}

.quick-search-inner h2,
.section-title-row h2,
.page-hero h1 {
    margin: 0;
    color: var(--mist-900);
    line-height: 1.2;
}

.quick-search-inner p,
.page-hero p,
.section-title-row a,
.movie-card-body p,
.footer-inner p {
    color: var(--mist-600);
}

.wide-search {
    display: flex;
    flex: 0 1 520px;
    border: 1px solid var(--mist-300);
    border-radius: 16px;
    overflow: hidden;
    background: var(--white);
    box-shadow: var(--shadow-soft);
}

.section-block {
    padding: 54px 0;
}

.section-title-row {
    margin-bottom: 24px;
}

.section-title-row h2 {
    margin-top: 8px;
    font-size: clamp(26px, 3vw, 34px);
}

.section-title-row a {
    font-weight: 800;
    color: var(--primary-dark);
}

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--mist-200);
    border-radius: 18px;
    background: var(--white);
    box-shadow: var(--shadow-soft);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: var(--mist-100);
}

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

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

.poster-link::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.72));
    transition: opacity 0.25s ease;
}

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

.poster-play {
    position: absolute;
    left: 50%;
    bottom: 18px;
    z-index: 2;
    opacity: 0;
    transform: translate(-50%, 8px);
    border-radius: 999px;
    padding: 8px 16px;
    color: var(--white);
    background: var(--primary);
    font-size: 13px;
    font-weight: 800;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .poster-play {
    opacity: 1;
    transform: translate(-50%, 0);
}

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

.card-meta span,
.detail-meta span {
    padding: 4px 8px;
    background: var(--mist-100);
    color: var(--mist-600);
}

.movie-card h3 {
    min-height: 52px;
    margin: 10px 0 8px;
    font-size: 17px;
    line-height: 1.35;
}

.movie-card h3 a:hover {
    color: var(--primary-dark);
}

.movie-card-body p {
    display: -webkit-box;
    min-height: 44px;
    margin: 0 0 12px;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 14px;
}

.tag-row span {
    padding: 4px 8px;
    color: var(--primary-dark);
    background: var(--primary-soft);
}

.category-band {
    padding: 54px 0;
    background: linear-gradient(90deg, #f0fdf4, #f0f9ff);
}

.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;
    overflow: hidden;
    min-height: 190px;
    border-radius: 22px;
    padding: 24px;
    color: var(--white);
    background: var(--mist-900);
    box-shadow: var(--shadow-soft);
}

.category-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.48;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

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

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

.category-card span {
    display: block;
    margin-top: 74px;
    font-size: 24px;
    font-weight: 900;
}

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

.category-card:hover img {
    opacity: 0.62;
    transform: scale(1.08);
}

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

.rank-row {
    display: grid;
    grid-template-columns: 44px 58px 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border: 1px solid var(--mist-200);
    border-radius: 16px;
    background: var(--white);
    box-shadow: var(--shadow-soft);
}

.rank-row img {
    width: 58px;
    height: 78px;
    border-radius: 10px;
    object-fit: cover;
}

.rank-number,
.rank-badge {
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: var(--white);
    background: linear-gradient(135deg, var(--primary), var(--bamboo));
    font-weight: 900;
}

.rank-number {
    width: 34px;
    height: 34px;
}

.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 3;
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
}

.rank-title {
    font-weight: 900;
}

.rank-info {
    color: var(--mist-500);
    font-size: 13px;
}

.page-hero {
    padding: 72px 0;
    color: var(--white);
    background: linear-gradient(135deg, var(--primary), var(--bamboo));
}

.page-hero.small-hero {
    padding: 56px 0;
}

.page-hero .section-kicker {
    background: rgba(255, 255, 255, 0.16);
    color: var(--white);
}

.page-hero h1 {
    margin-top: 12px;
    color: var(--white);
    font-size: clamp(32px, 5vw, 50px);
}

.page-hero p {
    max-width: 720px;
    margin: 12px 0 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 18px;
}

.filter-bar {
    display: grid;
    grid-template-columns: 1fr 180px 180px;
    gap: 12px;
    margin-bottom: 24px;
}

.filter-bar input,
.filter-bar select {
    border: 1px solid var(--mist-300);
    border-radius: 14px;
    background: var(--white);
}

.empty-state {
    display: none;
    padding: 26px;
    border: 1px dashed var(--mist-300);
    border-radius: 18px;
    color: var(--mist-600);
    background: var(--white);
    text-align: center;
}

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

.searchable-card.is-hidden {
    display: none;
}

.detail-wrap {
    padding-top: 26px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 20px;
    color: var(--mist-500);
    font-size: 14px;
}

.breadcrumb a:hover {
    color: var(--primary-dark);
}

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

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

.player-shell video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000000;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: var(--white);
    background: rgba(0, 0, 0, 0.42);
    font-size: 18px;
    font-weight: 900;
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-cover.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.play-circle {
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--bamboo));
    box-shadow: 0 16px 32px rgba(2, 132, 199, 0.35);
}

.detail-title-card,
.text-card,
.side-card {
    margin-top: 22px;
    border: 1px solid var(--mist-200);
    border-radius: 22px;
    padding: 24px;
    background: var(--white);
    box-shadow: var(--shadow-soft);
}

.detail-title-card h1 {
    margin: 12px 0;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.15;
}

.detail-title-card p,
.text-card p {
    color: var(--mist-700);
    font-size: 17px;
}

.detail-meta {
    margin: 18px 0;
}

.detail-tags {
    margin-top: 12px;
}

.text-card h2,
.side-card h2 {
    margin: 0 0 12px;
    font-size: 24px;
}

.text-card p {
    margin: 0;
    white-space: pre-line;
}

.detail-poster {
    width: 100%;
    border-radius: 22px;
    box-shadow: var(--shadow-card);
}

.side-card dl {
    display: grid;
    grid-template-columns: 76px 1fr;
    gap: 10px 12px;
    margin: 0 0 20px;
}

.side-card dt {
    color: var(--mist-500);
}

.side-card dd {
    margin: 0;
    color: var(--mist-900);
    font-weight: 700;
}

.related-block {
    padding-bottom: 24px;
}

.site-footer {
    margin-top: 24px;
    background: var(--mist-900);
    color: var(--white);
}

.footer-inner {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 40px;
    padding: 46px 0;
}

.footer-logo {
    color: var(--white);
}

.footer-inner p {
    max-width: 520px;
    color: var(--mist-300);
}

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

.footer-links a {
    padding: 7px 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    color: var(--mist-300);
}

.footer-links a:hover {
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.38);
}

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

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

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

    .detail-side {
        display: grid;
        grid-template-columns: 260px 1fr;
        gap: 22px;
    }

    .side-card {
        margin-top: 0;
    }
}

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

    .header-inner {
        justify-content: space-between;
    }

    .menu-toggle {
        display: block;
    }

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

    .hero-nav {
        display: none;
    }

    .quick-search-inner,
    .section-title-row,
    .hero-actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .wide-search {
        width: 100%;
        flex: auto;
    }

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

    .filter-bar {
        grid-template-columns: 1fr;
    }

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

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

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

    .movie-card h3 {
        min-height: auto;
        font-size: 15px;
    }

    .movie-card-body p,
    .tag-row {
        display: none;
    }

    .hero h1 {
        font-size: 36px;
    }

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

    .detail-title-card,
    .text-card,
    .side-card {
        padding: 18px;
        border-radius: 18px;
    }

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

    .rank-row {
        grid-template-columns: 36px 48px 1fr;
    }

    .rank-row img {
        width: 48px;
        height: 64px;
    }

    .rank-info {
        display: none;
    }
}
