* {
    box-sizing: border-box;
}

:root {
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.86);
    --panel-strong: #111827;
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --subtle: #cbd5e1;
    --accent: #f97316;
    --accent-2: #f59e0b;
    --accent-3: #ef4444;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
    --radius: 22px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 18% 2%, rgba(249, 115, 22, 0.22), transparent 30rem),
        radial-gradient(circle at 82% 10%, rgba(245, 158, 11, 0.16), transparent 28rem),
        linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.82);
    backdrop-filter: blur(18px);
}

.header-shell {
    width: min(1440px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 78px;
    display: flex;
    align-items: center;
    gap: 22px;
}

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

.brand-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #111827;
    box-shadow: 0 12px 28px rgba(249, 115, 22, 0.34);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-text strong {
    font-size: 1.25rem;
    background: linear-gradient(90deg, #fb923c, #facc15);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-text small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.75rem;
}

.top-search {
    flex: 1;
    display: flex;
    max-width: 520px;
    margin-left: auto;
    border: 1px solid var(--line);
    border-radius: 999px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.78);
}

.top-search input,
.large-search input,
.local-filter input {
    width: 100%;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
}

.top-search input {
    padding: 12px 16px;
}

.top-search button,
.large-search button {
    border: 0;
    padding: 0 20px;
    color: #111827;
    font-weight: 700;
    cursor: pointer;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--subtle);
    white-space: nowrap;
}

.main-nav a {
    font-size: 0.94rem;
    transition: color 0.2s ease;
}

.main-nav a:hover {
    color: var(--accent-2);
}

.menu-toggle {
    display: none;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 8px 11px;
    color: var(--text);
    background: rgba(15, 23, 42, 0.8);
}

main {
    width: min(1440px, calc(100% - 32px));
    margin: 0 auto;
}

.hero {
    position: relative;
    margin: 28px 0 24px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 34px;
    min-height: 620px;
    box-shadow: var(--shadow);
    background: #0f172a;
}

.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-bg {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(120deg, rgba(2, 6, 23, 0.94) 0%, rgba(15, 23, 42, 0.75) 48%, rgba(249, 115, 22, 0.24) 100%);
}

.hero-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.26;
    filter: blur(2px) saturate(1.18);
}

.hero-bg-img.is-missing,
.poster-img.is-missing,
.hero-poster-img.is-missing,
.detail-poster-img.is-missing {
    display: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 620px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: center;
    gap: 56px;
    padding: 72px clamp(28px, 6vw, 86px) 98px;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--accent-2);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    font-size: clamp(2.4rem, 6vw, 5.8rem);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.hero-desc {
    width: min(720px, 100%);
    margin: 24px 0 0;
    color: #e2e8f0;
    font-size: clamp(1.05rem, 2vw, 1.35rem);
    line-height: 1.75;
}

.hero-tags,
.detail-meta,
.card-meta,
.player-note {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags {
    margin-top: 26px;
}

.hero-tags span,
.detail-meta span,
.player-note span {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 8px 12px;
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.66);
}

.hero-actions,
.detail-actions,
.centered-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 32px;
}

.centered-actions {
    justify-content: center;
}

.primary-btn,
.ghost-btn,
.rank-link,
.text-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border-radius: 999px;
    padding: 0 20px;
    font-weight: 800;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.primary-btn {
    color: #111827;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 14px 34px rgba(249, 115, 22, 0.32);
}

.ghost-btn,
.rank-link,
.text-btn {
    border: 1px solid var(--line);
    color: var(--text);
    background: rgba(15, 23, 42, 0.68);
}

.primary-btn:hover,
.ghost-btn:hover,
.rank-link:hover,
.text-btn:hover {
    transform: translateY(-2px);
    border-color: rgba(249, 115, 22, 0.55);
}

.hero-poster {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    aspect-ratio: 2 / 3;
    background:
        linear-gradient(135deg, rgba(249, 115, 22, 0.28), rgba(245, 158, 11, 0.08)),
        #111827;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.46);
}

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

