:root {
    --primary: #0284c7;
    --primary-dark: #0369a1;
    --primary-soft: #e0f2fe;
    --accent: #059669;
    --secondary: #f59e0b;
    --ink: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --panel: #ffffff;
    --soft: #f8fafc;
    --dark: #111827;
    --dark-2: #030712;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.14);
    --radius: 22px;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    color: var(--ink);
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 42%, #f8fafc 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

img {
    background: linear-gradient(135deg, #0f172a, #164e63);
}

main {
    padding-top: 64px;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 1px 18px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(16px);
}

.nav-shell {
    max-width: 1180px;
    height: 64px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    color: var(--ink);
}

.brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 12px;
    box-shadow: 0 12px 24px rgba(2, 132, 199, 0.28);
    font-size: 14px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 26px;
    font-weight: 650;
    color: #374151;
}

.desktop-nav a,
.mobile-nav a,
.site-footer a {
    transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
    color: var(--primary);
}

.nav-toggle {
    display: none;
    font-size: 28px;
    color: #374151;
}

.mobile-nav {
    display: none;
    padding: 10px 20px 18px;
    border-top: 1px solid var(--line);
    background: #ffffff;
}

.mobile-nav a {
    display: block;
    padding: 12px 0;
    color: #374151;
    font-weight: 650;
}

.hero {
    position: relative;
    height: min(760px, 72vh);
    min-height: 560px;
    overflow: hidden;
    color: #ffffff;
    background: #020617;
}

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

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

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.86) 0%, rgba(2, 6, 23, 0.62) 47%, rgba(2, 6, 23, 0.08) 100%), linear-gradient(0deg, rgba(2, 6, 23, 0.7) 0%, rgba(2, 6, 23, 0) 50%);
}

.hero-copy {
    position: absolute;
    z-index: 3;
    left: max(24px, calc((100vw - 1180px) / 2));
    top: 50%;
    width: min(660px, calc(100% - 48px));
    transform: translateY(-50%);
}

.hero-kicker {
    display: inline-flex;
    padding: 8px 14px;
    margin-bottom: 18px;
    color: #dff6ff;
    background: rgba(2, 132, 199, 0.36);
    border: 1px solid rgba(125, 211, 252, 0.36);
    border-radius: 999px;
    backdrop-filter: blur(12px);
    font-weight: 750;
}

.hero h1,
.page-hero h1 {
    font-size: clamp(38px, 6vw, 68px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.hero h2 {
    margin-top: 16px;
    font-size: clamp(28px, 4vw, 46px);
    line-height: 1.1;
    font-weight: 850;
}

.hero-desc {
    max-width: 620px;
    margin-top: 18px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 18px;
    line-height: 1.8;
}

.hero-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.hero-meta span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    font-weight: 700;
    backdrop-filter: blur(10px);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 34px;
}

.primary-btn,
.ghost-btn,
.hero-search-form button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 24px;
    border-radius: 14px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn,
.hero-search-form button {
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    box-shadow: 0 16px 34px rgba(2, 132, 199, 0.32);
}

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

.primary-btn:hover,
.ghost-btn:hover,
.hero-search-form button:hover {
    transform: translateY(-2px) scale(1.02);
}

.hero-arrow {
    position: absolute;
    z-index: 5;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.24);
    backdrop-filter: blur(12px);
    font-size: 34px;
    line-height: 1;
}

.hero-arrow.prev {
    left: 28px;
}

.hero-arrow.next {
    right: 28px;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    transition: width 0.2s ease, background 0.2s ease;
}

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

.search-hero-panel,
.content-section,
.detail-shell {
    max-width: 1180px;
    margin: 0 auto;
    padding: 56px 20px;
}

.search-hero-panel {
    display: grid;
    grid-template-columns: 1fr minmax(280px, 520px);
    gap: 24px;
    align-items: center;
    margin-top: -52px;
    padding: 28px;
    position: relative;
    z-index: 8;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 26px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.search-hero-panel h2,
.section-head h2 {
    font-size: clamp(26px, 3vw, 34px);
    font-weight: 850;
    letter-spacing: -0.03em;
}

.search-hero-panel p,
.section-head p,
.page-hero p {
    margin-top: 8px;
    color: var(--muted);
    line-height: 1.75;
}

.hero-search-form {
    display: flex;
    gap: 12px;
}

.hero-search-form input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 48px;
    padding: 0 15px;
    border: 1px solid #dbe3ef;
    border-radius: 14px;
    background: #ffffff;
    outline: none;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.hero-search-form input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.12);
}

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

