:root {
    --bg: #f8fafc;
    --panel: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --line: #e5e7eb;
    --cyan: #06b6d4;
    --cyan-dark: #0891b2;
    --teal: #14b8a6;
    --slate: #0f172a;
    --shadow: 0 10px 30px rgba(15, 23, 42, 0.10);
    --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.18);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.88);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    backdrop-filter: blur(18px);
}

.header-inner {
    max-width: 1440px;
    height: 72px;
    margin: 0 auto;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    font-size: 22px;
    color: #0f172a;
    white-space: nowrap;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan), var(--teal));
    box-shadow: 0 12px 30px rgba(6, 182, 212, 0.35);
}

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

.nav-links a,
.mobile-nav a {
    padding: 10px 16px;
    border-radius: 999px;
    color: #475569;
    font-weight: 600;
    transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.nav-links a:hover,
.nav-links a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
    color: var(--cyan-dark);
    background: rgba(6, 182, 212, 0.10);
}

.nav-toggle {
    width: 42px;
    height: 42px;
    display: none;
    border: 0;
    border-radius: 12px;
    background: #f1f5f9;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    background: #0f172a;
}

.mobile-nav {
    display: none;
    padding: 0 20px 18px;
}

.hero {
    position: relative;
    height: 70vh;
    min-height: 500px;
    margin: 24px 32px 0;
    border-radius: 28px;
    overflow: hidden;
    background: #0f172a;
    box-shadow: var(--shadow-lg);
}

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

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

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

.hero-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.38), rgba(0, 0, 0, 0.08));
}

.hero-content {
    position: absolute;
    left: clamp(28px, 6vw, 72px);
    right: clamp(28px, 6vw, 72px);
    bottom: clamp(32px, 8vh, 82px);
    max-width: 760px;
    color: #ffffff;
}

.hero-tags,
.detail-meta-row,
.tag-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags span,
.detail-meta-row span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    background: rgba(6, 182, 212, 0.92);
    color: #ffffff;
}

.detail-meta-row span,
.tag-row span {
    color: #0f172a;
    background: #ecfeff;
}

.hero h1 {
    margin: 18px 0 14px;
    font-size: clamp(34px, 6vw, 64px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero p {
    max-width: 680px;
    margin: 0 0 28px;
    font-size: 18px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.86);
}

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

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

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

.btn.primary {
    color: #ffffff;
    background: linear-gradient(90deg, var(--cyan), var(--teal));
    box-shadow: 0 14px 34px rgba(20, 184, 166, 0.32);
}

.btn.ghost {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.26);
    backdrop-filter: blur(12px);
}

.btn.ghost.dark {
    color: #0f172a;
    background: #ffffff;
    border-color: #dbeafe;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.48);
    backdrop-filter: blur(10px);
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
}

.hero-prev {
    left: 20px;
}

.hero-next {
    right: 20px;
}

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

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

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

.quick-entry {
    max-width: 1440px;
    margin: 28px auto 0;
    padding: 0 32px;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 22px;
}

.quick-card,
.quick-search,
.search-panel,
.content-panel,
.category-overview-card,
.home-rank,
.player-card {
    background: var(--panel);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.quick-card {
    padding: 28px;
}

.quick-card h2,
.home-rank h2,
.content-panel h2 {
    margin: 0 0 12px;
}

.quick-card p {
    margin: 0 0 18px;
    color: var(--muted);
    line-height: 1.8;
}

.quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.quick-links a {
    padding: 9px 14px;
    border-radius: 999px;
    background: #ecfeff;
    color: #0e7490;
    font-weight: 700;
}

.quick-search {
    padding: 24px;
    display: grid;
    gap: 14px;
}

.quick-search label,
.search-box {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-weight: 700;
}

.quick-search input,
.search-box input {
    width: 100%;
    height: 48px;
    border: 1px solid #cbd5e1;
    border-radius: 16px;
    padding: 0 16px;
    outline: none;
    color: var(--text);
    font-size: 16px;
    transition: border 0.25s ease, box-shadow 0.25s ease;
}

.quick-search input:focus,
.search-box input:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.13);
}

.quick-search button {
    height: 48px;
    border: 0;
    border-radius: 16px;
    color: #ffffff;
    background: linear-gradient(90deg, var(--cyan), var(--teal));
    font-weight: 800;
    cursor: pointer;
}

.section,
.page-main .section {
    max-width: 1440px;
    margin: 58px auto;
    padding: 0 32px;
}

.section-heading {
    margin-bottom: 24px;
}

.section-heading h2 {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0;
    font-size: clamp(24px, 3vw, 34px);
    letter-spacing: -0.03em;
}

.section-heading h2::before {
    content: "";
    width: 6px;
    height: 34px;
    border-radius: 999px;
    background: linear-gradient(to bottom, var(--cyan), var(--teal));
}

