:root {
    color-scheme: light;
    --primary: #0f766e;
    --primary-light: #14b8a6;
    --primary-soft: rgba(20, 184, 166, 0.12);
    --accent: #f59e0b;
    --ink: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --paper: #ffffff;
    --soft: #f3f4f6;
    --deep: #0f172a;
    --radius: 22px;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.10);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
    font: inherit;
}

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

.nav-shell {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: var(--deep);
    letter-spacing: -0.02em;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    box-shadow: 0 10px 24px rgba(15, 118, 110, 0.28);
}

.brand-text {
    font-size: 20px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #374151;
    font-weight: 600;
}

.main-nav a {
    padding: 10px 14px;
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary);
    background: var(--primary-soft);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: var(--soft);
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    border-radius: 4px;
    background: var(--deep);
}

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

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

.hero {
    position: relative;
    padding: 34px 0 20px;
    background:
        radial-gradient(circle at 10% 10%, rgba(20, 184, 166, 0.18), transparent 30%),
        linear-gradient(180deg, #f8fafc, #eef6f5 76%, #f8fafc);
    overflow: hidden;
}

.hero-shell {
    position: relative;
    width: min(1200px, calc(100% - 32px));
    min-height: 560px;
    margin: 0 auto;
    border-radius: 34px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background: var(--deep);
}

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

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

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

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.64) 46%, rgba(15, 23, 42, 0.16)),
        linear-gradient(0deg, rgba(2, 6, 23, 0.82), transparent 50%);
}

.hero-content {
    position: absolute;
    inset: auto auto 56px 56px;
    width: min(560px, calc(100% - 112px));
    color: #ffffff;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    margin-bottom: 16px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(12px);
    font-size: 14px;
}

.hero h1,
.hero h2 {
    margin: 0 0 16px;
    font-size: clamp(34px, 6vw, 68px);
    line-height: 1.04;
    letter-spacing: -0.05em;
}

.hero p {
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

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

.btn-primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    box-shadow: 0 16px 28px rgba(15, 118, 110, 0.28);
}

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

.btn-light {
    color: var(--primary);
    background: var(--paper);
    border-color: var(--line);
}

.hero-panel {
    position: absolute;
    right: 34px;
    bottom: 34px;
    width: min(380px, calc(100% - 68px));
    display: grid;
    gap: 12px;
}

.hero-mini {
    display: grid;
    grid-template-columns: 82px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-mini img {
    width: 82px;
    height: 64px;
    object-fit: cover;
    border-radius: 14px;
}

.hero-mini strong {
    display: block;
    line-height: 1.35;
}

.hero-mini span {
    display: block;
    margin-top: 2px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 13px;
}

.hero-dots {
    position: absolute;
    left: 56px;
    bottom: 24px;
    display: flex;
    gap: 8px;
}

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

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

.section {
    padding: 34px 0;
}

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

.section-head h2,
.page-title h1 {
    margin: 0;
    color: var(--deep);
    line-height: 1.15;
    letter-spacing: -0.035em;
}

.section-head h2 {
    font-size: clamp(26px, 4vw, 38px);
}

.section-head p,
.page-title p {
    margin: 8px 0 0;
    color: var(--muted);
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(20, 184, 166, 0.36);
    box-shadow: var(--shadow);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--soft);
}

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

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

.poster-mask {
    position: absolute;
    inset: auto 12px 12px auto;
    padding: 7px 12px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(15, 118, 110, 0.92);
    font-size: 13px;
    font-weight: 800;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.movie-card:hover .poster-mask {
    opacity: 1;
    transform: translateY(0);
}

.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    display: grid;
    place-items: center;
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent), #ef4444);
    box-shadow: 0 10px 20px rgba(239, 68, 68, 0.24);
}

.card-body {
    padding: 16px;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 13px;
}

.card-meta span {
    padding: 3px 8px;
    border-radius: 999px;
    background: var(--soft);
}

.movie-card h3 {
    margin: 0 0 8px;
    color: var(--deep);
    font-size: 18px;
    line-height: 1.35;
}

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

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

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

.tag-row span,
.detail-tags span,
.hero-tags span {
    padding: 5px 9px;
    border-radius: 999px;
    color: var(--primary);
    background: var(--primary-soft);
    font-size: 12px;
    font-weight: 800;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.hero-tags span {
    color: #d1fffb;
    background: rgba(20, 184, 166, 0.25);
}

.feature-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
    gap: 22px;
}

.feature-large .poster-link {
    aspect-ratio: 16 / 9;
}

.side-list {
    display: grid;
    gap: 12px;
}

.side-card {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--paper);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.side-card:hover strong {
    color: var(--primary);
}

.side-card img {
    width: 110px;
    height: 78px;
    object-fit: cover;
    border-radius: 14px;
}

.side-card strong,
.side-card em {
    display: block;
}

.side-card strong {
    line-height: 1.35;
}

.side-card em {
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
}

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

