:root {
    --blue: #2563eb;
    --blue-dark: #1d4ed8;
    --blue-soft: #eff6ff;
    --cyan: #0891b2;
    --orange: #f97316;
    --red: #dc2626;
    --green: #10b981;
    --teal: #0d9488;
    --text: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --soft: #f3f4f6;
    --white: #ffffff;
    --shadow: 0 18px 48px rgba(15, 23, 42, 0.14);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    background: #f9fafb;
    color: var(--text);
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, var(--blue), var(--blue-dark));
    color: var(--white);
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.28);
}

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

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

.brand {
    font-size: 22px;
    flex: 0 0 auto;
}

.brand-icon {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

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

.site-nav a,
.nav-dropdown > button {
    color: rgba(255, 255, 255, 0.92);
    transition: color 0.2s ease, opacity 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active,
.nav-dropdown > button:hover {
    color: #dbeafe;
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown > button {
    border: 0;
    background: transparent;
    padding: 0;
}

.dropdown-panel {
    position: absolute;
    top: 100%;
    left: 0;
    display: grid;
    min-width: 180px;
    margin-top: 14px;
    padding: 8px;
    border-radius: 14px;
    background: var(--white);
    color: var(--text);
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: 0.2s ease;
}

.nav-dropdown:hover .dropdown-panel,
.nav-dropdown:focus-within .dropdown-panel {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.dropdown-panel a {
    padding: 9px 12px;
    border-radius: 10px;
    color: var(--text);
}

.dropdown-panel a:hover {
    background: var(--blue-soft);
    color: var(--blue);
}

.global-search {
    display: flex;
    align-items: center;
    flex: 1 1 360px;
    max-width: 430px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.global-search input {
    width: 100%;
    min-width: 0;
    padding: 10px 16px;
    border: 0;
    outline: 0;
    color: var(--white);
    background: transparent;
}

.global-search input::placeholder {
    color: rgba(255, 255, 255, 0.78);
}

.global-search button,
.search-large button {
    border: 0;
    border-radius: 999px;
    background: var(--white);
    color: var(--blue);
    padding: 8px 15px;
    margin-right: 4px;
    font-weight: 750;
}

.menu-button {
    display: none;
    border: 0;
    border-radius: 12px;
    padding: 8px 10px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.14);
}

.hero-carousel {
    position: relative;
    height: 590px;
    overflow: hidden;
    background: #111827;
}

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

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

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

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.45) 42%, rgba(0, 0, 0, 0.12));
}

.hero-content {
    position: absolute;
    left: 50%;
    bottom: 74px;
    transform: translateX(-50%);
    color: var(--white);
}

.hero-label,
.eyebrow {
    display: inline-flex;
    align-items: center;
    width: max-content;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-label {
    padding: 8px 15px;
    margin-bottom: 18px;
    background: var(--red);
}

.hero-content h1 {
    max-width: 780px;
    margin: 0 0 16px;
    font-size: clamp(34px, 6vw, 62px);
    line-height: 1.08;
    font-weight: 900;
    text-shadow: 0 12px 36px rgba(0, 0, 0, 0.55);
}

.hero-content p {
    max-width: 720px;
    margin: 0 0 20px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 19px;
}

.hero-tags,
.movie-meta,
.detail-meta-card,
.detail-meta-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags span,
.movie-meta span,
.pill {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    padding: 5px 11px;
    font-size: 13px;
    font-weight: 700;
}

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

.primary-button,
.ghost-button,
.wide-button,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.primary-button {
    padding: 12px 24px;
    color: var(--white);
    background: var(--blue);
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.35);
}

.primary-button:hover,
.wide-button:hover {
    transform: translateY(-2px);
    background: var(--blue-dark);
}

.ghost-button {
    padding: 11px 22px;
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
}

.ghost-button:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.18);
}

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

.hero-dots button {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.52);
}

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

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

.white-block {
    background: var(--white);
}

.soft-block {
    background: var(--soft);
}

.hot-strip {
    padding: 48px 0;
    background: linear-gradient(90deg, var(--orange), var(--red));
}

.category-band {
    background: linear-gradient(135deg, var(--green), var(--teal));
}

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

.section-title h2,
.page-hero h1,
.detail-content h1 {
    margin: 0;
    font-weight: 900;
    letter-spacing: -0.03em;
}

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

.eyebrow {
    margin-bottom: 8px;
    color: var(--blue);
}

.light-title,
.light-title .eyebrow {
    color: var(--white);
}

.scroll-actions {
    display: flex;
    gap: 10px;
}

