:root {
    --primary: #1e40af;
    --primary-dark: #1e3a8a;
    --primary-light: #eff6ff;
    --secondary: #065f46;
    --secondary-soft: #f0fdf4;
    --accent: #92400e;
    --accent-soft: #fffbeb;
    --text: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --panel: #ffffff;
    --bg: #f9fafb;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
    font: inherit;
}

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

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(1180px, calc(100% - 32px));
    height: 64px;
    margin: 0 auto;
    gap: 20px;
}

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

.logo-mark {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 10px;
    box-shadow: 0 12px 24px rgba(30, 64, 175, 0.22);
}

.logo-text {
    display: grid;
    line-height: 1.1;
}

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

.logo-text small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    color: #374151;
    font-size: 15px;
    font-weight: 650;
    white-space: nowrap;
}

.desktop-nav a:hover,
.footer-links a:hover,
.text-link:hover {
    color: var(--primary);
}

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

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

.search-form input,
.mobile-search input,
.big-search input,
.filter-bar input,
.filter-bar select {
    border: 1px solid #d1d5db;
    border-radius: 12px;
    outline: none;
    background: #ffffff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-form input {
    width: 220px;
    padding: 10px 12px;
}

.search-form button,
.mobile-search button,
.big-search button {
    border: 0;
    color: #ffffff;
    background: var(--primary);
    border-radius: 12px;
    padding: 10px 16px;
    cursor: pointer;
}

.search-form input:focus,
.mobile-search input:focus,
.big-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.16);
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    background: #f3f4f6;
    border-radius: 12px;
    cursor: pointer;
}

.mobile-panel {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 14px 0 18px;
    border-top: 1px solid var(--line);
}

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

.mobile-panel nav {
    display: grid;
    gap: 12px;
    margin-top: 14px;
    font-weight: 650;
}

.mobile-search input {
    width: 100%;
    padding: 11px 12px;
}

.hero-section {
    padding: 64px 16px 72px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark) 52%, var(--secondary));
}

.hero-topline {
    width: min(900px, 100%);
    margin: 0 auto 42px;
    text-align: center;
}

.hero-topline h1 {
    margin: 0 0 14px;
    font-size: clamp(32px, 5vw, 56px);
    line-height: 1.08;
    letter-spacing: -0.03em;
}

.hero-topline p {
    margin: 0;
    color: #dbeafe;
    font-size: clamp(17px, 2.2vw, 22px);
}

.hero-carousel {
    position: relative;
    width: min(1180px, 100%);
    aspect-ratio: 21 / 9;
    min-height: 430px;
    margin: 0 auto;
    overflow: hidden;
    background: #111827;
    border-radius: 24px;
    box-shadow: var(--shadow);
}

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

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

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.36) 46%, rgba(0, 0, 0, 0.06));
}

.hero-content {
    position: absolute;
    left: clamp(24px, 6vw, 72px);
    right: clamp(24px, 8vw, 120px);
    bottom: clamp(28px, 6vw, 64px);
    max-width: 760px;
}

.hero-kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    color: #ffffff;
    background: rgba(59, 130, 246, 0.92);
    border-radius: 999px;
    padding: 7px 13px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.eyebrow {
    color: var(--primary);
    background: #dbeafe;
}

.hero-content h2 {
    margin: 18px 0 12px;
    font-size: clamp(30px, 5vw, 48px);
    line-height: 1.08;
}

.hero-content p {
    max-width: 660px;
    margin: 0 0 18px;
    color: #e5e7eb;
    font-size: 18px;
    line-height: 1.7;
}

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

