:root {
    --blue: #2563eb;
    --cyan: #06b6d4;
    --teal: #14b8a6;
    --orange: #f97316;
    --red: #ef4444;
    --slate: #0f172a;
    --muted: #64748b;
    --soft: #f8fafc;
    --card: #ffffff;
    --ring: rgba(37, 99, 235, 0.22);
    --shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Inter", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", Arial, sans-serif;
    color: #0f172a;
    background: #f8fafc;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #fff;
    background: linear-gradient(90deg, #2563eb 0%, #06b6d4 50%, #14b8a6 100%);
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.25);
}

.header-inner {
    max-width: 1180px;
    min-height: 68px;
    margin: 0 auto;
    padding: 0 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.logo-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

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

.main-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    font-weight: 650;
}

.main-nav a {
    opacity: 0.95;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.main-nav a:hover {
    opacity: 1;
    transform: translateY(-1px);
}

.header-search {
    position: relative;
    width: min(280px, 28vw);
}

.header-search input,
.local-tools input,
.local-tools select {
    width: 100%;
    border: 0;
    border-radius: 999px;
    outline: none;
}

.header-search input {
    padding: 10px 16px;
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(12px);
}

.header-search input::placeholder {
    color: rgba(255, 255, 255, 0.76);
}

.search-results {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    right: 0;
    overflow: hidden;
    border-radius: 18px;
    color: #0f172a;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow);
    max-height: 420px;
    overflow-y: auto;
}

.search-result-item {
    display: block;
    padding: 12px 14px;
    border-bottom: 1px solid #e2e8f0;
}

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

.search-result-title {
    font-weight: 750;
    color: #0f172a;
}

.search-result-line {
    margin-top: 3px;
    font-size: 13px;
    color: #64748b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mobile-toggle {
    display: none;
    border: 0;
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    width: 42px;
    height: 42px;
    border-radius: 14px;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 22px 18px;
}

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

.mobile-nav a {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.12);
}

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

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

.hero {
    position: relative;
    height: 560px;
    overflow: hidden;
    background: #0f172a;
}

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

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

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 38%, rgba(59, 130, 246, 0.36), transparent 34%),
        linear-gradient(90deg, rgba(15, 23, 42, 0.86), rgba(15, 23, 42, 0.34) 56%, rgba(15, 23, 42, 0.72));
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: center;
}

.hero-copy {
    width: min(680px, 92%);
    color: #fff;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    margin-bottom: 18px;
    border-radius: 999px;
    background: linear-gradient(90deg, #f97316, #ef4444);
    font-weight: 800;
    font-size: 14px;
    box-shadow: 0 14px 35px rgba(239, 68, 68, 0.28);
}

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

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

.hero-meta,
.card-meta,
.detail-meta,
.rank-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
}

.hero-meta {
    margin-bottom: 30px;
}

.pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    color: #2563eb;
    background: #dbeafe;
    font-size: 13px;
    font-weight: 750;
}