.scroll-actions button {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    color: var(--white);
    background: rgba(255, 255, 255, 0.2);
    font-size: 28px;
    line-height: 1;
}

.horizontal-row {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
    scrollbar-width: none;
}

.horizontal-row::-webkit-scrollbar {
    display: none;
}

.horizontal-row .movie-card {
    min-width: 280px;
    scroll-snap-align: start;
}

.movie-grid {
    display: grid;
    gap: 22px;
}

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

.four-cols {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

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

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

.poster-link,
.movie-thumb,
.category-image,
.rank-thumb {
    position: relative;
    display: block;
    overflow: hidden;
    background: #111827;
}

.poster-link {
    aspect-ratio: 16 / 10;
}

.poster-link img,
.movie-thumb img,
.category-image img,
.rank-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.movie-card:hover img,
.category-tile:hover img,
.rank-row:hover img {
    transform: scale(1.08);
}

.poster-layer {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.45), transparent 55%);
}

.play-mini {
    position: absolute;
    left: 14px;
    bottom: 14px;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: var(--white);
    background: var(--blue);
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.35);
}

.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    display: grid;
    place-items: center;
    min-width: 34px;
    height: 34px;
    border-radius: 999px;
    color: var(--white);
    background: linear-gradient(135deg, var(--orange), var(--red));
    font-weight: 900;
}

.movie-info {
    padding: 16px;
}

.movie-title {
    display: block;
    margin-bottom: 8px;
    color: var(--text);
    font-weight: 850;
    line-height: 1.35;
}

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

.movie-meta {
    gap: 8px;
    margin-bottom: 9px;
    color: var(--muted);
    font-size: 13px;
}

.movie-meta span {
    background: var(--soft);
}

.movie-info p,
.rank-main p,
.category-tile p,
.detail-content p,
.side-panel p,
.site-footer p {
    margin: 0;
    color: var(--muted);
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-row span {
    border-radius: 999px;
    padding: 5px 10px;
    background: var(--soft);
    color: #4b5563;
    font-size: 13px;
}

.movie-card-list {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 18px;
    align-items: stretch;
    padding: 12px;
}

.movie-card-list .movie-thumb {
    min-height: 136px;
    border-radius: 14px;
}

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

.category-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 30px;
}

.category-buttons a {
    border-radius: 999px;
    padding: 10px 16px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
    font-weight: 800;
}

.category-buttons a:hover {
    background: rgba(255, 255, 255, 0.28);
}

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

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

.category-tile {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 18px;
    border-radius: var(--radius);
    padding: 14px;
    background: var(--white);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.1);
}

.category-image {
    border-radius: 14px;
    min-height: 112px;
}

.category-tile h2 {
    margin: 0 0 8px;
    font-size: 20px;
}

.category-samples {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.category-samples a {
    border-radius: 999px;
    padding: 4px 10px;
    background: var(--blue-soft);
    color: var(--blue);
    font-size: 13px;
    font-weight: 700;
}

.page-hero {
    padding: 64px 0;
    color: var(--white);
    background: linear-gradient(120deg, var(--blue), var(--cyan));
}

.category-hero {
    background: linear-gradient(120deg, var(--blue), #7c3aed);
}

.ranking-hero {
    background: linear-gradient(120deg, var(--orange), var(--red));
}

.search-hero {
    background: linear-gradient(120deg, var(--green), var(--teal));
}

.page-hero h1 {
    margin-top: 6px;
    font-size: clamp(34px, 5vw, 52px);
}

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

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 14px;
}

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

.filter-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 26px;
    padding: 14px;
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.filter-panel input,
.filter-panel select,
.search-large input {
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 999px;
    outline: 0;
    background: var(--white);
    color: var(--text);
}

.filter-panel input {
    flex: 1;
    padding: 0 16px;
}

.filter-panel select {
    padding: 0 14px;
}

.search-large {
    display: flex;
    gap: 10px;
    max-width: 650px;
    margin-top: 28px;
    padding: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(10px);
}

.search-large input {
    flex: 1;
    padding: 0 18px;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 64px 150px 1fr auto;
    align-items: center;
    gap: 18px;
    padding: 12px 18px;
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.rank-number {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: var(--white);
    background: linear-gradient(135deg, var(--orange), var(--red));
    font-weight: 900;
}

.rank-thumb {
    height: 86px;
    border-radius: 14px;
}

.rank-category {
    border-radius: 999px;
    padding: 8px 12px;
    color: var(--blue);
    background: var(--blue-soft);
    font-weight: 800;
    white-space: nowrap;
}

.detail-top {
    padding: 30px 0 46px;
    background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.34), transparent 34%), #0f172a;
    color: var(--white);
}

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

