:root {
    color-scheme: light;
    --site-bg: #f8fafc;
    --panel: #ffffff;
    --panel-soft: rgba(255, 255, 255, 0.88);
    --text-main: #111827;
    --text-soft: #4b5563;
    --text-muted: #6b7280;
    --line: #e5e7eb;
    --primary: #06b6d4;
    --primary-dark: #0284c7;
    --blue: #2563eb;
    --shadow: 0 20px 60px rgba(15, 23, 42, 0.12);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
    color: var(--text-main);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.84);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    gap: 22px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #0f172a;
    text-decoration: none;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.brand-mark {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--blue));
    box-shadow: 0 12px 30px rgba(6, 182, 212, 0.28);
}

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

.main-nav a {
    color: #334155;
    text-decoration: none;
    font-weight: 650;
    padding: 10px 14px;
    border-radius: 999px;
    transition: 0.22s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: #075985;
    background: #ecfeff;
}

.nav-search {
    display: flex;
    align-items: center;
    min-width: 260px;
    border: 1px solid #dbeafe;
    background: #ffffff;
    border-radius: 999px;
    padding: 4px;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.05);
}

.nav-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    padding: 10px 12px;
    background: transparent;
    color: #0f172a;
}

.nav-search button,
.hero-search button,
.primary-button,
.secondary-button,
.filter-panel button {
    border: 0;
    cursor: pointer;
    border-radius: 999px;
    font-weight: 750;
    transition: 0.22s ease;
}

.nav-search button {
    padding: 10px 16px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--blue));
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    cursor: pointer;
}

.mobile-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background: #0f172a;
    margin: 4px auto;
    border-radius: 999px;
}

.hero-slider {
    position: relative;
    height: 70vh;
    min-height: 520px;
    overflow: hidden;
    background: #020617;
}

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-layer {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.52) 48%, rgba(2, 6, 23, 0.16) 100%);
}

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

.hero-inner {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

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

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #0e7490;
    background: #ecfeff;
    padding: 8px 14px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 14px;
}

.hero-kicker {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(12px);
}

.hero-copy h1 {
    margin: 18px 0 18px;
    font-size: clamp(40px, 7vw, 76px);
    line-height: 1.02;
    letter-spacing: -0.05em;
    text-shadow: 0 18px 50px rgba(0, 0, 0, 0.48);
}

.hero-copy p {
    margin: 0 0 24px;
    color: #dbeafe;
    font-size: clamp(17px, 2.4vw, 22px);
    line-height: 1.75;
    max-width: 660px;
}

.hero-meta,
.detail-meta,
.card-meta,
.tag-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.hero-meta span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 8px 14px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
    font-size: 14px;
    font-weight: 750;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.primary-button,
.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 13px 22px;
    text-decoration: none;
}

.primary-button {
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--blue));
    box-shadow: 0 18px 36px rgba(37, 99, 235, 0.28);
}

.secondary-button {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.26);
    backdrop-filter: blur(12px);
}

.primary-button:hover,
.secondary-button:hover,
.nav-search button:hover,
.hero-search button:hover,
.filter-panel button:hover {
    transform: translateY(-1px) scale(1.02);
}

.hero-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.24);
    backdrop-filter: blur(12px);
    cursor: pointer;
    font-size: 34px;
    line-height: 1;
    transition: 0.22s ease;
}

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

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

.hero-dot {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: 0.22s ease;
}

.hero-dot.active {
    width: 36px;
    background: #ffffff;
}

.hero-search-wrap {
    position: relative;
    z-index: 3;
    max-width: 1280px;
    margin: -42px auto 0;
    padding: 0 24px;
}

.hero-search {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    max-width: 760px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(16px);
    border-radius: 26px;
    border: 1px solid rgba(219, 234, 254, 0.92);
    box-shadow: var(--shadow);
}

.hero-search input {
    border: 0;
    outline: 0;
    color: #0f172a;
    padding: 0 16px;
    background: transparent;
    min-height: 48px;
}

.hero-search button,
.filter-panel button {
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--blue));
    padding: 0 24px;
}

.page-main {
    max-width: 1280px;
    margin: 0 auto;
    padding: 56px 24px 72px;
}

.section-block {
    margin-top: 64px;
}

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

.section-title h2,
.page-title h1 {
    margin: 12px 0 8px;
    color: #0f172a;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.15;
    letter-spacing: -0.035em;
}

.section-title p,
.page-title p {
    margin: 0;
    max-width: 760px;
    color: var(--text-muted);
    line-height: 1.8;
}

.section-link {
    color: var(--primary-dark);
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

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

.movie-card {
    position: relative;
    border-radius: 22px;
    background: var(--panel);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 58px rgba(15, 23, 42, 0.16);
}

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

.card-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.card-poster {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 5;
    background: linear-gradient(135deg, #e0f2fe, #eff6ff);
}

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

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

.card-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.55), rgba(2, 6, 23, 0));
    opacity: 0;
    transition: 0.28s ease;
}

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

.card-badge,
.rank-badge {
    position: absolute;
    top: 12px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(10px);
    font-size: 12px;
    font-weight: 800;
}

.card-badge {
    right: 12px;
    padding: 6px 10px;
}

.rank-badge {
    left: 12px;
    min-width: 36px;
    height: 32px;
    padding: 0 10px;
    background: linear-gradient(135deg, var(--primary), var(--blue));
}

.card-body {
    padding: 18px;
}

