:root {
    --primary-50: #f4f7fb;
    --primary-100: #e6edf5;
    --primary-600: #506688;
    --primary-700: #42536f;
    --primary-900: #243044;
    --accent-400: #facc15;
    --accent-500: #eab308;
    --neutral-50: #f9fafb;
    --neutral-100: #f3f4f6;
    --neutral-200: #e5e7eb;
    --neutral-300: #d1d5db;
    --neutral-500: #6b7280;
    --neutral-600: #4b5563;
    --neutral-700: #374151;
    --neutral-900: #111827;
    --shadow-soft: 0 18px 45px rgba(17, 24, 39, 0.12);
    --shadow-card: 0 10px 25px rgba(17, 24, 39, 0.08);
    --radius-lg: 22px;
    --radius-md: 16px;
}

* {
    box-sizing: border-box;
}

body {
    min-width: 320px;
    background: var(--neutral-50);
    color: var(--neutral-900);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
}

img.cover-error {
    opacity: 0;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(229, 231, 235, 0.9);
    backdrop-filter: blur(18px);
}

.header-inner {
    max-width: 1180px;
    margin: 0 auto;
    min-height: 72px;
    padding: 0 22px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--primary-900);
    font-weight: 800;
    font-size: 22px;
    white-space: nowrap;
}

.logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary-600), var(--primary-900));
    box-shadow: 0 10px 22px rgba(80, 102, 136, 0.28);
    font-size: 15px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-left: auto;
}

.desktop-nav a,
.mobile-menu a,
.footer-links a {
    color: var(--neutral-700);
    font-weight: 600;
    transition: color 0.22s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active,
.mobile-menu a:hover,
.mobile-menu a.is-active,
.footer-links a:hover {
    color: var(--primary-600);
}

.top-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-search input,
.mobile-menu input,
.filter-search input,
.search-panel input {
    width: 230px;
    border: 1px solid var(--neutral-300);
    border-radius: 999px;
    background: #ffffff;
    padding: 10px 14px;
    color: var(--neutral-900);
    outline: none;
    transition: border-color 0.22s ease, box-shadow 0.22s ease;
}

.top-search input:focus,
.mobile-menu input:focus,
.filter-search input:focus,
.search-panel input:focus {
    border-color: var(--primary-600);
    box-shadow: 0 0 0 4px rgba(80, 102, 136, 0.12);
}

.top-search button,
.mobile-menu button {
    border: 0;
    border-radius: 999px;
    background: var(--primary-600);
    color: #ffffff;
    padding: 10px 16px;
    font-weight: 700;
}

.menu-toggle {
    display: none;
    margin-left: auto;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    color: var(--neutral-700);
    background: var(--neutral-100);
}

.mobile-menu {
    display: none;
    flex-direction: column;
    gap: 14px;
    padding: 16px 22px 22px;
    border-top: 1px solid var(--neutral-200);
}

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

.mobile-menu form {
    display: flex;
    gap: 8px;
}

.mobile-menu input {
    width: 100%;
}

.page-shell {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
}

.hero-slider {
    background: #0f172a;
}

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

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

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

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: radial-gradient(circle at 30% 30%, #334155, #020617 62%);
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.88), rgba(15, 23, 42, 0.56), rgba(15, 23, 42, 0.12));
}

.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(1180px, calc(100% - 40px));
    transform: translate(-50%, -50%);
    color: #ffffff;
}

.hero-content h1,
.hero-content h2 {
    max-width: 760px;
    margin: 14px 0 16px;
    font-size: clamp(38px, 6vw, 68px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.04em;
}

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

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: rgba(250, 204, 21, 0.18);
    color: var(--accent-400);
    padding: 8px 14px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
    color: #e5e7eb;
}

.hero-meta span {
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
}

.hero-actions,
.page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.primary-button,
.ghost-button,
.rank-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 12px;
    padding: 0 20px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.primary-button {
    color: #ffffff;
    background: var(--primary-600);
    box-shadow: 0 14px 24px rgba(80, 102, 136, 0.28);
}

.primary-button:hover,
.rank-action:hover {
    background: var(--primary-700);
    transform: translateY(-1px);
}

.ghost-button {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.32);
    background: rgba(255, 255, 255, 0.12);
}

.ghost-button.dark {
    color: var(--primary-700);
    border-color: var(--primary-100);
    background: #ffffff;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.46);
    font-size: 34px;
    line-height: 1;
    transition: background 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(0, 0, 0, 0.7);
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 24px;
    display: flex;
    gap: 9px;
    transform: translateX(-50%);
}

.hero-dots button {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.55);
    transition: width 0.2s ease, background 0.2s ease;
}

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

