:root {
    --sky: #0284c7;
    --blue: #2563eb;
    --deep: #0f172a;
    --text: #1f2937;
    --muted: #64748b;
    --line: #dbeafe;
    --soft: #f0f9ff;
    --card: #ffffff;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(14, 165, 233, 0.16), transparent 32rem),
        linear-gradient(180deg, #f8fbff 0%, #eef8ff 45%, #ffffff 100%);
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(186, 230, 253, 0.8);
    box-shadow: 0 8px 30px rgba(14, 165, 233, 0.08);
}

.header-inner,
.footer-inner,
.page-wrap {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
}

.header-inner {
    height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--deep);
}

.brand-icon {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--sky), var(--blue));
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.25);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-text strong,
.footer-brand {
    font-size: 22px;
    font-weight: 800;
    background: linear-gradient(90deg, var(--sky), var(--blue));
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

.brand-text em {
    font-size: 12px;
    color: var(--muted);
    font-style: normal;
    margin-top: 4px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    font-weight: 700;
    color: #334155;
}

.desktop-nav a,
.mobile-nav a,
.footer-links a,
.hero-link,
.page-link {
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.footer-links a:hover,
.page-link:hover {
    color: var(--sky);
}

.menu-button {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    background: #e0f2fe;
    color: var(--sky);
    font-size: 24px;
}

.mobile-nav {
    display: none;
    padding: 12px 16px 18px;
    border-top: 1px solid var(--line);
}

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

.mobile-nav a {
    padding: 12px 14px;
    border-radius: 14px;
    color: #334155;
    font-weight: 700;
}

.mobile-nav a:hover {
    background: #e0f2fe;
}

.hero {
    position: relative;
    min-height: 560px;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a 0%, #075985 45%, #0284c7 100%);
    color: #fff;
}

.hero::before,
.hero::after {
    content: "";
    position: absolute;
    inset: auto;
    width: 520px;
    height: 520px;
    border-radius: 999px;
    filter: blur(40px);
    opacity: 0.34;
}

.hero::before {
    right: -160px;
    top: -160px;
    background: #38bdf8;
}

.hero::after {
    left: -180px;
    bottom: -220px;
    background: #2563eb;
}

.hero-inner {
    position: relative;
    z-index: 2;
    width: min(1280px, calc(100% - 32px));
    min-height: 560px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.75fr);
    align-items: center;
    gap: 48px;
    padding: 72px 0;
}

.hero-copy h1 {
    margin: 0 0 20px;
    font-size: clamp(40px, 6vw, 72px);
    line-height: 1.04;
    letter-spacing: -0.04em;
}

.hero-copy p {
    max-width: 680px;
    margin: 0 0 26px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
    line-height: 1.85;
}

.hero-tags,
.tag-row,
.meta-list,
.filter-bar,
.hero-actions,
.category-pills {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags span,
.tag-row span,
.detail-tags span,
.category-pills a {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 7px 12px;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}

.hero-actions {
    margin-top: 30px;
}

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

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

.btn-primary {
    color: #fff;
    background: linear-gradient(90deg, #0ea5e9, #2563eb);
    box-shadow: 0 16px 30px rgba(14, 165, 233, 0.3);
}

.btn-light {
    color: #075985;
    background: #fff;
}

.hero-stage {
    position: relative;
    min-height: 460px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: end;
    padding: 22px;
    border-radius: 32px;
    overflow: hidden;
    opacity: 0;
    transform: scale(0.98) translateY(12px);
    transition: opacity 0.65s ease, transform 0.65s ease;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.32);
    background: #082f49;
}

.hero-slide.active {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.hero-slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.88;
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.08), rgba(15, 23, 42, 0.88));
}

.slide-content {
    position: relative;
    z-index: 2;
}

.slide-content h2 {
    margin: 0 0 10px;
    font-size: 30px;
}

.slide-content p {
    margin: 0 0 16px;
    color: rgba(255, 255, 255, 0.86);
    line-height: 1.7;
}

.hero-dots {
    position: absolute;
    left: 22px;
    bottom: -28px;
    z-index: 4;
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
}

.hero-dot.active {
    width: 28px;
    background: #fff;
}

.page-wrap {
    padding: 42px 0 72px;
}

.section {
    margin-bottom: 56px;
}

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

.section-title,
.page-title {
    margin: 0;
    color: var(--deep);
    letter-spacing: -0.02em;
}

.section-title {
    font-size: clamp(26px, 4vw, 38px);
}

.page-title {
    font-size: clamp(34px, 6vw, 56px);
}

.section-desc,
.page-desc {
    color: var(--muted);
    line-height: 1.8;
    margin: 10px 0 0;
}

.hero-search,
.search-panel {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 12px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow);
}

.hero-search input,
.search-panel input,
.filter-bar select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 14px 16px;
    font: inherit;
    outline: none;
    color: #0f172a;
    background: #fff;
}

.hero-search input:focus,
.search-panel input:focus,
.filter-bar select:focus {
    border-color: #7dd3fc;
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.14);
}

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

.movie-card {
    overflow: hidden;
    border-radius: 24px;
    background: var(--card);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.09);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 60px rgba(14, 165, 233, 0.18);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, #bae6fd, #dbeafe);
}

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

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