.section-more {
    color: var(--primary);
    font-weight: 800;
}

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

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

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

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

.wide-link,
.poster-link,
.rank-link {
    display: block;
    height: 100%;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border 0.25s ease;
}

.wide-link:hover,
.poster-link:hover,
.rank-link:hover {
    transform: translateY(-6px);
    border-color: rgba(2, 132, 199, 0.32);
    box-shadow: var(--shadow);
}

.wide-image-wrap,
.poster-image-wrap {
    position: relative;
    display: block;
    overflow: hidden;
    background: #0f172a;
}

.wide-image-wrap {
    aspect-ratio: 16 / 9;
}

.poster-image-wrap {
    aspect-ratio: 3 / 4;
}

.wide-image-wrap img,
.poster-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.wide-link:hover img,
.poster-link:hover img {
    transform: scale(1.08);
}

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.08) 58%);
}

.play-mark {
    position: absolute;
    left: 50%;
    top: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    color: var(--primary-dark);
    background: rgba(255, 255, 255, 0.92);
    border-radius: 50%;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.86);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.wide-link:hover .play-mark,
.poster-link:hover .play-mark {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 30px;
    padding: 0 10px;
    color: #ffffff;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    border-radius: 999px;
    font-weight: 850;
    box-shadow: 0 10px 18px rgba(239, 68, 68, 0.28);
}

.wide-content,
.poster-info {
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding: 17px;
}

