:root {
    --blue: #2563eb;
    --blue-dark: #1d4ed8;
    --cyan: #06b6d4;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --white: #ffffff;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --soft-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--gray-900);
    background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 48%, #ecfeff 100%);
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(18px);
    box-shadow: 0 8px 25px rgba(15, 23, 42, 0.08);
}

.nav-inner {
    max-width: 1240px;
    margin: 0 auto;
    min-height: 68px;
    padding: 0 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.logo-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.logo-icon {
    width: 36px;
    height: 36px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    color: white;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.25);
}

.logo-text,
.footer-logo {
    font-size: 25px;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    -webkit-background-clip: text;
    color: transparent;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 22px;
    flex: 1;
    justify-content: flex-end;
}

.nav-link {
    color: var(--gray-600);
    font-weight: 650;
    white-space: nowrap;
    transition: color 0.2s ease;
}

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

.nav-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--gray-100);
    padding: 6px;
    border-radius: 999px;
}

.nav-search input,
.hero-search input,
.page-filter input,
.page-filter select {
    border: 1px solid transparent;
    outline: none;
    background: var(--white);
    color: var(--gray-900);
}

.nav-search input {
    width: 230px;
    padding: 10px 14px;
    border-radius: 999px;
}

.nav-search button,
.hero-search button,
.page-filter button {
    border: none;
    border-radius: 999px;
    padding: 10px 18px;
    color: var(--white);
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    cursor: pointer;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-search button:hover,
.hero-search button:hover,
.page-filter button:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 12px;
    background: var(--gray-100);
    cursor: pointer;
}

.mobile-menu-button span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    border-radius: 999px;
    background: var(--gray-800);
}

.hero {
    position: relative;
    height: 600px;
    overflow: hidden;
    background: linear-gradient(120deg, #172554, #1e40af 48%, #164e63);
}

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

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

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.55;
    transform: scale(1.04);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.9) 0%, rgba(15, 23, 42, 0.68) 46%, rgba(15, 23, 42, 0.15) 100%);
}

.hero-content {
    position: absolute;
    inset: 0;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 22px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    color: white;
}

