:root {
    --blue: #2563eb;
    --blue-dark: #1d4ed8;
    --red: #dc2626;
    --yellow: #f59e0b;
    --green: #16a34a;
    --slate: #0f172a;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-900: #111827;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 10px 25px rgba(15, 23, 42, 0.10);
    --shadow-xl: 0 25px 60px rgba(15, 23, 42, 0.20);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.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.96);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(12px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.brand:hover {
    color: var(--blue);
}

.brand-mark {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--blue), #60a5fa);
    color: var(--white);
    font-size: 14px;
    box-shadow: 0 12px 26px rgba(37, 99, 235, 0.25);
}

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

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

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

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: var(--gray-100);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.menu-button span {
    display: block;
    width: 19px;
    height: 2px;
    border-radius: 999px;
    background: var(--gray-700);
}

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

.mobile-nav.is-open {
    display: grid;
    gap: 10px;
}

.mobile-link {
    display: block;
    padding: 9px 6px;
}

.hero {
    position: relative;
    height: 500px;
    overflow: hidden;
    background: linear-gradient(135deg, #1e3a8a, #0f172a);
}

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.52), rgba(15, 23, 42, 0.10));
}

.hero-content {
    position: absolute;
    inset: auto 0 0;
    z-index: 2;
    padding-bottom: 64px;
}

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

.badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.badges span,
.meta-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 12px;
    border-radius: 999px;
    color: var(--white);
    font-size: 14px;
    font-weight: 700;
}

.badge-red {
    background: var(--red);
}

.badge-blue {
    background: var(--blue);
}

.badge-dark {
    background: rgba(15, 23, 42, 0.70);
}

.hero h1,
.hero h2 {
    margin: 0 0 14px;
    color: var(--white);
    font-size: clamp(32px, 6vw, 56px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.hero p {
    margin: 0 0 22px;
    color: #e5e7eb;
    font-size: 18px;
    max-width: 720px;
}

.hero-actions,
.section-head,
.inline-actions,
.card-meta,
.tag-row,
.detail-meta,
.breadcrumb,
.filter-row,
.pagination-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.button-primary,
.button-ghost,
.button-soft {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.button-primary {
    background: var(--blue);
    color: var(--white);
    box-shadow: 0 16px 35px rgba(37, 99, 235, 0.28);
}

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

.button-ghost {
    background: rgba(255, 255, 255, 0.14);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.30);
}

.button-ghost:hover {
    background: rgba(255, 255, 255, 0.22);
}

.button-soft {
    background: #dbeafe;
    color: var(--blue-dark);
}

.button-soft:hover {
    background: #bfdbfe;
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 3;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.52);
    color: var(--white);
    font-size: 28px;
    transform: translateY(-50%);
    transition: background 0.2s ease;
}

.hero-control:hover {
    background: rgba(0, 0, 0, 0.72);
}

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

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

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

.hero-dots button {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.55);
    transition: width 0.2s ease, background 0.2s ease;
}

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

.main-space {
    padding: 48px 0 64px;
}

.section {
    margin-bottom: 64px;
}

.section-head {
    justify-content: space-between;
    margin-bottom: 24px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title h2,
.page-title h1,
.detail-copy h1 {
    margin: 0;
    color: var(--gray-900);
    font-size: clamp(25px, 4vw, 34px);
    line-height: 1.18;
    letter-spacing: -0.035em;
}

.section-title span {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 12px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.page-title {
    margin-bottom: 28px;
    padding: 28px;
    border-radius: 18px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.page-title p {
    margin: 12px 0 0;
    color: var(--gray-600);
    max-width: 860px;
}

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

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

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

.movie-card {
    overflow: hidden;
    border-radius: 18px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.card-cover {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--slate);
}

.card-cover img,
.small-cover img,
.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.30s ease;
}

.movie-card:hover .card-cover img,
.small-item:hover .small-cover img,
.category-tile:hover .category-image img {
    transform: scale(1.08);
}

.card-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.42), transparent 55%);
    opacity: 0;
    transition: opacity 0.24s ease;
}

.movie-card:hover .card-cover::after {
    opacity: 1;
}

.play-chip {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 2;
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.92);
    color: var(--white);
    font-size: 14px;
    opacity: 0;
    transform: translateY(5px);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.movie-card:hover .play-chip {
    opacity: 1;
    transform: translateY(0);
}

.card-body {
    padding: 16px;
}

.card-meta {
    gap: 8px;
    color: var(--gray-500);
    font-size: 13px;
}

.card-meta span {
    display: inline-flex;
    align-items: center;
}

.movie-card h3 {
    margin: 8px 0 8px;
    font-size: 18px;
    line-height: 1.3;
}

.movie-card h3 a:hover,
.small-head a:hover,
.category-copy h2 a:hover {
    color: var(--blue);
}

.movie-card p,
.small-body p {
    margin: 0;
    color: var(--gray-600);
    font-size: 14px;
}

.tag-row {
    gap: 7px;
    margin-top: 12px;
}

.tag-row span {
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--gray-100);
    color: var(--gray-600);
    font-size: 12px;
    font-weight: 700;
}