.hero .pill {
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 12px 22px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 850;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

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

.btn-primary {
    color: #fff;
    background: linear-gradient(90deg, #f97316, #ef4444);
    box-shadow: 0 18px 35px rgba(239, 68, 68, 0.24);
}

.btn-light {
    color: #2563eb;
    background: #fff;
    box-shadow: 0 18px 35px rgba(255, 255, 255, 0.18);
}

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

.hero-dot {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.5);
    transition: width 0.18s ease, background 0.18s ease;
}

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

.section {
    padding: 74px 0;
}

.section-white {
    background: #fff;
}

.section-soft {
    background: linear-gradient(135deg, #eff6ff 0%, #ecfeff 100%);
}

.section-dark {
    color: #fff;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

.section-cta {
    color: #fff;
    background: linear-gradient(90deg, #2563eb 0%, #06b6d4 50%, #14b8a6 100%);
}

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

.section-title {
    margin: 0 0 6px;
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.section-desc {
    margin: 0;
    color: #64748b;
}

.section-dark .section-desc,
.section-cta .section-desc {
    color: rgba(255, 255, 255, 0.72);
}

.grid {
    display: grid;
    gap: 24px;
}

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

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

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

.movie-card,
.rank-card,
.category-card,
.detail-panel {
    overflow: hidden;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover,
.rank-card:hover,
.category-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 50px rgba(15, 23, 42, 0.14);
}

.poster {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, #1e293b, #0f172a);
}

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

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

.movie-card:hover .poster img,
.rank-card:hover .poster img {
    transform: scale(1.06);
}

.poster-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    padding: 5px 10px;
    border-radius: 999px;
    color: #fff;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(10px);
    font-size: 12px;
    font-weight: 800;
}

.poster-rank {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    padding: 5px 10px;
    border-radius: 10px;
    color: #fff;
    background: #ef4444;
    font-weight: 900;
    box-shadow: 0 10px 25px rgba(239, 68, 68, 0.28);
}

.card-body {
    padding: 17px;
}

.card-title {
    margin: 0 0 8px;
    min-height: 2.8em;
    color: #0f172a;
    font-size: 17px;
    line-height: 1.4;
    font-weight: 850;
}

.card-title.compact {
    min-height: 0;
}

.card-line {
    margin: 0 0 14px;
    color: #64748b;
    font-size: 14px;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta {
    color: #64748b;
    font-size: 13px;
}

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

.hot-item {
    display: flex;
    gap: 14px;
    padding: 14px;
    border-radius: 20px;
    background: #fff;
    color: #0f172a;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.hot-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 48px rgba(15, 23, 42, 0.18);
}

.hot-thumb {
    width: 120px;
    min-width: 120px;
    aspect-ratio: 4 / 3;
    border-radius: 16px;
    overflow: hidden;
    background: #1e293b;
}

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

.hot-title {
    margin: 0 0 8px;
    font-weight: 900;
    line-height: 1.35;
}

.hot-line {
    margin: 0;
    color: #64748b;
    font-size: 13px;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.category-card {
    display: grid;
    min-height: 190px;
    padding: 28px;
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
}

.category-card[data-tone="pink"] {
    background: linear-gradient(135deg, #ec4899, #fb7185);
}

.category-card[data-tone="orange"] {
    background: linear-gradient(135deg, #f97316, #ef4444);
}

.category-card[data-tone="cyan"] {
    background: linear-gradient(135deg, #06b6d4, #14b8a6);
}

.category-card[data-tone="slate"] {
    background: linear-gradient(135deg, #1e293b, #0f172a);
}

.category-card[data-tone="red"] {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
}

.category-card[data-tone="rose"] {
    background: linear-gradient(135deg, #fb7185, #f43f5e);
}

.category-card[data-tone="green"] {
    background: linear-gradient(135deg, #22c55e, #14b8a6);
}

.category-card[data-tone="violet"] {
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
}

.category-card[data-tone="amber"] {
    background: linear-gradient(135deg, #f59e0b, #ea580c);
}

.category-emoji {
    font-size: 42px;
    line-height: 1;
}

.category-title {
    margin: 16px 0 8px;
    font-size: 23px;
    font-weight: 900;
}

.category-intro {
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 14px;
}

.page-hero {
    padding: 64px 0;
    color: #fff;
    background:
        radial-gradient(circle at 18% 30%, rgba(6, 182, 212, 0.38), transparent 33%),
        linear-gradient(135deg, #1d4ed8 0%, #0891b2 55%, #0f766e 100%);
}

.page-hero h1 {
    margin: 0 0 14px;
    font-size: clamp(32px, 5vw, 54px);
    letter-spacing: -0.04em;
    line-height: 1.1;
}

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

.local-tools {
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 14px;
    margin-bottom: 28px;
    padding: 18px;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
}

.local-tools input,
.local-tools select {
    min-height: 46px;
    padding: 0 16px;
    color: #0f172a;
    background: #f8fafc;
    box-shadow: inset 0 0 0 1px #e2e8f0;
}

.detail-hero {
    color: #fff;
    background:
        radial-gradient(circle at 22% 18%, rgba(249, 115, 22, 0.38), transparent 30%),
        linear-gradient(135deg, #0f172a 0%, #1e293b 55%, #111827 100%);
}

.detail-hero-inner {
    width: min(1180px, calc(100% - 36px));
    min-height: 460px;
    margin: 0 auto;
    padding: 58px 0;
    display: grid;
    grid-template-columns: 330px 1fr;
    align-items: center;
    gap: 40px;
}

.detail-cover {
    overflow: hidden;
    border-radius: 26px;
    background: #020617;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.34);
}

.detail-cover img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

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

.detail-copy p {
    margin: 18px 0 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
}

.detail-meta {
    gap: 10px;
}

.detail-meta .pill {
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
}

.breadcrumb {
    margin-bottom: 16px;
    color: rgba(255, 255, 255, 0.74);
    font-size: 14px;
}

.breadcrumb a {
    text-decoration: underline;
    text-underline-offset: 3px;
}

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

.detail-panel {
    padding: 26px;
    margin-bottom: 24px;
}

.detail-panel h2 {
    margin: 0 0 16px;
    font-size: 25px;
}

.detail-panel p {
    margin: 0;
    color: #334155;
}

.player {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    background: #020617;
    box-shadow: 0 24px 60px rgba(2, 6, 23, 0.22);
}

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

.play-layer {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    border: 0;
    cursor: pointer;
    color: #fff;
    background:
        radial-gradient(circle at center, rgba(249, 115, 22, 0.32), rgba(2, 6, 23, 0.72)),
        rgba(2, 6, 23, 0.28);
}

.play-layer span {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    border-radius: 999px;
    background: linear-gradient(90deg, #f97316, #ef4444);
    font-weight: 900;
    box-shadow: 0 18px 35px rgba(239, 68, 68, 0.25);
}

.player.is-playing .play-layer {
    display: none;
}

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

.related-card {
    display: grid;
    grid-template-columns: 112px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 18px;
    background: #f8fafc;
    transition: background 0.18s ease, transform 0.18s ease;
}

.related-card:hover {
    background: #eff6ff;
    transform: translateX(2px);
}

.related-card img {
    width: 112px;
    height: 76px;
    object-fit: cover;
    border-radius: 14px;
}

.related-title {
    margin: 0 0 6px;
    font-weight: 850;
    line-height: 1.35;
}

.related-meta {
    color: #64748b;
    font-size: 12px;
}

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

.tag {
    padding: 7px 11px;
    border-radius: 999px;
    color: #0369a1;
    background: #e0f2fe;
    font-size: 13px;
    font-weight: 750;
}

.site-footer {
    color: #cbd5e1;
    background: linear-gradient(135deg, #0f172a, #111827);
}

.footer-inner {
    width: min(1180px, calc(100% - 36px));
    margin: 0 auto;
    padding: 44px 0;
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 28px;
}

.footer-title {
    margin: 0 0 12px;
    color: #fff;
    font-size: 21px;
    font-weight: 900;
}

.footer-inner p {
    margin: 0;
}

.footer-links {
    display: grid;
    gap: 9px;
}

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

.footer-bottom {
    border-top: 1px solid rgba(148, 163, 184, 0.22);
    padding: 18px;
    text-align: center;
    color: #94a3b8;
    font-size: 14px;
}

.empty-state {
    display: none;
    padding: 36px;
    text-align: center;
    color: #64748b;
    border-radius: 24px;
    background: #fff;
}

@media (max-width: 980px) {
    .main-nav,
    .header-search {
        display: none;
    }

    .mobile-toggle {
        display: grid;
        place-items: center;
    }

    .hero {
        height: 620px;
    }

    .grid-4,
    .grid-3,
    .hot-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

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

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

@media (max-width: 640px) {
    .header-inner {
        padding: 0 16px;
    }

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

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

    .hero {
        height: 660px;
    }

    .section {
        padding: 54px 0;
    }

    .section-head {
        display: block;
    }

    .grid-4,
    .grid-3,
    .grid-2,
    .hot-list {
        grid-template-columns: 1fr;
    }

    .hot-item {
        display: grid;
        grid-template-columns: 112px 1fr;
    }

    .hot-thumb {
        width: 112px;
        min-width: 112px;
    }

    .local-tools {
        grid-template-columns: 1fr;
    }

    .detail-hero-inner {
        padding: 40px 0;
    }

    .detail-panel {
        padding: 20px;
    }

    .related-card {
        grid-template-columns: 96px 1fr;
    }

    .related-card img {
        width: 96px;
        height: 68px;
    }
}
