:root {
    --site-blue: #2563eb;
    --site-blue-dark: #1d4ed8;
    --site-dark: #0f172a;
    --site-gray: #64748b;
    --site-soft: #f8fafc;
    --site-border: #e2e8f0;
    --site-card: #ffffff;
    --site-radius: 1rem;
    --site-shadow: 0 12px 30px rgba(15, 23, 42, 0.10);
}

html {
    scroll-behavior: smooth;
}

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

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(14px);
}

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

.header-inner {
    height: 4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 800;
    color: #111827;
    white-space: nowrap;
}

.logo-mark {
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 0.75rem;
    display: inline-grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #0f172a);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.25);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.4rem;
    color: #374151;
    font-weight: 600;
}

.nav-links a:hover,
.logo:hover {
    color: var(--site-blue);
}

.header-search {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 230px;
}

.header-search input,
.search-panel input,
.search-panel select {
    width: 100%;
    border: 1px solid var(--site-border);
    border-radius: 999px;
    padding: 0.65rem 0.95rem;
    outline: none;
    background: #ffffff;
}

.header-search input:focus,
.search-panel input:focus,
.search-panel select:focus {
    border-color: var(--site-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.icon-button,
.search-button,
.primary-button,
.secondary-button,
.player-button {
    border: 0;
    cursor: pointer;
    font-weight: 700;
    transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease, color 180ms ease;
}

.search-button {
    padding: 0.65rem 1rem;
    border-radius: 999px;
    color: #ffffff;
    background: var(--site-blue);
}

.search-button:hover,
.primary-button:hover,
.player-button:hover {
    background: var(--site-blue-dark);
    transform: translateY(-1px);
}

.icon-button {
    display: none;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    color: #374151;
    background: #f1f5f9;
}

.mobile-menu {
    display: none;
    padding: 0.5rem 0 1rem;
    border-top: 1px solid var(--site-border);
}

.mobile-menu.is-open {
    display: block;
}

.mobile-menu a {
    display: block;
    padding: 0.75rem 0;
    color: #374151;
    font-weight: 700;
}

.hero {
    position: relative;
    min-height: 600px;
    overflow: hidden;
    background: linear-gradient(135deg, #1e3a8a, #0f172a);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1000ms ease;
}

.hero-slide.is-active {
    opacity: 1;
    z-index: 2;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.46), rgba(0, 0, 0, 0.12));
}

.hero-content-wrap {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: flex-end;
    pointer-events: none;
}

.hero-content {
    width: min(100% - 32px, 1280px);
    margin: 0 auto;
    padding: 0 0 4.8rem;
    color: #ffffff;
    pointer-events: auto;
}

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

.hero-badges,
.meta-row,
.tag-list,
.card-meta,
.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: #ffffff;
    background: #dc2626;
}

.badge.blue {
    background: var(--site-blue);
}

.badge.soft {
    color: #1d4ed8;
    background: #eff6ff;
}

.hero-title {
    margin: 1rem 0 1rem;
    font-size: clamp(2.15rem, 5vw, 4.8rem);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero-desc {
    margin: 0 0 1.4rem;
    max-width: 680px;
    color: #e5e7eb;
    font-size: 1.1rem;
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.6rem;
}

.primary-button,
.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.85rem 1.55rem;
}

.primary-button {
    color: #ffffff;
    background: var(--site-blue);
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.32);
}

.secondary-button {
    color: #ffffff;
    background: rgba(15, 23, 42, 0.62);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.secondary-button:hover {
    background: rgba(15, 23, 42, 0.85);
    transform: translateY(-1px);
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 2.7rem;
    height: 2.7rem;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.45);
    transform: translateY(-50%);
}

.hero-control:hover {
    background: rgba(0, 0, 0, 0.72);
}

.hero-control.prev {
    left: 1rem;
}

.hero-control.next {
    right: 1rem;
}

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

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

.hero-dot.is-active {
    width: 1.8rem;
    background: #ffffff;
}

.section {
    padding: 3rem 0;
}

