:root {
    --blue-950: #172554;
    --blue-900: #1e3a8a;
    --blue-800: #1e40af;
    --blue-700: #1d4ed8;
    --slate-950: #020617;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748b;
    --slate-300: #cbd5e1;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;
    --slate-50: #f8fafc;
    --white: #ffffff;
    --amber-500: #f59e0b;
    --green-700: #15803d;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
    --shadow-lg: 0 20px 30px -18px rgba(15, 23, 42, 0.35);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.container-custom {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--slate-200);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(18px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 4rem;
    gap: 1rem;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--slate-900);
    white-space: nowrap;
}

.logo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    background: var(--blue-900);
    color: var(--white);
    box-shadow: 0 12px 24px -16px var(--blue-900);
}

.desktop-nav {
    display: none;
    align-items: center;
    gap: 2rem;
}

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

.nav-link:hover,
.nav-link.active,
.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: var(--blue-900);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-search {
    display: none;
    position: relative;
}

.header-search input,
.mobile-search input,
.filter-input,
.sort-select {
    border: 1px solid var(--slate-300);
    border-radius: 0.75rem;
    background: var(--white);
    color: var(--slate-900);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
    width: 17rem;
    padding: 0.6rem 3rem 0.6rem 1rem;
}

.header-search button {
    position: absolute;
    top: 50%;
    right: 0.375rem;
    transform: translateY(-50%);
    width: 2.25rem;
    height: 2.25rem;
    border: 0;
    border-radius: 0.625rem;
    background: var(--blue-900);
    color: var(--white);
}

.header-search input:focus,
.mobile-search input:focus,
.filter-input:focus,
.sort-select:focus {
    border-color: var(--blue-700);
    box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.16);
}

.menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border: 0;
    border-radius: 0.75rem;
    background: var(--slate-100);
    color: var(--slate-800);
}

.mobile-panel {
    display: none;
    border-top: 1px solid var(--slate-200);
    background: var(--white);
}

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

.mobile-nav {
    display: grid;
    gap: 0.5rem;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.mobile-nav-link {
    display: block;
    border-radius: 0.75rem;
    padding: 0.65rem 0.8rem;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    background: var(--slate-100);
}

.mobile-search {
    display: flex;
    gap: 0.5rem;
    padding-top: 0.5rem;
}

.mobile-search input {
    min-width: 0;
    flex: 1;
    padding: 0.7rem 0.8rem;
}

.mobile-search button,
.btn-primary,
.btn-secondary,
.hero-search button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 0.75rem;
    font-weight: 700;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.mobile-search button,
.btn-primary,
.hero-search button {
    background: var(--blue-900);
    color: var(--white);
}

.btn-primary,
.btn-secondary {
    padding: 0.75rem 1.1rem;
}

.btn-primary:hover,
.hero-search button:hover,
.mobile-search button:hover {
    background: var(--blue-800);
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.16);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.24);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.26);
}

.hero-section {
    position: relative;
    overflow: hidden;
    background: linear-gradient(120deg, var(--blue-950), var(--blue-800));
    color: var(--white);
}

.hero-section::before {
    content: "";
    position: absolute;
    inset: -30% 35% auto auto;
    width: 38rem;
    height: 38rem;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.35);
    filter: blur(68px);
}

.hero-section::after {
    content: "";
    position: absolute;
    inset: auto auto -20% -12%;
    width: 30rem;
    height: 30rem;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.22);
    filter: blur(70px);
}

.hero-carousel {
    position: relative;
    z-index: 1;
    min-height: 560px;
}

.hero-slide {
    display: none;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
    align-items: center;
    gap: 3rem;
    min-height: 560px;
    padding: 4rem 0;
}

.hero-slide.is-active {
    display: grid;
}

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

.hero-kicker {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    margin-bottom: 1rem;
    padding: 0.3rem 0.8rem;
    background: rgba(255, 255, 255, 0.14);
    color: #dbeafe;
    font-size: 0.9rem;
    font-weight: 700;
}

.hero-copy h1,
.hero-copy h2 {
    margin: 0 0 1rem;
    font-size: clamp(2.4rem, 6vw, 4.6rem);
    line-height: 1.05;
    letter-spacing: -0.055em;
}

.hero-copy p {
    margin: 0 0 1.25rem;
    color: #dbeafe;
    font-size: 1.1rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.hero-search {
    display: flex;
    overflow: hidden;
    max-width: 580px;
    margin-top: 1.5rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 25px 50px -30px rgba(0, 0, 0, 0.55);
}

.hero-search input {
    min-width: 0;
    flex: 1;
    border: 0;
    padding: 0.95rem 1rem;
    outline: none;
}

.hero-search button {
    margin: 0.35rem;
    padding: 0 1.2rem;
}

.hero-poster-wrap {
    position: relative;
}

.hero-poster-card {
    position: relative;
    overflow: hidden;
    border-radius: 1.5rem;
    aspect-ratio: 21 / 13;
    background: var(--slate-900);
    box-shadow: var(--shadow-lg);
}

.hero-poster-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.03);
}

