:root {
    --site-blue: #2563eb;
    --site-blue-dark: #1d4ed8;
    --site-red: #dc2626;
    --site-gray: #f3f4f6;
    --site-text: #111827;
    --site-muted: #6b7280;
    --site-dark: #111827;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--site-text);
    background: #f8fafc;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #fff;
    background: linear-gradient(90deg, var(--site-blue), var(--site-blue-dark));
    box-shadow: 0 10px 28px rgba(15, 23, 42, .18);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
    gap: 20px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 21px;
    font-weight: 800;
    letter-spacing: .02em;
    white-space: nowrap;
}

.logo-mark {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, .16);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2);
}

.logo-mark svg {
    width: 21px;
    height: 21px;
}

.nav {
    display: flex;
    align-items: center;
    gap: 24px;
    font-weight: 650;
}

.nav a,
.mobile-nav a {
    transition: color .2s ease, opacity .2s ease, background .2s ease;
}

.nav a:hover,
.mobile-nav a:hover {
    color: #bfdbfe;
}

.header-search {
    flex: 1;
    max-width: 440px;
    position: relative;
}

.header-search input,
.catalog-tools input,
.search-panel input,
.search-panel select {
    width: 100%;
    border: none;
    outline: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, .2);
    color: #fff;
    padding: 11px 44px 11px 18px;
    backdrop-filter: blur(10px);
    transition: background .2s ease, box-shadow .2s ease;
}

.header-search input::placeholder {
    color: #dbeafe;
}

.header-search input:focus {
    background: rgba(255, 255, 255, .28);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, .2);
}

.search-button {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border: 0;
    color: #fff;
    background: transparent;
    cursor: pointer;
}

.mobile-toggle {
    display: none;
    border: 0;
    color: #fff;
    background: rgba(255, 255, 255, .12);
    border-radius: 10px;
    padding: 9px;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    padding: 0 0 18px;
}

.mobile-nav.open {
    display: grid;
    gap: 12px;
}

.hero {
    position: relative;
    height: 560px;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(180deg, #111827, #1f2937);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity .9s ease;
}

.hero-slide.active {
    opacity: 1;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.05);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, .88), rgba(0, 0, 0, .44) 52%, rgba(0, 0, 0, .18));
}

.hero-content {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 0 0 64px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 800;
    color: #fff;
    background: var(--site-red);
    box-shadow: 0 12px 28px rgba(220, 38, 38, .28);
}

.hero h1,
.hero h2 {
    max-width: 820px;
    margin: 18px 0 16px;
    font-size: clamp(34px, 6vw, 62px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -.04em;
}

.hero p {
    max-width: 740px;
    margin: 0 0 28px;
    color: #e5e7eb;
    font-size: 18px;
    line-height: 1.75;
}

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

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

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

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

.btn-primary:hover {
    background: var(--site-blue-dark);
}

.btn-light {
    color: #fff;
    background: rgba(255, 255, 255, .16);
    backdrop-filter: blur(10px);
}

.hero-dots {
    position: absolute;
    right: max(24px, calc((100vw - 1180px) / 2));
    bottom: 48px;
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, .42);
    cursor: pointer;
    transition: width .2s ease, background .2s ease;
}

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

.section {
    padding: 54px 0;
}

.section-soft {
    background: var(--site-gray);
}

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

.section-title {
    margin: 0;
    color: #111827;
    font-size: clamp(24px, 4vw, 34px);
    font-weight: 900;
    letter-spacing: -.03em;
}

.section-desc {
    margin: 8px 0 0;
    max-width: 760px;
    color: var(--site-muted);
    line-height: 1.75;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .08);
    transition: transform .2s ease, box-shadow .2s ease;
}

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

.poster-link {
    display: block;
    position: relative;
    aspect-ratio: 2 / 3;
    background: linear-gradient(135deg, #e5e7eb, #cbd5e1);
    overflow: hidden;
}

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

.movie-card:hover img {
    transform: scale(1.05);
}

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

.card-body {
    padding: 16px;
}

.card-title {
    margin: 0 0 8px;
    color: #111827;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 850;
}

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

.card-meta,
.breadcrumb,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: var(--site-muted);
    font-size: 13px;
}