.wide-content strong,
.poster-info strong,
.rank-content strong {
    display: -webkit-box;
    color: var(--ink);
    font-size: 18px;
    font-weight: 850;
    line-height: 1.35;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.meta-line,
.poster-info span,
.rank-content span {
    color: var(--muted);
    font-size: 14px;
}

.desc-line,
.rank-content em {
    display: -webkit-box;
    color: #4b5563;
    font-size: 14px;
    line-height: 1.65;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-style: normal;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.tag {
    display: inline-flex;
    padding: 5px 9px;
    color: #475569;
    background: #f1f5f9;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.ranking-section {
    max-width: none;
    padding-left: max(20px, calc((100vw - 1180px) / 2));
    padding-right: max(20px, calc((100vw - 1180px) / 2));
    background: linear-gradient(135deg, #0f172a, #082f49 55%, #064e3b);
    color: #ffffff;
}

.ranking-section .section-head p,
.ranking-section .section-more {
    color: rgba(255, 255, 255, 0.76);
}

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

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

.rank-link {
    display: grid;
    grid-template-columns: 54px 88px 1fr;
    gap: 14px;
    align-items: center;
    padding: 12px;
}

.rank-link img {
    width: 88px;
    height: 66px;
    object-fit: cover;
    border-radius: 14px;
}

.rank-number {
    display: inline-flex;
    justify-content: center;
    color: var(--primary);
    font-size: 26px;
    font-weight: 900;
}

.rank-content {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

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

.category-tile,
.category-overview-card a {
    display: flex;
    flex-direction: column;
    min-height: 156px;
    padding: 24px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, #ffffff, #f0f9ff);
    border: 1px solid rgba(186, 230, 253, 0.85);
    box-shadow: 0 10px 26px rgba(2, 132, 199, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-tile strong,
.category-overview-card h2 {
    color: var(--ink);
    font-size: 23px;
    font-weight: 850;
}

.category-tile span,
.category-overview-card p {
    margin-top: 10px;
    color: var(--muted);
    line-height: 1.7;
}

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

.category-samples span {
    padding: 5px 9px;
    color: var(--primary-dark);
    background: var(--primary-soft);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 750;
}

.page-hero {
    color: #ffffff;
    background: radial-gradient(circle at 18% 30%, rgba(14, 165, 233, 0.42), transparent 34%), linear-gradient(135deg, #0f172a, #075985 56%, #047857);
}

.page-hero > div {
    max-width: 1180px;
    margin: 0 auto;
    padding: 88px 20px;
}

.page-hero.slim > div {
    padding: 72px 20px;
}

.page-hero p {
    max-width: 760px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(240px, 1.5fr) repeat(3, minmax(150px, 1fr));
    gap: 14px;
    margin-bottom: 26px;
    padding: 18px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.filter-panel label {
    display: flex;
    flex-direction: column;
    gap: 7px;
    color: #475569;
    font-size: 13px;
    font-weight: 800;
}

.listing-grid {
    align-items: stretch;
}

.empty-state {
    display: none;
    margin-top: 26px;
    padding: 26px;
    text-align: center;
    color: var(--muted);
    background: #ffffff;
    border-radius: var(--radius);
    border: 1px solid var(--line);
}

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

.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 9px;
    margin-top: 36px;
}

.pagination a,
.pagination span {
    min-width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 13px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid var(--line);
    color: #475569;
    font-weight: 800;
}

.pagination a.current {
    color: #ffffff;
    background: var(--primary);
    border-color: var(--primary);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 22px;
    color: #64748b;
    font-weight: 700;
}

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

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

.detail-main {
    min-width: 0;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #020617;
    box-shadow: 0 22px 52px rgba(2, 6, 23, 0.32);
    aspect-ratio: 16 / 9;
}

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

.player-start {
    position: absolute;
    left: 50%;
    top: 50%;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    color: #ffffff;
    background: rgba(2, 132, 199, 0.92);
    border-radius: 999px;
    box-shadow: 0 18px 38px rgba(2, 132, 199, 0.34);
    transform: translate(-50%, -50%);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

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

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

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

.player-message.show {
    display: block;
}

.detail-card,
.side-card {
    margin-top: 24px;
    padding: 28px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.detail-card h1 {
    font-size: clamp(30px, 4vw, 44px);
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -0.04em;
}

.detail-card .detail-meta span {
    color: #075985;
    background: #e0f2fe;
}

.one-line {
    margin-top: 22px;
    color: #334155;
    font-size: 18px;
    line-height: 1.8;
    font-weight: 700;
}

.detail-tags {
    margin-top: 18px;
}

.detail-card h2,
.side-card h2,
.site-footer h2 {
    margin-top: 28px;
    margin-bottom: 12px;
    color: var(--ink);
    font-size: 22px;
    font-weight: 850;
}

.detail-card p {
    color: #334155;
    line-height: 2;
    font-size: 16px;
}

.detail-side {
    position: sticky;
    top: 88px;
    height: fit-content;
}

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

.side-card dl {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 12px 10px;
}

.side-card dt {
    color: #64748b;
    font-weight: 800;
}

.side-card dd {
    color: #0f172a;
    line-height: 1.6;
}

.related-section {
    padding-top: 18px;
}

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

.footer-grid {
    max-width: 1180px;
    margin: 0 auto;
    padding: 46px 20px;
    display: grid;
    grid-template-columns: minmax(0, 2fr) 1fr 1fr;
    gap: 34px;
}

.footer-brand {
    color: #ffffff;
}

.footer-main p {
    max-width: 560px;
    margin-top: 14px;
    color: #94a3b8;
    line-height: 1.8;
}

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

.site-footer a {
    display: block;
    margin-top: 10px;
    color: #94a3b8;
}

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

.copyright {
    max-width: 1180px;
    margin: 0 auto;
    padding: 20px;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    color: #64748b;
    text-align: center;
}

@media (max-width: 1024px) {
    .wide-grid,
    .rank-grid.full {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

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

    .detail-side {
        position: static;
        display: grid;
        grid-template-columns: 220px 1fr;
        gap: 22px;
        align-items: start;
    }

    .side-card {
        margin-top: 0;
    }

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

@media (max-width: 760px) {
    main {
        padding-top: 60px;
    }

    .nav-shell {
        height: 60px;
    }

    .desktop-nav {
        display: none;
    }

    .nav-toggle {
        display: inline-flex;
    }

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

    .brand {
        font-size: 20px;
    }

    .hero {
        height: 660px;
        min-height: 660px;
    }

    .hero-copy {
        top: 52%;
    }

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

    .hero h2 {
        font-size: 30px;
    }

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

    .hero-arrow {
        top: auto;
        bottom: 82px;
        transform: none;
    }

    .search-hero-panel {
        grid-template-columns: 1fr;
        margin-top: -34px;
    }

    .hero-search-form {
        flex-direction: column;
    }

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

    .wide-grid,
    .poster-grid,
    .poster-grid.compact,
    .rank-grid,
    .rank-grid.full,
    .category-grid,
    .category-overview-grid,
    .footer-grid,
    .filter-panel {
        grid-template-columns: 1fr;
    }

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

    .detail-cover {
        max-width: 260px;
    }

    .rank-link {
        grid-template-columns: 44px 76px 1fr;
    }

    .rank-link img {
        width: 76px;
        height: 58px;
    }
}