.quick-categories {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 34px;
}

.category-chip,
.category-panel {
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-md);
    background: #ffffff;
    box-shadow: var(--shadow-card);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.category-chip {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 18px;
}

.category-chip span,
.category-panel h2 {
    color: var(--primary-900);
    font-size: 20px;
    font-weight: 850;
}

.category-chip small,
.category-panel p {
    color: var(--neutral-600);
}

.category-chip:hover,
.category-panel:hover,
.video-card:hover {
    transform: translateY(-4px);
    border-color: rgba(80, 102, 136, 0.26);
    box-shadow: var(--shadow-soft);
}

.content-section {
    padding: 56px 0 0;
}

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

.section-heading h2 {
    color: var(--neutral-900);
    font-size: clamp(26px, 4vw, 36px);
    line-height: 1.15;
    font-weight: 900;
}

.section-heading p {
    max-width: 520px;
    color: var(--neutral-600);
}

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

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

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

.video-card {
    overflow: hidden;
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-md);
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(17, 24, 39, 0.05);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.card-cover {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, #1e293b, #020617);
}

.video-card-small .card-cover,
.library-grid .card-cover {
    aspect-ratio: 3 / 4;
}

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

.video-card:hover .card-image {
    transform: scale(1.08);
}

.card-kind,
.card-year {
    position: absolute;
    z-index: 2;
    border-radius: 8px;
    padding: 5px 9px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
}

.card-kind {
    left: 10px;
    top: 10px;
    background: var(--primary-600);
}

.card-year {
    right: 10px;
    top: 10px;
    background: rgba(0, 0, 0, 0.68);
}

.card-body {
    padding: 16px;
}

.card-body h3 {
    margin: 0 0 8px;
    color: var(--neutral-900);
    font-size: 18px;
    line-height: 1.35;
    font-weight: 850;
}

.card-body h3 a:hover,
.rank-main h3 a:hover {
    color: var(--primary-600);
}

.card-body p,
.rank-main p {
    display: -webkit-box;
    overflow: hidden;
    color: var(--neutral-600);
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    color: var(--neutral-500);
    font-size: 12px;
}

.card-meta span {
    border-radius: 999px;
    background: var(--neutral-100);
    padding: 4px 9px;
}

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

.tag-row span,
.detail-tags a {
    border-radius: 999px;
    color: var(--primary-700);
    background: var(--primary-100);
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 700;
}

.page-hero {
    margin-top: 36px;
    padding: 44px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #ffffff 0%, #eef3f9 100%);
    box-shadow: var(--shadow-card);
}

.page-hero h1 {
    max-width: 820px;
    margin: 14px 0 12px;
    color: var(--primary-900);
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.08;
    font-weight: 950;
    letter-spacing: -0.035em;
}

.page-hero p {
    max-width: 820px;
    color: var(--neutral-600);
    font-size: 18px;
}

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

.category-panel {
    padding: 22px;
}

.category-panel-main {
    display: block;
}

.category-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-bottom: 14px;
    border-radius: 15px;
    color: #ffffff;
    background: var(--primary-600);
}

.category-samples {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.category-samples a {
    color: var(--neutral-600);
    background: var(--neutral-100);
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
}

.filter-panel {
    display: grid;
    gap: 16px;
    margin: 34px 0 28px;
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-md);
    background: #ffffff;
    padding: 18px;
    box-shadow: 0 8px 20px rgba(17, 24, 39, 0.04);
}

.filter-search input {
    width: min(100%, 520px);
}

.filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-group button {
    border-radius: 999px;
    background: var(--neutral-100);
    color: var(--neutral-700);
    padding: 8px 14px;
    font-weight: 750;
    transition: background 0.2s ease, color 0.2s ease;
}

.filter-group button.is-active,
.filter-group button:hover {
    color: #ffffff;
    background: var(--primary-600);
}

[data-card].is-hidden {
    display: none;
}

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

.home-rank-list {
    gap: 12px;
}

.rank-row {
    display: grid;
    grid-template-columns: 148px 52px minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-md);
    background: #ffffff;
    padding: 14px;
    box-shadow: 0 8px 18px rgba(17, 24, 39, 0.05);
}

.rank-cover {
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    background: linear-gradient(135deg, #1e293b, #020617);
}

.rank-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: #ffffff;
    background: var(--accent-500);
    font-weight: 900;
}

.rank-main h3 {
    margin: 0 0 6px;
    color: var(--neutral-900);
    font-size: 20px;
    font-weight: 900;
}

.rank-action {
    color: #ffffff;
    background: var(--primary-600);
}