.card-summary {
    margin: 12px 0 0;
    color: #4b5563;
    line-height: 1.65;
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.category-card {
    min-height: 168px;
    border-radius: 22px;
    padding: 24px;
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #1e40af);
    box-shadow: 0 12px 30px rgba(37, 99, 235, .22);
    transition: transform .2s ease, box-shadow .2s ease;
}

.category-card:nth-child(2n) {
    background: linear-gradient(135deg, #dc2626, #991b1b);
}

.category-card:nth-child(3n) {
    background: linear-gradient(135deg, #7c3aed, #4c1d95);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 38px rgba(15, 23, 42, .18);
}

.category-card h2,
.category-card h3 {
    margin: 0 0 12px;
    font-size: 24px;
    font-weight: 900;
}

.category-card p {
    margin: 0;
    color: rgba(255, 255, 255, .85);
    line-height: 1.65;
}

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

.ranking-item {
    display: grid;
    grid-template-columns: 52px 76px 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .07);
}

.rank-number {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    color: #fff;
    font-weight: 900;
    background: var(--site-red);
}

.ranking-thumb {
    width: 76px;
    height: 104px;
    border-radius: 12px;
    object-fit: cover;
}

.ranking-title {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 900;
}

.page-hero {
    color: #fff;
    background: radial-gradient(circle at 12% 30%, rgba(96, 165, 250, .34), transparent 26%), linear-gradient(135deg, #111827, #1e3a8a 62%, #1d4ed8);
    padding: 72px 0;
}

.page-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(30px, 5vw, 48px);
    font-weight: 950;
    letter-spacing: -.04em;
}

.page-hero p {
    max-width: 800px;
    margin: 0;
    color: #dbeafe;
    line-height: 1.8;
    font-size: 17px;
}

.catalog-tools {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    margin-bottom: 28px;
}

.catalog-tools input,
.search-panel input,
.search-panel select {
    color: #111827;
    background: #fff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .06);
}

.catalog-tools input::placeholder,
.search-panel input::placeholder {
    color: #9ca3af;
}

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

.player-card,
.detail-card,
.side-card {
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .08);
    overflow: hidden;
}

.video-shell {
    position: relative;
    background: #050505;
    aspect-ratio: 16 / 9;
}

.video-shell video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
    object-fit: contain;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(180deg, rgba(0, 0, 0, .1), rgba(0, 0, 0, .72));
    cursor: pointer;
    z-index: 3;
}

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

.play-button {
    display: grid;
    place-items: center;
    width: 82px;
    height: 82px;
    border-radius: 999px;
    background: rgba(37, 99, 235, .92);
    box-shadow: 0 20px 45px rgba(37, 99, 235, .35);
    transition: transform .2s ease, background .2s ease;
}

.play-overlay:hover .play-button {
    transform: scale(1.06);
    background: #1d4ed8;
}

.player-info,
.detail-card,
.side-card {
    padding: 24px;
}

.detail-title {
    margin: 0 0 12px;
    font-size: clamp(28px, 5vw, 44px);
    line-height: 1.15;
    font-weight: 950;
    letter-spacing: -.04em;
}

.detail-cover {
    width: 100%;
    border-radius: 16px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    box-shadow: 0 12px 26px rgba(15, 23, 42, .15);
}

.detail-section h2,
.side-card h2 {
    margin: 0 0 14px;
    font-size: 22px;
    font-weight: 900;
}

.detail-section p {
    color: #374151;
    line-height: 1.9;
    margin: 0 0 18px;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0 0;
}

.tag-list span,
.meta-chip {
    display: inline-flex;
    border-radius: 999px;
    padding: 6px 11px;
    color: #1d4ed8;
    background: #dbeafe;
    font-size: 13px;
    font-weight: 750;
}

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

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

.related-item img {
    width: 72px;
    height: 96px;
    border-radius: 12px;
    object-fit: cover;
}

.related-item strong {
    display: block;
    margin-bottom: 6px;
    line-height: 1.35;
}

.search-panel {
    display: grid;
    grid-template-columns: 1fr 180px 180px;
    gap: 14px;
    margin: 0 0 28px;
}

.search-results-note {
    color: var(--site-muted);
    margin-bottom: 18px;
}

.site-footer {
    color: #d1d5db;
    background: #111827;
    padding: 44px 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 28px;
}

.site-footer h2,
.site-footer h3 {
    margin: 0 0 14px;
    color: #fff;
    font-size: 18px;
    font-weight: 850;
}

.site-footer p,
.site-footer a {
    color: #9ca3af;
    line-height: 1.8;
    font-size: 14px;
}

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

.footer-links {
    display: grid;
    gap: 8px;
}

.hidden-card {
    display: none !important;
}

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

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

    .hero {
        height: 540px;
    }

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

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

    .search-panel {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 620px) {
    .container {
        width: min(100% - 24px, 1180px);
    }

    .hero {
        height: 520px;
    }

    .hero-content {
        padding-bottom: 54px;
    }

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

    .hero-dots {
        left: 12px;
        right: auto;
        bottom: 22px;
    }

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

    .ranking-item {
        grid-template-columns: 44px 62px 1fr;
    }

    .ranking-item .btn {
        grid-column: 2 / 4;
        width: fit-content;
    }

    .ranking-thumb {
        width: 62px;
        height: 88px;
    }

    .catalog-tools {
        grid-template-columns: 1fr;
    }
}