.category-card {
    min-height: 170px;
    padding: 24px;
    border: 1px solid rgba(20, 184, 166, 0.22);
    border-radius: var(--radius);
    background:
        linear-gradient(135deg, rgba(20, 184, 166, 0.14), rgba(255, 255, 255, 0.92)),
        var(--paper);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-card h2,
.category-card h3 {
    margin: 0 0 10px;
    font-size: 24px;
}

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

.page-hero {
    padding: 56px 0 28px;
    background:
        radial-gradient(circle at 80% 0%, rgba(20, 184, 166, 0.20), transparent 30%),
        linear-gradient(180deg, #ffffff, #f1f5f9);
}

.page-title {
    width: min(880px, 100%);
}

.page-title h1 {
    font-size: clamp(34px, 6vw, 58px);
}

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

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

.filter-panel {
    display: grid;
    grid-template-columns: 1.5fr 0.7fr 0.7fr 0.7fr;
    gap: 12px;
    padding: 16px;
    margin: 20px 0 26px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.06);
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    outline: none;
    color: var(--deep);
    background: #ffffff;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 4px var(--primary-soft);
}

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

.ranking-row {
    display: grid;
    grid-template-columns: 70px 132px 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--paper);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.ranking-index {
    display: grid;
    place-items: center;
    width: 50px;
    height: 50px;
    border-radius: 16px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    font-weight: 900;
}

.ranking-row img {
    width: 132px;
    height: 82px;
    object-fit: cover;
    border-radius: 16px;
}

.ranking-row h2,
.ranking-row h3 {
    margin: 0 0 6px;
    font-size: 20px;
}

.ranking-row p {
    margin: 0;
    color: var(--muted);
}

.detail-hero {
    padding: 34px 0 24px;
    background:
        radial-gradient(circle at 20% 0%, rgba(20, 184, 166, 0.18), transparent 36%),
        linear-gradient(180deg, #ffffff, #f8fafc);
}

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

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #020617;
    box-shadow: var(--shadow);
}

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

.play-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #ffffff;
    background: rgba(2, 6, 23, 0.22);
    cursor: pointer;
    z-index: 2;
}

.play-cover.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.play-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.62;
    filter: saturate(1.05);
}

.play-cover span {
    position: relative;
    display: grid;
    place-items: center;
    width: 90px;
    height: 90px;
    border-radius: 999px;
    background: rgba(20, 184, 166, 0.92);
    box-shadow: 0 20px 45px rgba(20, 184, 166, 0.35);
}

.play-cover span::before {
    content: "";
    margin-left: 7px;
    border-top: 18px solid transparent;
    border-bottom: 18px solid transparent;
    border-left: 28px solid #ffffff;
}

.detail-card {
    margin-top: 22px;
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: var(--paper);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.detail-card h1 {
    margin: 0 0 12px;
    font-size: clamp(30px, 5vw, 48px);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 18px;
    color: var(--muted);
}

.detail-meta span {
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--soft);
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0 0;
}

.article-block {
    margin-top: 22px;
}

.article-block h2 {
    margin: 0 0 10px;
    font-size: 24px;
}

.article-block p {
    margin: 0;
    color: #374151;
    white-space: pre-wrap;
}

.detail-side {
    position: sticky;
    top: 92px;
    display: grid;
    gap: 18px;
}

.cover-card,
.related-card {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--paper);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.cover-card img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 18px;
}

.related-card h2 {
    margin: 2px 0 14px;
    font-size: 22px;
}

.search-empty {
    display: none;
    padding: 28px;
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    color: var(--muted);
    text-align: center;
    background: var(--paper);
}

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

.footer-inner {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.footer-brand {
    color: #ffffff;
    font-size: 22px;
    font-weight: 900;
}

.footer-inner p {
    margin: 0;
    max-width: 560px;
}

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

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

@media (max-width: 1000px) {
    .movie-grid,
    .movie-grid.three,
    .category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .hero-panel {
        display: none;
    }

    .detail-side {
        position: static;
    }

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

@media (max-width: 760px) {
    .nav-shell {
        min-height: 64px;
    }

    .nav-toggle {
        display: block;
    }

    .main-nav {
        position: absolute;
        top: 64px;
        left: 16px;
        right: 16px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        border: 1px solid var(--line);
        border-radius: 20px;
        background: rgba(255, 255, 255, 0.96);
        box-shadow: var(--shadow);
    }

    .main-nav.is-open {
        display: flex;
    }

    .hero {
        padding-top: 18px;
    }

    .hero-shell {
        min-height: 520px;
        border-radius: 24px;
    }

    .hero-content {
        left: 22px;
        right: 22px;
        bottom: 56px;
        width: auto;
    }

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

    .hero-dots {
        left: 22px;
    }

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

    .movie-grid,
    .movie-grid.three,
    .category-grid {
        grid-template-columns: 1fr;
    }

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

    .ranking-row {
        grid-template-columns: 44px 90px 1fr;
    }

    .ranking-row .btn {
        grid-column: 1 / -1;
    }

    .ranking-index {
        width: 38px;
        height: 38px;
        border-radius: 12px;
    }

    .ranking-row img {
        width: 90px;
        height: 68px;
    }

    .footer-links {
        flex-wrap: wrap;
    }
}
