
:root {
    --bg: #f5f7fb;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --card: #ffffff;
    --blue: #2563eb;
    --blue-dark: #1e3a8a;
    --cyan: #38bdf8;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: linear-gradient(180deg, #eef4ff 0%, #f8fafc 36%, #ffffff 100%);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

.container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #ffffff;
    background: linear-gradient(90deg, #0f172a 0%, #1e3a8a 52%, #0f172a 100%);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.26);
}

.header-inner {
    display: flex;
    align-items: center;
    min-height: 68px;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    font-weight: 800;
}

.logo-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(135deg, #60a5fa, #2563eb);
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.4);
}

.logo-text {
    font-size: 20px;
    letter-spacing: 0.02em;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    overflow-x: auto;
    scrollbar-width: none;
}

.main-nav::-webkit-scrollbar {
    display: none;
}

.main-nav a {
    padding: 9px 12px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.82);
    white-space: nowrap;
    transition: background 0.25s ease, color 0.25s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.13);
}

.top-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.top-search input {
    width: 180px;
    border: 0;
    color: #ffffff;
    outline: 0;
    padding: 8px 6px 8px 12px;
    background: transparent;
}

.top-search input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.top-search button,
.hero-search button,
.filter-bar button,
.btn {
    border: 0;
    cursor: pointer;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.3);
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.top-search button {
    padding: 8px 14px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    font-weight: 700;
}

.btn.secondary {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: none;
    backdrop-filter: blur(10px);
}

.btn:hover,
.top-search button:hover,
.hero-search button:hover,
.filter-bar button:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 35px rgba(37, 99, 235, 0.34);
}

.nav-toggle {
    display: none;
    color: #ffffff;
    border: 0;
    font-size: 24px;
    background: transparent;
}

.hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: radial-gradient(circle at 22% 20%, rgba(59, 130, 246, 0.42), transparent 32%), linear-gradient(135deg, #0f172a 0%, #1e3a8a 54%, #111827 100%);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.16;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.55) 1px, transparent 1px);
    background-size: 34px 34px;
}

.hero-shell {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
    gap: 38px;
    align-items: center;
    min-height: 620px;
    padding: 72px 0;
}

.hero-eyebrow,
.section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #bfdbfe;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero h1 {
    margin: 18px 0 18px;
    max-width: 760px;
    font-size: clamp(38px, 5vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.045em;
}

.hero-lead {
    max-width: 690px;
    color: #dbeafe;
    font-size: clamp(18px, 2vw, 24px);
}

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

.hero-search {
    display: flex;
    max-width: 610px;
    margin-top: 24px;
    padding: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(18px);
}

.hero-search input {
    flex: 1;
    min-width: 0;
    color: #ffffff;
    border: 0;
    outline: 0;
    padding: 12px 16px;
    background: transparent;
    font-size: 16px;
}

.hero-search input::placeholder {
    color: rgba(255, 255, 255, 0.74);
}

.hero-search button {
    padding: 12px 22px;
    font-weight: 800;
}

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

.hero-tags a,
.tag-row span,
.info-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.hero-tags a {
    padding: 9px 13px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-carousel {
    position: relative;
    min-height: 480px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-rows: minmax(260px, 1fr) auto;
    overflow: hidden;
    border-radius: 30px;
    background: #0f172a;
    box-shadow: 0 32px 70px rgba(0, 0, 0, 0.36);
    opacity: 0;
    transform: translateX(18px) scale(0.98);
    pointer-events: none;
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.hero-slide.is-active {
    opacity: 1;
    transform: translateX(0) scale(1);
    pointer-events: auto;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    min-height: 310px;
    object-fit: cover;
    opacity: 0.92;
}

.hero-slide-content {
    position: relative;
    padding: 24px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.98));
}

.hero-slide-content h2 {
    margin: 0 0 8px;
    font-size: 26px;
}

.hero-slide-content p {
    margin: 0 0 16px;
    color: #cbd5e1;
}

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

.hero-dots button {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    cursor: pointer;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
}

.hero-dots button.is-active {
    width: 28px;
    background: #60a5fa;
}

.section {
    padding: 70px 0;
}

.section.alt {
    background: linear-gradient(135deg, #eff6ff, #f8fafc);
}

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

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

.section-head p,
.page-title p {
    max-width: 760px;
    margin: 10px 0 0;
    color: var(--muted);
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: 0 10px 32px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #0f172a;
}

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 35%, rgba(0, 0, 0, 0.68));
    opacity: 0.75;
}