.hero-poster-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.86));
}

.hero-poster-info {
    position: absolute;
    right: 1.25rem;
    bottom: 1.25rem;
    left: 1.25rem;
    z-index: 1;
}

.hero-poster-info h3 {
    margin: 0 0 0.4rem;
    font-size: 1.5rem;
}

.hero-poster-info p {
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
}

.hero-dots {
    position: absolute;
    z-index: 2;
    right: 1rem;
    bottom: 1.2rem;
    display: flex;
    gap: 0.5rem;
}

.hero-dot {
    width: 0.65rem;
    height: 0.65rem;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.42);
}

.hero-dot.is-active {
    width: 2rem;
    background: var(--white);
}

.page-hero,
.category-hero {
    background: linear-gradient(120deg, var(--blue-950), var(--blue-700));
    color: var(--white);
    padding: 4rem 0;
}

.page-hero h1,
.category-hero h1 {
    margin: 0 0 0.75rem;
    font-size: clamp(2rem, 4vw, 3.25rem);
    line-height: 1.1;
}

.page-hero p,
.category-hero p {
    max-width: 760px;
    margin: 0;
    color: #dbeafe;
    font-size: 1.1rem;
}

.main-section {
    padding: 3rem 0;
}

.section-block {
    margin-bottom: 4rem;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.section-title {
    margin: 0;
    color: var(--slate-900);
    font-size: clamp(1.5rem, 3vw, 2rem);
    line-height: 1.15;
}

.section-heading a {
    color: var(--blue-900);
    font-weight: 700;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 1.25rem;
}

.video-card {
    overflow: hidden;
    border: 1px solid var(--slate-200);
    border-radius: 1rem;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.video-card:hover {
    transform: translateY(-4px);
    border-color: rgba(30, 58, 138, 0.22);
    box-shadow: var(--shadow-lg);
}

.video-card-link {
    display: block;
    height: 100%;
}

.video-card-media {
    position: relative;
    overflow: hidden;
}

.video-card-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: var(--slate-200);
    transition: transform 0.35s ease;
}

.video-card:hover .video-card-image {
    transform: scale(1.055);
}

.play-hover {
    position: absolute;
    top: 50%;
    left: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--blue-900);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.92);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.badge,
.badge-rating,
.badge-year,
.badge-region {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.16rem 0.62rem;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1rem;
}

.badge-rating {
    position: absolute;
    top: 0.65rem;
    right: 0.65rem;
    background: #fef3c7;
    color: #92400e;
}

.badge-year {
    background: #dbeafe;
    color: #1e40af;
}

.badge-region {
    background: #dcfce7;
    color: #166534;
}

.video-card-body {
    padding: 1rem;
}

.video-card h3 {
    display: -webkit-box;
    min-height: 3rem;
    margin: 0 0 0.65rem;
    overflow: hidden;
    color: var(--slate-900);
    font-size: 1rem;
    line-height: 1.5;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.meta-row,
.card-bottom {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.card-bottom {
    justify-content: space-between;
    margin-top: 0.75rem;
    color: var(--slate-500);
    font-size: 0.9rem;
}

.rating {
    color: #b45309;
    font-weight: 800;
}

.large-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 1.25rem;
}

.large-card {
    position: relative;
    overflow: hidden;
    border-radius: 1.2rem;
    min-height: 260px;
    background: var(--slate-900);
    box-shadow: var(--shadow-lg);
}

.large-card img {
    width: 100%;
    height: 100%;
    min-height: 260px;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.large-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.15));
}

.large-card-content {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1;
    padding: 1.5rem;
    color: var(--white);
}

.large-card-content h3 {
    margin: 0 0 0.5rem;
    font-size: 1.45rem;
}

.large-card-content p {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.84);
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

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

.category-card {
    display: block;
    padding: 1.35rem;
    border: 1px solid var(--slate-200);
    border-radius: 1rem;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-card h2,
.category-card h3 {
    margin: 0 0 0.5rem;
    color: var(--slate-900);
}

.category-card p {
    margin: 0;
    color: var(--slate-600);
}

.filter-bar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin: 0 0 1.5rem;
    padding: 1rem;
    border: 1px solid var(--slate-200);
    border-radius: 1rem;
    background: var(--white);
}

.filter-input,
.sort-select {
    width: 100%;
    padding: 0.78rem 0.9rem;
}

.movie-shell {
    padding: 1.5rem 0 3rem;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
    color: var(--slate-600);
    font-size: 0.94rem;
}