.card-body h3 {
    margin: 0 0 9px;
    color: #111827;
    font-size: 18px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.card-body p {
    margin: 0 0 14px;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.card-meta span,
.tag-list span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 750;
}

.card-meta span {
    color: #0e7490;
    background: #cffafe;
    padding: 5px 9px;
}

.tag-list span {
    color: #475569;
    background: #f1f5f9;
    padding: 7px 10px;
}

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

.category-card {
    position: relative;
    display: block;
    min-height: 220px;
    padding: 30px;
    color: #ffffff;
    text-decoration: none;
    overflow: hidden;
    border-radius: var(--radius);
    background: linear-gradient(135deg, #0891b2 0%, #2563eb 55%, #4f46e5 100%);
    box-shadow: var(--shadow);
}

.category-card:nth-child(2n) {
    background: linear-gradient(135deg, #0f766e 0%, #0284c7 56%, #2563eb 100%);
}

.category-card:nth-child(3n) {
    background: linear-gradient(135deg, #4338ca 0%, #0ea5e9 55%, #06b6d4 100%);
}

.category-card::before {
    content: "";
    position: absolute;
    width: 240px;
    height: 240px;
    right: -80px;
    top: -80px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
}

.category-card h2,
.category-card h3 {
    position: relative;
    z-index: 1;
    margin: 0 0 12px;
    font-size: 28px;
}

.category-card p {
    position: relative;
    z-index: 1;
    max-width: 520px;
    margin: 0;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.8;
}

.page-hero {
    padding: 64px 0 28px;
}

.page-title {
    max-width: 900px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: #64748b;
    font-size: 14px;
}

.breadcrumb a {
    color: #0891b2;
    text-decoration: none;
    font-weight: 750;
}

.filter-panel {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, minmax(130px, 0.5fr)) auto;
    gap: 12px;
    margin: 28px 0 30px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid #e2e8f0;
    border-radius: 22px;
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 46px;
    border: 1px solid #dbeafe;
    outline: 0;
    border-radius: 15px;
    padding: 0 14px;
    color: #0f172a;
    background: #ffffff;
}

.no-result {
    display: none;
    padding: 32px;
    color: #64748b;
    text-align: center;
    border-radius: 22px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
}

.no-result.show {
    display: block;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: #020617;
}

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

.detail-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(10px) scale(1.08);
}

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.82) 45%, rgba(2, 6, 23, 0.55) 100%);
}

.detail-wrap {
    position: relative;
    z-index: 1;
    max-width: 1280px;
    margin: 0 auto;
    padding: 72px 24px 54px;
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 42px;
    align-items: center;
}

.detail-poster {
    border-radius: 26px;
    overflow: hidden;
    aspect-ratio: 4 / 5;
    background: linear-gradient(135deg, #0e7490, #1d4ed8);
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.42);
}

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

.detail-info h1 {
    margin: 14px 0 18px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.detail-info p {
    max-width: 800px;
    color: #dbeafe;
    line-height: 1.9;
    font-size: 17px;
}

.detail-main {
    max-width: 1280px;
    margin: 0 auto;
    padding: 54px 24px 72px;
}

.player-section,
.content-panel {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 28px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.player-section {
    padding: 18px;
    margin-bottom: 34px;
}

.video-shell {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: #020617;
    aspect-ratio: 16 / 9;
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle at center, rgba(8, 145, 178, 0.22), rgba(2, 6, 23, 0.34));
    cursor: pointer;
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.play-icon {
    width: 76px;
    height: 76px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    font-size: 32px;
    padding-left: 5px;
    background: linear-gradient(135deg, var(--primary), var(--blue));
    box-shadow: 0 20px 48px rgba(37, 99, 235, 0.38);
}

.video-shell.is-playing .play-overlay {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.content-panel {
    padding: 30px;
    margin-bottom: 34px;
}

.content-panel h2 {
    margin: 0 0 18px;
    font-size: 26px;
}

.content-panel p {
    color: #334155;
    line-height: 2;
    margin: 0 0 18px;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 28px;
}

.meta-table {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 12px 16px;
    color: #475569;
}

.meta-table strong {
    color: #0f172a;
}

.site-footer {
    border-top: 1px solid #e2e8f0;
    background: #ffffff;
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 32px 24px;
    display: flex;
    justify-content: space-between;
    gap: 24px;
    color: #64748b;
    line-height: 1.8;
}

.footer-inner a {
    color: #0891b2;
    text-decoration: none;
    font-weight: 750;
}

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

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

    .detail-wrap {
        grid-template-columns: 240px 1fr;
    }
}

@media (max-width: 860px) {
    .nav-container {
        flex-wrap: wrap;
    }

    .mobile-toggle {
        display: block;
        margin-left: auto;
    }

    .main-nav,
    .nav-search {
        display: none;
        width: 100%;
    }

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

    .main-nav {
        flex-direction: column;
        align-items: stretch;
    }

    .main-nav a {
        border-radius: 14px;
    }

    .nav-search {
        min-width: 0;
    }

    .hero-slider {
        min-height: 560px;
        height: 78vh;
    }

    .hero-control {
        display: none;
    }

    .hero-search {
        grid-template-columns: 1fr;
    }

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

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

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

    .detail-poster {
        max-width: 280px;
    }

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

    .footer-inner {
        flex-direction: column;
    }
}

@media (max-width: 560px) {
    .nav-container,
    .hero-inner,
    .hero-search-wrap,
    .page-main,
    .detail-main,
    .detail-wrap {
        padding-left: 16px;
        padding-right: 16px;
    }

    .brand {
        font-size: 19px;
    }

    .hero-copy h1 {
        font-size: 40px;
    }

    .movie-grid,
    .category-grid,
    .filter-panel {
        grid-template-columns: 1fr;
    }

    .content-panel {
        padding: 22px;
    }
}
