html {
    scroll-behavior: smooth;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: #0f172a;
    background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 45%, #ecfeff 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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;
    border-bottom: 1px solid rgba(226, 232, 240, 0.85);
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(18px);
}

.nav-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(1180px, calc(100% - 32px));
    min-height: 68px;
    margin: 0 auto;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
}

.brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    border-radius: 14px;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.28);
}

.brand-name {
    font-size: 21px;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #1d4ed8, #0891b2);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    padding: 10px 16px;
    color: #475569;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 700;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: #ffffff;
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
    box-shadow: 0 14px 24px rgba(37, 99, 235, 0.24);
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 10px;
    border: 0;
    background: #f1f5f9;
    border-radius: 12px;
}

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

.section,
.page-hero,
.filter-panel,
.detail-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

main {
    min-height: calc(100vh - 68px);
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
    gap: 48px;
    align-items: center;
    width: 100%;
    padding: 88px max(32px, calc((100vw - 1180px) / 2)) 72px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.55s ease, visibility 0.55s ease;
}

.hero-slide::before {
    position: absolute;
    inset: 0;
    content: "";
    background-image: linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.66), rgba(15, 23, 42, 0.18)), var(--hero-image);
    background-position: center;
    background-size: cover;
    transform: scale(1.04);
    filter: saturate(1.08);
}

.hero-slide::after {
    position: absolute;
    inset: 0;
    content: "";
    background: radial-gradient(circle at 20% 20%, rgba(34, 211, 238, 0.26), transparent 34%), radial-gradient(circle at 82% 24%, rgba(59, 130, 246, 0.22), transparent 28%), linear-gradient(180deg, transparent 66%, rgba(2, 6, 23, 0.82));
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
}