.score {
    position: absolute;
    top: 12px;
    right: 12px;
    border-radius: 999px;
    padding: 5px 10px;
    background: linear-gradient(90deg, #f59e0b, #ef4444);
    color: #fff;
    font-size: 13px;
    font-weight: 900;
    box-shadow: 0 12px 25px rgba(239, 68, 68, 0.24);
}

.card-body {
    padding: 18px;
}

.card-title {
    display: -webkit-box;
    min-height: 48px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--deep);
    font-size: 18px;
    line-height: 1.35;
    font-weight: 850;
}

.card-title:hover {
    color: var(--sky);
}

.card-meta {
    margin-top: 8px;
    color: var(--sky);
    font-size: 13px;
    font-weight: 800;
}

.card-body p {
    display: -webkit-box;
    min-height: 66px;
    margin: 12px 0;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--muted);
    line-height: 1.55;
    font-size: 14px;
}

.tag-row span {
    background: #e0f2fe;
    color: #0369a1;
}

.scroll-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 310px;
    gap: 18px;
    overflow-x: auto;
    padding: 4px 4px 20px;
    scroll-snap-type: x mandatory;
}

.scroll-row .movie-card {
    scroll-snap-align: start;
}

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

.category-card {
    min-height: 170px;
    padding: 24px;
    border-radius: 26px;
    background: linear-gradient(135deg, #ffffff, #e0f2fe);
    box-shadow: var(--shadow);
    border: 1px solid rgba(186, 230, 253, 0.75);
}

.category-card h2,
.category-card h3 {
    margin: 0 0 10px;
    color: var(--deep);
}

.category-card p {
    margin: 0 0 18px;
    color: var(--muted);
    line-height: 1.75;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 56px 90px 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.rank-num {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: #fff;
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
    font-weight: 900;
}

.rank-item img {
    width: 90px;
    height: 120px;
    border-radius: 16px;
    object-fit: cover;
    background: #e0f2fe;
}

.rank-item h2,
.rank-item h3 {
    margin: 0 0 8px;
    color: var(--deep);
}

.rank-item p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.rank-mark {
    color: var(--sky);
    font-weight: 900;
    white-space: nowrap;
}

.breadcrumb {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 22px;
    color: var(--muted);
    font-weight: 700;
}

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

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

.player-shell {
    overflow: hidden;
    border-radius: 28px;
    background: #000;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.32);
}

.video-box {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
}

.video-box video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
}

.play-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.08), rgba(15, 23, 42, 0.74));
    cursor: pointer;
}

.play-cover.hidden {
    display: none;
}

.play-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.52;
}

.play-button {
    position: relative;
    z-index: 2;
    width: 86px;
    height: 86px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
    font-size: 34px;
    cursor: pointer;
    box-shadow: 0 18px 45px rgba(2, 132, 199, 0.45);
}

.detail-card {
    padding: 28px;
    border-radius: 28px;
    background: #fff;
    box-shadow: var(--shadow);
}

.detail-card h1 {
    margin: 0 0 16px;
    color: var(--deep);
    font-size: clamp(32px, 5vw, 54px);
    line-height: 1.15;
}

.meta-list {
    margin-bottom: 18px;
}

.meta-list span {
    padding: 8px 12px;
    border-radius: 999px;
    background: #e0f2fe;
    color: #0369a1;
    font-size: 13px;
    font-weight: 850;
}

.detail-card p {
    color: #475569;
    line-height: 1.9;
    font-size: 16px;
}

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

.detail-tags span {
    background: linear-gradient(90deg, #e0f2fe, #dbeafe);
    color: #0369a1;
}

.side-panel {
    display: grid;
    gap: 18px;
    align-content: start;
}

.side-box {
    padding: 20px;
    border-radius: 24px;
    background: #fff;
    box-shadow: var(--shadow);
}

.side-box h2 {
    margin: 0 0 16px;
    color: var(--deep);
}

.related-grid {
    display: grid;
    gap: 14px;
}

.related-card a {
    display: grid;
    grid-template-columns: 76px 1fr;
    gap: 12px;
    align-items: center;
}

.related-card img {
    width: 76px;
    height: 100px;
    border-radius: 14px;
    object-fit: cover;
    background: #e0f2fe;
}

.related-card span {
    color: var(--deep);
    font-weight: 850;
    line-height: 1.45;
}

.related-card p {
    margin: 6px 0 0 88px;
    color: var(--muted);
    font-size: 13px;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 34px;
}

.pagination a,
.pagination span {
    min-width: 42px;
    padding: 11px 15px;
    border-radius: 14px;
    background: #fff;
    color: #0369a1;
    font-weight: 800;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.pagination .active {
    color: #fff;
    background: linear-gradient(90deg, #0ea5e9, #2563eb);
}

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

.footer-inner {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 32px;
}

.footer-inner p {
    max-width: 560px;
    line-height: 1.85;
}

.footer-links {
    display: grid;
    align-content: start;
    gap: 10px;
}

.footer-links strong {
    color: #fff;
    margin-bottom: 8px;
}

.footer-links a:hover {
    color: #7dd3fc;
}

.hidden-card {
    display: none !important;
}

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

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

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

    .hero-stage {
        min-height: 420px;
    }
}

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

    .menu-button {
        display: inline-grid;
        place-items: center;
    }

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

    .hero-inner {
        padding: 48px 0 70px;
    }

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

    .rank-item {
        grid-template-columns: 42px 72px 1fr;
    }

    .rank-mark {
        grid-column: 3;
    }

    .rank-item img {
        width: 72px;
        height: 96px;
    }

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

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

    .hero-stage {
        min-height: 360px;
    }

    .scroll-row {
        grid-auto-columns: 82%;
    }
}
