:root {
    --cyan: #0891b2;
    --cyan-dark: #0e7490;
    --blue: #2563eb;
    --slate-950: #020617;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748b;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;
    --slate-50: #f8fafc;
    --white: #ffffff;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
    --soft-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    color: var(--slate-800);
    background: linear-gradient(180deg, var(--slate-50), var(--white));
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.85);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.site-nav,
.mobile-nav,
.page-shell,
.footer-inner,
.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

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

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--slate-800);
}

.logo-mark {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    color: var(--white);
    border-radius: 12px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 10px 20px rgba(8, 145, 178, 0.28);
    font-size: 16px;
}

.site-logo span:last-child {
    background: linear-gradient(90deg, var(--cyan), var(--blue));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-link,
.mobile-link {
    color: var(--slate-700);
    font-weight: 650;
    transition: color 0.2s ease;
}

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

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

.menu-button span {
    display: block;
    width: 100%;
    height: 2px;
    margin: 5px 0;
    background: var(--slate-700);
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    padding: 0 0 18px;
}

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

.page-shell {
    padding: 32px 0 0;
}

.hero-carousel {
    position: relative;
    height: 560px;
    overflow: hidden;
    border-radius: 28px;
    box-shadow: var(--shadow);
    background: var(--slate-900);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    background-position: center;
    background-size: cover;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.06), rgba(2, 6, 23, 0.44) 42%, rgba(2, 6, 23, 0.86));
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 760px;
    padding: 48px;
    color: var(--white);
}

.hero-kicker,
.section-heading span,
.page-hero span {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 7px 13px;
    color: var(--white);
    background: var(--cyan);
    border-radius: 999px;
    font-size: 14px;
    font-weight: 750;
    letter-spacing: 0.02em;
}

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

.hero-content p {
    max-width: 680px;
    margin: 0 0 28px;
    font-size: 18px;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.9);
}

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

.primary-button,
.ghost-button,
.filter-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 12px;
    font-weight: 750;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.primary-button {
    color: var(--white);
    background: var(--cyan);
    box-shadow: 0 14px 28px rgba(8, 145, 178, 0.34);
}

.primary-button:hover,
.filter-link:hover {
    background: var(--cyan-dark);
    transform: translateY(-1px);
}

.ghost-button {
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.38);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
}

.ghost-button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    color: var(--white);
    background: rgba(2, 6, 23, 0.48);
    cursor: pointer;
    font-size: 34px;
    line-height: 1;
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(2, 6, 23, 0.72);
    transform: translateY(-50%) scale(1.04);
}

.hero-prev {
    left: 20px;
    transform: translateY(-50%);
}

.hero-next {
    right: 20px;
    transform: translateY(-50%);
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 24px;
    z-index: 5;
    display: flex;
    gap: 9px;
    transform: translateX(-50%);
}

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

.hero-dot.is-active {
    width: 32px;
    background: var(--white);
}

.search-section,
.filter-bar,
.page-hero,
.content-section,
.detail-card,
.category-overview-card {
    border-radius: 24px;
    background: var(--white);
    box-shadow: var(--soft-shadow);
}

.search-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
    gap: 26px;
    align-items: center;
    margin: 34px 0 0;
    padding: 30px;
    background: linear-gradient(90deg, #ecfeff, #eff6ff);
}

.search-section h2,
.page-hero h1,
.section-heading h2 {
    margin: 0;
    color: var(--slate-800);
    letter-spacing: -0.04em;
}

.search-section h2 {
    font-size: 30px;
}

.search-section p,
.page-hero p {
    margin: 10px 0 0;
    color: var(--slate-600);
    line-height: 1.75;
}

.filter-bar {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    margin: 28px 0 0;
    padding: 18px;
}

.search-label {
    display: grid;
    flex: 1;
    gap: 8px;
    color: var(--slate-600);
    font-weight: 700;
}

.search-label input {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--slate-200);
    border-radius: 14px;
    padding: 0 16px;
    color: var(--slate-800);
    outline: none;
    background: var(--white);
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.search-label input:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.14);
}

.filter-link {
    color: var(--white);
    background: var(--cyan);
}

.content-section {
    margin: 34px 0 0;
    padding: 30px;
}

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

.section-heading div {
    display: grid;
    gap: 10px;
}

.section-heading span {
    color: var(--cyan);
    background: #ecfeff;
}

.section-heading h2 {
    font-size: clamp(26px, 4vw, 36px);
}

.section-heading a {
    color: var(--cyan);
    font-weight: 750;
}

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

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

