:root {
    --blue-50: #eff6ff;
    --blue-100: #dbeafe;
    --blue-600: #2563eb;
    --blue-700: #1d4ed8;
    --blue-800: #1e40af;
    --indigo-900: #312e81;
    --green-50: #ecfdf5;
    --emerald-50: #ecfdf5;
    --purple-50: #faf5ff;
    --pink-50: #fdf2f8;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-500: #6b7280;
    --gray-700: #374151;
    --gray-900: #111827;
    --text: #172033;
    --muted: #64748b;
    --card: #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(--text);
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 44%, #ffffff 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.65;
}

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

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    color: #ffffff;
    background: linear-gradient(90deg, var(--blue-600), var(--blue-700), var(--blue-800));
    box-shadow: 0 14px 30px rgba(30, 64, 175, 0.25);
}

.header-inner {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.logo-mark {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: var(--blue-700);
    background: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

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

.main-nav a,
.category-strip a {
    padding: 8px 12px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.92);
    font-weight: 600;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active,
.category-strip a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    transform: translateY(-1px);
}

.mobile-menu-button {
    display: none;
    border: 0;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    padding: 8px 11px;
    font-size: 22px;
}

.category-strip {
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(15, 23, 42, 0.08);
}

.category-strip-inner {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-top: 8px;
    padding-bottom: 8px;
}

.hero-carousel {
    position: relative;
    min-height: 650px;
    overflow: hidden;
    color: #ffffff;
    background: #101828;
}

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

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

.hero-slide > img,
.detail-backdrop > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-slide::before,
.poster::before,
.detail-poster::before,
.rank-poster::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(135deg, #1d4ed8, #7c3aed 55%, #111827);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.45), transparent 30%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.46) 46%, rgba(2, 6, 23, 0.28));
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 650px;
    display: flex;
    align-items: flex-end;
    padding-bottom: 74px;
}

.hero-copy {
    width: min(760px, 100%);
    animation: fadeUp 0.7s ease both;
}

.hero-label,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(14px);
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0 0 16px;
    font-size: clamp(38px, 7vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.045em;
}

.hero-copy p,
.page-hero p,
.detail-copy p {
    max-width: 720px;
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(16px, 2vw, 20px);
}

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

.primary-button,
.ghost-button,
.home-search-form button,
.search-panel button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 12px 22px;
    border: 0;
    border-radius: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button,
.home-search-form button,
.search-panel button {
    color: #ffffff;
    background: var(--blue-600);
    box-shadow: 0 12px 26px rgba(37, 99, 235, 0.35);
}

.primary-button:hover,
.home-search-form button:hover,
.search-panel button:hover {
    background: var(--blue-700);
    transform: translateY(-2px);
}

.ghost-button {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(12px);
}

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

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.45);
    font-size: 38px;
    line-height: 1;
    cursor: pointer;
}

.hero-control.prev {
    left: 20px;
}

.hero-control.next {
    right: 20px;
}

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

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

.hero-dots button.active {
    width: 34px;
    background: #ffffff;
}

.search-panel {
    margin-top: 28px;
    padding: 24px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.86);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.home-search {
    margin-top: -48px;
    position: relative;
    z-index: 8;
}

.search-panel h2 {
    margin: 0 0 4px;
    font-size: 26px;
}

.search-panel p {
    margin: 0 0 16px;
    color: var(--muted);
}

.home-search-form,
.filter-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
}

.filter-row.multi-filter {
    grid-template-columns: 2fr repeat(3, 1fr);
}

input,
select {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    color: var(--text);
    background: #ffffff;
    font: inherit;
    outline: none;
}

input:focus,
select:focus {
    border-color: var(--blue-600);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.content-section {
    padding-top: 58px;
    padding-bottom: 58px;
}

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 38px);
    letter-spacing: -0.035em;
}

.section-heading p {
    max-width: 520px;
    margin: 0;
    color: var(--muted);
}

.section-kicker {
    color: var(--blue-700);
    background: var(--blue-50);
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(37, 99, 235, 0.25);
    box-shadow: 0 22px 50px rgba(15, 23, 42, 0.15);
}

.poster,
.rank-poster,
.detail-poster {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, #1d4ed8, #7c3aed);
}

.poster {
    aspect-ratio: 3 / 4;
}

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

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

.year-badge,
.play-chip {
    position: absolute;
    z-index: 2;
    padding: 6px 10px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
    background: rgba(17, 24, 39, 0.72);
    backdrop-filter: blur(10px);
}

.year-badge {
    top: 10px;
    left: 10px;
}

.play-chip {
    right: 10px;
    bottom: 10px;
    background: rgba(37, 99, 235, 0.84);
}

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

.movie-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 13px;
}

.movie-meta-line a {
    color: var(--blue-700);
    font-weight: 800;
}

.movie-card h3 {
    margin: 0 0 8px;
    font-size: 19px;
    line-height: 1.32;
}

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

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

.tag-row span {
    padding: 5px 9px;
    border-radius: 999px;
    color: var(--blue-700);
    background: var(--blue-50);
    font-size: 12px;
    font-weight: 700;
}

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

.wide-gradient {
    margin-top: 24px;
    margin-bottom: 24px;
}

.green-gradient {
    background: linear-gradient(90deg, var(--green-50), var(--emerald-50));
}

.purple-gradient {
    background: linear-gradient(135deg, var(--blue-50), var(--purple-50), var(--pink-50));
}

.horizontal-scroll {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 280px;
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 14px;
}

.movie-card.horizontal {
    display: grid;
    grid-template-columns: 170px 1fr;
}