.play-mark {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    color: #ffffff;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.92);
    transform: translate(-50%, -50%) scale(0.86);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    display: grid;
    place-items: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    color: #ffffff;
    border-radius: 999px;
    background: linear-gradient(135deg, #f97316, #ef4444);
    box-shadow: 0 10px 20px rgba(239, 68, 68, 0.35);
}

.card-body {
    padding: 18px;
}

.card-title {
    margin: 0;
    font-size: 19px;
    line-height: 1.35;
}

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

.card-meta {
    margin: 8px 0;
    color: var(--muted);
    font-size: 14px;
}

.card-summary {
    min-height: 46px;
    margin: 0 0 14px;
    color: #334155;
    font-size: 14px;
}

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

.tag-row span {
    padding: 5px 9px;
    color: #1d4ed8;
    background: #dbeafe;
}

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

.category-card {
    display: flex;
    min-height: 180px;
    flex-direction: column;
    justify-content: space-between;
    padding: 22px;
    border-radius: var(--radius);
    color: #ffffff;
    background: radial-gradient(circle at top right, rgba(96, 165, 250, 0.7), transparent 38%), linear-gradient(135deg, #1e3a8a, #0f172a);
    box-shadow: var(--shadow);
}

.category-card h2,
.category-card h3 {
    margin: 0 0 10px;
    font-size: 24px;
}

.category-card p {
    margin: 0;
    color: #dbeafe;
}

.filter-panel {
    margin-bottom: 26px;
    padding: 18px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 10px 32px rgba(15, 23, 42, 0.08);
}

.filter-panel input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 16px;
    outline: 0;
    padding: 14px 16px;
    font-size: 16px;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.filter-bar button {
    padding: 9px 13px;
}

.filter-bar button.is-active {
    background: linear-gradient(135deg, #0f172a, #1e3a8a);
}

.page-hero {
    padding: 72px 0 42px;
    background: linear-gradient(135deg, #eef4ff, #ffffff);
}

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

.rank-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
    align-items: start;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 56px 120px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
}

.rank-num {
    display: grid;
    place-items: center;
    min-width: 38px;
    height: 38px;
    color: #ffffff;
    border-radius: 999px;
    font-weight: 900;
    background: linear-gradient(135deg, #f97316, #ef4444);
}

.rank-item img {
    width: 120px;
    height: 76px;
    border-radius: 16px;
    object-fit: cover;
}

.rank-item h2 {
    margin: 0 0 6px;
    font-size: 20px;
}

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

.rank-score {
    color: #ef4444;
    font-weight: 900;
}

.sidebar-card {
    position: sticky;
    top: 92px;
    padding: 22px;
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--shadow);
}

.compact-list {
    display: grid;
    gap: 12px;
}

.compact-card {
    display: grid;
    grid-template-columns: auto 82px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 18px;
    background: #f8fafc;
}

.compact-card img {
    width: 82px;
    height: 54px;
    object-fit: cover;
    border-radius: 14px;
}

.compact-card strong,
.compact-card em {
    display: block;
}

.compact-card strong {
    line-height: 1.35;
}

.compact-card em {
    color: var(--muted);
    font-style: normal;
    font-size: 13px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--muted);
    font-size: 14px;
}

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

.detail-hero {
    padding: 42px 0 64px;
    color: #ffffff;
    background: radial-gradient(circle at 80% 10%, rgba(96, 165, 250, 0.4), transparent 28%), linear-gradient(135deg, #0f172a, #1e3a8a 58%, #111827);
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 32px;
    align-items: start;
}

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

.detail-title p {
    max-width: 760px;
    color: #dbeafe;
    font-size: 18px;
}

.info-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0 22px;
}

.info-pill {
    padding: 8px 12px;
    color: #dbeafe;
    background: rgba(255, 255, 255, 0.11);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.detail-cover {
    overflow: hidden;
    border-radius: 28px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.38);
}

.detail-cover img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
}

.player-card {
    margin-top: -36px;
    position: relative;
    z-index: 3;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    background: #020617;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.36);
}

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

.play-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 8px;
    color: #ffffff;
    border: 0;
    cursor: pointer;
    background: radial-gradient(circle at center, rgba(37, 99, 235, 0.34), rgba(2, 6, 23, 0.76));
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-cover span {
    display: grid;
    place-items: center;
    width: 82px;
    height: 82px;
    border-radius: 999px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    box-shadow: 0 18px 42px rgba(37, 99, 235, 0.46);
    font-size: 28px;
}

.play-cover strong {
    font-size: 18px;
}

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

.content-card {
    padding: 30px;
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--shadow);
}

.content-card h2 {
    margin-top: 0;
    font-size: 28px;
}

.content-card p {
    color: #334155;
    font-size: 17px;
}

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

.site-footer {
    color: #cbd5e1;
    background: linear-gradient(180deg, #0f172a, #020617);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 28px;
    padding: 52px 0 32px;
}

.site-footer h2 {
    margin: 0 0 12px;
    color: #ffffff;
    font-size: 19px;
}

.site-footer p {
    margin: 0;
    color: #94a3b8;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
}

.footer-links a:hover {
    color: #60a5fa;
}

.copyright {
    padding: 18px;
    text-align: center;
    color: #94a3b8;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

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

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

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

    .hero-carousel {
        min-height: 520px;
    }

    .sidebar-card {
        position: static;
    }
}

@media (max-width: 820px) {
    .header-inner {
        flex-wrap: wrap;
        padding: 12px 0;
    }

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

    .main-nav {
        display: none;
        flex-basis: 100%;
        flex-direction: column;
        align-items: stretch;
        padding: 10px 0;
    }

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

    .top-search {
        order: 5;
        width: 100%;
    }

    .top-search input {
        width: 100%;
    }

    .hero-shell {
        min-height: auto;
        padding: 54px 0;
    }

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

    .rank-item {
        grid-template-columns: 44px 92px minmax(0, 1fr);
    }

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

    .rank-item img {
        width: 92px;
        height: 62px;
    }

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

@media (max-width: 560px) {
    .container {
        width: min(100% - 22px, 1180px);
    }

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

    .hero-search {
        border-radius: 22px;
        flex-direction: column;
    }

    .hero-search button {
        width: 100%;
    }

    .hero-carousel {
        min-height: 450px;
    }

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

    .section {
        padding: 50px 0;
    }

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

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