* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: #1f2937;
    background: #f8fafc;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #ffffff;
    background: linear-gradient(90deg, #2563eb 0%, #06b6d4 100%);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.18);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.brand-icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.26);
}

.brand-name {
    font-size: clamp(18px, 2vw, 24px);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 28px;
    font-weight: 700;
}

.desktop-nav > a,
.nav-dropdown > a {
    padding: 22px 0;
    transition: color 0.2s ease;
}

.desktop-nav > a:hover,
.nav-dropdown > a:hover {
    color: #cffafe;
}

.nav-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% - 4px);
    left: -18px;
    min-width: 180px;
    padding: 8px;
    display: grid;
    gap: 2px;
    color: #111827;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: 0.2s ease;
}

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

.dropdown-menu a {
    padding: 10px 12px;
    border-radius: 10px;
}

.dropdown-menu a:hover {
    color: #0284c7;
    background: #eff6ff;
}

.header-search,
.mobile-search,
.hero-search,
.search-card form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search input,
.mobile-search input,
.hero-search input,
.search-card input,
.filter-bar input {
    width: 100%;
    border: 0;
    outline: 0;
    border-radius: 999px;
    padding: 12px 16px;
    color: #0f172a;
    background: rgba(255, 255, 255, 0.92);
}

.header-search input {
    width: 250px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

.header-search input::placeholder {
    color: rgba(255, 255, 255, 0.78);
}

.header-search button,
.mobile-search button,
.hero-search button,
.search-card button {
    border: 0;
    border-radius: 999px;
    padding: 12px 18px;
    color: #ffffff;
    font-weight: 800;
    cursor: pointer;
    background: linear-gradient(90deg, #f97316, #ef4444);
    box-shadow: 0 12px 24px rgba(239, 68, 68, 0.28);
}

.mobile-menu-button {
    display: none;
    border: 0;
    border-radius: 12px;
    padding: 9px 12px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    cursor: pointer;
}

.mobile-nav {
    display: none;
    padding: 14px 18px 22px;
    background: #1d4ed8;
}

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

.mobile-category-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding-top: 4px;
}

.mobile-category-list a,
.mobile-nav > a {
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
}

.hero-slider {
    position: relative;
    min-height: 500px;
    height: 70vh;
    overflow: hidden;
    background: #0f172a;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: linear-gradient(135deg, #1d4ed8, #06b6d4);
}

img.image-blank {
    opacity: 0;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.76) 0%, rgba(0, 0, 0, 0.52) 44%, rgba(0, 0, 0, 0.08) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    height: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    color: #ffffff;
    max-width: 720px;
}

.hero-label,
.section-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 8px 14px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
    background: linear-gradient(90deg, #f97316, #ef4444);
}

.hero-content h1 {
    margin: 20px 0 16px;
    font-size: clamp(38px, 7vw, 74px);
    line-height: 1.02;
    letter-spacing: -0.06em;
}

.hero-content p {
    max-width: 690px;
    margin: 0 0 22px;
    color: #e5e7eb;
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.7;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 30px;
}

.hero-meta span {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(10px);
}

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

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border-radius: 999px;
    padding: 0 22px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary-button {
    color: #ffffff;
    background: linear-gradient(90deg, #2563eb, #06b6d4);
    box-shadow: 0 16px 32px rgba(37, 99, 235, 0.36);
}

.ghost-button {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.primary-button:hover,
.ghost-button:hover,
.movie-card:hover,
.category-card:hover {
    transform: translateY(-4px);
}

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

.hero-dot {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.44);
    cursor: pointer;
}

.hero-dot.is-active {
    width: 34px;
    background: #ffffff;
}

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

.quick-panel {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 20px;
    margin-top: -42px;
    position: relative;
    z-index: 5;
}

.quick-card,
.category-preview-card,
.ranking-panel,
.detail-panel,
.meta-card,
.related-panel,
.cover-card,
.category-card {
    background: #ffffff;
    border-radius: 22px;
    box-shadow: 0 18px 46px rgba(15, 23, 42, 0.09);
}

.quick-card {
    min-height: 150px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
}

.quick-card strong,
.quick-card h2 {
    margin: 0;
    color: #0f172a;
    font-size: 24px;
}

.quick-card p {
    margin: 0;
    color: #64748b;
    line-height: 1.7;
}

.content-section,
.split-section {
    padding: 66px 0 0;
}

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

.section-heading h2,
.page-hero h1,
.detail-panel h1 {
    margin: 10px 0 0;
    color: #0f172a;
    font-size: clamp(28px, 4vw, 44px);
    letter-spacing: -0.05em;
}

.section-heading a {
    color: #0284c7;
    font-weight: 800;
}

.slim-heading {
    align-items: center;
    margin-bottom: 18px;
}

.slim-heading h2 {
    font-size: 24px;
}

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

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

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

.movie-card {
    display: block;
    overflow: hidden;
    color: #111827;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    box-shadow: 0 24px 55px rgba(15, 23, 42, 0.18);
}

.poster-frame,
.category-cover,
.rank-thumb,
.cover-card {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, #1d4ed8, #06b6d4);
}

.poster-frame {
    aspect-ratio: 16 / 10;
}

.poster-frame img,
.category-cover img,
.rank-thumb img,
.cover-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease, opacity 0.2s ease;
}

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

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

.play-float {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 54px;
    height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transform: translate(-50%, -50%) scale(0.92);
    color: #ffffff;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.52);
    opacity: 0;
    transition: 0.25s ease;
}

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

.poster-badge {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 6px 10px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.82);
}

.card-body {
    display: grid;
    gap: 8px;
    padding: 16px;
}