.movie-card.horizontal .poster {
    height: 100%;
    min-height: 210px;
}

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

.category-tile,
.category-overview-card {
    display: block;
    padding: 20px;
    border: 1px solid rgba(147, 197, 253, 0.5);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 12px 26px rgba(30, 64, 175, 0.08);
}

.category-tile strong,
.category-cover strong {
    display: block;
    font-size: 21px;
}

.category-tile span,
.category-cover span {
    color: var(--muted);
    font-weight: 700;
}

.category-tile div {
    display: grid;
    gap: 6px;
    margin-top: 14px;
    font-size: 13px;
    color: var(--blue-700);
}

.page-hero {
    color: #ffffff;
    background:
        radial-gradient(circle at top left, rgba(96, 165, 250, 0.5), transparent 34%),
        linear-gradient(120deg, #1d4ed8, #312e81 70%, #111827);
}

.small-hero,
.category-hero {
    padding: 88px 0;
}

.category-overview-card p {
    color: var(--muted);
}

.category-overview-card ul,
.site-footer ul,
.index-group ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.category-overview-card li a,
.index-group li a {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-100);
    color: var(--gray-700);
}

.category-overview-card li span,
.index-group li span {
    color: var(--muted);
    white-space: nowrap;
}

.text-link {
    display: inline-flex;
    margin-top: 14px;
    color: var(--blue-700);
    font-weight: 800;
}

.result-count {
    margin-top: 14px !important;
    margin-bottom: 0 !important;
}

.ranking-list {
    display: grid;
    gap: 16px;
    padding-top: 36px;
    padding-bottom: 58px;
}

.rank-row {
    display: grid;
    grid-template-columns: 56px 110px 1fr;
    align-items: center;
    gap: 18px;
    padding: 14px;
}

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

.rank-poster {
    aspect-ratio: 3 / 4;
    border-radius: 16px;
}

.rank-info h2 {
    margin: 0 0 8px;
    font-size: 22px;
}

.rank-info p {
    margin: 0 0 10px;
    color: var(--muted);
}

.detail-hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: #0f172a;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    opacity: 0.35;
    filter: blur(3px);
}

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.55));
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    padding-top: 34px;
    padding-bottom: 70px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 26px;
    color: rgba(255, 255, 255, 0.74);
    font-size: 14px;
}

.breadcrumb a {
    color: #ffffff;
}

.detail-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 34px;
    align-items: end;
}

.detail-poster {
    aspect-ratio: 3 / 4;
    border-radius: 28px;
    box-shadow: 0 26px 80px rgba(0, 0, 0, 0.35);
}

.detail-facts {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    margin: 22px 0;
    padding: 0;
    list-style: none;
}

.detail-facts li {
    padding: 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
}

.detail-facts span {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
}

.detail-facts strong {
    display: block;
    margin-top: 4px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #020617;
    box-shadow: var(--shadow);
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 10px;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle at center, rgba(37, 99, 235, 0.28), rgba(0, 0, 0, 0.6));
    cursor: pointer;
}

.play-overlay span {
    display: grid;
    place-items: center;
    width: 78px;
    height: 78px;
    border-radius: 999px;
    background: var(--blue-600);
    box-shadow: 0 18px 40px rgba(37, 99, 235, 0.35);
    font-size: 32px;
}

.player-shell.is-playing .play-overlay {
    display: none;
}

.player-status {
    margin: 0;
    padding: 10px 16px;
    color: #dbeafe;
    background: #0f172a;
    font-size: 14px;
}

.detail-text {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.detail-text article {
    padding: 26px;
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
}

.detail-text h2 {
    margin-top: 0;
}

.all-index {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    padding-top: 50px;
    padding-bottom: 60px;
}

.index-group {
    padding: 22px;
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
}

.index-group h2 {
    margin: 0 0 12px;
    color: var(--blue-700);
}

.site-footer {
    color: #d1d5db;
    background: #111827;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 30px;
    padding-top: 48px;
    padding-bottom: 38px;
}

.site-footer h3 {
    margin-top: 0;
    color: #ffffff;
}

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

.site-footer li {
    margin: 8px 0;
}

.footer-bottom {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: #9ca3af;
}

.back-to-top {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 80;
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: var(--blue-700);
    box-shadow: var(--shadow);
    cursor: pointer;
}

.back-to-top.visible {
    display: block;
}

.hidden-by-filter {
    display: none !important;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

@media (max-width: 820px) {
    .mobile-menu-button {
        display: block;
    }

    .main-nav {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 68px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        border-radius: 18px;
        background: var(--blue-800);
        box-shadow: var(--shadow);
    }

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

    .hero-carousel,
    .hero-content {
        min-height: 560px;
    }

    .hero-control {
        display: none;
    }

    .movie-grid,
    .movie-grid.two-column,
    .category-grid,
    .category-overview-grid,
    .footer-grid,
    .detail-text,
    .all-index {
        grid-template-columns: 1fr;
    }

    .horizontal-scroll {
        grid-auto-columns: 74%;
    }

    .movie-card.horizontal,
    .rank-row,
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .rank-poster {
        width: 130px;
    }

    .detail-poster {
        width: min(280px, 100%);
    }

    .filter-row,
    .filter-row.multi-filter,
    .home-search-form {
        grid-template-columns: 1fr;
    }
}

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

    .logo span:last-child {
        font-size: 17px;
    }

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

    .content-section {
        padding-top: 38px;
        padding-bottom: 38px;
    }

    .section-heading {
        display: block;
    }

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