:root {
    --blue: #2563eb;
    --blue-dark: #1d4ed8;
    --cyan: #06b6d4;
    --green: #16a34a;
    --orange: #f97316;
    --red: #ef4444;
    --purple: #9333ea;
    --pink: #ec4899;
    --slate: #334155;
    --yellow: #eab308;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-500: #64748b;
    --gray-700: #334155;
    --gray-900: #0f172a;
    --white: #ffffff;
    --shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
    --shadow-soft: 0 10px 22px rgba(15, 23, 42, 0.08);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    backdrop-filter: blur(18px);
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.03em;
    background: linear-gradient(90deg, var(--blue), var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

.brand-mark,
.footer-brand span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    color: var(--white);
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 10px 18px rgba(37, 99, 235, 0.26);
    font-size: 15px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 28px;
    font-weight: 700;
    color: var(--gray-700);
}

.desktop-nav a,
.mobile-panel a {
    transition: color 0.2s ease;
}

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

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

.nav-search input,
.mobile-search input,
.filter-input,
.filter-select {
    border: 1px solid var(--gray-300);
    background: var(--white);
    color: var(--gray-900);
    border-radius: 999px;
    padding: 10px 16px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nav-search input {
    width: 230px;
}

.nav-search input:focus,
.mobile-search input:focus,
.filter-input:focus,
.filter-select:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.nav-search button,
.mobile-search button,
.primary-btn,
.secondary-btn,
.filter-button {
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.nav-search button,
.mobile-search button,
.primary-btn,
.filter-button {
    color: var(--white);
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 12px 22px rgba(37, 99, 235, 0.2);
}

.nav-search button,
.mobile-search button {
    padding: 10px 16px;
}

.primary-btn,
.secondary-btn,
.filter-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
}

.secondary-btn {
    color: var(--white);
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.34);
    backdrop-filter: blur(12px);
}

.nav-search button:hover,
.mobile-search button:hover,
.primary-btn:hover,
.filter-button:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, var(--blue-dark), #0891b2);
}

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

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: var(--gray-100);
    color: var(--gray-900);
    cursor: pointer;
    font-size: 22px;
}

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

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

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

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

.hero {
    position: relative;
    height: 600px;
    overflow: hidden;
    background: #020617;
}

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08) contrast(1.06);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.88), rgba(15, 23, 42, 0.58), rgba(15, 23, 42, 0.08));
}

.hero-inner {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
}

.hero-copy {
    width: min(680px, 100%);
    color: var(--white);
}

.eyebrow,
.hero-badge {
    display: inline-flex;
    align-items: center;
    width: max-content;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.hero-badge {
    margin-bottom: 18px;
    padding: 8px 16px;
    color: var(--white);
    background: linear-gradient(135deg, var(--blue), var(--cyan));
}

.eyebrow {
    margin-bottom: 8px;
    color: var(--blue);
    background: rgba(37, 99, 235, 0.1);
    padding: 6px 12px;
}

.hero h1 {
    margin: 0 0 18px;
    font-size: clamp(36px, 6vw, 64px);
    line-height: 1.06;
    letter-spacing: -0.05em;
}

.hero p {
    margin: 0 0 28px;
    color: #e5e7eb;
    font-size: clamp(18px, 2.2vw, 24px);
}

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

.hero-control {
    position: absolute;
    top: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    color: var(--white);
    border: 0;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.52);
    cursor: pointer;
    transform: translateY(-50%);
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-control:hover {
    background: rgba(0, 0, 0, 0.76);
    transform: translateY(-50%) scale(1.05);
}

.hero-control.prev {
    left: 22px;
}

.hero-control.next {
    right: 22px;
}

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

.hero-dots button {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.48);
    cursor: pointer;
    transition: background 0.2s ease, width 0.2s ease;
}

.hero-dots button.is-active {
    width: 32px;
    background: var(--white);
}

.content-section {
    padding: 54px 0;
}

.content-section.soft {
    background: linear-gradient(135deg, #eff6ff, #ecfeff);
}

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(28px, 3vw, 38px);
    line-height: 1.2;
    letter-spacing: -0.04em;
}

.section-heading p {
    margin: 8px 0 0;
    color: var(--gray-500);
}

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

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

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