.section-heading p {
    margin: 10px 0 0 20px;
    max-width: 780px;
    color: var(--muted);
    line-height: 1.8;
}

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

.movie-grid.all-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.movie-card {
    min-width: 0;
}

.movie-card a {
    display: block;
    height: 100%;
    overflow: hidden;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: var(--shadow);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.movie-card a:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.card-cover {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a, #155e75);
}

.card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.movie-card a:hover img {
    transform: scale(1.10);
}

.card-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.66), transparent 58%);
    transition: opacity 0.28s ease;
}

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

.cover-type {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    padding: 5px 10px;
    border-radius: 9px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.64);
    backdrop-filter: blur(8px);
    font-size: 12px;
    font-weight: 700;
}

.cover-play {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 3;
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    background: var(--cyan);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
    transition: opacity 0.28s ease, transform 0.28s ease;
}

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

.card-body {
    padding: 18px;
}

.card-body h3 {
    min-height: 52px;
    margin: 0 0 10px;
    font-size: 18px;
    line-height: 1.45;
    color: #111827;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.25s ease;
}

.movie-card a:hover h3 {
    color: var(--cyan-dark);
}

.card-body p {
    min-height: 45px;
    margin: 0 0 14px;
    color: var(--muted);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #64748b;
    font-size: 14px;
}

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

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

.home-rank {
    padding: 24px;
    position: sticky;
    top: 96px;
}

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

