:root {
    color-scheme: light;
    --site-bg: #f8fafc;
    --panel: #ffffff;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --blue: #2563eb;
    --red: #dc2626;
    --orange: #f97316;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --soft-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--site-bg);
    color: var(--ink);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

img {
    display: block;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
    box-shadow: 0 1px 20px rgba(15, 23, 42, 0.05);
}

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

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.brand-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    background: linear-gradient(135deg, var(--red), var(--orange));
    box-shadow: 0 12px 20px rgba(220, 38, 38, 0.22);
}

.brand-text {
    display: grid;
    line-height: 1.15;
}

.brand-text strong {
    font-size: 20px;
    letter-spacing: -0.02em;
}

.brand-text small {
    color: var(--muted);
    font-size: 12px;
}

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

.nav-link,
.mobile-link {
    padding: 9px 12px;
    border-radius: 10px;
    color: #334155;
    font-size: 14px;
    font-weight: 650;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    background: #eff6ff;
    color: var(--blue);
}

.nav-link:hover {
    transform: translateY(-1px);
}

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

.top-search input,
.mobile-search input,
.inline-filter input {
    width: 220px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    padding: 11px 16px;
    outline: none;
    background: #fff;
    color: var(--ink);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.top-search input:focus,
.mobile-search input:focus,
.inline-filter input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.top-search button,
.mobile-search button,
.inline-filter button {
    border: 0;
    border-radius: 999px;
    padding: 11px 18px;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    background: linear-gradient(135deg, var(--blue), #1d4ed8);
}

.mobile-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.mobile-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    margin: 5px auto;
    background: var(--ink);
    border-radius: 999px;
}

.mobile-panel {
    display: none;
    padding: 16px 20px 22px;
    border-top: 1px solid var(--line);
    background: #fff;
}

.mobile-panel.open {
    display: block;
}

.mobile-panel nav {
    display: grid;
    gap: 8px;
    margin-top: 14px;
}

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

.hero-stage,
.hero-slide {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    transition: opacity 900ms ease;
}

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

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.48) 48%, rgba(15, 23, 42, 0.24)), linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.42) 55%, rgba(2, 6, 23, 0.05));
}

.hero-content {
    position: absolute;
    z-index: 2;
    left: 50%;
    bottom: 58px;
    width: min(1180px, calc(100% - 40px));
    transform: translateX(-50%);
    color: #fff;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 8px 14px;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--red), #db2777);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.hero h1 {
    max-width: 820px;
    margin: 18px 0 16px;
    font-size: clamp(36px, 7vw, 64px);
    line-height: 1.04;
    letter-spacing: -0.05em;
}

.hero p {
    max-width: 760px;
    margin: 0;
    color: #e2e8f0;
    font-size: 18px;
}

.hero-tags,
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.hero-tags span,
.tag-cloud span {
    padding: 6px 10px;
    border-radius: 999px;
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.14);
    font-size: 13px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 28px;
}

.primary-btn,
.ghost-btn,
.text-btn,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
    padding: 13px 22px;
    color: #fff;
    background: linear-gradient(135deg, var(--red), var(--orange));
    box-shadow: 0 16px 30px rgba(220, 38, 38, 0.28);
}

.ghost-btn {
    padding: 12px 20px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.38);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
}

.text-btn {
    color: #bfdbfe;
}

.primary-btn:hover,
.ghost-btn:hover,
.section-more:hover {
    transform: translateY(-2px);
}

.hero-control {
    position: absolute;
    z-index: 3;
    top: 50%;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: rgba(15, 23, 42, 0.5);
    cursor: pointer;
    font-size: 34px;
    line-height: 1;
    backdrop-filter: blur(8px);
}

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

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

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

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

.hero-dot.active {
    background: #fff;
}