.detail-layout {
    padding-top: 34px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 20px;
    color: var(--neutral-500);
    font-size: 14px;
}

.breadcrumb a {
    color: var(--primary-600);
    font-weight: 700;
}

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

.player-card {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-lg);
    background: #000000;
    box-shadow: var(--shadow-soft);
}

.movie-player {
    width: 100%;
    height: 100%;
    background: #000000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.72));
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.player-overlay.is-hidden {
    visibility: hidden;
    opacity: 0;
}

.play-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 74px;
    height: 74px;
    border-radius: 999px;
    background: var(--primary-600);
    box-shadow: 0 12px 28px rgba(80, 102, 136, 0.42);
    font-size: 28px;
}

.player-message {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 18px;
    display: none;
    border-radius: 12px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.72);
    padding: 10px 14px;
    text-align: center;
}

.player-message.is-visible {
    display: block;
}

.detail-content,
.detail-sidebar,
.search-panel,
.search-results {
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-lg);
    background: #ffffff;
    box-shadow: var(--shadow-card);
}

.detail-content {
    margin-top: 22px;
    padding: 28px;
}

.detail-content h1 {
    color: var(--primary-900);
    font-size: clamp(30px, 5vw, 48px);
    line-height: 1.12;
    font-weight: 950;
}

.detail-content .lead {
    margin: 14px 0 10px;
    color: var(--neutral-700);
    font-size: 19px;
}

.detail-content h2 {
    margin: 28px 0 10px;
    color: var(--neutral-900);
    font-size: 24px;
    font-weight: 900;
}

.detail-content p {
    color: var(--neutral-700);
}

.detail-sidebar {
    position: sticky;
    top: 96px;
    padding: 18px;
}

.poster-card {
    overflow: hidden;
    aspect-ratio: 3 / 4;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #1e293b, #020617);
}

.detail-meta-list {
    display: grid;
    gap: 10px;
    margin: 18px 0;
}

.detail-meta-list li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--neutral-100);
    padding-bottom: 10px;
}

.detail-meta-list span {
    color: var(--neutral-500);
}

.detail-meta-list strong {
    color: var(--neutral-900);
    text-align: right;
}

.full-button {
    width: 100%;
}

.search-page {
    padding: 34px 0 30px;
}

.search-panel {
    display: flex;
    gap: 12px;
    padding: 18px;
}

.search-panel input {
    flex: 1;
    width: auto;
}

.search-results {
    display: grid;
    gap: 12px;
    margin-top: 20px;
    padding: 18px;
}

.search-item {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    border-bottom: 1px solid var(--neutral-100);
    padding: 0 0 14px;
}

.search-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.search-thumb {
    overflow: hidden;
    aspect-ratio: 3 / 4;
    border-radius: 12px;
    background: linear-gradient(135deg, #1e293b, #020617);
}

.search-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-item h2 {
    color: var(--neutral-900);
    font-size: 18px;
    font-weight: 900;
}

.search-item p {
    color: var(--neutral-600);
    font-size: 14px;
}

.site-footer {
    margin-top: 70px;
    background: var(--neutral-900);
    color: #ffffff;
}

.footer-inner {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 42px 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    align-items: start;
}

.footer-logo {
    color: #ffffff;
}

.footer-brand p {
    max-width: 580px;
    margin-top: 16px;
    color: #d1d5db;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-links a {
    color: #d1d5db;
}

.copyright {
    grid-column: 1 / -1;
    color: #9ca3af;
}

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

    .quick-categories,
    .category-layout {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

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

    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .hero-stage {
        height: 540px;
    }

    .hero-arrow {
        display: none;
    }

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

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

    .detail-sidebar {
        position: static;
    }

    .rank-row,
    .search-item {
        grid-template-columns: 92px minmax(0, 1fr);
    }

    .rank-number,
    .rank-action,
    .search-item .primary-button {
        display: none;
    }

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

@media (max-width: 640px) {
    .page-shell {
        width: min(100% - 28px, 1180px);
    }

    .header-inner {
        padding: 0 14px;
    }

    .site-logo {
        font-size: 18px;
    }

    .hero-stage {
        height: 520px;
    }

    .hero-content {
        width: min(100% - 28px, 1180px);
    }

    .hero-content h1,
    .hero-content h2 {
        font-size: 36px;
    }

    .hero-meta span:nth-child(n + 3) {
        display: none;
    }

    .quick-categories,
    .card-grid,
    .region-grid,
    .editor-grid,
    .related-grid,
    .library-grid,
    .category-layout {
        grid-template-columns: 1fr;
    }

    .page-hero {
        padding: 28px;
    }

    .search-panel {
        flex-direction: column;
    }
}