.movie-row {
    display: flex;
    gap: 22px;
    overflow-x: auto;
    padding: 4px 2px 18px;
    scroll-snap-type: x mandatory;
}

.movie-row .movie-card {
    width: 310px;
    flex: 0 0 auto;
    scroll-snap-align: start;
}

.movie-card {
    display: block;
    overflow: hidden;
    min-width: 0;
    color: var(--gray-900);
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.movie-cover {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(135deg, #dbeafe, #cffafe);
}

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

.movie-card:hover .movie-cover img {
    transform: scale(1.06);
}

.movie-badge,
.movie-duration {
    position: absolute;
    z-index: 2;
    padding: 5px 10px;
    border-radius: 999px;
    color: var(--white);
    font-size: 12px;
    font-weight: 800;
}

.movie-badge {
    left: 12px;
    top: 12px;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
}

.movie-duration {
    right: 12px;
    bottom: 12px;
    background: rgba(0, 0, 0, 0.72);
}

.movie-info {
    display: grid;
    gap: 10px;
    padding: 18px;
}

.movie-info strong {
    display: -webkit-box;
    overflow: hidden;
    min-height: 52px;
    font-size: 18px;
    line-height: 1.45;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-desc {
    display: -webkit-box;
    overflow: hidden;
    min-height: 46px;
    color: var(--gray-500);
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-meta,
.movie-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.movie-meta span,
.movie-tags span {
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.movie-meta span {
    color: var(--gray-700);
    background: var(--gray-100);
    padding: 5px 9px;
}

.movie-tags span {
    color: var(--blue-dark);
    background: #dbeafe;
    padding: 4px 8px;
}

.movie-card-large {
    display: grid;
    grid-template-columns: 1.08fr 0.92fr;
    align-items: stretch;
}

.movie-card-large .movie-cover {
    aspect-ratio: auto;
    min-height: 260px;
}

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

.category-tile {
    display: grid;
    min-height: 170px;
    align-content: space-between;
    color: var(--white);
    border-radius: 22px;
    padding: 24px;
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: var(--shadow);
}

.category-tile strong {
    display: block;
    margin-bottom: 8px;
    font-size: 24px;
}

.category-tile span {
    opacity: 0.9;
}

.accent-blue { background: linear-gradient(135deg, #2563eb, #06b6d4); }
.accent-cyan { background: linear-gradient(135deg, #0891b2, #22d3ee); }
.accent-purple { background: linear-gradient(135deg, #7c3aed, #c084fc); }
.accent-red { background: linear-gradient(135deg, #dc2626, #fb7185); }
.accent-green { background: linear-gradient(135deg, #16a34a, #4ade80); }
.accent-orange { background: linear-gradient(135deg, #ea580c, #facc15); }
.accent-pink { background: linear-gradient(135deg, #db2777, #f472b6); }
.accent-indigo { background: linear-gradient(135deg, #4f46e5, #38bdf8); }
.accent-yellow { background: linear-gradient(135deg, #ca8a04, #f97316); }
.accent-slate { background: linear-gradient(135deg, #334155, #0f172a); }

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

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

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

.rank-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    color: var(--white);
    border-radius: 14px;
    background: linear-gradient(135deg, var(--orange), var(--red));
    font-size: 19px;
    font-weight: 900;
}

.rank-item img {
    width: 132px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 14px;
}

.rank-copy {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.rank-copy strong,
.rank-copy em {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-copy strong {
    font-size: 17px;
}

.rank-copy em {
    color: var(--gray-500);
    font-style: normal;
}

.rank-copy span {
    color: var(--gray-500);
    font-size: 13px;
}

.page-hero {
    color: var(--white);
    background: radial-gradient(circle at 20% 20%, rgba(6, 182, 212, 0.38), transparent 32%), linear-gradient(135deg, #1d4ed8, #0f172a);
    padding: 72px 0;
}

.page-hero h1 {
    margin: 0 0 14px;
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: #dbeafe;
    font-weight: 700;
}

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

.filter-panel {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin: 0 0 26px;
    padding: 18px;
    background: var(--white);
    border-radius: 22px;
    box-shadow: var(--shadow-soft);
}

.filter-input {
    min-width: min(360px, 100%);
    flex: 1 1 260px;
}

.filter-select {
    min-width: 170px;
}

.empty-state {
    display: none;
    padding: 48px 20px;
    text-align: center;
    color: var(--gray-500);
    background: var(--white);
    border-radius: 22px;
    box-shadow: var(--shadow-soft);
}

.empty-state.is-visible {
    display: block;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(300px, 0.9fr);
    gap: 28px;
    padding: 36px 0 58px;
}

.player-band {
    background: #000000;
}

.player-wrap {
    width: min(1180px, 100%);
    margin: 0 auto;
}

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

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: var(--white);
    border: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.7));
    cursor: pointer;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 86px;
    height: 86px;
    border-radius: 999px;
    color: var(--white);
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 22px 42px rgba(37, 99, 235, 0.36);
    font-size: 34px;
    padding-left: 5px;
}

.player-overlay strong {
    font-size: 22px;
}

.detail-card,
.side-card {
    background: var(--white);
    border-radius: 22px;
    box-shadow: var(--shadow-soft);
    padding: 26px;
}

.detail-title {
    margin: 0 0 14px;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.16;
    letter-spacing: -0.04em;
}

.detail-meta,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0 22px;
}

.detail-meta span,
.detail-tags span {
    display: inline-flex;
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 13px;
    font-weight: 800;
}

.detail-meta span {
    color: var(--gray-700);
    background: var(--gray-100);
}

.detail-tags span {
    color: var(--blue-dark);
    background: #dbeafe;
}

.detail-card h2,
.side-card h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

.detail-card p {
    color: var(--gray-700);
    font-size: 17px;
}

.side-card {
    display: grid;
    gap: 16px;
}

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

.side-movie {
    display: grid;
    grid-template-columns: 118px 1fr;
    gap: 12px;
    align-items: center;
}

.side-movie img {
    width: 118px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 12px;
}

.side-movie strong {
    display: -webkit-box;
    overflow: hidden;
    margin-bottom: 6px;
    font-size: 15px;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.side-movie span {
    color: var(--gray-500);
    font-size: 12px;
}

.pagination-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}

.pagination-links a {
    display: inline-flex;
    padding: 9px 14px;
    border-radius: 999px;
    color: var(--gray-700);
    background: var(--white);
    box-shadow: var(--shadow-soft);
    font-weight: 800;
}

.pagination-links a.active,
.pagination-links a:hover {
    color: var(--white);
    background: linear-gradient(135deg, var(--blue), var(--cyan));
}

.site-footer {
    color: #cbd5e1;
    background: #0f172a;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 32px;
    padding: 50px 0 32px;
}

.footer-brand {
    margin-bottom: 16px;
    color: var(--white);
    background: none;
    -webkit-background-clip: initial;
    background-clip: initial;
}

.site-footer h3 {
    margin: 0 0 16px;
    color: var(--white);
}

.site-footer p {
    margin: 0;
    color: #94a3b8;
}

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

.site-footer a:hover {
    color: #60a5fa;
}

.footer-bottom {
    border-top: 1px solid #1e293b;
    padding: 20px 16px;
    text-align: center;
    color: #94a3b8;
}

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

    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .movie-grid,
    .movie-grid.three,
    .category-grid,
    .rank-grid,
    .footer-grid,
    .detail-layout {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

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

    .brand {
        font-size: 20px;
    }

    .hero {
        height: 560px;
    }

    .hero-control {
        display: none;
    }

    .hero-shade {
        background: linear-gradient(180deg, rgba(2, 6, 23, 0.32), rgba(2, 6, 23, 0.9));
    }

    .hero-inner {
        align-items: flex-end;
        padding-bottom: 72px;
    }

    .content-section {
        padding: 40px 0;
    }

    .section-heading {
        display: block;
    }

    .movie-grid,
    .movie-grid.two,
    .movie-grid.three,
    .category-grid,
    .rank-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .movie-card-large {
        display: block;
    }

    .rank-item {
        grid-template-columns: 46px 110px 1fr;
        gap: 12px;
        padding: 12px;
    }

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

    .detail-card,
    .side-card {
        padding: 20px;
    }

    .side-movie {
        grid-template-columns: 104px 1fr;
    }

    .side-movie img {
        width: 104px;
    }
}
