:root {
    --primary-50: #e6f2f8;
    --primary-100: #cce5f1;
    --primary-400: #3397c7;
    --primary-600: #006494;
    --primary-700: #004b6f;
    --primary-800: #00324a;
    --secondary-600: #147494;
    --accent-600: #c49c0c;
    --neutral-50: #f8f9fa;
    --neutral-100: #f1f3f5;
    --neutral-200: #e9ecef;
    --neutral-300: #dee2e6;
    --neutral-500: #adb5bd;
    --neutral-600: #6c757d;
    --neutral-700: #495057;
    --neutral-800: #343a40;
    --neutral-900: #212529;
    --shadow-soft: 0 2px 15px 0 rgba(0, 0, 0, 0.08);
    --shadow-medium: 0 4px 20px 0 rgba(0, 0, 0, 0.12);
    --shadow-strong: 0 8px 30px 0 rgba(0, 0, 0, 0.16);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--neutral-900);
    background: var(--neutral-50);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.5;
}

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.94);
    border-bottom: 1px solid var(--neutral-200);
    backdrop-filter: blur(16px);
}

.nav-wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: max-content;
}

.brand-icon {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #fff;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-700), var(--secondary-600));
    box-shadow: var(--shadow-soft);
}

.brand-copy {
    display: flex;
    flex-direction: column;
}

.brand-copy strong {
    font-size: 21px;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.brand-copy small {
    color: var(--neutral-600);
    font-size: 12px;
    margin-top: 2px;
}

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

.nav-link {
    color: var(--neutral-700);
    font-weight: 600;
    transition: color 0.2s ease;
}

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

.top-search,
.mobile-search {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-search input,
.mobile-search input,
.filter-panel input,
.filter-panel select {
    border: 1px solid var(--neutral-300);
    border-radius: 12px;
    padding: 10px 12px;
    background: #fff;
    color: var(--neutral-900);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.top-search input:focus,
.mobile-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
    border-color: transparent;
    box-shadow: 0 0 0 3px rgba(0, 125, 185, 0.24);
}

.top-search button,
.mobile-search button,
.nav-toggle,
.primary-btn,
.ghost-btn {
    border: 0;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
}

.top-search button,
.mobile-search button,
.primary-btn {
    color: #fff;
    background: var(--primary-600);
    padding: 10px 16px;
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.top-search button:hover,
.mobile-search button:hover,
.primary-btn:hover {
    background: var(--primary-700);
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium);
}

.nav-toggle {
    display: none;
    padding: 10px 12px;
    color: var(--neutral-700);
    background: var(--neutral-100);
}

.mobile-panel {
    border-top: 1px solid var(--neutral-200);
    padding: 14px 24px 20px;
}

.mobile-panel nav,
.mobile-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 14px;
}

.mobile-panel a {
    color: var(--neutral-700);
    font-weight: 600;
}

.hero {
    color: #fff;
    background: linear-gradient(135deg, var(--primary-700), var(--primary-600), var(--secondary-600));
    overflow: hidden;
}

.hero-shell {
    position: relative;
    min-height: 620px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.65s ease, visibility 0.65s ease;
}

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

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 75% 20%, rgba(255, 255, 255, 0.18), transparent 28%),
        linear-gradient(90deg, rgba(0, 50, 74, 0.94) 0%, rgba(0, 75, 111, 0.84) 45%, rgba(20, 116, 148, 0.64) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    min-height: 620px;
    margin: 0 auto;
    padding: 76px 24px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
    align-items: center;
    gap: 46px;
}

.hero-copy {
    max-width: 760px;
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    width: max-content;
    border-radius: 999px;
    padding: 6px 12px;
    margin-bottom: 16px;
    color: #fff;
    background: rgba(196, 156, 12, 0.94);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.hero h1,
.hero h2,
.page-hero h1,
.movie-hero-detail h1 {
    margin: 0 0 18px;
    font-size: clamp(40px, 6vw, 72px);
    line-height: 1.03;
    letter-spacing: -0.05em;
}

.hero h2 {
    font-size: clamp(28px, 4vw, 48px);
}

.hero p,
.page-hero p,
.movie-hero-detail p {
    max-width: 780px;
    margin: 0 0 24px;
    color: var(--primary-50);
    font-size: clamp(17px, 2vw, 21px);
    line-height: 1.8;
}

.hero-tags .tag {
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.24);
}

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

