:root {
    --blue-950: #10234e;
    --blue-900: #173b7a;
    --blue-700: #1d5fd1;
    --blue-600: #2563eb;
    --blue-500: #3b82f6;
    --orange-500: #f97316;
    --green-500: #22c55e;
    --gray-950: #111827;
    --gray-900: #1f2937;
    --gray-700: #374151;
    --gray-600: #4b5563;
    --gray-500: #6b7280;
    --gray-200: #e5e7eb;
    --gray-100: #f3f4f6;
    --gray-50: #f9fafb;
    --white: #ffffff;
    --shadow-card: 0 18px 45px rgba(17, 24, 39, 0.12);
    --shadow-soft: 0 12px 30px rgba(37, 99, 235, 0.18);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--gray-900);
    background: var(--gray-50);
    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: 100;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 rgba(17, 24, 39, 0.08);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--blue-700);
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.brand-mark {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    color: var(--white);
    background: linear-gradient(135deg, var(--blue-500), var(--blue-900));
    border-radius: 12px;
    box-shadow: var(--shadow-soft);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.main-nav a {
    padding: 10px 14px;
    color: var(--gray-700);
    border-radius: 999px;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--blue-700);
    background: rgba(59, 130, 246, 0.11);
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 9px;
    border: 0;
    background: transparent;
}

.nav-toggle span {
    display: block;
    height: 2px;
    margin: 6px 0;
    background: var(--gray-900);
    border-radius: 999px;
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.9s ease, transform 1.2s ease;
    pointer-events: none;
}

.hero-slide.active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

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

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

.hero-bg::after {
    position: absolute;
    inset: 0;
    content: "";
    background: radial-gradient(circle at 80% 30%, rgba(59, 130, 246, 0.26), transparent 30%), linear-gradient(90deg, rgba(16, 35, 78, 0.95), rgba(23, 59, 122, 0.72), rgba(16, 35, 78, 0.25));
}

.hero-inner {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    min-height: 500px;
}

.hero-content {
    max-width: 660px;
    padding: 70px 0;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 13px;
    color: var(--white);
    background: rgba(59, 130, 246, 0.9);
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.32);
}

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

.hero p {
    max-width: 620px;
    margin: 0 0 30px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 18px;
}

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

.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 24px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
    color: var(--blue-700);
    background: var(--white);
    box-shadow: var(--shadow-soft);
}

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

.btn-primary:hover,
.btn-secondary:hover {
    transform: translateY(-2px);
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 5;
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    color: var(--white);
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    transform: translateY(-50%);
}

.hero-control:hover {
    background: rgba(255, 255, 255, 0.28);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

.hero-dots {
    position: absolute;
    right: 0;
    bottom: 28px;
    left: 0;
    z-index: 6;
    display: flex;
    justify-content: center;
    gap: 9px;
}

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

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

.section {
    padding: 54px 0;
}

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

.section-kicker {
    color: var(--blue-600);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.section-head h2 {
    margin: 4px 0 0;
    color: var(--gray-950);
    font-size: clamp(26px, 4vw, 36px);
    line-height: 1.2;
}

.section-head p {
    max-width: 700px;
    margin: 8px 0 0;
    color: var(--gray-500);
}

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

.movie-card {
    overflow: hidden;
    background: var(--white);
    border: 1px solid rgba(17, 24, 39, 0.08);
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(17, 24, 39, 0.05);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, var(--blue-900), var(--blue-500));
}

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, 0.72));
}

.poster-play {
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    color: var(--blue-700);
    background: rgba(255, 255, 255, 0.92);
    border-radius: 999px;
    font-size: 15px;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.24);
}

.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    display: grid;
    min-width: 34px;
    height: 34px;
    place-items: center;
    color: var(--white);
    background: linear-gradient(135deg, var(--orange-500), #ef4444);
    border-radius: 10px;
    font-weight: 900;
    box-shadow: 0 8px 18px rgba(249, 115, 22, 0.35);
}

.movie-card-body {
    padding: 16px;
}

.movie-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--gray-500);
    font-size: 13px;
}

.movie-card h3 {
    margin: 8px 0 8px;
    color: var(--gray-950);
    font-size: 18px;
    line-height: 1.35;
}

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

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

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 13px;
}