.section.tight {
    padding: 2rem 0;
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.section-title {
    margin: 0;
    font-size: clamp(1.55rem, 3vw, 2.25rem);
    font-weight: 900;
    color: #111827;
}

.section-desc {
    margin: 0.45rem 0 0;
    color: var(--site-gray);
    line-height: 1.75;
}

.grid {
    display: grid;
    gap: 1.25rem;
}

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

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

.movie-card {
    display: block;
    height: 100%;
    overflow: hidden;
    border-radius: var(--site-radius);
    background: var(--site-card);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
    transition: transform 220ms ease, box-shadow 220ms ease;
}

.movie-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--site-shadow);
}

.movie-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(135deg, #dbeafe, #e2e8f0);
}

.movie-card.large .movie-thumb {
    aspect-ratio: 16 / 10;
}

.movie-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 300ms ease;
}

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

.movie-thumb::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.58), transparent 58%);
    transition: opacity 220ms ease;
}

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

.duration {
    position: absolute;
    right: 0.75rem;
    bottom: 0.75rem;
    z-index: 2;
    border-radius: 0.4rem;
    padding: 0.25rem 0.5rem;
    color: #ffffff;
    font-size: 0.78rem;
    background: rgba(0, 0, 0, 0.78);
}

.movie-body {
    padding: 1rem;
}

.movie-card.large .movie-body {
    padding: 1.15rem;
}

.movie-title {
    margin: 0 0 0.55rem;
    color: #111827;
    font-size: 1.02rem;
    font-weight: 800;
    line-height: 1.45;
}

.movie-card:hover .movie-title,
.rank-item:hover .rank-title {
    color: var(--site-blue);
}

.movie-desc {
    margin: 0 0 0.8rem;
    color: #64748b;
    font-size: 0.92rem;
    line-height: 1.65;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta {
    justify-content: space-between;
    color: #64748b;
    font-size: 0.86rem;
}

.card-meta-left {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.search-panel,
.info-panel,
.content-panel {
    border-radius: 1rem;
    padding: 1.35rem;
    background: #ffffff;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.07);
}

.search-panel {
    display: grid;
    grid-template-columns: 1fr 170px 160px;
    gap: 0.8rem;
    align-items: center;
}

.category-card {
    display: block;
    min-height: 154px;
    border-radius: 1rem;
    padding: 1.15rem;
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #0f172a);
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.18);
    transition: transform 220ms ease, box-shadow 220ms ease;
}

.category-card:nth-child(2n) {
    background: linear-gradient(135deg, #0f172a, #1d4ed8);
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.24);
}

.category-card h3 {
    margin: 0 0 0.6rem;
    font-size: 1.2rem;
    font-weight: 900;
}

.category-card p {
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.65;
    font-size: 0.92rem;
}

.category-card span {
    display: inline-flex;
    margin-top: 1rem;
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.16);
}

.rank-list {
    display: grid;
    gap: 1rem;
}

.rank-item {
    display: grid;
    grid-template-columns: 3rem 170px 1fr;
    gap: 1rem;
    align-items: center;
    border-radius: 1rem;
    padding: 0.9rem;
    background: #ffffff;
    box-shadow: 0 5px 16px rgba(15, 23, 42, 0.07);
}

.rank-no {
    display: grid;
    place-items: center;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 999px;
    color: #ffffff;
    font-weight: 900;
    background: var(--site-blue);
}

.rank-cover {
    position: relative;
    overflow: hidden;
    border-radius: 0.75rem;
    aspect-ratio: 16 / 9;
}

.rank-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 300ms ease;
}

.rank-title {
    margin: 0 0 0.45rem;
    font-size: 1.1rem;
    font-weight: 900;
}

.rank-desc {
    margin: 0 0 0.65rem;
    color: #64748b;
    line-height: 1.65;
}

.breadcrumb {
    margin: 1.5rem 0 1rem;
    color: #64748b;
    font-size: 0.92rem;
}

.breadcrumb a:hover {
    color: var(--site-blue);
}

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

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 1.15rem;
    background: #020617;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.25);
}

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

.player-layer {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.12));
}

.player-layer.is-hidden {
    display: none;
}

