* {
    box-sizing: border-box;
}

:root {
    --bg: #f7f8fc;
    --ink: #172033;
    --muted: #667085;
    --line: #e6e9f2;
    --white: #ffffff;
    --blue: #1d4ed8;
    --blue-dark: #0f2f67;
    --orange: #f97316;
    --orange-dark: #ea580c;
    --shadow: 0 18px 45px rgba(18, 32, 61, 0.12);
    --radius: 22px;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--bg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
}

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, #0b2c67, #0f52ba 55%, #103c88);
    color: #ffffff;
    box-shadow: 0 16px 34px rgba(11, 44, 103, 0.28);
}

.header-inner {
    width: min(1180px, calc(100% - 32px));
    height: 70px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand,
.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--orange), #facc15);
    color: #ffffff;
    font-size: 22px;
    box-shadow: 0 10px 24px rgba(249, 115, 22, 0.38);
}

.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-copy strong {
    font-size: 20px;
    letter-spacing: 0.03em;
}

.brand-copy small {
    color: rgba(255, 255, 255, 0.72);
    font-size: 12px;
    font-weight: 500;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.88);
    transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.nav-link:hover,
.nav-link.is-active {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    transform: translateY(-1px);
}

.nav-menu {
    position: relative;
}

.nav-menu-button {
    border: 0;
    background: transparent;
    cursor: pointer;
}

.nav-menu-panel {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 190px;
    padding: 10px;
    border-radius: 16px;
    background: #ffffff;
    color: var(--ink);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.2s ease;
}

.nav-menu:hover .nav-menu-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-menu-panel a,
.mobile-nav a,
.site-footer a {
    display: block;
    padding: 9px 10px;
    border-radius: 11px;
}

.nav-menu-panel a:hover,
.mobile-nav a:hover {
    background: #eef4ff;
    color: var(--blue);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    background: #ffffff;
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 16px;
    color: #ffffff;
}

.mobile-nav.is-open {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.hero {
    position: relative;
    color: #ffffff;
    background: #071426;
}

.hero-stage {
    position: relative;
    height: 540px;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease;
}

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

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.03);
    filter: saturate(1.05);
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: center;
    gap: 56px;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    color: #facc15;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0 0 16px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.hero-copy p,
.page-hero p,
.detail-copy p {
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
}

.hero-tags,
.detail-tags,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.detail-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.92);
    font-size: 13px;
}

.tag-row span {
    min-height: 24px;
    background: #eef4ff;
    color: #2f5fb3;
    font-size: 12px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 14px;
    font-weight: 800;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

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

.btn-primary {
    background: var(--orange);
    color: #ffffff;
    box-shadow: 0 14px 24px rgba(249, 115, 22, 0.35);
}

.btn-primary:hover {
    background: var(--orange-dark);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.hero-cover {
    position: relative;
    display: block;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
    transform: rotate(2deg);
}

.hero-cover img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.hero-dots {
    position: absolute;
    z-index: 4;
    left: 50%;
    bottom: 26px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
}

.hero-dot {
    width: 11px;
    height: 11px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.48);
    cursor: pointer;
    transition: all 0.25s ease;
}

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

.intro-strip {
    margin-top: -34px;
    position: relative;
    z-index: 5;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.intro-strip > div {
    padding: 20px;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.intro-strip span,
.section-heading span {
    display: block;
    color: var(--orange);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.intro-strip strong {
    display: block;
    margin-top: 4px;
    font-size: 17px;
}

.section-block {
    padding: 54px 0;
}

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

.section-heading h2 {
    margin: 4px 0 0;
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.2;
}

.section-heading a {
    color: var(--blue);
    font-weight: 800;
}

.light-heading,
.light-heading a {
    color: #ffffff;
}

.filter-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
    padding: 16px;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(18, 32, 61, 0.08);
}

.search-label {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    color: var(--muted);
    font-weight: 800;
}

.search-label input {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0 14px;
    outline: none;
    color: var(--ink);
    background: #f9fbff;
}

.search-label input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(29, 78, 216, 0.12);
}

.filter-hints {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-hints button {
    border: 0;
    border-radius: 999px;
    padding: 8px 12px;
    color: #31558f;
    background: #eef4ff;
    cursor: pointer;
}

.movie-grid {
    display: grid;
    gap: 18px;
}

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

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

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

.movie-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 12px 34px rgba(18, 32, 61, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 45px rgba(18, 32, 61, 0.15);
}

.movie-poster {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(145deg, #1f2a44, #0f172a);
}

.movie-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.45s ease;
}

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

.poster-glow {
    position: absolute;
    inset: auto 0 0;
    height: 45%;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), transparent);
}

.movie-year,
.rank-number {
    position: absolute;
    top: 10px;
    left: 10px;
    min-width: 46px;
    min-height: 28px;
    display: inline-grid;
    place-items: center;
    padding: 0 8px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.76);
    font-size: 13px;
    font-weight: 800;
    backdrop-filter: blur(10px);
}

.rank-number {
    left: auto;
    right: 10px;
    background: var(--orange);
}

.movie-info {
    flex: 1;
    padding: 14px;
}

.movie-title {
    display: -webkit-box;
    min-height: 46px;
    color: #111827;
    font-weight: 900;
    font-size: 16px;
    line-height: 1.4;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-info p {
    display: -webkit-box;
    min-height: 44px;
    margin: 8px 0 10px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
    color: #7c8aa5;
    font-size: 12px;
}

.movie-meta span:not(:last-child)::after {
    content: "·";
    margin-left: 6px;
}

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

.category-tile {
    min-height: 190px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 22px;
    border-radius: 24px;
    color: #ffffff;
    box-shadow: var(--shadow);
    overflow: hidden;
    position: relative;
    isolation: isolate;
}

.category-tile::after {
    content: "";
    position: absolute;
    width: 150px;
    height: 150px;
    right: -50px;
    top: -50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    z-index: -1;
}

.category-icon {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.18);
    font-size: 24px;
    font-weight: 900;
}