.breadcrumb a {
    color: var(--blue-900);
    font-weight: 700;
}

.detail-hero {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1.25rem;
    border: 1px solid var(--slate-200);
    border-radius: 1.25rem;
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.player-frame {
    position: relative;
    overflow: hidden;
    border-radius: 1.1rem;
    aspect-ratio: 16 / 9;
    background: var(--slate-950);
}

.player-frame video {
    width: 100%;
    height: 100%;
    background: var(--slate-950);
    object-fit: cover;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.7));
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 5.25rem;
    height: 5.25rem;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--blue-900);
    font-size: 2rem;
    box-shadow: 0 25px 45px -25px rgba(0, 0, 0, 0.65);
}

.detail-info h1 {
    margin: 0 0 1rem;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.15;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.detail-summary {
    color: var(--slate-600);
    font-size: 1.05rem;
}

.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1.2rem;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    border-radius: 999px;
    background: var(--slate-100);
    padding: 0.28rem 0.8rem;
    color: var(--slate-700);
    font-size: 0.88rem;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.content-card {
    padding: 1.35rem;
    border: 1px solid var(--slate-200);
    border-radius: 1rem;
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.content-card h2 {
    margin: 0 0 0.85rem;
    font-size: 1.45rem;
}

.content-card p {
    margin: 0;
    color: var(--slate-700);
}

.aside-list {
    display: grid;
    gap: 0.75rem;
}

.aside-item {
    display: grid;
    grid-template-columns: 5.5rem 1fr;
    gap: 0.8rem;
    align-items: center;
    padding: 0.6rem;
    border: 1px solid var(--slate-200);
    border-radius: 0.85rem;
    background: var(--white);
}

.aside-item img {
    width: 5.5rem;
    aspect-ratio: 16 / 10;
    border-radius: 0.6rem;
    object-fit: cover;
}

.aside-item h3 {
    margin: 0 0 0.25rem;
    font-size: 0.98rem;
}

.aside-item span {
    color: var(--slate-500);
    font-size: 0.84rem;
}

.ranking-list {
    display: grid;
    gap: 0.85rem;
}

.rank-row {
    display: grid;
    grid-template-columns: 3rem 7rem 1fr;
    gap: 1rem;
    align-items: center;
    padding: 0.75rem;
    border: 1px solid var(--slate-200);
    border-radius: 1rem;
    background: var(--white);
}

.rank-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.8rem;
    background: var(--blue-900);
    color: var(--white);
    font-weight: 800;
}

.rank-row img {
    width: 7rem;
    aspect-ratio: 16 / 9;
    border-radius: 0.75rem;
    object-fit: cover;
}

.rank-row h2,
.rank-row h3 {
    margin: 0 0 0.3rem;
    font-size: 1.12rem;
}

.rank-row p {
    margin: 0;
    color: var(--slate-600);
}

.search-empty {
    padding: 3rem 1rem;
    border: 1px solid var(--slate-200);
    border-radius: 1rem;
    background: var(--white);
    text-align: center;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.site-footer h2,
.site-footer h3 {
    margin: 0 0 0.9rem;
    color: var(--white);
}

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

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

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

.footer-bottom {
    border-top: 1px solid var(--slate-800);
    padding: 1rem;
    color: var(--slate-500);
    text-align: center;
}

.footer-bottom p {
    margin: 0;
}

@media (min-width: 640px) {
    .container-custom {
        padding: 0 1.5rem;
    }

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

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

@media (min-width: 768px) {
    .desktop-nav,
    .header-search {
        display: flex;
    }

    .menu-toggle {
        display: none;
    }

    .filter-bar {
        grid-template-columns: 1fr 220px;
    }

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

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

@media (min-width: 1024px) {
    .container-custom {
        padding: 0 2rem;
    }

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

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

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

    .detail-hero {
        grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.75fr);
    }

    .content-grid {
        grid-template-columns: minmax(0, 1fr) 340px;
    }

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

@media (min-width: 1280px) {
    .video-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .hero-slide {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 3rem 0 4rem;
    }

    .hero-poster-wrap {
        order: -1;
    }

    .hero-carousel,
    .hero-slide {
        min-height: auto;
    }

    .rank-row {
        grid-template-columns: 2.5rem 5.5rem 1fr;
        gap: 0.75rem;
    }

    .rank-row img {
        width: 5.5rem;
    }
}

@media (max-width: 560px) {
    .hero-search {
        flex-direction: column;
        padding: 0.35rem;
    }

    .hero-search button {
        min-height: 2.75rem;
    }

    .hero-actions,
    .detail-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
    }

    .rank-row {
        grid-template-columns: 2.5rem 1fr;
    }

    .rank-row img {
        display: none;
    }
}