.player-button {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    border-radius: 999px;
    padding: 0.95rem 1.6rem;
    color: #ffffff;
    background: var(--site-blue);
    box-shadow: 0 15px 40px rgba(37, 99, 235, 0.38);
}

.detail-title {
    margin: 1.35rem 0 0.75rem;
    color: #111827;
    font-size: clamp(1.85rem, 4vw, 3rem);
    font-weight: 900;
    line-height: 1.18;
}

.detail-intro {
    color: #475569;
    font-size: 1.04rem;
    line-height: 1.85;
}

.meta-table {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin: 1.25rem 0;
}

.meta-cell {
    border-radius: 0.85rem;
    padding: 0.9rem;
    background: #f8fafc;
}

.meta-cell strong {
    display: block;
    margin-bottom: 0.25rem;
    color: #0f172a;
}

.article-text {
    color: #334155;
    line-height: 1.95;
    font-size: 1rem;
}

.article-text h2 {
    margin: 1.6rem 0 0.8rem;
    color: #111827;
    font-size: 1.45rem;
    font-weight: 900;
}

.article-text p {
    margin: 0 0 1rem;
}

.side-card {
    border-radius: 1rem;
    padding: 1rem;
    background: #ffffff;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

.side-card h2,
.side-card h3 {
    margin: 0 0 1rem;
    font-size: 1.15rem;
    font-weight: 900;
}

.side-poster {
    overflow: hidden;
    border-radius: 0.9rem;
    aspect-ratio: 16 / 10;
}

.side-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-list {
    display: grid;
    gap: 0.9rem;
}

.related-mini {
    display: grid;
    grid-template-columns: 104px 1fr;
    gap: 0.75rem;
    align-items: center;
}

.related-mini img {
    width: 104px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 0.65rem;
}

.related-mini strong {
    display: block;
    color: #111827;
    line-height: 1.45;
}

.related-mini span {
    display: block;
    margin-top: 0.3rem;
    color: #64748b;
    font-size: 0.82rem;
}

.tag-list a,
.tag-list span {
    border-radius: 999px;
    padding: 0.34rem 0.68rem;
    color: #1d4ed8;
    font-size: 0.82rem;
    font-weight: 700;
    background: #eff6ff;
}

.site-footer {
    margin-top: 3rem;
    color: #cbd5e1;
    background: #111827;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.3fr;
    gap: 2rem;
    padding: 2.4rem 0;
}

.site-footer h3 {
    margin: 0 0 0.85rem;
    color: #ffffff;
    font-size: 1.05rem;
}

.site-footer p,
.site-footer a {
    color: #cbd5e1;
    line-height: 1.75;
    font-size: 0.92rem;
}

.site-footer a {
    display: block;
    margin: 0.35rem 0;
}

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

.footer-bottom {
    border-top: 1px solid #1f2937;
    padding: 1rem 0;
    color: #94a3b8;
    text-align: center;
    font-size: 0.9rem;
}

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

@media (max-width: 1100px) {
    .grid.cards {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

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

@media (max-width: 860px) {
    .nav-links,
    .header-search {
        display: none;
    }

    .icon-button {
        display: inline-grid;
        place-items: center;
    }

    .hero {
        min-height: 540px;
    }

    .hero-control {
        display: none;
    }

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

    .rank-item {
        grid-template-columns: 2.4rem 120px 1fr;
    }

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

@media (max-width: 620px) {
    .container {
        width: min(100% - 24px, 1280px);
    }

    .grid.cards,
    .grid.categories {
        grid-template-columns: 1fr;
    }

    .hero-content {
        width: min(100% - 24px, 1280px);
        padding-bottom: 3.6rem;
    }

    .hero-desc {
        font-size: 0.98rem;
    }

    .hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .primary-button,
    .secondary-button {
        width: 100%;
    }

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

    .rank-item {
        grid-template-columns: 2rem 1fr;
    }

    .rank-cover {
        display: none;
    }

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

    .related-mini {
        grid-template-columns: 92px 1fr;
    }

    .related-mini img {
        width: 92px;
    }

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