.rank-item a {
    display: grid;
    grid-template-columns: 54px 72px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    min-height: 82px;
    padding: 10px;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.home-rank .rank-item a {
    grid-template-columns: 42px minmax(0, 1fr) auto;
}

.home-rank .rank-item img,
.home-rank .rank-desc {
    display: none;
}

.rank-item a:hover {
    transform: translateX(4px);
    border-color: rgba(6, 182, 212, 0.45);
    box-shadow: var(--shadow);
}

.rank-number {
    font-size: 20px;
    font-weight: 900;
    color: var(--cyan-dark);
    text-align: center;
}

.rank-item img {
    width: 72px;
    height: 48px;
    object-fit: cover;
    border-radius: 12px;
}

.rank-title {
    display: block;
    font-weight: 800;
    color: #0f172a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-desc {
    color: var(--muted);
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-year {
    color: #64748b;
    font-weight: 700;
}

.more-link {
    display: inline-flex;
    margin-top: 18px;
    color: var(--cyan-dark);
    font-weight: 800;
}

.ribbon-section {
    max-width: none;
    padding: 52px 32px;
    background: linear-gradient(135deg, #f8fafc, #ecfeff);
}

.ribbon-section > * {
    max-width: 1440px;
    margin-left: auto;
    margin-right: auto;
}

.ribbon-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.scroll-buttons {
    display: flex;
    gap: 10px;
}

.scroll-buttons button {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: var(--shadow);
    color: #0f172a;
    font-size: 26px;
    cursor: pointer;
}

.scroll-row {
    display: flex;
    gap: 22px;
    overflow-x: auto;
    padding: 4px 0 18px;
    scrollbar-width: none;
}

.scroll-row::-webkit-scrollbar {
    display: none;
}

.compact-card {
    flex: 0 0 270px;
    display: grid;
    gap: 10px;
    padding: 14px;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.compact-card img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 16px;
}

.compact-card span {
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.compact-card small {
    color: var(--muted);
}

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

.category-card,
.category-overview-card a {
    display: grid;
    gap: 14px;
    min-height: 168px;
    padding: 24px;
    border-radius: 24px;
    background: linear-gradient(135deg, #ffffff, #ecfeff);
    border: 1px solid rgba(6, 182, 212, 0.16);
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover,
.category-overview-card a:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.category-card strong,
.category-overview-title h2 {
    margin: 0;
    font-size: 22px;
    color: #0f172a;
}

.category-card span,
.category-overview-card p {
    color: var(--muted);
    line-height: 1.75;
}

.category-overview-title {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
}

.category-overview-title span {
    color: var(--cyan-dark);
    font-weight: 800;
}

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

.category-samples span {
    padding: 6px 10px;
    border-radius: 999px;
    background: #ffffff;
    color: #0e7490;
    font-size: 13px;
    font-weight: 700;
}

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

.page-hero {
    max-width: 1440px;
    margin: 24px auto 0;
    padding: 0 32px;
}

.page-hero > div {
    min-height: 290px;
    display: grid;
    align-content: center;
    padding: 48px;
    border-radius: 28px;
    color: #ffffff;
    background: radial-gradient(circle at top right, rgba(20, 184, 166, 0.72), transparent 38%), linear-gradient(135deg, #0f172a, #155e75);
    box-shadow: var(--shadow-lg);
}

.eyebrow {
    margin: 0 0 10px;
    color: #67e8f9;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.page-hero h1 {
    margin: 0 0 16px;
    font-size: clamp(34px, 5vw, 56px);
    letter-spacing: -0.04em;
}

.page-hero p {
    max-width: 800px;
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
    line-height: 1.8;
}

.search-panel {
    margin-bottom: 24px;
    padding: 20px;
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 2fr;
    gap: 18px;
    align-items: end;
}

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

.filter-btn {
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    color: #475569;
    background: #ffffff;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.filter-btn:hover,
.filter-btn.active {
    color: #ffffff;
    border-color: transparent;
    background: linear-gradient(90deg, var(--cyan), var(--teal));
}

.empty-state {
    padding: 32px;
    text-align: center;
    color: var(--muted);
    border-radius: 18px;
    background: #ffffff;
}

.detail-main {
    max-width: 1440px;
    margin: 0 auto;
    padding: 24px 32px 0;
}

.detail-hero {
    display: grid;
    grid-template-columns: 420px minmax(0, 1fr);
    gap: 34px;
    align-items: stretch;
    min-height: 540px;
    padding: 34px;
    border-radius: 30px;
    color: #ffffff;
    background: radial-gradient(circle at 70% 20%, rgba(6, 182, 212, 0.34), transparent 28%), linear-gradient(135deg, #0f172a, #111827 55%, #134e4a);
    box-shadow: var(--shadow-lg);
}

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

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

.detail-info {
    display: grid;
    align-content: center;
    gap: 18px;
}

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

.breadcrumb a:hover {
    color: #67e8f9;
}

.detail-info h1 {
    margin: 0;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.detail-one-line {
    max-width: 840px;
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
    line-height: 1.85;
}

.player-section {
    padding-left: 0;
    padding-right: 0;
}

.player-card {
    position: relative;
    overflow: hidden;
    padding: 0;
    background: #000000;
    aspect-ratio: 16 / 9;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 14px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.20));
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-play {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--cyan), var(--teal));
    font-size: 34px;
    box-shadow: 0 22px 50px rgba(6, 182, 212, 0.34);
}

.player-overlay strong {
    font-size: 20px;
}

.detail-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding-left: 0;
    padding-right: 0;
}

.content-panel {
    padding: 28px;
}

.content-panel p {
    margin: 0;
    color: #475569;
    line-height: 2;
    font-size: 16px;
}

.neighbour-links {
    padding-left: 0;
    padding-right: 0;
    display: flex;
    justify-content: space-between;
    gap: 18px;
}

.neighbour-links a {
    flex: 1;
    padding: 18px 22px;
    border-radius: 18px;
    background: #ffffff;
    color: #0e7490;
    font-weight: 800;
    box-shadow: var(--shadow);
}

.site-footer {
    margin-top: 80px;
    padding: 46px 32px;
    color: #cbd5e1;
    background: #0f172a;
}

.footer-inner {
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 30px;
}

.footer-brand {
    display: inline-flex;
    margin-bottom: 10px;
    color: #ffffff;
    font-size: 22px;
    font-weight: 900;
}

.footer-inner p {
    max-width: 620px;
    margin: 0;
    line-height: 1.8;
}

.footer-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}

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

[hidden] {
    display: none !important;
}

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

    .split-section,
    .detail-hero,
    .quick-entry,
    .search-panel {
        grid-template-columns: 1fr;
    }

    .home-rank {
        position: static;
    }

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

@media (max-width: 760px) {
    .header-inner {
        height: 64px;
        padding: 0 18px;
    }

    .brand {
        font-size: 18px;
    }

    .brand-mark {
        width: 36px;
        height: 36px;
        border-radius: 12px;
    }

    .nav-links {
        display: none;
    }

    .nav-toggle {
        display: block;
    }

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

    .hero {
        min-height: 520px;
        height: 68vh;
        margin: 16px 16px 0;
        border-radius: 22px;
    }

    .hero-content {
        left: 22px;
        right: 22px;
        bottom: 52px;
    }

    .hero p {
        font-size: 16px;
    }

    .hero-arrow {
        display: none;
    }

    .quick-entry,
    .section,
    .page-main .section,
    .page-hero,
    .detail-main {
        padding-left: 16px;
        padding-right: 16px;
    }

    .movie-grid,
    .movie-grid.all-grid,
    .compact-grid,
    .detail-content-grid,
    .category-grid,
    .category-overview-grid {
        grid-template-columns: 1fr;
    }

    .page-hero > div {
        min-height: 240px;
        padding: 30px;
    }

    .detail-hero {
        padding: 20px;
        min-height: auto;
    }

    .detail-poster {
        max-height: 360px;
    }

    .rank-item a {
        grid-template-columns: 42px minmax(0, 1fr) auto;
    }

    .rank-item img,
    .rank-desc {
        display: none;
    }

    .neighbour-links,
    .footer-inner {
        flex-direction: column;
    }

    .site-footer {
        padding: 38px 18px;
    }
}
