:root {
    --blue-900: #1e3a8a;
    --blue-800: #1e40af;
    --blue-700: #1d4ed8;
    --blue-600: #2563eb;
    --blue-500: #3b82f6;
    --blue-100: #dbeafe;
    --blue-50: #eff6ff;
    --gray-950: #030712;
    --gray-900: #111827;
    --gray-800: #1f2937;
    --gray-700: #374151;
    --gray-600: #4b5563;
    --gray-500: #6b7280;
    --gray-300: #d1d5db;
    --gray-200: #e5e7eb;
    --gray-100: #f3f4f6;
    --gray-50: #f9fafb;
    --white: #ffffff;
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.10), 0 2px 4px -2px rgb(0 0 0 / 0.10);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.12), 0 4px 6px -4px rgb(0 0 0 / 0.12);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.14), 0 8px 10px -6px rgb(0 0 0 / 0.14);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

img,
video {
    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 rgba(229, 231, 235, 0.9);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(16px);
}

.nav-shell {
    max-width: 1280px;
    height: 64px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 22px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    color: var(--blue-600);
    white-space: nowrap;
}

.brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    color: var(--white);
    background: linear-gradient(135deg, var(--blue-500), var(--blue-700));
    box-shadow: 0 8px 18px rgb(37 99 235 / 0.28);
    font-size: 14px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    flex: 1;
    min-width: 0;
}

.desktop-nav a {
    color: var(--gray-700);
    font-weight: 600;
    font-size: 15px;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.desktop-nav a:hover,
.desktop-nav a.active {
    color: var(--blue-600);
}

.site-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.site-search input,
.filter-panel input,
.filter-panel select {
    width: 210px;
    border: 1px solid var(--gray-300);
    border-radius: 999px;
    padding: 10px 14px;
    background: var(--white);
    outline: none;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.filter-panel select {
    border-radius: 14px;
}

.site-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--blue-500);
    box-shadow: 0 0 0 3px rgb(59 130 246 / 0.18);
}

.site-search button,
.primary-button,
.secondary-button {
    border: 0;
    border-radius: 999px;
    padding: 10px 18px;
    color: var(--white);
    background: var(--blue-600);
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.site-search button:hover,
.primary-button:hover {
    background: var(--blue-700);
    transform: translateY(-1px);
}

.secondary-button {
    color: var(--blue-700);
    background: var(--white);
}

.secondary-button:hover {
    background: var(--blue-50);
    transform: translateY(-1px);
}

.mobile-menu-button {
    display: none;
    margin-left: auto;
    border: 0;
    color: var(--gray-700);
    background: transparent;
    font-size: 28px;
    cursor: pointer;
}

.mobile-menu {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px 20px;
}

.mobile-menu nav {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.mobile-menu a {
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--blue-50);
    color: var(--blue-700);
    font-weight: 700;
}

.hero {
    position: relative;
    height: 500px;
    overflow: hidden;
    color: var(--white);
    background: linear-gradient(90deg, var(--blue-900), var(--blue-700));
}

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

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

.hero-image {
    position: absolute;
    inset: 0;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.30;
}

.hero-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgb(30 58 138 / 0.86), rgb(29 78 216 / 0.55), rgb(3 7 18 / 0.20));
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    height: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
}

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

.hero-tag {
    display: inline-flex;
    align-items: center;
    margin-bottom: 16px;
    padding: 5px 12px;
    border-radius: 999px;
    color: var(--white);
    background: var(--blue-500);
    font-size: 14px;
    font-weight: 700;
}

.hero h1,
.hero h2 {
    margin: 0 0 18px;
    font-size: clamp(36px, 6vw, 56px);
    line-height: 1.08;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero p {
    max-width: 650px;
    margin: 0 0 26px;
    color: var(--gray-200);
    font-size: 18px;
}

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

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 999px;
    color: var(--white);
    background: rgb(255 255 255 / 0.20);
    backdrop-filter: blur(12px);
    cursor: pointer;
    transform: translateY(-50%);
    transition: background 0.2s ease;
}