.hero-label,
.section-kicker,
.page-hero-inner > span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 8px 16px;
    background: rgba(37, 99, 235, 0.92);
    color: white;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.hero h1 {
    margin: 24px 0 18px;
    max-width: 760px;
    font-size: clamp(42px, 7vw, 74px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-summary {
    max-width: 680px;
    margin: 0 0 28px;
    font-size: 21px;
    color: rgba(255, 255, 255, 0.86);
}

.hero-meta,
.movie-meta,
.detail-meta-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.hero-meta span,
.hero-meta a {
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: white;
    backdrop-filter: blur(12px);
}

.hero-actions {
    display: flex;
    gap: 14px;
    margin-top: 30px;
}

.primary-button,
.ghost-button,
.section-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.primary-button {
    padding: 14px 28px;
    color: white;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 18px 35px rgba(37, 99, 235, 0.35);
}

.ghost-button {
    padding: 14px 24px;
    color: white;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(14px);
}

.primary-button:hover,
.ghost-button:hover,
.section-action:hover {
    transform: translateY(-2px) scale(1.02);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.13);
    color: white;
    font-size: 42px;
    line-height: 1;
    cursor: pointer;
    backdrop-filter: blur(12px);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

.hero-dot {
    width: 11px;
    height: 11px;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
}

.hero-dot.is-active {
    width: 34px;
    background: white;
}

.content-section {
    max-width: 1240px;
    margin: 0 auto;
    padding: 58px 22px;
}

.intro-section {
    padding-top: 36px;
}

.intro-card {
    border-radius: 28px;
    padding: 34px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: var(--soft-shadow);
}

.intro-card h2 {
    margin: 0 0 12px;
    font-size: clamp(28px, 5vw, 44px);
    line-height: 1.16;
}

.intro-card p {
    max-width: 860px;
    margin: 0 0 24px;
    color: var(--gray-600);
    font-size: 18px;
}

.hero-search,
.page-filter {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.hero-search input {
    min-width: min(100%, 430px);
    padding: 14px 18px;
    border-radius: 999px;
    box-shadow: inset 0 0 0 1px var(--gray-200);
}

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

.section-header h2 {
    margin: 10px 0 0;
    font-size: clamp(28px, 4vw, 40px);
    letter-spacing: -0.03em;
}

.section-kicker {
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    font-size: 14px;
}

.section-action {
    padding: 10px 18px;
    background: white;
    color: var(--blue);
    box-shadow: var(--soft-shadow);
}

.movie-grid,
.category-grid,
.overview-grid {
    display: grid;
    gap: 24px;
}

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

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

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

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

.movie-card,
.compact-card,
.category-tile,
.overview-card,
.detail-card,
.sidebar-card,
.player-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--soft-shadow);
    overflow: hidden;
}

.movie-card,
.compact-card,
.category-tile,
.overview-card {
    transition: transform 0.26s ease, box-shadow 0.26s ease;
}

.movie-card:hover,
.compact-card:hover,
.category-tile:hover,
.overview-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.poster-wrap,
.compact-image,
.overview-cover {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #1e3a8a, #0e7490);
}

.poster-wrap {
    height: 230px;
}

.large-card .poster-wrap {
    height: 340px;
}

.cover-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.movie-card:hover .cover-image,
.compact-card:hover .cover-image,
.category-tile:hover .cover-image,
.overview-card:hover .cover-image {
    transform: scale(1.08);
}

.category-badge,
.rank-number {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    font-weight: 800;
}

.category-badge {
    right: 14px;
    top: 14px;
    padding: 6px 12px;
    color: white;
    background: var(--blue);
    font-size: 13px;
}

.rank-number {
    left: 12px;
    top: 12px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    color: white;
    background: linear-gradient(135deg, #f97316, #ef4444);
    box-shadow: 0 10px 22px rgba(239, 68, 68, 0.35);
}

.card-content {
    padding: 22px;
}

.card-content h3,
.compact-content h3,
.overview-content h2,
.category-tile h3 {
    margin: 0;
    color: var(--gray-900);
}

.card-content h3 {
    min-height: 54px;
    font-size: 19px;
    line-height: 1.35;
}

.card-content p,
.compact-content p,
.overview-content p,
.category-tile p {
    color: var(--gray-600);
}

.card-content p {
    min-height: 48px;
    margin: 10px 0 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-meta {
    justify-content: space-between;
    color: var(--gray-500);
    font-size: 14px;
}

.tag-list,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.tag-list span,
.detail-tags span {
    display: inline-flex;
    padding: 5px 9px;
    border-radius: 999px;
    background: var(--gray-100);
    color: var(--gray-600);
    font-size: 12px;
}

.category-tile {
    position: relative;
    min-height: 230px;
    display: flex;
    align-items: flex-end;
    padding: 24px;
    color: white;
}

.category-tile .cover-image {
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: 0.6;
}

.category-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.86), rgba(15, 23, 42, 0.16));
}

.category-tile div {
    position: relative;
    z-index: 2;
}

.category-tile h3 {
    color: white;
    font-size: 24px;
}

.category-tile p {
    margin: 8px 0 0;
    color: rgba(255, 255, 255, 0.82);
}

.ranking-section {
    max-width: 1240px;
}

.ranking-section .section-header,
.ranking-section .section-kicker,
.ranking-section h2 {
    color: white;
}

.ranking-section {
    border-radius: 34px;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 22px 58px rgba(37, 99, 235, 0.22);
}

.ranking-grid,
.ranking-list {
    display: grid;
    gap: 18px;
}

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

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

.compact-card {
    display: grid;
    grid-template-columns: 135px minmax(0, 1fr);
    gap: 18px;
    padding: 12px;
}

.compact-image {
    height: 112px;
    border-radius: 16px;
}

.compact-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.compact-content h3 {
    font-size: 18px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.compact-content p {
    margin: 7px 0 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.page-hero,
.detail-header {
    background: linear-gradient(135deg, #1d4ed8, #0891b2);
    color: white;
}

.page-hero-inner,
.detail-header-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 70px 22px;
}

.compact-hero .page-hero-inner {
    padding: 48px 22px;
}

.page-hero h1,
.detail-header h1 {
    margin: 18px 0 12px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.page-hero p,
.detail-header p {
    max-width: 780px;
    margin: 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: 19px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.78);
    margin-bottom: 20px;
}

.breadcrumb a:hover {
    color: white;
}

.page-filter {
    margin-top: 28px;
}

.page-filter input,
.page-filter select {
    min-height: 48px;
    border-radius: 999px;
    padding: 0 16px;
}

.page-filter input {
    min-width: min(100%, 420px);
}

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

.empty-state {
    padding: 58px 22px;
    text-align: center;
    color: var(--gray-600);
}

.empty-state h2 {
    color: var(--gray-900);
}

.overview-card {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
}

.overview-cover {
    min-height: 260px;
}

.overview-content {
    padding: 28px;
}

.overview-content h2 {
    font-size: 28px;
}

.overview-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 18px;
}

.overview-preview span {
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--gray-100);
    color: var(--gray-600);
    font-size: 13px;
}