.ghost-btn {
    padding: 10px 16px;
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.28);
    transition: background 0.2s ease, transform 0.2s ease;
}

.ghost-btn:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: translateY(-1px);
}

.ghost-btn.light {
    color: var(--primary-700);
    background: #fff;
}

.hero-poster,
.detail-cover {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: var(--shadow-strong);
}

.hero-poster img,
.detail-cover img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.hero-poster:hover img,
.detail-cover:hover img {
    transform: scale(1.04);
}

.hero-poster span {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 16px;
    border-radius: 14px;
    padding: 10px 12px;
    color: #fff;
    background: rgba(0, 0, 0, 0.68);
    text-align: center;
    font-weight: 700;
}

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

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

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

.hero-category-bar {
    max-width: 1280px;
    margin: -36px auto 0;
    position: relative;
    z-index: 8;
    padding: 0 24px 32px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hero-category-bar a,
.quick-links a {
    border-radius: 14px;
    padding: 12px 16px;
    color: var(--primary-700);
    background: #fff;
    box-shadow: var(--shadow-soft);
    font-weight: 700;
}

.section-wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 54px 24px;
}

.section-grid.two-col,
.split-content,
.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 34px;
    align-items: start;
}

.section-wrap h2,
.detail-section h2,
.info-card h2 {
    margin: 0 0 14px;
    color: var(--neutral-900);
    font-size: clamp(26px, 3vw, 40px);
    line-height: 1.15;
    letter-spacing: -0.035em;
}

.section-lead,
.section-head p,
.detail-section p,
.info-card p {
    color: var(--neutral-700);
    font-size: 17px;
    line-height: 1.85;
}

.section-kicker {
    color: var(--primary-700);
    background: var(--primary-100);
}

.quick-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

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

.section-head.compact {
    align-items: center;
}

.plain-link {
    color: var(--primary-600);
    font-weight: 800;
}

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

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

.category-tile {
    min-height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-radius: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #fff, var(--primary-50));
    border: 1px solid rgba(0, 100, 148, 0.10);
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

.category-tile span {
    color: var(--primary-700);
    font-size: 20px;
    font-weight: 900;
}

.category-tile p {
    margin: 16px 0 0;
    color: var(--neutral-600);
    font-size: 14px;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow-soft);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.movie-thumb {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: var(--neutral-200);
}

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

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

.card-category,
.card-score,
.card-duration,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 9px;
    padding: 5px 8px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.card-category {
    top: 10px;
    left: 10px;
    background: var(--primary-600);
}

.card-score {
    top: 10px;
    right: 10px;
    background: var(--accent-600);
}

.card-duration {
    right: 10px;
    bottom: 10px;
    background: rgba(0, 0, 0, 0.70);
}

.rank-badge {
    left: 10px;
    bottom: 10px;
    background: var(--primary-800);
}

.movie-info {
    padding: 16px;
}

.movie-info h3 {
    margin: 0 0 8px;
    font-size: 17px;
    line-height: 1.35;
}

.movie-info h3 a {
    transition: color 0.2s ease;
}

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

.movie-info p {
    display: -webkit-box;
    min-height: 44px;
    margin: 0 0 12px;
    overflow: hidden;
    color: var(--neutral-600);
    font-size: 14px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.movie-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: var(--neutral-500);
    font-size: 13px;
}

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

.tag {
    border: 1px solid var(--neutral-200);
    border-radius: 999px;
    padding: 5px 9px;
    color: var(--primary-700);
    background: var(--primary-50);
    font-size: 12px;
    font-weight: 700;
}

.ranking-panel,
.info-card,
.detail-main,
.category-preview {
    border-radius: 22px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.ranking-panel,
.info-card {
    padding: 22px;
}

.panel-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    color: var(--neutral-900);
    font-size: 21px;
    font-weight: 900;
}

.panel-title a {
    color: var(--primary-600);
    font-size: 14px;
}

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

.compact-row {
    display: grid;
    grid-template-columns: auto 86px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
}

.compact-row img {
    width: 86px;
    height: 56px;
    border-radius: 10px;
    object-fit: cover;
}

.row-rank {
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #fff;
    background: var(--primary-600);
    font-size: 12px;
    font-weight: 900;
}

.compact-main {
    min-width: 0;
}

.compact-main strong,
.compact-main em {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.compact-main strong {
    font-size: 14px;
}

.compact-main em {
    margin-top: 3px;
    color: var(--neutral-500);
    font-size: 12px;
    font-style: normal;
}

.compact-score {
    color: var(--accent-600);
    font-weight: 900;
}

.page-hero,
.movie-hero-detail {
    color: #fff;
    background:
        radial-gradient(circle at 85% 15%, rgba(255, 255, 255, 0.18), transparent 28%),
        linear-gradient(135deg, var(--primary-700), var(--primary-600), var(--secondary-600));
}

.page-hero > div,
.movie-hero-detail {
    max-width: 1280px;
    margin: 0 auto;
    padding: 72px 24px;
}

.filter-panel {
    margin-bottom: 24px;
    padding: 16px;
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 180px 200px;
    gap: 14px;
    border: 1px solid var(--neutral-200);
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.filter-panel label {
    display: block;
    margin: 0 0 6px;
    color: var(--neutral-600);
    font-size: 13px;
    font-weight: 800;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
}

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

.ranking-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 22px;
    border-radius: 22px;
    padding: 22px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 28px;
    color: var(--primary-50);
    font-weight: 700;
}

.detail-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 40px;
    align-items: center;
}

.detail-cover img {
    aspect-ratio: 3 / 4;
}

.detail-main {
    padding: 24px;
}

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

.player-shell video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
    cursor: pointer;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    color: #fff;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.72));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-circle {
    width: 76px;
    height: 76px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--primary-600);
    box-shadow: var(--shadow-strong);
    font-size: 30px;
    line-height: 1;
}