.movie-card {
    min-width: 0;
}

.movie-card.is-hidden,
.rank-card.is-hidden {
    display: none;
}

.movie-card-link {
    display: block;
    height: 100%;
    overflow: hidden;
    border-radius: 18px;
    background: var(--white);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.movie-card-link:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 42px rgba(15, 23, 42, 0.14);
}

.movie-poster {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: var(--slate-900);
}

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

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

.movie-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0;
    background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.68));
    transition: opacity 0.25s ease;
}

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

.movie-category {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    padding: 5px 10px;
    color: var(--white);
    background: var(--cyan);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 750;
    box-shadow: 0 10px 18px rgba(8, 145, 178, 0.26);
}

.poster-play {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 60px;
    height: 60px;
    color: var(--white);
    border-radius: 999px;
    background: rgba(8, 145, 178, 0.92);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card-link:hover .poster-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

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

.movie-card-body h3 {
    display: -webkit-box;
    min-height: 48px;
    margin: 0 0 10px;
    overflow: hidden;
    color: var(--slate-800);
    font-size: 18px;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: color 0.2s ease;
}

.movie-card-link:hover h3 {
    color: var(--cyan);
}

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

.movie-meta,
.rank-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--slate-500);
    font-size: 13px;
}

.movie-meta span,
.rank-meta span,
.detail-meta span {
    padding: 4px 8px;
    border-radius: 8px;
    background: var(--slate-100);
}

.movie-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 12px 0 0;
}

.movie-tags span,
.detail-tags span {
    padding: 4px 8px;
    border-radius: 8px;
    color: var(--cyan-dark);
    background: #ecfeff;
    font-size: 12px;
    font-weight: 650;
}

.ranking-panel {
    background: linear-gradient(90deg, #ecfeff, #eff6ff);
}

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

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

.rank-card a {
    display: grid;
    grid-template-columns: auto 86px 1fr;
    gap: 14px;
    align-items: center;
    min-height: 128px;
    padding: 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-card a:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 30px rgba(15, 23, 42, 0.12);
}

.rank-number {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: var(--white);
    border-radius: 14px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    font-weight: 850;
}

.rank-card img {
    width: 86px;
    height: 104px;
    object-fit: cover;
    border-radius: 12px;
    background: var(--slate-900);
}

.rank-card h3 {
    margin: 0 0 8px;
    color: var(--slate-800);
    font-size: 17px;
}

.rank-card p {
    display: -webkit-box;
    margin: 0 0 10px;
    overflow: hidden;
    color: var(--slate-600);
    font-size: 14px;
    line-height: 1.55;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.category-tile {
    position: relative;
    display: flex;
    min-height: 170px;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    padding: 20px;
    border-radius: 18px;
    color: var(--white);
    background-position: center;
    background-size: cover;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
}

.category-tile::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.78));
}

.category-tile span,
.category-tile strong {
    position: relative;
    z-index: 1;
}

.category-tile span {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 850;
}

.category-tile strong {
    color: rgba(255, 255, 255, 0.86);
    font-size: 13px;
    line-height: 1.55;
}

.page-hero {
    padding: 36px;
    background: linear-gradient(90deg, #ecfeff, #eff6ff);
}

.slim-hero h1 {
    margin: 16px 0 0;
    font-size: clamp(32px, 5vw, 48px);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 0 0 20px;
    color: var(--slate-500);
    font-size: 14px;
}

.breadcrumb a {
    color: var(--cyan);
    font-weight: 700;
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 210px 1fr;
    gap: 22px;
    padding: 18px;
}

.category-cover {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: 220px;
    overflow: hidden;
    padding: 18px;
    border-radius: 18px;
    color: var(--white);
    background-position: center;
    background-size: cover;
}

.category-cover::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.76));
}

.category-cover span {
    position: relative;
    z-index: 1;
    font-size: 24px;
    font-weight: 850;
}

.category-overview-card h2 {
    margin: 6px 0 10px;
    color: var(--slate-800);
}

.category-overview-card p {
    margin: 0 0 14px;
    color: var(--slate-600);
    line-height: 1.7;
}

.category-overview-card ul {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.category-overview-card li a {
    color: var(--slate-700);
    font-weight: 650;
}

.category-overview-card li a:hover {
    color: var(--cyan);
}

.detail-shell {
    max-width: 1120px;
}

.detail-card {
    overflow: hidden;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 24px 24px 0 0;
    background: var(--slate-950);
}

.movie-video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--slate-950);
}

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 14px;
    width: 100%;
    color: var(--white);
    border: 0;
    background-position: center;
    background-size: cover;
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.82));
}