.search-meta {
    margin-bottom: 22px;
    color: var(--gray-600);
    font-weight: 700;
}

.detail-main {
    max-width: 1240px;
    margin: 0 auto;
    padding: 36px 22px 64px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) 380px;
    gap: 30px;
}

.detail-primary {
    min-width: 0;
}

.player-card {
    position: relative;
    background: #020617;
    box-shadow: 0 25px 70px rgba(15, 23, 42, 0.25);
}

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

.player-start {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    border: none;
    border-radius: 999px;
    color: white;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    font-weight: 850;
    cursor: pointer;
    box-shadow: 0 20px 38px rgba(37, 99, 235, 0.38);
}

.player-start:hover {
    transform: translate(-50%, -50%) scale(1.04);
}

.play-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
}

.player-message {
    position: absolute;
    left: 20px;
    bottom: 18px;
    color: white;
    font-weight: 700;
}

.detail-card,
.sidebar-card {
    padding: 30px;
    margin-top: 28px;
}

.detail-meta-row {
    gap: 10px;
    margin-bottom: 22px;
}

.detail-meta-row span,
.category-pill {
    padding: 7px 12px;
    border-radius: 999px;
    background: var(--gray-100);
    color: var(--gray-600);
    font-weight: 700;
    font-size: 14px;
}

.category-pill {
    color: white;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
}

.detail-card h2,
.sidebar-card h2 {
    margin: 28px 0 14px;
    font-size: 25px;
}

.detail-card h2:first-of-type,
.sidebar-card h2:first-child {
    margin-top: 0;
}

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

.lead-text {
    color: var(--gray-900) !important;
    font-size: 20px !important;
    font-style: italic;
}

.review-box {
    padding: 22px;
    border-radius: 18px;
    background: linear-gradient(135deg, #eff6ff, #ecfeff);
}

.detail-sidebar {
    min-width: 0;
}

.sidebar-card {
    position: sticky;
    top: 92px;
}

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

.site-footer {
    margin-top: 34px;
    background: #0f172a;
    color: rgba(255, 255, 255, 0.76);
}

.footer-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 42px 22px;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 28px;
}

.footer-logo {
    display: inline-block;
    margin-bottom: 12px;
}

.footer-inner p {
    max-width: 640px;
    margin: 0;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 20px;
    justify-content: flex-end;
}

.footer-links a:hover {
    color: white;
}

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

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

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

    .sidebar-card {
        position: static;
    }
}

@media (max-width: 900px) {
    .mobile-menu-button {
        display: block;
    }

    .nav-inner {
        flex-wrap: wrap;
        min-height: 64px;
    }

    .nav-menu {
        display: none;
        width: 100%;
        padding: 12px 0 20px;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .nav-menu.is-open {
        display: flex;
    }

    .nav-search {
        width: 100%;
    }

    .nav-search input {
        width: 100%;
        flex: 1;
    }

    .hero {
        height: 660px;
    }

    .hero-content {
        padding: 0 28px;
    }

    .hero-arrow {
        display: none;
    }

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

    .footer-links {
        justify-content: flex-start;
    }
}

@media (max-width: 720px) {
    .movie-grid,
    .featured-grid,
    .category-grid,
    .overview-grid,
    .ranking-grid,
    .ranking-list,
    .category-movie-grid {
        grid-template-columns: 1fr;
    }

    .overview-card,
    .compact-card {
        grid-template-columns: 1fr;
    }

    .compact-image {
        height: 190px;
    }

    .overview-cover {
        min-height: 220px;
    }

    .section-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .hero-actions,
    .hero-search,
    .page-filter {
        align-items: stretch;
        flex-direction: column;
    }

    .hero-search input,
    .page-filter input,
    .page-filter select,
    .hero-search button,
    .page-filter button {
        width: 100%;
    }

    .content-section,
    .page-hero-inner,
    .detail-header-inner,
    .detail-main {
        padding-left: 16px;
        padding-right: 16px;
    }

    .detail-card,
    .sidebar-card {
        padding: 22px;
    }
}