.detail-section {
    padding: 26px 0 0;
}

.detail-section p {
    margin: 0;
    white-space: pre-line;
}

.info-card + .info-card {
    margin-top: 22px;
}

.info-card ul {
    margin: 0 0 20px;
    padding: 0;
    list-style: none;
}

.info-card li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--neutral-200);
}

.info-card li span {
    color: var(--neutral-500);
}

.info-card li strong {
    color: var(--neutral-900);
    text-align: right;
}

.full-btn {
    display: block;
    text-align: center;
}

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

.pager-links a {
    border: 1px solid var(--neutral-200);
    border-radius: 14px;
    padding: 14px;
    color: var(--primary-700);
    background: var(--primary-50);
    font-weight: 800;
}

.site-footer {
    margin-top: 40px;
    color: #fff;
    background: var(--neutral-900);
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 42px 24px;
    display: grid;
    grid-template-columns: 1.4fr 0.6fr 1fr;
    gap: 28px;
}

.footer-brand {
    display: inline-block;
    margin-bottom: 10px;
    font-size: 24px;
    font-weight: 900;
}

.footer-inner p {
    margin: 0;
    color: var(--neutral-300);
}

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

.footer-links a,
.footer-categories a {
    color: var(--neutral-300);
    font-weight: 700;
}

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

    .nav-toggle {
        display: inline-flex;
        margin-left: auto;
    }

    .hero-content,
    .section-grid.two-col,
    .split-content,
    .detail-layout,
    .detail-hero-grid,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .hero-poster,
    .detail-cover {
        max-width: 320px;
    }

    .category-grid,
    .category-grid-wide,
    .movie-grid,
    .dense-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

@media (max-width: 720px) {
    .nav-wrap {
        padding: 12px 16px;
    }

    .brand-copy small {
        display: none;
    }

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

    .hero-content,
    .section-wrap,
    .page-hero > div,
    .movie-hero-detail {
        padding-left: 16px;
        padding-right: 16px;
    }

    .hero-content {
        padding-top: 52px;
        padding-bottom: 74px;
    }

    .hero-poster {
        display: none;
    }

    .hero-category-bar {
        margin-top: 0;
        padding-left: 16px;
        padding-right: 16px;
    }

    .quick-links,
    .filter-panel,
    .pager-links {
        grid-template-columns: 1fr;
    }

    .section-head {
        display: block;
    }

    .category-grid,
    .category-grid-wide,
    .movie-grid,
    .dense-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .movie-info {
        padding: 13px;
    }

    .compact-row {
        grid-template-columns: auto 74px minmax(0, 1fr);
    }

    .compact-score {
        display: none;
    }

    .compact-row img {
        width: 74px;
        height: 50px;
    }
}

@media (max-width: 460px) {
    .category-grid,
    .category-grid-wide,
    .movie-grid,
    .dense-grid {
        grid-template-columns: 1fr;
    }

    .hero h1,
    .page-hero h1,
    .movie-hero-detail h1 {
        font-size: 36px;
    }

    .hero h2 {
        font-size: 28px;
    }
}
