:root {
    --sky: #0284c7;
    --sky-dark: #0369a1;
    --sky-soft: #e0f2fe;
    --blue: #2563eb;
    --indigo: #4338ca;
    --amber: #f59e0b;
    --emerald: #10b981;
    --ink: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --bg: #f8fafc;
    --white: #ffffff;
    --shadow: 0 20px 50px 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(135deg, #f8fafc 0%, #eff6ff 55%, #f8fafc 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.nav-shell {
    width: min(1220px, calc(100% - 32px));
    height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 22px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--sky);
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -0.03em;
    white-space: nowrap;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    color: #fff;
    background: linear-gradient(135deg, var(--sky), var(--indigo));
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(2, 132, 199, 0.3);
}

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

.nav-links > a,
.nav-drop > button {
    border: 0;
    background: transparent;
    color: #374151;
    font-weight: 700;
    cursor: pointer;
    transition: color 0.2s ease;
}

.nav-links > a:hover,
.nav-drop > button:hover {
    color: var(--sky);
}

.nav-drop {
    position: relative;
}

.nav-menu {
    position: absolute;
    top: calc(100% + 16px);
    right: 0;
    display: grid;
    min-width: 210px;
    padding: 10px;
    background: #fff;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 16px;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.2s ease;
}

.nav-menu a {
    padding: 9px 12px;
    border-radius: 10px;
    color: #475569;
    font-weight: 700;
}

.nav-menu a:hover {
    background: var(--sky-soft);
    color: var(--sky-dark);
}

.nav-drop:hover .nav-menu,
.nav-drop:focus-within .nav-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-search {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 4px;
}

.nav-search input,
.filter-panel input,
.filter-panel select {
    min-width: 220px;
    padding: 11px 15px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #fff;
    color: #0f172a;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nav-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--sky);
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.16);
}

.nav-search button,
.primary-btn,
.secondary-btn,
.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 11px 20px;
    border-radius: 999px;
    border: 0;
    color: #fff;
    background: linear-gradient(135deg, var(--sky), var(--blue));
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.24);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.nav-search button:hover,
.primary-btn:hover,
.secondary-btn:hover,
.ghost-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(37, 99, 235, 0.32);
}

.secondary-btn {
    color: var(--sky-dark);
    background: #fff;
}

.ghost-btn {
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    border: 2px solid rgba(255, 255, 255, 0.86);
    box-shadow: none;
}

.menu-toggle {
    display: none;
    margin-left: auto;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    color: var(--sky-dark);
    background: var(--sky-soft);
    font-size: 24px;
    cursor: pointer;
}

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

.hero {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(120deg, #0284c7, #2563eb 52%, #4338ca);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
    background-position: right center;
    background-size: min(48vw, 680px) auto;
    background-repeat: no-repeat;
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 75% 35%, rgba(255, 255, 255, 0.26), transparent 22%), linear-gradient(90deg, rgba(2, 132, 199, 0.96), rgba(37, 99, 235, 0.86) 48%, rgba(67, 56, 202, 0.46));
}

.hero-slide::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 160px;
    background: linear-gradient(0deg, #f8fafc, transparent);
}

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

.hero-inner {
    position: relative;
    z-index: 2;
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: center;
    gap: 42px;
    padding: 76px 0 110px;
}

.hero-copy {
    max-width: 760px;
}

.eyebrow,
.section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 13px;
    color: #075985;
    background: rgba(224, 242, 254, 0.95);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.hero h1,
.page-hero h1,
.detail-title {
    margin: 22px 0 18px;
    font-size: clamp(38px, 7vw, 72px);
    line-height: 1.02;
    font-weight: 950;
    letter-spacing: -0.06em;
}

.hero p {
    max-width: 680px;
    margin: 0 0 26px;
    color: #dbeafe;
    font-size: clamp(17px, 2vw, 23px);
}

.hero-meta,
.meta-line,
.card-meta,
.breadcrumb,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.hero-meta span,
.meta-line span,
.card-meta span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    color: #075985;
    background: #e0f2fe;
    font-size: 12px;
    font-weight: 800;
}

.hero-meta span {
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
}

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