.hero-control:hover {
    background: rgb(255 255 255 / 0.32);
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgb(255 255 255 / 0.45);
    cursor: pointer;
}

.hero-dot.active {
    width: 28px;
    background: var(--white);
}

.page-shell {
    max-width: 1280px;
    margin: 0 auto;
    padding: 48px 24px;
}

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

.section-heading h1,
.section-heading h2 {
    margin: 0;
    color: var(--gray-900);
    font-size: clamp(28px, 4vw, 38px);
    line-height: 1.2;
    font-weight: 900;
}

.section-heading p,
.lead-text {
    max-width: 760px;
    color: var(--gray-600);
    font-size: 17px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 22px;
    font-size: 26px;
    font-weight: 900;
}

.section-title::before {
    content: "";
    width: 5px;
    height: 28px;
    border-radius: 999px;
    background: var(--blue-600);
}

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

.movie-card {
    display: block;
    overflow: hidden;
    border-radius: 16px;
    background: var(--white);
    box-shadow: var(--shadow-md);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster-frame {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--gray-200);
}

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

.movie-card:hover .poster-frame img {
    transform: scale(1.08);
}

.poster-frame::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgb(0 0 0 / 0);
    transition: background 0.25s ease;
}

.movie-card:hover .poster-frame::after {
    background: rgb(0 0 0 / 0.30);
}

.movie-duration,
.play-badge {
    position: absolute;
    z-index: 2;
}

.movie-duration {
    right: 10px;
    bottom: 10px;
    padding: 3px 8px;
    border-radius: 8px;
    color: var(--white);
    background: rgb(0 0 0 / 0.72);
    font-size: 12px;
}

.play-badge {
    top: 50%;
    left: 50%;
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: var(--blue-600);
    background: rgb(255 255 255 / 0.92);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.movie-body {
    display: block;
    padding: 16px;
}

.movie-body strong {
    display: -webkit-box;
    min-height: 48px;
    overflow: hidden;
    color: var(--gray-900);
    font-size: 17px;
    line-height: 1.45;
    font-weight: 800;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    transition: color 0.2s ease;
}

.movie-card:hover .movie-body strong {
    color: var(--blue-600);
}

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

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: var(--gray-500);
    font-size: 12px;
}

.movie-meta span:first-child {
    padding: 3px 8px;
    border-radius: 8px;
    color: var(--blue-700);
    background: var(--blue-100);
    font-weight: 700;
}

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