.card-body strong {
    color: #111827;
    font-size: 17px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.card-meta {
    width: fit-content;
    padding: 6px 10px;
    color: #2563eb;
    font-size: 12px;
    font-weight: 800;
    border-radius: 999px;
    background: #eff6ff;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
}

.ranking-panel,
.category-preview-card,
.detail-panel,
.meta-card,
.related-panel {
    padding: 24px;
}

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

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

.rank-item:hover {
    background: #eff6ff;
    transform: translateX(4px);
}

.rank-number {
    color: #2563eb;
    font-size: 20px;
    font-weight: 900;
}

.rank-thumb {
    width: 64px;
    height: 46px;
    border-radius: 12px;
}

.rank-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.rank-copy strong,
.rank-copy span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rank-copy span {
    color: #64748b;
    font-size: 13px;
}

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

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

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

.compact-card .poster-frame {
    aspect-ratio: 16 / 9;
}

.compact-card .card-desc {
    display: none;
}

.compact-card .card-body strong {
    font-size: 14px;
}

.category-card {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
    box-shadow: 0 24px 55px rgba(15, 23, 42, 0.16);
}

.category-cover {
    min-height: 180px;
}

.category-card-body {
    display: grid;
    align-content: center;
    gap: 12px;
    padding: 24px;
}

.category-card-body strong {
    color: #0f172a;
    font-size: 28px;
}

.category-card-body span,
.category-card-body em {
    color: #64748b;
    line-height: 1.7;
    font-style: normal;
}

.page-hero,
.detail-hero {
    padding-top: 48px;
}

.compact-page-hero {
    padding: 56px 0 12px;
}

.compact-page-hero p {
    max-width: 760px;
    color: #64748b;
    font-size: 18px;
    line-height: 1.8;
}

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

.breadcrumb a {
    color: #0284c7;
    font-weight: 800;
}

.filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 26px;
    padding: 16px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.filter-bar input {
    max-width: 430px;
    background: #f1f5f9;
}

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

.filter-chip {
    border: 0;
    padding: 9px 14px;
    border-radius: 999px;
    color: #475569;
    font-weight: 800;
    background: #f1f5f9;
    cursor: pointer;
}

.filter-chip.is-active {
    color: #ffffff;
    background: linear-gradient(90deg, #2563eb, #06b6d4);
}

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

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: #000000;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.25);
}

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

.player-start {
    position: absolute;
    left: 50%;
    top: 50%;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 0;
    border-radius: 999px;
    padding: 16px 26px;
    color: #ffffff;
    font-size: 18px;
    font-weight: 900;
    background: linear-gradient(90deg, #2563eb, #06b6d4);
    box-shadow: 0 18px 36px rgba(37, 99, 235, 0.36);
    transform: translate(-50%, -50%);
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.player-start:hover {
    transform: translate(-50%, -50%) scale(1.04);
}

.player-shell.is-playing .player-start {
    opacity: 0;
    pointer-events: none;
}

.player-start.is-loading strong {
    opacity: 0.7;
}

.detail-panel {
    margin-top: 24px;
}

.detail-one-line {
    color: #334155;
    font-size: 18px;
    line-height: 1.8;
}

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

.detail-panel p {
    color: #475569;
    line-height: 1.9;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 20px 0;
}

.detail-tags span {
    padding: 8px 12px;
    border-radius: 999px;
    color: #0369a1;
    font-weight: 800;
    background: #e0f2fe;
}

.detail-aside {
    display: grid;
    align-content: start;
    gap: 20px;
}

.cover-card {
    aspect-ratio: 3 / 4;
}

.meta-card ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
}

.meta-card li {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.meta-card span {
    color: #64748b;
}

.meta-card strong {
    color: #0f172a;
    text-align: right;
}

.single-column {
    grid-template-columns: 1fr;
}

.hero-search {
    max-width: 660px;
    margin-top: 24px;
}

.search-results-section {
    min-height: 420px;
}

.empty-state {
    grid-column: 1 / -1;
    padding: 38px;
    color: #64748b;
    text-align: center;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.site-footer {
    margin-top: 70px;
    color: #d1d5db;
    background: #111827;
}

.footer-grid {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 46px 0;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
}

.footer-grid h2 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: 18px;
}

.footer-grid p {
    max-width: 460px;
    line-height: 1.8;
}

.footer-grid a {
    display: block;
    margin-bottom: 10px;
    transition: color 0.2s ease;
}

.footer-grid a:hover {
    color: #67e8f9;
}

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

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 24px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #9ca3af;
}

[data-filter-hidden="true"] {
    display: none;
}

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

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

    .split-section,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .ranking-panel {
        order: -1;
    }
}

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

    .mobile-menu-button {
        display: inline-flex;
    }

    .quick-panel,
    .footer-grid,
    .category-preview-grid,
    .category-grid,
    .large-rank-list {
        grid-template-columns: 1fr;
    }

    .quick-panel {
        margin-top: 18px;
    }

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

    .filter-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .filter-bar input {
        max-width: none;
    }
}

@media (max-width: 620px) {
    .header-inner {
        width: min(100% - 22px, 1180px);
        height: 62px;
    }

    .brand-name {
        font-size: 18px;
    }

    .hero-slider {
        height: 72vh;
        min-height: 560px;
    }

    .hero-content {
        width: min(100% - 28px, 1180px);
        justify-content: flex-end;
        padding-bottom: 92px;
    }

    .hero-content h1 {
        font-size: 38px;
    }

    .movie-grid,
    .small-grid,
    .wide-grid,
    .compact-grid {
        grid-template-columns: 1fr;
    }

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

    .category-cover {
        min-height: 220px;
    }

    .footer-bottom {
        flex-direction: column;
    }
}