.hero-card {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.24);
    box-shadow: 0 30px 70px rgba(15, 23, 42, 0.34);
    backdrop-filter: blur(16px);
}

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

.hero-card-info {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 22px;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.88), transparent);
}

.hero-card-info strong {
    display: block;
    font-size: 20px;
}

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

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

.hero-dots button.is-active {
    background: #fff;
}

.section {
    padding: 70px 0;
}

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

.section-title h2,
.section-title h1 {
    margin: 10px 0 0;
    color: #0f172a;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.1;
    font-weight: 950;
    letter-spacing: -0.05em;
}

.section-title p,
.page-hero p,
.detail-summary p,
.site-footer p {
    max-width: 760px;
    color: var(--muted);
    font-size: 16px;
}

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

.movie-card {
    overflow: hidden;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.poster-frame {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, #dbeafe, #e0f2fe);
}

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

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

.poster-frame::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.52), transparent 55%);
    opacity: 0;
    transition: opacity 0.24s ease;
}

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

.poster-year,
.poster-type {
    position: absolute;
    z-index: 2;
    top: 12px;
    padding: 5px 9px;
    border-radius: 999px;
    color: #fff;
    font-size: 12px;
    font-weight: 900;
}

.poster-year {
    left: 12px;
    background: var(--amber);
}

.poster-type {
    right: 12px;
    background: rgba(2, 132, 199, 0.9);
}

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

.movie-card h3 {
    margin: 0 0 8px;
    color: #111827;
    font-size: 18px;
    line-height: 1.3;
    font-weight: 900;
}

.movie-card h3 a:hover {
    color: var(--sky);
}

.movie-card p {
    display: -webkit-box;
    min-height: 46px;
    margin: 0 0 13px;
    overflow: hidden;
    color: #64748b;
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta {
    justify-content: space-between;
    margin-bottom: 12px;
}

.card-meta span:last-child {
    color: #475569;
    background: #f1f5f9;
}

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

.category-card {
    position: relative;
    min-height: 180px;
    overflow: hidden;
    padding: 24px;
    border-radius: var(--radius);
    color: #fff;
    background: linear-gradient(135deg, var(--sky), var(--blue) 58%, var(--indigo));
    box-shadow: 0 18px 40px rgba(37, 99, 235, 0.2);
}

.category-card::after {
    content: "";
    position: absolute;
    right: -30px;
    bottom: -50px;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
}

.category-card strong {
    display: block;
    position: relative;
    z-index: 2;
    margin-bottom: 10px;
    font-size: 24px;
    font-weight: 950;
}

.category-card p {
    position: relative;
    z-index: 2;
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
}

.rank-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 390px;
    gap: 26px;
}