.category-card {
    min-height: 180px;
    padding: 28px;
    border-radius: 22px;
    color: var(--white);
    background: linear-gradient(135deg, var(--blue-600), var(--blue-800));
    box-shadow: var(--shadow-lg);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card:nth-child(2n) {
    background: linear-gradient(135deg, #0f766e, var(--blue-700));
}

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

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

.category-card strong {
    display: block;
    margin-bottom: 12px;
    font-size: 24px;
    font-weight: 900;
}

.category-card span {
    display: block;
    color: rgb(255 255 255 / 0.86);
}

.rank-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 28px;
    align-items: start;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 46px 150px 1fr;
    gap: 16px;
    align-items: center;
    padding: 12px;
    border-radius: 16px;
    background: var(--white);
    box-shadow: var(--shadow-md);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.rank-item img {
    width: 150px;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    object-fit: cover;
    background: var(--gray-200);
}

.rank-item strong,
.rank-item em,
.rank-item small {
    display: block;
}

.rank-item strong {
    margin-bottom: 4px;
    font-size: 18px;
    font-style: normal;
    font-weight: 800;
}

.rank-item em {
    display: -webkit-box;
    overflow: hidden;
    color: var(--gray-600);
    font-size: 14px;
    font-style: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.rank-item small {
    margin-top: 5px;
    color: var(--gray-500);
}

.aside-panel,
.content-panel,
.filter-panel,
.player-card {
    border-radius: 18px;
    background: var(--white);
    box-shadow: var(--shadow-lg);
}

.aside-panel,
.content-panel,
.filter-panel {
    padding: 24px;
}

.filter-panel {
    margin-bottom: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.filter-panel input {
    width: min(420px, 100%);
    border-radius: 14px;
}

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

.breadcrumbs {
    margin-bottom: 18px;
    color: var(--gray-600);
    font-size: 14px;
}

.breadcrumbs a {
    color: var(--blue-600);
    font-weight: 700;
}

.player-card {
    overflow: hidden;
    margin-bottom: 24px;
}

.player-wrap {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #000000;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: linear-gradient(180deg, rgb(0 0 0 / 0.10), rgb(0 0 0 / 0.42));
    cursor: pointer;
}

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

.player-button {
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    border: 0;
    border-radius: 999px;
    color: var(--blue-600);
    background: rgb(255 255 255 / 0.94);
    box-shadow: var(--shadow-xl);
    font-size: 26px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.player-button:hover {
    transform: scale(1.05);
}

.player-error {
    padding: 14px 18px;
    color: var(--white);
    background: #991b1b;
}

.player-error:empty {
    display: none;
}

.content-panel {
    margin-bottom: 24px;
}

.content-panel h1 {
    margin: 0 0 16px;
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.18;
    font-weight: 900;
}

.info-pills,
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0;
}

.info-pills span,
.tag-list span {
    padding: 6px 10px;
    border-radius: 999px;
    color: var(--blue-700);
    background: var(--blue-50);
    font-size: 13px;
    font-weight: 700;
}

.content-panel h2,
.aside-panel h2,
.aside-panel h3 {
    margin: 0 0 14px;
    font-size: 22px;
    font-weight: 900;
}

.content-panel p {
    margin: 0 0 18px;
    color: var(--gray-700);
    font-size: 16px;
}

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

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

.related-card img {
    width: 120px;
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    object-fit: cover;
    background: var(--gray-200);
}

.related-card strong {
    display: -webkit-box;
    overflow: hidden;
    color: var(--gray-900);
    font-size: 15px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.related-card small {
    display: block;
    margin-top: 4px;
    color: var(--gray-500);
}

.site-footer {
    color: var(--gray-300);
    background: var(--gray-900);
}

.footer-grid {
    max-width: 1280px;
    margin: 0 auto;
    padding: 48px 24px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 30px;
}

.site-footer p {
    margin: 14px 0 0;
    color: var(--gray-300);
}

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

.site-footer a {
    display: block;
    margin: 8px 0;
    color: var(--gray-300);
    font-size: 14px;
    transition: color 0.2s ease;
}

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

.footer-bottom {
    max-width: 1280px;
    margin: 0 auto;
    padding: 18px 24px 28px;
    color: var(--gray-500);
    border-top: 1px solid rgb(255 255 255 / 0.10);
    font-size: 14px;
}

.back-to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 40;
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 999px;
    color: var(--white);
    background: var(--blue-600);
    box-shadow: var(--shadow-lg);
    cursor: pointer;
}

.back-to-top.show {
    display: block;
}

.search-results-note {
    margin: 0 0 22px;
    color: var(--gray-600);
}

.empty-state {
    padding: 58px 20px;
    text-align: center;
    color: var(--gray-600);
    background: var(--white);
    border-radius: 18px;
    box-shadow: var(--shadow-md);
}

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

    .mobile-menu-button {
        display: block;
    }

    .nav-shell > .site-search {
        display: none;
    }

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

    .category-grid,
    .rank-layout,
    .detail-layout,
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .nav-shell {
        padding: 0 16px;
    }

    .hero {
        height: 540px;
    }

    .hero-content,
    .page-shell {
        padding-left: 16px;
        padding-right: 16px;
    }

    .hero-control {
        display: none;
    }

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

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

    .movie-body {
        padding: 13px;
    }

    .movie-body strong {
        font-size: 15px;
    }

    .rank-item {
        grid-template-columns: 36px 105px 1fr;
        gap: 10px;
    }

    .rank-item img {
        width: 105px;
    }

    .related-card {
        grid-template-columns: 96px 1fr;
    }

    .related-card img {
        width: 96px;
    }
}

@media (max-width: 480px) {
    .movie-grid {
        grid-template-columns: 1fr;
    }

    .site-search {
        width: 100%;
    }

    .site-search input {
        width: 100%;
    }
}