.hero-tags span,
.tag-row span {
    padding: 6px 10px;
    color: #1f2937;
    background: rgba(255, 255, 255, 0.84);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.tag-row span {
    color: var(--primary-dark);
    background: var(--primary-light);
}

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

.primary-button,
.ghost-button,
.row-button,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 18px;
    border-radius: 12px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.primary-button {
    color: #ffffff;
    background: var(--primary);
    box-shadow: 0 14px 26px rgba(30, 64, 175, 0.2);
}

.hero-content .primary-button {
    color: var(--primary);
    background: #ffffff;
}

.ghost-button {
    color: #ffffff;
    background: rgba(0, 0, 0, 0.34);
    border: 1px solid rgba(255, 255, 255, 0.36);
}

.primary-button:hover,
.ghost-button:hover,
.row-button:hover {
    transform: translateY(-1px);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 46px;
    height: 46px;
    border: 0;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 999px;
    font-size: 38px;
    line-height: 1;
    transform: translateY(-50%);
    cursor: pointer;
}

.hero-prev {
    left: 18px;
}

.hero-next {
    right: 18px;
}

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

.hero-dot {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 0;
    background: rgba(255, 255, 255, 0.58);
    border-radius: 999px;
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.active {
    width: 32px;
    background: #ffffff;
}

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

.inner-section {
    padding: 0;
}

.soft-section {
    padding: 62px 0;
    background: linear-gradient(135deg, var(--secondary-soft), var(--primary-light));
}

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

.section-heading h2,
.rank-panel h2,
.related-panel h2,
.story-card h2,
.watch-column h2 {
    margin: 8px 0 0;
    color: #111827;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.15;
}

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

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

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

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

.movie-card {
    overflow: hidden;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 40px rgba(15, 23, 42, 0.12);
}

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

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

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

.play-chip {
    position: absolute;
    right: 10px;
    bottom: 10px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.72);
    border-radius: 999px;
    padding: 7px 10px;
    font-size: 12px;
    font-weight: 800;
}

.rank-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    display: grid;
    min-width: 30px;
    height: 30px;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, #f59e0b, #dc2626);
    border-radius: 999px;
    font-weight: 900;
}

.card-body {
    padding: 15px;
}

.card-body h3,
.row-info h3 {
    margin: 0 0 8px;
    font-size: 17px;
    line-height: 1.35;
}

.card-body h3 a:hover,
.row-info h3 a:hover {
    color: var(--primary);
}

.meta,
.desc,
.row-info p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.desc {
    display: -webkit-box;
    min-height: 42px;
    margin-top: 7px;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.card-body .tag-row {
    margin-top: 12px;
}

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

.category-card {
    position: relative;
    min-height: 220px;
    overflow: hidden;
    color: #ffffff;
    background: #111827;
    border-radius: 22px;
    box-shadow: var(--shadow);
}

.category-card img {
    width: 100%;
    height: 100%;
    min-height: 220px;
    object-fit: cover;
    opacity: 0.64;
    transition: transform 0.32s ease;
}

.category-card::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.14));
}

.category-card span,
.category-card p {
    position: absolute;
    z-index: 2;
    left: 20px;
    right: 20px;
}

.category-card span {
    bottom: 56px;
    font-size: 25px;
    font-weight: 900;
}

.category-card p {
    bottom: 20px;
    margin: 0;
    color: #e5e7eb;
    font-size: 14px;
    line-height: 1.5;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 34px;
    align-items: start;
}

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

.list-row {
    display: grid;
    grid-template-columns: auto 72px 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 14px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.row-rank {
    display: grid;
    min-width: 34px;
    height: 34px;
    place-items: center;
    color: var(--primary);
    background: var(--primary-light);
    border-radius: 10px;
    font-weight: 900;
}

.row-poster {
    display: block;
    width: 72px;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #e5e7eb;
    border-radius: 12px;
}

.row-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.row-button {
    color: #ffffff;
    background: var(--secondary);
}

.rank-panel,
.related-panel,
.story-card,
.category-overview-card,
.filter-bar,
.big-search {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.rank-panel {
    position: sticky;
    top: 88px;
    padding: 24px;
}

.rank-panel h2 {
    margin-bottom: 20px;
}

.rank-list .list-row {
    grid-template-columns: auto 52px 1fr;
    box-shadow: none;
}

.rank-list .row-button {
    display: none;
}

.rank-list .row-poster {
    width: 52px;
}

.rank-list .row-info p:last-child {
    display: none;
}

.page-hero {
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    padding: 72px 16px;
}

.page-hero > div {
    width: min(1180px, 100%);
    margin: 0 auto;
}

.page-hero h1 {
    margin: 16px 0 14px;
    font-size: clamp(34px, 5vw, 52px);
    line-height: 1.08;
}

.page-hero p {
    max-width: 720px;
    margin: 0;
    color: #dbeafe;
    font-size: 19px;
    line-height: 1.75;
}

.ranking-hero {
    background: linear-gradient(135deg, #92400e, #1e40af);
}

.search-hero {
    background: linear-gradient(135deg, #065f46, #1e40af);
}

.category-hero {
    background: linear-gradient(135deg, #1e40af, #92400e);
}

.hero-mini-list {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 28px;
}

.featured-mini {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 210px;
    padding: 9px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    overflow: hidden;
}

.featured-mini img {
    width: 50px;
    height: 66px;
    object-fit: cover;
    border-radius: 10px;
    transition: transform 0.28s ease;
}

.filter-bar {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 28px;
    padding: 18px;
}

.filter-bar input {
    flex: 1;
    min-width: 0;
    padding: 13px 14px;
}

.filter-bar select {
    min-width: 180px;
    padding: 13px 14px;
}

.big-search {
    margin-bottom: 18px;
    padding: 18px;
}

.big-search input {
    flex: 1;
    min-width: 0;
    padding: 14px 16px;
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 190px 1fr;
    gap: 22px;
    padding: 20px;
}

.category-collage {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    overflow: hidden;
    border-radius: 16px;
}

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

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

.category-overview-card p {
    margin: 0 0 18px;
    color: var(--muted);
    line-height: 1.7;
}

.text-link {
    color: var(--primary);
    background: var(--primary-light);
}

.detail-hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: #111827;
}

.detail-bg {
    position: absolute;
    inset: 0;
    opacity: 0.38;
    filter: blur(2px);
    transform: scale(1.04);
}

.detail-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(17, 24, 39, 0.96), rgba(17, 24, 39, 0.72), rgba(17, 24, 39, 0.38));
}

.detail-wrap {
    position: relative;
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 34px;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 54px 0;
}

.detail-poster {
    overflow: hidden;
    background: #1f2937;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 22px;
    box-shadow: var(--shadow);
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    color: #bfdbfe;
    font-size: 14px;
}

.breadcrumb a:hover {
    color: #ffffff;
}

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

.detail-line {
    margin: 0 0 16px;
    color: #d1d5db;
    font-size: 17px;
}

.detail-desc {
    max-width: 760px;
    color: #f3f4f6;
    font-size: 18px;
    line-height: 1.8;
}

.detail-tags {
    margin: 22px 0;
}

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

.video-shell {
    position: relative;
    overflow: hidden;
    margin-top: 18px;
    background: #000000;
    border-radius: 22px;
    box-shadow: var(--shadow);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.56), rgba(0, 0, 0, 0.2));
    cursor: pointer;
}

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