.player-cover.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.play-circle,
.player-title {
    position: relative;
    z-index: 1;
}

.play-circle {
    display: grid;
    place-items: center;
    width: 84px;
    height: 84px;
    border-radius: 999px;
    background: var(--cyan);
    box-shadow: 0 20px 40px rgba(8, 145, 178, 0.35);
    font-size: 34px;
}

.player-title {
    max-width: 80%;
    font-size: clamp(22px, 4vw, 36px);
    font-weight: 850;
    text-align: center;
    text-shadow: 0 4px 18px rgba(2, 6, 23, 0.5);
}

.detail-content {
    padding: 30px;
}

.detail-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.detail-title-row h1 {
    margin: 0;
    color: var(--slate-800);
    font-size: clamp(30px, 5vw, 44px);
    line-height: 1.18;
    letter-spacing: -0.05em;
}

.detail-category {
    flex: 0 0 auto;
    padding: 8px 14px;
    color: var(--white);
    border-radius: 999px;
    background: var(--cyan);
    font-size: 14px;
    font-weight: 750;
}

.detail-meta {
    margin: 18px 0 0;
}

.detail-tags span {
    font-size: 13px;
}

.highlight-box {
    margin: 24px 0;
    padding: 18px;
    border-radius: 16px;
    background: #ecfeff;
}

.highlight-box p {
    margin: 0;
    color: var(--slate-800);
    font-size: 18px;
    line-height: 1.75;
    font-weight: 700;
}

.detail-text {
    margin: 26px 0 0;
}

.detail-text h2 {
    margin: 0 0 12px;
    color: var(--slate-800);
    font-size: 24px;
}

.detail-text p {
    margin: 0;
    color: var(--slate-700);
    font-size: 17px;
    line-height: 1.9;
    white-space: pre-line;
}

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

.site-footer {
    margin: 60px 0 0;
    color: #cbd5e1;
    background: var(--slate-900);
}

.footer-inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 42px;
    padding: 44px 0;
}

.footer-logo span:last-child {
    color: var(--white);
    background: none;
    -webkit-background-clip: initial;
    background-clip: initial;
}

.footer-brand p {
    max-width: 520px;
    margin: 16px 0 0;
    color: #94a3b8;
    line-height: 1.75;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: var(--white);
    font-size: 18px;
}

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

.site-footer a:hover {
    color: #67e8f9;
}

.footer-bottom {
    padding: 22px 0;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    color: #94a3b8;
    text-align: center;
}

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

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

    .category-overview-grid {
        grid-template-columns: 1fr;
    }
}

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

    .menu-button {
        display: block;
    }

    .hero-carousel {
        height: 500px;
        border-radius: 22px;
    }

    .hero-content {
        padding: 34px 24px;
    }

    .hero-arrow {
        width: 40px;
        height: 40px;
        font-size: 28px;
    }

    .search-section,
    .filter-bar,
    .section-heading,
    .detail-title-row {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: stretch;
    }

    .movie-grid,
    .home-grid,
    .related-grid,
    .rank-grid,
    .rank-grid-wide {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

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

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

@media (max-width: 560px) {
    .site-nav,
    .mobile-nav,
    .page-shell,
    .footer-inner,
    .footer-bottom {
        width: min(100% - 22px, 1180px);
    }

    .site-logo {
        font-size: 21px;
    }

    .logo-mark {
        width: 32px;
        height: 32px;
    }

    .page-shell {
        padding-top: 18px;
    }

    .hero-carousel {
        height: 480px;
        border-radius: 18px;
    }

    .hero-content h1,
    .hero-content h2 {
        font-size: 33px;
    }

    .hero-content p {
        font-size: 16px;
    }

    .hero-prev,
    .hero-next {
        display: none;
    }

    .content-section,
    .search-section,
    .filter-bar,
    .page-hero,
    .detail-content {
        padding: 20px;
        border-radius: 18px;
    }

    .movie-grid,
    .home-grid,
    .related-grid,
    .all-movie-grid,
    .category-grid,
    .rank-grid,
    .rank-grid-wide {
        grid-template-columns: 1fr;
    }

    .rank-card a {
        grid-template-columns: auto 78px 1fr;
    }

    .rank-card img {
        width: 78px;
        height: 96px;
    }

    .player-shell {
        border-radius: 18px 18px 0 0;
    }

    .play-circle {
        width: 68px;
        height: 68px;
        font-size: 28px;
    }
}
