:root {
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-2: #f1f5f9;
    --text: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --cyan: #0891b2;
    --cyan-dark: #0e7490;
    --blue: #2563eb;
    --dark: #020617;
    --shadow: 0 18px 50px 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%, #eef6fb 45%, #f8fafc 100%);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

body.menu-open {
    overflow: hidden;
}

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

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

img.is-missing {
    display: none;
}

.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.9);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.header-inner {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    height: 68px;
    display: flex;
    align-items: center;
    gap: 22px;
}

.brand,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.brand-mark {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 12px 30px rgba(8, 145, 178, 0.32);
}

.brand-text {
    font-size: 22px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    -webkit-background-clip: text;
    color: transparent;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-left: auto;
}

.nav-link,
.mobile-link {
    font-size: 15px;
    color: #334155;
    font-weight: 650;
    transition: color 0.2s ease;
}

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

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

.header-search input,
.mobile-search input,
.filter-panel input,
.filter-panel select {
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    padding: 10px 14px;
    min-width: 220px;
    outline: none;
    color: var(--text);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
    border-color: rgba(8, 145, 178, 0.6);
    box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.12);
}

.header-search button,
.mobile-search button,
.primary-button,
.secondary-button,
.filter-panel button,
.play-button-inline {
    border: 0;
    cursor: pointer;
    border-radius: 999px;
    padding: 10px 18px;
    font-weight: 750;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: #fff;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.primary-button:hover,
.filter-panel button:hover,
.play-button-inline:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 28px rgba(37, 99, 235, 0.28);
}

.secondary-button {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: none;
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: #f1f5f9;
    cursor: pointer;
    padding: 10px;
}

.menu-button span {
    display: block;
    height: 2px;
    background: #0f172a;
    margin: 5px 0;
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.95);
    padding: 16px;
}

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

.page-main,
.section {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
}

.hero {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    background: #020617;
    color: #fff;
}

.hero-slider {
    position: relative;
    min-height: 620px;
}

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

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

.hero-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 80% 20%, rgba(8, 145, 178, 0.36), transparent 32%), linear-gradient(135deg, #020617 0%, #0f172a 48%, #111827 100%);
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.42;
    filter: saturate(1.12) contrast(1.08);
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(15, 23, 42, 0.78) 42%, rgba(15, 23, 42, 0.18) 100%), linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.82));
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1200px, calc(100% - 32px));
    min-height: 620px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.58fr);
    gap: 42px;
    align-items: center;
    padding: 76px 0 92px;
}

.hero-eyebrow,
.section-eyebrow,
.detail-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: max-content;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 750;
    background: rgba(8, 145, 178, 0.18);
    color: #67e8f9;
    border: 1px solid rgba(103, 232, 249, 0.26);
}

.hero h1 {
    margin: 18px 0 18px;
    font-size: clamp(42px, 7vw, 76px);
    line-height: 0.95;
    letter-spacing: -0.06em;
}

.hero p {
    max-width: 720px;
    margin: 0 0 24px;
    font-size: clamp(17px, 2vw, 21px);
    line-height: 1.72;
    color: #cbd5e1;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-card {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.36);
    backdrop-filter: blur(18px);
}

.hero-card img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    background: linear-gradient(135deg, #0f172a, #155e75, #1d4ed8);
}

.hero-card-body {
    padding: 20px;
}

.hero-card-body h2 {
    margin: 0 0 8px;
    font-size: 22px;
}

.hero-card-body p {
    font-size: 14px;
    margin: 0;
    color: #cbd5e1;
}

.hero-controls {
    position: absolute;
    z-index: 3;
    left: 50%;
    bottom: 28px;
    width: min(1200px, calc(100% - 32px));
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.hero-arrows {
    display: flex;
    gap: 10px;
}

.hero-arrow,
.hero-dot {
    border: 0;
    cursor: pointer;
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(14px);
}

.hero-arrow {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    font-size: 22px;
}

.hero-dots {
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 38px;
    height: 6px;
    border-radius: 999px;
    padding: 0;
    opacity: 0.55;
}

.hero-dot.active {
    opacity: 1;
    background: #67e8f9;
}

.section {
    padding: 64px 0 0;
}

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

.section-heading h1,
.section-heading h2 {
    margin: 10px 0 0;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.section-heading p,
.lead {
    max-width: 780px;
    color: var(--muted);
    line-height: 1.8;
}

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

.movie-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border-color: rgba(8, 145, 178, 0.28);
}

.poster-link {
    position: relative;
    display: block;
}

.poster-shell,
.rank-cover,
.detail-poster,
.category-card-icon {
    display: block;
    overflow: hidden;
    background: radial-gradient(circle at 30% 20%, rgba(103, 232, 249, 0.35), transparent 36%), linear-gradient(135deg, #0f172a 0%, #155e75 45%, #1d4ed8 100%);
}

.poster-shell {
    aspect-ratio: 3 / 4;
}

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

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

.card-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    border-radius: 999px;
    padding: 6px 10px;
    color: #fff;
    font-size: 12px;
    font-weight: 750;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(10px);
}

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

.movie-card h2,
.ranking-item h2 {
    margin: 8px 0 8px;
    font-size: 18px;
    line-height: 1.35;
}

.movie-card h2 a:hover,
.ranking-item h2 a:hover,
.footer-inner a:hover {
    color: var(--cyan);
}

.movie-card p,
.ranking-item p,
.detail-copy p,
.detail-article p {
    color: var(--muted);
    line-height: 1.75;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #64748b;
    font-size: 13px;
    font-weight: 650;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.tag {
    display: inline-flex;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 12px;
    color: #0e7490;
    background: #ecfeff;
    border: 1px solid #cffafe;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 190px;
    border-radius: 28px;
    padding: 24px;
    color: #fff;
    background: linear-gradient(135deg, #0f172a, #0e7490 55%, #2563eb);
    box-shadow: var(--shadow);
}

.category-card h2 {
    margin: 18px 0 10px;
    font-size: 26px;
}

.category-card p {
    margin: 0 0 18px;
    color: #dbeafe;
    line-height: 1.7;
}

.category-card-icon {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    font-weight: 900;
}

.filter-panel {
    width: min(1200px, calc(100% - 32px));
    margin: 32px auto 0;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.07);
}

.filter-row {
    display: flex;
    align-items: end;
    gap: 14px;
    flex-wrap: wrap;
}

.filter-row label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
}

.type-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.type-tabs button {
    background: #e2e8f0;
    color: #334155;
    box-shadow: none;
}

.type-tabs button.active {
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: #fff;
}

.filter-empty {
    display: none;
    margin: 14px 0 0;
    color: var(--muted);
}

.filter-empty.show {
    display: block;
}

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

.ranking-item {
    display: grid;
    grid-template-columns: 72px 96px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.06);
}