.tag-row span,
.info-pill {
    padding: 4px 8px;
    color: var(--blue-700);
    background: rgba(59, 130, 246, 0.10);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

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

.category-tile {
    position: relative;
    overflow: hidden;
    min-height: 150px;
    padding: 22px;
    color: var(--white);
    background: linear-gradient(135deg, var(--blue-500), var(--blue-900));
    border-radius: 22px;
    box-shadow: var(--shadow-soft);
}

.category-tile::after {
    position: absolute;
    right: -30px;
    bottom: -50px;
    width: 130px;
    height: 130px;
    content: "";
    background: rgba(255, 255, 255, 0.13);
    border-radius: 50%;
}

.category-tile strong {
    position: relative;
    z-index: 1;
    display: block;
    margin-bottom: 8px;
    font-size: 22px;
}

.category-tile span {
    position: relative;
    z-index: 1;
    display: block;
    color: rgba(255, 255, 255, 0.84);
    font-size: 14px;
}

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

.compact-card {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 16px;
    align-items: center;
    padding: 12px;
    background: var(--white);
    border: 1px solid rgba(17, 24, 39, 0.08);
    border-radius: 18px;
    box-shadow: 0 8px 20px rgba(17, 24, 39, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.compact-card img {
    width: 96px;
    height: 128px;
    object-fit: cover;
    border-radius: 14px;
}

.compact-card strong {
    display: block;
    margin-bottom: 8px;
    color: var(--gray-950);
    font-size: 18px;
}

.compact-card em {
    display: block;
    color: var(--gray-500);
    font-size: 14px;
    font-style: normal;
}

.page-hero {
    padding: 70px 0 56px;
    color: var(--white);
    background: linear-gradient(135deg, var(--blue-950), var(--blue-700));
}

.page-hero h1 {
    max-width: 780px;
    margin: 0 0 14px;
    font-size: clamp(34px, 6vw, 56px);
    line-height: 1.12;
}

.page-hero p {
    max-width: 780px;
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
}

.filter-bar {
    display: grid;
    grid-template-columns: 1fr 170px 170px;
    gap: 12px;
    margin-bottom: 24px;
    padding: 16px;
    background: var(--white);
    border: 1px solid rgba(17, 24, 39, 0.08);
    border-radius: 18px;
    box-shadow: 0 10px 24px rgba(17, 24, 39, 0.05);
}

.filter-bar input,
.filter-bar select {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    color: var(--gray-900);
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 13px;
    outline: none;
}

.filter-bar input:focus,
.filter-bar select:focus {
    border-color: var(--blue-500);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.14);
}

.detail-hero {
    position: relative;
    overflow: hidden;
    color: var(--white);
    background: linear-gradient(135deg, var(--blue-950), var(--blue-700));
}

.detail-bg {
    position: absolute;
    inset: 0;
}

.detail-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.22;
    filter: blur(2px);
}

.detail-bg::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(90deg, rgba(16, 35, 78, 0.95), rgba(16, 35, 78, 0.78));
}

.detail-layout {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 34px;
    align-items: end;
    padding: 58px 0;
}

.detail-poster {
    overflow: hidden;
    aspect-ratio: 2 / 3;
    border: 6px solid rgba(255, 255, 255, 0.22);
    border-radius: 24px;
    box-shadow: 0 22px 55px rgba(0, 0, 0, 0.25);
}

.detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
}

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

.detail-info h1 {
    margin: 0 0 16px;
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.08;
}

.detail-info p {
    max-width: 760px;
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 18px;
}

.detail-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.detail-pills span {
    padding: 7px 12px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
}

.player-section {
    padding: 44px 0 0;
}

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

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

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: var(--white);
    background: radial-gradient(circle at center, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.78));
    border: 0;
    cursor: pointer;
}

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

.play-ring {
    display: grid;
    width: 78px;
    height: 78px;
    place-items: center;
    color: var(--blue-700);
    background: rgba(255, 255, 255, 0.95);
    border-radius: 999px;
    font-size: 28px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

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

.content-panel {
    padding: 28px;
    background: var(--white);
    border: 1px solid rgba(17, 24, 39, 0.08);
    border-radius: 22px;
    box-shadow: 0 12px 30px rgba(17, 24, 39, 0.06);
}

.content-panel h2 {
    margin: 0 0 14px;
    color: var(--gray-950);
    font-size: 26px;
}

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

.content-panel p:last-child {
    margin-bottom: 0;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 26px;
    align-items: start;
}

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

.pagination-note {
    margin-top: 22px;
    color: var(--gray-500);
    font-size: 14px;
}

.site-footer {
    margin-top: 60px;
    color: rgba(255, 255, 255, 0.76);
    background: var(--gray-950);
}

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

.footer-brand {
    margin-bottom: 12px;
    color: var(--white);
    font-size: 24px;
    font-weight: 900;
}

.site-footer p {
    max-width: 520px;
    margin: 0;
}

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

.site-footer a {
    display: block;
    margin: 8px 0;
    color: rgba(255, 255, 255, 0.76);
}

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

.hidden-card {
    display: none;
}

@media (max-width: 980px) {
    .movie-grid,
    .category-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

    .detail-poster {
        width: min(280px, 70vw);
    }

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

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

    .main-nav {
        position: absolute;
        top: 70px;
        right: 16px;
        left: 16px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        background: var(--white);
        border: 1px solid rgba(17, 24, 39, 0.08);
        border-radius: 18px;
        box-shadow: var(--shadow-card);
    }

    .main-nav.open {
        display: flex;
    }

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

    .hero-control {
        display: none;
    }

    .movie-grid,
    .category-grid,
    .compact-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .compact-card {
        grid-template-columns: 86px 1fr;
    }

    .compact-card img {
        width: 86px;
        height: 116px;
    }

    .section {
        padding: 38px 0;
    }

    .detail-layout {
        padding: 38px 0;
    }
}

@media (max-width: 520px) {
    .movie-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .movie-card-body {
        padding: 12px;
    }

    .movie-card h3 {
        font-size: 16px;
    }

    .movie-card p,
    .tag-row {
        display: none;
    }
}