.category-tile strong {
    margin-top: 16px;
    font-size: 24px;
}

.category-tile small {
    color: rgba(255, 255, 255, 0.82);
}

.category-tile em {
    font-style: normal;
    font-weight: 800;
}

.tone-red {
    background: linear-gradient(135deg, #ef4444, #f97316);
}

.tone-orange,
.page-hero-orange {
    background: linear-gradient(135deg, #f97316, #ef4444);
}

.tone-blue,
.page-hero-blue {
    background: linear-gradient(135deg, #2563eb, #0f52ba);
}

.tone-pink {
    background: linear-gradient(135deg, #ec4899, #f43f5e);
}

.tone-indigo {
    background: linear-gradient(135deg, #4f46e5, #1d4ed8);
}

.tone-violet {
    background: linear-gradient(135deg, #7c3aed, #4f46e5);
}

.tone-green {
    background: linear-gradient(135deg, #16a34a, #0f766e);
}

.tone-cyan {
    background: linear-gradient(135deg, #0891b2, #2563eb);
}

.rank-strip {
    width: min(1180px, calc(100% - 32px));
    border-radius: 32px;
    padding: 36px;
    background: linear-gradient(135deg, #f97316, #dc2626);
    box-shadow: var(--shadow);
}

.ranking-grid,
.ranking-list {
    display: grid;
    gap: 16px;
}

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

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

.movie-card-compact {
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr);
    min-height: 166px;
}

.movie-card-compact .movie-poster img {
    height: 100%;
    aspect-ratio: auto;
}

.movie-card-compact .movie-title {
    min-height: auto;
}

.page-main {
    min-height: 70vh;
}

.page-hero {
    padding: 82px 0 70px;
    color: #ffffff;
}

.page-hero p {
    max-width: 780px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.78);
    font-weight: 700;
}

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

.category-preview {
    padding: 30px 0;
}

.detail-main {
    background: #f7f8fc;
}

.detail-hero {
    min-height: 620px;
    display: flex;
    align-items: center;
    color: #ffffff;
    background-size: cover;
    background-position: center;
}

.detail-hero-grid {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    align-items: center;
    gap: 52px;
    padding: 58px 0;
}

.detail-poster {
    display: block;
    overflow: hidden;
    border-radius: 28px;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
}

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

.detail-copy h1 {
    max-width: 850px;
}

.detail-meta-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 24px 0 28px;
}

.detail-meta-grid span {
    padding: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
}

.detail-meta-grid b {
    display: block;
    margin-bottom: 4px;
    color: rgba(255, 255, 255, 0.65);
    font-size: 12px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #030712;
    box-shadow: 0 25px 80px rgba(3, 7, 18, 0.25);
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(3, 7, 18, 0.1), rgba(3, 7, 18, 0.72));
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-circle {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--orange);
    box-shadow: 0 20px 40px rgba(249, 115, 22, 0.35);
    font-size: 28px;
}

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

.detail-article,
.detail-side {
    padding: 28px;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 12px 34px rgba(18, 32, 61, 0.08);
}

.detail-article h2,
.detail-side h2,
.site-footer h2 {
    margin: 0 0 14px;
}

.detail-article p {
    margin: 0 0 22px;
    color: #3c485f;
    font-size: 17px;
}

.detail-side dl {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 10px 14px;
    margin: 0;
}

.detail-side dt {
    color: var(--muted);
    font-weight: 800;
}

.detail-side dd {
    margin: 0;
}

.detail-side a {
    color: var(--blue);
    font-weight: 800;
}

.site-footer {
    margin-top: 40px;
    color: rgba(255, 255, 255, 0.8);
    background: #071426;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 0.8fr 0.8fr;
    gap: 28px;
    padding: 46px 0;
}

.footer-brand {
    color: #ffffff;
    font-size: 22px;
}

.site-footer p {
    max-width: 520px;
}

.site-footer h2 {
    color: #ffffff;
    font-size: 17px;
}

.site-footer a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.footer-bottom {
    padding: 18px 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.movie-card.is-filtered {
    display: none;
}

.empty-state {
    grid-column: 1 / -1;
    padding: 36px;
    border-radius: 20px;
    color: var(--muted);
    background: #ffffff;
    text-align: center;
}

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

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

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

    .menu-toggle {
        display: block;
    }

    .brand-copy small {
        display: none;
    }

    .hero-stage {
        height: 680px;
    }

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

    .hero-content {
        gap: 28px;
        padding-top: 34px;
        padding-bottom: 72px;
    }

    .hero-cover,
    .detail-poster {
        width: min(260px, 78vw);
    }

    .intro-strip {
        grid-template-columns: 1fr;
        margin-top: 18px;
    }

    .filter-panel,
    .section-heading {
        align-items: stretch;
        flex-direction: column;
    }

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

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

@media (max-width: 560px) {
    .header-inner {
        height: 64px;
    }

    .brand-copy strong {
        font-size: 17px;
    }

    .hero-copy h1,
    .page-hero h1,
    .detail-copy h1 {
        font-size: 34px;
    }

    .page-hero,
    .detail-hero {
        min-height: auto;
        padding: 52px 0;
    }

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

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

    .movie-info {
        padding: 12px;
    }

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

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