.hero-content,
.hero-poster {
    position: relative;
    z-index: 2;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    color: #67e8f9;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero-content h1 {
    max-width: 760px;
    margin: 0;
    font-size: clamp(40px, 7vw, 74px);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero-content p {
    max-width: 680px;
    margin: 24px 0 0;
    color: #dbeafe;
    font-size: 19px;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 26px 0;
}

.hero-meta span,
.detail-meta span,
.card-tags span,
.badge-line span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.hero-meta span {
    color: #e0f2fe;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(10px);
}

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

.button-primary,
.button-secondary,
.button-light,
.player-start {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 46px;
    padding: 12px 22px;
    border: 0;
    border-radius: 999px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.button-primary,
.player-start {
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    box-shadow: 0 18px 34px rgba(37, 99, 235, 0.34);
}

.button-primary:hover,
.player-start:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 22px 40px rgba(37, 99, 235, 0.42);
}

.button-secondary {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(10px);
}

.button-light {
    color: #0f172a;
    background: #ffffff;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.1);
}

.hero-poster {
    align-self: center;
}

.poster-frame {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 30px;
    box-shadow: 0 34px 70px rgba(2, 6, 23, 0.52);
    transform: perspective(1000px) rotateY(-8deg) rotateX(2deg);
}

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

.poster-caption {
    position: absolute;
    right: 18px;
    bottom: 18px;
    left: 18px;
    padding: 16px;
    color: #ffffff;
    background: rgba(2, 6, 23, 0.62);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 20px;
    backdrop-filter: blur(18px);
}

.poster-caption strong {
    display: block;
    font-size: 18px;
}

.poster-caption span {
    color: #bae6fd;
    font-size: 13px;
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 5;
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    transform: translateY(-50%);
    backdrop-filter: blur(8px);
}

.hero-control:hover {
    background: rgba(255, 255, 255, 0.28);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

.hero-dots {
    position: absolute;
    right: 0;
    bottom: 28px;
    left: 0;
    z-index: 6;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.hero-dot {
    width: 34px;
    height: 5px;
    padding: 0;
    border: 0;
    background: rgba(255, 255, 255, 0.32);
    border-radius: 999px;
    cursor: pointer;
}

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

.section {
    padding: 76px 0 0;
}

.section-head,
.page-title-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

.section-kicker {
    display: inline-flex;
    margin-bottom: 8px;
    color: #0891b2;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.12em;
}

.section h2,
.page-hero h1,
.detail-title h1 {
    margin: 0;
    color: #0f172a;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.12;
    letter-spacing: -0.035em;
}

.section-intro,
.page-hero p,
.detail-title p {
    max-width: 760px;
    margin: 12px 0 0;
    color: #64748b;
}

.text-link {
    color: #2563eb;
    font-weight: 800;
}

.text-link:hover {
    color: #0891b2;
}

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

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

.movie-card {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.88);
    border-radius: 24px;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
    border-color: rgba(37, 99, 235, 0.2);
    box-shadow: 0 26px 52px rgba(15, 23, 42, 0.16);
    transform: translateY(-8px);
}

.card-cover {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, #dbeafe, #cffafe);
}

.movie-card:not(.movie-card-list) .card-cover img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.movie-card:hover .card-cover img,
.compact-card:hover img,
.rank-item:hover img {
    transform: scale(1.08);
}

.card-year,
.rank-badge {
    position: absolute;
    top: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: rgba(2, 6, 23, 0.68);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(8px);
}

.card-year {
    right: 12px;
    padding: 6px 10px;
}

.rank-badge {
    left: 12px;
    min-width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
}

.card-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 18px;
}

.card-kicker {
    color: #0891b2;
    font-size: 12px;
    font-weight: 900;
}

.card-content strong {
    display: block;
    margin: 7px 0;
    color: #0f172a;
    font-size: 18px;
    line-height: 1.25;
}

.card-desc {
    display: -webkit-box;
    overflow: hidden;
    min-height: 44px;
    color: #64748b;
    font-size: 14px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.card-tags,
.badge-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.card-tags span,
.badge-line span {
    color: #2563eb;
    background: #eff6ff;
}

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

.category-tile {
    position: relative;
    overflow: hidden;
    min-height: 210px;
    padding: 26px;
    color: #ffffff;
    background: linear-gradient(135deg, #1d4ed8, #0891b2);
    border-radius: 28px;
    box-shadow: 0 22px 48px rgba(37, 99, 235, 0.22);
    isolation: isolate;
}

.category-tile::before {
    position: absolute;
    inset: -40% -20% auto auto;
    width: 230px;
    height: 230px;
    content: "";
    background: rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    z-index: -1;
}

.category-tile strong {
    display: block;
    margin-bottom: 12px;
    font-size: 24px;
}

.category-tile p {
    margin: 0 0 20px;
    color: #dbeafe;
}

.category-tile span {
    display: inline-flex;
    color: #ffffff;
    font-weight: 800;
}

.strip-section {
    margin-top: 76px;
    padding: 58px 0;
    background: linear-gradient(135deg, rgba(219, 234, 254, 0.72), rgba(207, 250, 254, 0.72));
}

.horizontal-row {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    padding: 6px 0 16px;
    scroll-snap-type: x mandatory;
}

.horizontal-row .movie-card {
    flex: 0 0 294px;
    scroll-snap-align: start;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 54px 136px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    padding: 14px;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.88);
    border-radius: 22px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

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

.rank-item img {
    width: 136px;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 16px;
    transition: transform 0.35s ease;
}

.rank-info strong {
    display: block;
    margin-bottom: 6px;
    color: #0f172a;
    font-size: 17px;
}

.rank-info p {
    display: -webkit-box;
    overflow: hidden;
    margin: 0;
    color: #64748b;
    font-size: 14px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.masonry-grid {
    columns: 3 260px;
    column-gap: 18px;
}

.masonry-grid .movie-card {
    display: inline-flex;
    width: 100%;
    margin: 0 0 18px;
    break-inside: avoid;
}

.masonry-grid .card-cover img {
    aspect-ratio: 4 / 5;
}

.movie-card-list {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
}

.movie-card-list .card-cover img {
    width: 100%;
    height: 100%;
    min-height: 190px;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.page-hero {
    padding: 64px 0 30px;
}

.filter-panel {
    position: relative;
    z-index: 4;
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 180px 160px 150px;
    gap: 14px;
    margin-bottom: 30px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(226, 232, 240, 0.88);
    border-radius: 24px;
    box-shadow: 0 18px 46px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(16px);
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    color: #0f172a;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.16);
}

.view-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
}

.view-buttons button {
    border: 0;
    color: #475569;
    background: #ffffff;
    cursor: pointer;
}

.view-buttons button.is-active {
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
}

.filter-empty {
    display: none;
    padding: 54px;
    text-align: center;
    color: #64748b;
    background: #ffffff;
    border-radius: 24px;
}

.filter-empty.is-visible {
    display: block;
}

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

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

.breadcrumb a {
    color: #2563eb;
    font-weight: 700;
}

.player-card,
.detail-card,
.related-panel {
    overflow: hidden;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.88);
    border-radius: 28px;
    box-shadow: 0 18px 46px rgba(15, 23, 42, 0.08);
}

.player-card {
    margin-bottom: 22px;
    background: #020617;
}

.player-box {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.player-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #020617;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 28px;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.86), rgba(2, 6, 23, 0.42)), var(--player-image);
    background-position: center;
    background-size: cover;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-inner {
    text-align: center;
}

.player-inner h2 {
    margin: 0 0 18px;
    color: #ffffff;
    font-size: clamp(28px, 4vw, 48px);
    letter-spacing: -0.04em;
}

.play-symbol {
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 50%;
}

.detail-card {
    padding: 28px;
}

.detail-title h1 {
    margin-bottom: 14px;
}

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

.detail-meta span {
    color: #0f766e;
    background: #ccfbf1;
}

.detail-card h2,
.related-panel h2 {
    margin: 28px 0 12px;
    color: #0f172a;
    font-size: 22px;
}

.detail-card p {
    margin: 0;
    color: #475569;
    font-size: 16px;
}

.related-panel {
    position: sticky;
    top: 92px;
    padding: 20px;
}

.related-panel h2 {
    margin-top: 0;
}

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

.compact-card {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.compact-card img {
    width: 112px;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 16px;
    transition: transform 0.3s ease;
}

.compact-card strong {
    display: -webkit-box;
    overflow: hidden;
    color: #0f172a;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.compact-card em {
    display: block;
    margin-top: 5px;
    color: #64748b;
    font-size: 12px;
    font-style: normal;
}

.site-footer {
    margin-top: 80px;
    color: #e2e8f0;
    background: linear-gradient(135deg, #0f172a, #111827);
}

.footer-shell {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 0.8fr 1fr;
    gap: 34px;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 48px 0;
}

.brand-footer .brand-name {
    color: #ffffff;
    background: none;
}

.footer-brand p,
.footer-note p {
    margin: 16px 0 0;
    color: #94a3b8;
}

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

.footer-links h2,
.footer-note h2 {
    margin: 0 0 8px;
    color: #67e8f9;
    font-size: 16px;
}

.footer-links a {
    color: #cbd5e1;
    font-size: 14px;
}

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

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

.back-top {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 60;
    display: none;
    width: 46px;
    height: 46px;
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    border: 0;
    border-radius: 50%;
    box-shadow: 0 16px 28px rgba(37, 99, 235, 0.32);
    cursor: pointer;
}

.back-top.is-visible {
    display: grid;
    place-items: center;
}

@media (max-width: 1024px) {
    .hero-slide {
        grid-template-columns: 1fr;
        min-height: 760px;
        padding-right: 32px;
        padding-left: 32px;
    }

    .hero-poster {
        display: none;
    }

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

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

    .detail-shell {
        grid-template-columns: 1fr;
    }

    .related-panel {
        position: static;
    }

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

@media (max-width: 720px) {
    .nav-toggle {
        display: block;
    }

    .site-nav {
        position: absolute;
        top: 68px;
        right: 16px;
        left: 16px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        background: #ffffff;
        border: 1px solid rgba(226, 232, 240, 0.95);
        border-radius: 20px;
        box-shadow: 0 22px 50px rgba(15, 23, 42, 0.16);
    }

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

    .nav-link {
        justify-content: center;
    }

    .hero {
        min-height: 640px;
    }

    .hero-slide {
        min-height: 640px;
        padding: 72px 24px 54px;
    }

    .hero-control {
        display: none;
    }

    .section-head,
    .page-title-row {
        display: block;
    }

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

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

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

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

    .movie-card-list {
        grid-template-columns: 1fr;
    }

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

    .compact-card {
        grid-template-columns: 96px minmax(0, 1fr);
    }

    .compact-card img {
        width: 96px;
    }
}