.hero-poster span {
    position: absolute;
    left: 18px;
    bottom: 18px;
    border-radius: 999px;
    padding: 9px 14px;
    color: #111827;
    font-weight: 900;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.hero-dots {
    position: absolute;
    left: clamp(28px, 6vw, 86px);
    right: clamp(28px, 6vw, 86px);
    bottom: 28px;
    z-index: 4;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
}

.hero-dot {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 12px;
    color: var(--subtle);
    text-align: left;
    cursor: pointer;
    background: rgba(15, 23, 42, 0.76);
}

.hero-dot span {
    display: inline-grid;
    place-items: center;
    width: 26px;
    height: 26px;
    margin-right: 8px;
    border-radius: 50%;
    color: #111827;
    font-weight: 900;
    background: var(--accent-2);
}

.hero-dot.is-active {
    border-color: rgba(249, 115, 22, 0.65);
    color: var(--text);
}

.stats-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.stats-strip a,
.category-tile,
.category-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px;
    background: rgba(15, 23, 42, 0.74);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.18);
}

.stats-strip strong {
    display: block;
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    color: var(--accent-2);
}

.stats-strip span {
    color: var(--muted);
}

.section-block {
    margin: 28px 0;
    border: 1px solid var(--line);
    border-radius: 30px;
    padding: clamp(20px, 4vw, 34px);
    background: rgba(15, 23, 42, 0.62);
    box-shadow: var(--shadow);
}

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

.section-heading h2,
.text-column h2,
.tag-cloud h2 {
    margin: 0;
    font-size: clamp(1.55rem, 3vw, 2.55rem);
}

.section-heading p,
.text-column p,
.category-panel p,
.category-tile small {
    color: var(--muted);
    line-height: 1.75;
}

.local-filter {
    width: min(360px, 100%);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 12px 16px;
    background: rgba(2, 6, 23, 0.38);
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(2, 6, 23, 0.46);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(249, 115, 22, 0.48);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
}

.poster-link,
.poster-frame {
    display: block;
}

.poster-frame {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(249, 115, 22, 0.24), rgba(245, 158, 11, 0.08)),
        #111827;
}