.play-circle {
    display: grid;
    width: 86px;
    height: 86px;
    place-items: center;
    padding-left: 6px;
    color: var(--primary);
    background: #ffffff;
    border-radius: 999px;
    font-size: 34px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.34);
}

.story-card {
    margin-top: 28px;
    padding: 28px;
}

.story-card h2 + p {
    margin-top: 12px;
}

.story-card p {
    color: #374151;
    font-size: 16px;
    line-height: 1.9;
}

.related-panel {
    position: sticky;
    top: 88px;
    padding: 22px;
}

.related-grid {
    display: grid;
    gap: 16px;
    margin-top: 18px;
}

.compact-card {
    display: grid;
    grid-template-columns: 92px 1fr;
}

.compact-card .poster {
    height: 124px;
}

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

.compact-card .desc,
.compact-card .tag-row {
    display: none;
}

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

.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 28px;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0;
}

.footer-inner p {
    max-width: 560px;
    color: #9ca3af;
    line-height: 1.7;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 14px 22px;
    font-weight: 700;
}

.hidden-by-filter {
    display: none !important;
}

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

    .menu-button {
        display: block;
    }

    .six-col,
    .four-col,
    .category-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .split-section,
    .detail-main {
        grid-template-columns: 1fr;
    }

    .rank-panel,
    .related-panel {
        position: static;
    }
}

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

    .hero-carousel {
        aspect-ratio: 4 / 3;
        min-height: 430px;
    }

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

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

    .category-overview-card,
    .detail-wrap {
        grid-template-columns: 1fr;
    }

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

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

    .filter-bar select {
        min-width: 0;
    }

    .footer-inner {
        display: grid;
    }
}

@media (max-width: 560px) {
    .header-inner {
        width: calc(100% - 22px);
    }

    .logo-text small {
        display: none;
    }

    .hero-section {
        padding-top: 42px;
    }

    .hero-carousel {
        min-height: 420px;
        border-radius: 18px;
    }

    .hero-content {
        left: 18px;
        right: 18px;
        bottom: 28px;
    }

    .hero-arrow {
        display: none;
    }

    .six-col,
    .four-col,
    .category-grid,
    .category-overview-grid {
        grid-template-columns: 1fr;
    }

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

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

    .list-row {
        grid-template-columns: auto 58px 1fr;
    }

    .row-button {
        grid-column: 2 / -1;
        width: 100%;
    }

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

    .detail-main {
        width: calc(100% - 22px);
    }

    .play-circle {
        width: 70px;
        height: 70px;
        font-size: 28px;
    }
}