.player-card {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: #000;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: var(--white);
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.54), rgba(0, 0, 0, 0.18));
    transition: opacity 0.2s ease;
    z-index: 2;
}

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

.big-play {
    display: grid;
    place-items: center;
    width: 96px;
    height: 96px;
    padding-left: 6px;
    border-radius: 50%;
    background: var(--blue);
    box-shadow: 0 20px 44px rgba(37, 99, 235, 0.45);
    font-size: 40px;
}

.detail-side {
    overflow: hidden;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

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

.detail-meta-card {
    padding: 16px;
}

.pill {
    color: var(--white);
    background: rgba(255, 255, 255, 0.18);
}

.pill.muted {
    color: rgba(255, 255, 255, 0.88);
}

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

.detail-content,
.side-panel {
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.detail-content {
    padding: 30px;
}

.detail-content h1 {
    margin-bottom: 12px;
    font-size: clamp(30px, 4vw, 44px);
}

.lead-text {
    margin-bottom: 18px !important;
    color: #374151 !important;
    font-size: 18px;
}

.detail-content h2,
.side-panel h2 {
    margin: 28px 0 12px;
    font-size: 22px;
}

.detail-content p {
    white-space: pre-line;
    line-height: 1.88;
}

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

.side-panel {
    position: sticky;
    top: 90px;
    padding: 24px;
}

.side-panel h2 {
    margin-top: 0;
}

.side-links {
    display: grid;
    gap: 10px;
}

.side-links a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-radius: 12px;
    padding: 10px 12px;
    background: var(--soft);
}

.side-links a:hover {
    color: var(--blue);
    background: var(--blue-soft);
}

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

.wide-button {
    width: 100%;
    margin-top: 18px;
    padding: 12px 18px;
    color: var(--white);
    background: var(--blue);
}

.text-link {
    color: var(--blue);
    font-size: 15px;
}

.text-link:hover {
    color: var(--blue-dark);
}

.site-footer {
    background: #111827;
    color: #d1d5db;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 32px;
    padding: 48px 0;
}

.footer-brand {
    margin-bottom: 14px;
    color: var(--white);
    font-size: 20px;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: var(--white);
    font-size: 17px;
}

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

.site-footer a:hover {
    color: #93c5fd;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 18px 16px;
    text-align: center;
    color: #9ca3af;
}

.no-results {
    grid-column: 1 / -1;
    border-radius: var(--radius);
    padding: 36px;
    text-align: center;
    background: var(--white);
    color: var(--muted);
}

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

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

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

    .detail-side {
        display: none;
    }

    .side-panel {
        position: static;
    }
}

@media (max-width: 860px) {
    .nav-shell {
        flex-wrap: wrap;
        min-height: auto;
        padding: 12px 0;
    }

    .brand {
        font-size: 19px;
    }

    .menu-button {
        display: block;
        margin-left: auto;
    }

    .site-nav {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 10px 0;
    }

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

    .site-nav a,
    .nav-dropdown > button {
        padding: 10px 0;
        text-align: left;
    }

    .dropdown-panel {
        position: static;
        display: grid;
        margin: 4px 0 0;
        opacity: 1;
        pointer-events: auto;
        transform: none;
        box-shadow: none;
    }

    .global-search {
        order: 3;
        flex-basis: 100%;
        max-width: none;
    }

    .hero-carousel {
        height: 520px;
    }

    .hero-content {
        bottom: 60px;
    }

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

    .movie-grid,
    .four-cols,
    .five-cols,
    .three-cols,
    .category-grid,
    .full-category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .category-tile,
    .movie-card-list,
    .rank-row {
        grid-template-columns: 1fr;
    }

    .rank-category {
        width: max-content;
    }

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

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

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

    .hero-carousel {
        height: 500px;
    }

    .hero-content h1 {
        font-size: 34px;
    }

    .hero-dots {
        right: 18px;
        bottom: 20px;
    }

    .movie-grid,
    .four-cols,
    .five-cols,
    .three-cols,
    .category-grid,
    .full-category-grid {
        grid-template-columns: 1fr;
    }

    .horizontal-row .movie-card {
        min-width: 250px;
    }

    .section-title,
    .filter-panel,
    .search-large {
        align-items: stretch;
        flex-direction: column;
    }

    .filter-panel select,
    .search-large button {
        width: 100%;
    }

    .page-hero {
        padding: 48px 0;
    }

    .detail-content {
        padding: 22px;
    }

    .big-play {
        width: 78px;
        height: 78px;
        font-size: 34px;
    }

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