.rank-panel,
.side-panel,
.detail-summary,
.filter-panel,
.info-panel {
    padding: 24px;
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

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

.rank-item {
    display: grid;
    grid-template-columns: 46px 82px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    padding: 10px;
    border-radius: 16px;
    background: #f8fafc;
    transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
    background: var(--sky-soft);
    transform: translateX(4px);
}

.rank-num {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    color: #fff;
    background: linear-gradient(135deg, var(--amber), #ef4444);
    border-radius: 12px;
    font-weight: 950;
}

.rank-item img {
    width: 82px;
    height: 52px;
    border-radius: 12px;
    object-fit: cover;
    background: #dbeafe;
}

.rank-copy strong,
.rank-copy em {
    display: block;
}

.rank-copy strong {
    overflow: hidden;
    color: #0f172a;
    font-size: 15px;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-copy em {
    color: #64748b;
    font-size: 12px;
    font-style: normal;
}

.page-hero {
    padding: 74px 0 52px;
    color: #fff;
    background: linear-gradient(135deg, var(--sky), var(--blue) 58%, var(--indigo));
}

.page-hero p,
.page-hero .breadcrumb a,
.page-hero .breadcrumb span {
    color: #dbeafe;
}

.breadcrumb {
    margin-bottom: 8px;
    font-size: 14px;
}

.breadcrumb a:hover {
    color: #fff;
}

.filter-panel {
    margin-bottom: 26px;
}

.filter-row {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 180px 180px 180px auto;
    gap: 12px;
    align-items: center;
}

.filter-panel button {
    min-height: 46px;
}

.search-count {
    margin-top: 14px;
    color: var(--muted);
    font-weight: 700;
}

.detail-hero {
    padding: 42px 0 62px;
    color: #fff;
    background: radial-gradient(circle at 78% 10%, rgba(255, 255, 255, 0.2), transparent 26%), linear-gradient(135deg, #0f172a, #075985 60%, #1e1b4b);
}

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

.detail-title {
    font-size: clamp(34px, 5vw, 58px);
}

.player-box {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #020617;
    box-shadow: 0 30px 70px rgba(2, 6, 23, 0.45);
}

.player-box video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #fff;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.56), rgba(2, 6, 23, 0.2));
    cursor: pointer;
}

.player-overlay[hidden] {
    display: none;
}

.play-orb {
    display: grid;
    place-items: center;
    width: 92px;
    height: 92px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: var(--sky-dark);
    font-size: 42px;
    box-shadow: 0 24px 60px rgba(2, 6, 23, 0.35);
    transition: transform 0.2s ease;
}

.player-overlay:hover .play-orb {
    transform: scale(1.08);
}

.detail-poster {
    overflow: hidden;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 24px 60px rgba(2, 6, 23, 0.28);
}

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

.detail-poster div {
    padding: 18px;
    background: rgba(255, 255, 255, 0.12);
}

.detail-poster p {
    margin: 8px 0 0;
    color: #dbeafe;
}

.detail-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 350px;
    gap: 28px;
    padding: 42px 0 72px;
}

.detail-summary h2,
.side-panel h2,
.info-panel h2 {
    margin: 0 0 14px;
    color: #0f172a;
    font-size: 24px;
    font-weight: 950;
}

.detail-summary p {
    margin: 0 0 22px;
    max-width: none;
    color: #475569;
    font-size: 16px;
}

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

.related-list a {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 15px;
    background: #f8fafc;
}

.related-list a:hover {
    background: var(--sky-soft);
}

.related-list img {
    width: 78px;
    height: 52px;
    border-radius: 11px;
    object-fit: cover;
}

.related-list strong,
.related-list span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.related-list strong {
    color: #0f172a;
    font-weight: 900;
}

.related-list span {
    color: #64748b;
    font-size: 13px;
}

.info-list {
    display: grid;
    gap: 10px;
    color: #475569;
}

.info-list div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
}

.info-list strong {
    color: #0f172a;
}

.site-footer {
    color: #cbd5e1;
    background: #0f172a;
}

.footer-inner {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 36px;
    padding: 42px 0;
}

.footer-brand {
    color: #fff;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-end;
}

.footer-links a {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #dbeafe;
    font-size: 14px;
    font-weight: 700;
}

.footer-links a:hover {
    background: rgba(14, 165, 233, 0.35);
}

.copyright {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 24px;
    color: #94a3b8;
}

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

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

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

    .hero-card {
        display: none;
    }

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

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

@media (max-width: 820px) {
    .nav-shell {
        height: auto;
        min-height: 66px;
        flex-wrap: wrap;
        padding: 12px 0;
    }

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

    .nav-links {
        display: none;
        width: 100%;
        margin: 0;
        padding: 12px 0;
        border-top: 1px solid #e2e8f0;
    }

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

    .nav-drop,
    .nav-drop > button {
        display: none;
    }

    .hero {
        min-height: 560px;
    }

    .hero-slide {
        background-size: 88vw auto;
        background-position: center bottom;
    }

    .hero-inner {
        padding-top: 52px;
    }

    .hero-copy {
        padding-top: 12px;
    }

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

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

@media (max-width: 560px) {
    .container,
    .nav-shell,
    .hero-inner,
    .footer-inner,
    .copyright {
        width: min(100% - 22px, 1220px);
    }

    .brand {
        font-size: 20px;
    }

    .hero h1,
    .page-hero h1,
    .detail-title {
        letter-spacing: -0.04em;
    }

    .hero-actions {
        display: grid;
    }

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

    .section {
        padding: 48px 0;
    }

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

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

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

    .play-orb {
        width: 74px;
        height: 74px;
        font-size: 34px;
    }
}