.quick-categories,
.content-section,
.page-main,
.detail-main {
    max-width: 1180px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

.quick-categories {
    padding-top: 26px;
}

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

.category-tile,
.category-overview-card,
.movie-card,
.detail-meta-card,
.player-card,
.page-hero,
.rank-item {
    border: 1px solid var(--line);
    background: var(--panel);
    box-shadow: var(--soft-shadow);
}

.category-tile {
    display: grid;
    gap: 8px;
    min-height: 130px;
    padding: 22px;
    border-radius: 18px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.category-tile strong {
    font-size: 20px;
}

.category-tile span {
    color: var(--muted);
    font-size: 14px;
}

.category-tile:hover {
    border-color: #bfdbfe;
    box-shadow: var(--shadow);
    transform: translateY(-3px);
}

.content-section {
    padding-top: 54px;
}

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

.section-heading h2,
.page-hero h1,
.detail-meta-card h1,
.detail-text h2 {
    margin: 0;
    color: var(--ink);
    line-height: 1.15;
}

.section-heading h2 {
    font-size: 30px;
    letter-spacing: -0.04em;
}

.section-heading p,
.page-hero p,
.detail-meta-card p,
.detail-text p {
    margin: 8px 0 0;
    color: var(--muted);
}

.section-more {
    padding: 10px 16px;
    color: var(--blue);
    background: #eff6ff;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: 18px;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    border-color: #bfdbfe;
    box-shadow: var(--shadow);
    transform: translateY(-5px);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #0f172a;
}

.poster-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease, opacity 0.2s ease;
}

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

.type-badge,
.watch-pill {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.type-badge {
    top: 10px;
    right: 10px;
    padding: 5px 9px;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(8px);
}

.watch-pill {
    left: 50%;
    bottom: 14px;
    padding: 7px 12px;
    background: linear-gradient(135deg, var(--red), var(--orange));
    opacity: 0;
    transform: translate(-50%, 12px);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.movie-card:hover .watch-pill {
    opacity: 1;
    transform: translate(-50%, 0);
}

.movie-info {
    padding: 16px;
}

.movie-title {
    display: -webkit-box;
    overflow: hidden;
    min-height: 46px;
    color: var(--ink);
    font-weight: 800;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.movie-title:hover {
    color: var(--blue);
}

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

.movie-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: #64748b;
    font-size: 13px;
}

.movie-meta span:first-child {
    max-width: 60%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.movie-tags {
    overflow: hidden;
    margin: 10px 0 0;
    color: #94a3b8;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

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

.rank-item {
    display: grid;
    grid-template-columns: 42px 54px 1fr auto;
    align-items: center;
    gap: 12px;
    min-height: 82px;
    padding: 10px;
    border-radius: 16px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

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

.rank-item img {
    width: 54px;
    height: 70px;
    border-radius: 10px;
    object-fit: cover;
}

.rank-title {
    overflow: hidden;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-meta {
    color: var(--muted);
    font-size: 13px;
}

.page-main,
.detail-main {
    padding-top: 34px;
    padding-bottom: 58px;
}

.page-hero {
    padding: 34px;
    border-radius: 24px;
    background: radial-gradient(circle at 10% 0%, rgba(239, 68, 68, 0.12), transparent 32%), radial-gradient(circle at 90% 0%, rgba(37, 99, 235, 0.16), transparent 36%), #fff;
}

.small-page-hero h1 {
    margin-top: 16px;
    font-size: clamp(30px, 5vw, 48px);
    letter-spacing: -0.05em;
}

.inline-filter {
    margin-top: 24px;
}

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

.category-overview-card {
    margin-top: 24px;
    padding: 24px;
    border-radius: 22px;
}

.category-overview-head {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.category-overview-head h2 {
    margin: 0 0 8px;
}

.category-overview-head p {
    margin: 0;
    color: var(--muted);
}

.empty-state {
    display: none;
    margin-top: 24px;
    padding: 30px;
    border: 1px dashed var(--line);
    border-radius: 18px;
    color: var(--muted);
    text-align: center;
    background: #fff;
}

.empty-state.show {
    display: block;
}

.split-rank-page {
    display: grid;
    grid-template-columns: 340px 1fr;
    align-items: start;
    gap: 24px;
}

.big-rank {
    position: sticky;
    top: 90px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
    color: var(--muted);
    font-size: 14px;
}

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

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) 360px;
    gap: 24px;
    align-items: start;
}

.player-card {
    overflow: hidden;
    border-radius: 24px;
    background: #020617;
}

.video-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
}

.video-frame video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    border: 0;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.72));
}

.play-overlay.is-hidden {
    display: none;
}

.play-button {
    width: 76px;
    height: 76px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-left: 5px;
    background: linear-gradient(135deg, var(--red), var(--orange));
    box-shadow: 0 18px 38px rgba(220, 38, 38, 0.3);
    font-size: 30px;
}

.play-overlay strong {
    max-width: 80%;
    font-size: 22px;
}

.detail-side {
    display: grid;
    gap: 16px;
}

.detail-cover {
    width: 100%;
    border-radius: 24px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    box-shadow: var(--shadow);
}

.detail-meta-card {
    padding: 24px;
    border-radius: 24px;
}

.detail-meta-card h1 {
    font-size: 28px;
    letter-spacing: -0.04em;
}

.detail-meta-card dl {
    display: grid;
    gap: 10px;
    margin: 20px 0 0;
}

.detail-meta-card dl div {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 12px;
    color: var(--muted);
}

.detail-meta-card dt {
    color: #94a3b8;
}

.detail-meta-card dd {
    margin: 0;
    color: var(--ink);
    font-weight: 700;
}

.detail-meta-card dd a {
    color: var(--blue);
}

.detail-meta-card .tag-cloud span {
    color: #334155;
    background: #f1f5f9;
    border-color: #e2e8f0;
}

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

.detail-text h2 {
    margin-top: 28px;
    font-size: 28px;
}

.detail-text p {
    max-width: 920px;
    color: #334155;
    font-size: 17px;
}

.site-footer {
    margin-top: 40px;
    color: #cbd5e1;
    background: #111827;
}

.footer-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 42px 20px;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 30px;
}

.footer-brand {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.footer-brand strong {
    color: #fff;
    font-size: 20px;
}

.footer-brand p {
    max-width: 560px;
    margin: 8px 0 0;
    color: #94a3b8;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px 18px;
}

.footer-links a:hover {
    color: #60a5fa;
}

.footer-bottom {
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    padding: 16px 20px;
    text-align: center;
    color: #94a3b8;
}

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

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

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

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

    .big-rank {
        position: static;
    }
}

@media (max-width: 780px) {
    .header-inner {
        min-height: 64px;
    }

    .main-nav {
        display: none;
    }

    .mobile-toggle {
        display: block;
        margin-left: auto;
    }

    .brand-text small {
        display: none;
    }

    .hero {
        height: 560px;
    }

    .hero-content {
        bottom: 58px;
    }

    .hero-control {
        display: none;
    }

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

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

    .quick-inner,
    .movie-grid,
    .compact-grid,
    .home-rank {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .section-heading,
    .category-overview-head,
    .footer-inner {
        align-items: flex-start;
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .footer-links {
        justify-content: flex-start;
    }

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

    .inline-filter input,
    .inline-filter button,
    .mobile-search input {
        width: 100%;
    }

    .detail-side {
        grid-template-columns: 140px 1fr;
        align-items: start;
    }

    .detail-cover {
        border-radius: 18px;
    }
}

@media (max-width: 520px) {
    .quick-inner,
    .movie-grid,
    .compact-grid,
    .home-rank {
        grid-template-columns: 1fr;
    }

    .hero {
        min-height: 540px;
    }

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

    .primary-btn,
    .ghost-btn,
    .text-btn {
        width: 100%;
    }

    .rank-item {
        grid-template-columns: 38px 48px 1fr;
    }

    .rank-meta {
        display: none;
    }

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