.rank-num {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 18px;
    color: #fff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.rank-cover {
    width: 96px;
    aspect-ratio: 3 / 4;
    border-radius: 18px;
}

.rank-copy h2,
.rank-copy p {
    margin-top: 0;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at 75% 20%, rgba(8, 145, 178, 0.34), transparent 30%), linear-gradient(135deg, #020617, #0f172a 55%, #111827);
    color: #fff;
}

.detail-hero-inner {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 42px;
    align-items: center;
    padding: 74px 0;
}

.detail-poster {
    border-radius: 28px;
    aspect-ratio: 3 / 4;
    box-shadow: 0 34px 80px rgba(0, 0, 0, 0.38);
}

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

.breadcrumb a:hover {
    color: #67e8f9;
}

.detail-copy h1 {
    margin: 18px 0;
    font-size: clamp(36px, 6vw, 68px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 18px;
}

.detail-meta span {
    padding: 7px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #dbeafe;
}

.player-section {
    padding-top: 52px;
}

.video-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #020617;
    box-shadow: 0 30px 70px rgba(2, 6, 23, 0.25);
    aspect-ratio: 16 / 9;
}

.video-shell video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    background: #020617;
    cursor: pointer;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.15), rgba(2, 6, 23, 0.72));
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.play-circle {
    width: 88px;
    height: 88px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    font-size: 32px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.38);
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 28px;
    padding-top: 36px;
}

.detail-article,
.side-panel {
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.07);
    padding: 26px;
}

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

.side-panel .movie-card {
    box-shadow: none;
}

.side-panel .movie-card + .movie-card {
    margin-top: 16px;
}

.site-footer {
    margin-top: 72px;
    color: #cbd5e1;
    background: linear-gradient(135deg, #020617, #0f172a 48%, #111827);
}

.footer-inner {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 28px;
    padding: 52px 0 34px;
}

.footer-inner h2 {
    margin: 0 0 16px;
    color: #fff;
    font-size: 18px;
}

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

.footer-inner p,
.footer-inner a {
    color: #94a3b8;
    line-height: 1.7;
}

.footer-bottom {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 20px 0 28px;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    color: #64748b;
    font-size: 14px;
}

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

    .menu-button {
        display: block;
        margin-left: auto;
    }

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

    .hero-content,
    .detail-hero-inner,
    .detail-layout,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .hero-card {
        max-width: 360px;
    }

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

@media (max-width: 720px) {
    .header-inner {
        width: min(100% - 22px, 1200px);
    }

    .brand-text {
        font-size: 18px;
    }

    .hero,
    .hero-slider,
    .hero-content {
        min-height: 720px;
    }

    .hero-content {
        align-content: center;
        padding-top: 54px;
        padding-bottom: 110px;
    }

    .hero-card {
        display: none;
    }

    .hero-controls {
        align-items: flex-end;
    }

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

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

    .movie-card h2,
    .ranking-item h2 {
        font-size: 16px;
    }

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

    .ranking-item {
        grid-template-columns: 46px 74px minmax(0, 1fr);
        gap: 10px;
        padding: 10px;
    }

    .rank-num {
        width: 42px;
        height: 42px;
        border-radius: 14px;
        font-size: 14px;
    }

    .rank-cover {
        width: 74px;
    }

    .detail-hero-inner {
        padding: 44px 0;
    }

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

    .detail-article,
    .side-panel {
        padding: 18px;
    }
}

@media (max-width: 460px) {
    .movie-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .filter-row,
    .filter-row label,
    .filter-panel input,
    .filter-panel select {
        width: 100%;
    }
}