.play-badge {
    position: absolute;
    right: 12px;
    bottom: 12px;
    border-radius: 999px;
    padding: 7px 10px;
    color: #111827;
    font-size: 0.78rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.card-body {
    padding: 16px;
}

.card-title {
    display: -webkit-box;
    min-height: 3.1em;
    overflow: hidden;
    color: var(--text);
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.55;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta {
    margin-top: 9px;
    color: var(--muted);
    font-size: 0.82rem;
}

.card-body p {
    display: -webkit-box;
    min-height: 4.8em;
    margin: 12px 0;
    overflow: hidden;
    color: var(--subtle);
    font-size: 0.92rem;
    line-height: 1.6;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

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

.card-tags a,
.card-tags span,
.tag-cloud span {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px 9px;
    color: var(--muted);
    font-size: 0.78rem;
    background: rgba(15, 23, 42, 0.64);
}

.category-grid,
.category-panels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.category-tile,
.category-panel {
    display: flex;
    min-height: 160px;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover,
.category-panel:hover {
    transform: translateY(-4px);
    border-color: rgba(249, 115, 22, 0.55);
}

.category-tile strong,
.category-panel h2 {
    font-size: 1.35rem;
}

.category-tile span,
.panel-count {
    color: var(--accent-2);
    font-weight: 900;
}

.rank-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.rank-list a {
    display: grid;
    grid-template-columns: 48px 1fr auto;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 14px;
    background: rgba(2, 6, 23, 0.38);
}

.rank-no,
.table-rank {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    color: #111827;
    font-weight: 900;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

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

.rank-score {
    color: var(--accent-2);
    font-size: 0.86rem;
}

.page-hero {
    margin: 28px 0;
    border: 1px solid var(--line);
    border-radius: 30px;
    padding: clamp(32px, 7vw, 74px);
    text-align: center;
    background:
        radial-gradient(circle at 50% 0%, rgba(249, 115, 22, 0.22), transparent 28rem),
        rgba(15, 23, 42, 0.68);
    box-shadow: var(--shadow);
}

.page-hero p {
    max-width: 840px;
    margin-left: auto;
    margin-right: auto;
    color: var(--subtle);
    line-height: 1.75;
}

.large-search {
    display: flex;
    width: min(720px, 100%);
    margin: 26px auto 0;
    border: 1px solid var(--line);
    border-radius: 999px;
    overflow: hidden;
    background: rgba(2, 6, 23, 0.44);
}

.large-search input {
    padding: 16px 20px;
}

.table-wrap {
    overflow-x: auto;
}

.rank-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.rank-table th,
.rank-table td {
    border-bottom: 1px solid var(--line);
    padding: 14px 12px;
    text-align: left;
}

.rank-table th {
    color: var(--accent-2);
    font-size: 0.86rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.rank-table td {
    color: var(--subtle);
}

.rank-table a {
    color: var(--text);
    font-weight: 800;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 24px 0;
    color: var(--muted);
}

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

.detail-hero {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: clamp(24px, 5vw, 56px);
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 30px;
    padding: clamp(22px, 4vw, 42px);
    background:
        radial-gradient(circle at 22% 10%, rgba(249, 115, 22, 0.2), transparent 24rem),
        rgba(15, 23, 42, 0.64);
    box-shadow: var(--shadow);
}

.detail-poster {
    overflow: hidden;
    border-radius: 26px;
    aspect-ratio: 2 / 3;
    background:
        linear-gradient(135deg, rgba(249, 115, 22, 0.24), rgba(245, 158, 11, 0.08)),
        #111827;
}

.detail-one-line {
    color: #e2e8f0;
    font-size: 1.16rem;
    line-height: 1.75;
}

.detail-meta {
    margin-top: 22px;
}

.player-section {
    margin: 28px 0;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 30px;
    aspect-ratio: 16 / 9;
    background: #000;
    box-shadow: var(--shadow);
}

.main-player {
    width: 100%;
    height: 100%;
    background: #000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 12px;
    border: 0;
    color: var(--text);
    cursor: pointer;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.66));
}

.player-overlay span {
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    color: #111827;
    font-size: 2rem;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.player-overlay strong {
    font-size: 1.15rem;
}

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

.player-note {
    margin-top: 14px;
}

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

.text-column,
.tag-cloud {
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 22px;
    background: rgba(2, 6, 23, 0.34);
}

.text-column p {
    margin-bottom: 0;
    color: #dbe4f0;
}

.tag-cloud {
    grid-column: 1 / -1;
}

.tag-cloud div {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.empty-note {
    color: var(--accent-2);
    font-weight: 800;
}

.site-footer {
    margin-top: 44px;
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.72);
}

.footer-shell {
    width: min(1440px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 0.7fr 1fr;
    gap: 32px;
    padding: 42px 0;
}

.footer-brand {
    margin-bottom: 12px;
    color: var(--accent-2);
    font-size: 1.5rem;
    font-weight: 900;
}

.site-footer p,
.site-footer li {
    color: var(--muted);
    line-height: 1.7;
}

.site-footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer a:hover {
    color: var(--accent-2);
}

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

.copyright {
    border-top: 1px solid var(--line);
    padding: 18px;
    color: var(--muted);
    text-align: center;
}

@media (max-width: 1100px) {
    .top-search {
        max-width: 360px;
    }

    .main-nav {
        display: none;
        position: absolute;
        left: 16px;
        right: 16px;
        top: 78px;
        flex-direction: column;
        align-items: flex-start;
        padding: 18px;
        border: 1px solid var(--line);
        border-radius: 18px;
        background: rgba(2, 6, 23, 0.96);
    }

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

    .menu-toggle {
        display: block;
    }

    .hero-content {
        grid-template-columns: 1fr;
    }

    .hero-poster {
        display: none;
    }

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

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

@media (max-width: 760px) {
    .header-shell {
        flex-wrap: wrap;
        padding: 12px 0;
    }

    .top-search {
        order: 3;
        flex-basis: 100%;
        max-width: none;
    }

    .hero,
    .hero-content {
        min-height: 640px;
    }

    .hero-content {
        padding: 46px 22px 150px;
    }

    .hero h1,
    .page-hero h1,
    .detail-info h1 {
        font-size: 2.45rem;
    }

    .hero-dots {
        left: 16px;
        right: 16px;
        grid-template-columns: 1fr 1fr;
    }

    .hero-dot {
        font-size: 0.8rem;
    }

    .stats-strip,
    .detail-text,
    .footer-shell {
        grid-template-columns: 1fr;
    }

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

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

    .detail-poster {
        width: min(280px, 100%);
        margin: 0 auto;
    }

    .large-search {
        border-radius: 24px;
        flex-direction: column;
    }

    .large-search button {
        min-height: 48px;
    }
}