.feature-band {
    padding: 34px;
    border-radius: 24px;
    background: linear-gradient(120deg, #eff6ff, #f8fafc);
}

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

.category-pill {
    display: block;
    padding: 22px 18px;
    border-radius: 18px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.category-pill strong {
    display: block;
    font-size: 18px;
}

.category-pill span {
    display: block;
    margin-top: 8px;
    color: var(--gray-500);
    font-size: 13px;
}

.category-pill:hover {
    background: var(--blue);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.category-pill:hover span {
    color: #dbeafe;
}

.horizontal-scroll {
    overflow-x: auto;
    padding: 4px 2px 18px;
}

.horizontal-row {
    display: flex;
    gap: 18px;
    min-width: max-content;
}

.horizontal-row .movie-card {
    width: 300px;
}

.two-column {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr);
    gap: 28px;
}

.side-card,
.panel {
    border-radius: 18px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    padding: 22px;
}

.side-card h2,
.panel h2 {
    margin: 0 0 18px;
    font-size: 22px;
}

.small-list {
    display: grid;
    gap: 16px;
}

.small-item {
    display: grid;
    grid-template-columns: 136px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
}

.small-cover {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 12px;
    background: var(--slate);
}

.small-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    font-weight: 800;
}

.rank-number {
    display: grid;
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 9px;
    background: #dbeafe;
    color: var(--blue-dark);
    font-size: 13px;
    font-weight: 900;
}

.small-meta {
    margin-top: 6px;
    color: var(--gray-500);
    font-size: 13px;
}

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

.category-tile {
    overflow: hidden;
    border-radius: 20px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-image {
    position: relative;
    display: block;
    height: 190px;
    overflow: hidden;
    background: var(--slate);
}

.category-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.72), transparent 70%);
}

.category-image span {
    position: absolute;
    left: 20px;
    bottom: 18px;
    z-index: 2;
    color: var(--white);
    font-size: 24px;
    font-weight: 900;
}

.category-copy {
    padding: 20px;
}

.category-copy h2 {
    margin: 0 0 10px;
    font-size: 22px;
}

.category-copy p {
    margin: 0;
    color: var(--gray-600);
}

.mini-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.mini-links a {
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--gray-100);
    color: var(--gray-700);
    font-size: 13px;
    font-weight: 700;
}

.mini-links a:hover {
    background: #dbeafe;
    color: var(--blue-dark);
}

.breadcrumb {
    gap: 8px;
    margin-bottom: 18px;
    color: var(--gray-500);
    font-size: 14px;
}

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

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

.player-frame {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    background: #000000;
    box-shadow: var(--shadow-xl);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.10), rgba(0, 0, 0, 0.44));
    color: var(--white);
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-pulse {
    display: grid;
    width: 82px;
    height: 82px;
    place-items: center;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.96);
    box-shadow: 0 0 0 14px rgba(37, 99, 235, 0.18);
}

.play-triangle {
    display: block;
    width: 0;
    height: 0;
    margin-left: 6px;
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
    border-left: 23px solid var(--white);
}

.detail-copy {
    margin-top: 24px;
    border-radius: 18px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    padding: 28px;
}

.detail-copy h1 {
    margin-bottom: 18px;
}

.detail-meta {
    margin-bottom: 22px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--gray-200);
    color: var(--gray-600);
}

.detail-section {
    margin-bottom: 24px;
}

.detail-section h2 {
    margin: 0 0 10px;
    font-size: 20px;
}

.detail-section p {
    margin: 0;
    color: var(--gray-700);
}

.review-box {
    padding: 20px;
    border-radius: 16px;
    background: #eff6ff;
}

.filter-panel {
    margin-bottom: 28px;
    border-radius: 20px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    padding: 22px;
}

.filter-row {
    align-items: stretch;
}

.search-input,
.filter-select {
    min-height: 44px;
    border: 1px solid var(--gray-300);
    border-radius: 14px;
    background: var(--white);
    color: var(--gray-900);
    outline: none;
}

.search-input {
    flex: 1 1 280px;
    padding: 0 16px;
}

.filter-select {
    flex: 0 0 150px;
    padding: 0 12px;
}

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

.movie-card.is-hidden {
    display: none;
}

.site-footer {
    margin-top: 64px;
    background: #111827;
    color: #d1d5db;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.3fr;
    gap: 32px;
    padding: 46px 0;
}

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

.site-footer p,
.site-footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
    color: #d1d5db;
    font-size: 14px;
}

.site-footer li + li {
    margin-top: 8px;
}

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.10);
    padding: 18px;
    text-align: center;
    color: #9ca3af;
    font-size: 14px;
}

@media (min-width: 768px) {
    .hero {
        height: 600px;
    }
}

@media (max-width: 1024px) {
    .grid-4,
    .grid-3,
    .category-strip,
    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

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

    .menu-button {
        display: inline-flex;
    }

    .brand {
        font-size: 20px;
    }

    .hero {
        height: 560px;
    }

    .hero-content {
        padding-bottom: 72px;
    }

    .hero-control {
        display: none;
    }

    .grid-4,
    .grid-3,
    .category-grid,
    .category-strip,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .feature-band {
        padding: 22px;
    }

    .small-item {
        grid-template-columns: 118px minmax(0, 1fr);
    }

    .section {
        margin-bottom: 46px;
    }

    .detail-copy,
    .page-title,
    .panel,
    .side-card {
        padding: 20px;
    }

    .filter-row {
        display: grid;
    }

    .filter-select {
        width: 100%;
        flex-basis: auto;
    }
}
