:root {
    --color-bg: #f8fafc;
    --color-panel: #ffffff;
    --color-text: #111827;
    --color-muted: #6b7280;
    --color-soft: #f3f4f6;
    --color-line: #e5e7eb;
    --color-amber: #d97706;
    --color-amber-dark: #b45309;
    --color-orange: #ea580c;
    --shadow-card: 0 18px 45px rgba(15, 23, 42, 0.10);
    --shadow-soft: 0 10px 24px rgba(15, 23, 42, 0.08);
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 12px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--color-text);
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.18), transparent 34rem),
        linear-gradient(180deg, #fff7ed 0%, var(--color-bg) 26rem);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.header-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -0.04em;
    background: linear-gradient(90deg, var(--color-amber), var(--color-orange));
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    white-space: nowrap;
}

.brand-icon {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--color-amber), var(--color-orange));
    box-shadow: 0 12px 24px rgba(217, 119, 6, 0.28);
}

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

.desktop-nav a {
    padding: 9px 14px;
    border-radius: 999px;
    color: #374151;
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active {
    color: var(--color-amber-dark);
    background: #ffedd5;
}

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

.top-search input,
.mobile-nav input,
.filter-search input,
.search-hero input {
    width: 220px;
    height: 40px;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    padding: 0 16px;
    color: var(--color-text);
    background: #ffffff;
    outline: none;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.top-search input:focus,
.mobile-nav input:focus,
.filter-search input:focus,
.search-hero input:focus {
    border-color: var(--color-amber);
    box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.14);
}

.top-search button,
.mobile-nav button,
.search-hero button,
.primary-button,
.secondary-button {
    height: 40px;
    border: 0;
    border-radius: 999px;
    padding: 0 18px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--color-amber), var(--color-orange));
    cursor: pointer;
    font-weight: 800;
    box-shadow: 0 12px 22px rgba(217, 119, 6, 0.24);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.top-search button:hover,
.mobile-nav button:hover,
.search-hero button:hover,
.primary-button:hover,
.secondary-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 28px rgba(217, 119, 6, 0.32);
}

.secondary-button {
    color: var(--color-amber-dark);
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.56);
    box-shadow: none;
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: #fff7ed;
    cursor: pointer;
}

.mobile-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    border-radius: 999px;
    background: var(--color-amber-dark);
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
    border-top: 1px solid #e5e7eb;
}

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

.mobile-nav a {
    padding: 10px 4px;
    color: #374151;
    font-weight: 800;
}

.mobile-nav form {
    display: flex;
    gap: 8px;
}

.page-wrap,
.section-wrap {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.hero-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 32px auto 0;
}

.hero-slider {
    position: relative;
    height: 560px;
    overflow: hidden;
    border-radius: 28px;
    background: #111827;
    box-shadow: var(--shadow-card);
}

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.86) 0%, rgba(0, 0, 0, 0.58) 46%, rgba(0, 0, 0, 0.16) 100%),
        linear-gradient(0deg, rgba(0, 0, 0, 0.88) 0%, transparent 55%);
}

.hero-content {
    position: absolute;
    left: clamp(24px, 6vw, 72px);
    right: clamp(24px, 8vw, 92px);
    bottom: clamp(28px, 8vw, 76px);
    z-index: 2;
    max-width: 760px;
    color: #ffffff;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    margin-bottom: 14px;
    color: #fbbf24;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.36);
    backdrop-filter: blur(12px);
    font-weight: 900;
}

.hero-content h1,
.hero-content h2 {
    margin: 0 0 16px;
    font-size: clamp(36px, 6vw, 64px);
    line-height: 1.05;
    letter-spacing: -0.06em;
}

.hero-meta {
    margin: 0 0 10px;
    color: #fde68a;
    font-weight: 800;
}

.hero-desc {
    max-width: 680px;
    margin: 0 0 26px;
    color: #e5e7eb;
    font-size: 18px;
}

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

.hero-controls {
    position: absolute;
    right: 28px;
    bottom: 28px;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hero-controls button {
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    cursor: pointer;
    backdrop-filter: blur(10px);
}

.hero-dots {
    position: absolute;
    z-index: 3;
    left: clamp(24px, 6vw, 72px);
    bottom: 28px;
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 22px;
    height: 6px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.42);
    cursor: pointer;
}

.hero-dot.active {
    width: 42px;
    background: #f59e0b;
}

.section {
    padding: 58px 0;
}

.section.alt {
    background: rgba(255, 255, 255, 0.52);
    border-top: 1px solid rgba(229, 231, 235, 0.6);
    border-bottom: 1px solid rgba(229, 231, 235, 0.6);
    backdrop-filter: blur(12px);
}

.section.soft {
    background: linear-gradient(90deg, rgba(255, 237, 213, 0.78), rgba(254, 243, 199, 0.56));
}

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

.section-head h2,
.page-title h1 {
    margin: 0;
    font-size: clamp(28px, 3.8vw, 42px);
    line-height: 1.15;
    letter-spacing: -0.04em;
}

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

.section-link {
    color: var(--color-amber-dark);
    font-weight: 900;
    white-space: nowrap;
}

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

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

.movie-card {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: var(--radius-md);
    background: #ffffff;
    box-shadow: var(--shadow-soft);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-frame {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: linear-gradient(135deg, #111827, #374151);
}

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    opacity: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.70), transparent 58%);
    transition: opacity 0.25s ease;
}

.play-mark {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    color: #ffffff;
    border-radius: 999px;
    background: rgba(217, 119, 6, 0.92);
    transform: translate(-50%, -50%) scale(0.84);
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.movie-card:hover .poster-shade,
.movie-card:hover .play-mark {
    opacity: 1;
}

.movie-card:hover .play-mark {
    transform: translate(-50%, -50%) scale(1);
}

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 2;
    padding: 5px 10px;
    color: #ffffff;
    border-radius: 999px;
    background: linear-gradient(135deg, #dc2626, #ea580c);
    font-size: 12px;
    font-weight: 900;
}

.movie-card-body {
    display: grid;
    gap: 6px;
    padding: 14px;
}

.movie-card-body strong {
    overflow: hidden;
    font-size: 18px;
    line-height: 1.25;
    white-space: nowrap;
    text-overflow: ellipsis;
}

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

.card-desc {
    display: -webkit-box;
    min-height: 44px;
    overflow: hidden;
    color: #4b5563;
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.compact-card .movie-card-body strong {
    font-size: 15px;
}

.compact-card .card-desc {
    display: none;
}

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

.category-card {
    min-height: 168px;
    padding: 22px;
    border: 1px solid rgba(217, 119, 6, 0.20);
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #ffffff, #fff7ed);
    box-shadow: var(--shadow-soft);
    transition: transform 0.24s ease, border-color 0.24s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(217, 119, 6, 0.54);
}

.category-card strong {
    display: block;
    margin-bottom: 8px;
    font-size: 21px;
}

.category-card p {
    margin: 0 0 16px;
    color: var(--color-muted);
    font-size: 14px;
}

.category-card span {
    color: var(--color-amber-dark);
    font-weight: 900;
}

.page-hero {
    padding: 52px 0 26px;
}

.page-title {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.page-title .crumb {
    margin-bottom: 14px;
}

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

.crumb a {
    color: var(--color-amber-dark);
    font-weight: 800;
}

.filter-panel {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 26px;
    padding: 18px;
    border: 1px solid rgba(229, 231, 235, 0.86);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(16px);
}

.filter-search {
    display: grid;
    gap: 8px;
}

.filter-search span {
    color: #374151;
    font-weight: 900;
}

.filter-search input {
    width: 100%;
}

.filter-hints {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.filter-hints span {
    padding: 4px 10px;
    color: var(--color-muted);
    border-radius: 999px;
    background: #f3f4f6;
    font-size: 13px;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 64px 76px 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border-radius: var(--radius-md);
    background: #ffffff;
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-row:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.14);
}

.rank-number {
    color: var(--color-amber-dark);
    font-size: 22px;
    font-weight: 1000;
    text-align: center;
}

.rank-cover {
    overflow: hidden;
    aspect-ratio: 3 / 4;
    border-radius: 12px;
    background: #111827;
}

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

.rank-info {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.rank-info strong {
    font-size: 18px;
}

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

.rank-info em {
    overflow: hidden;
    color: #4b5563;
    font-size: 14px;
    font-style: normal;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank-score {
    min-width: 64px;
    padding: 6px 10px;
    color: #ffffff;
    border-radius: 999px;
    background: linear-gradient(135deg, #dc2626, #f59e0b);
    text-align: center;
    font-weight: 900;
}

.detail-hero {
    width: min(1180px, calc(100% - 32px));
    margin: 32px auto 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 26px;
    align-items: start;
}

.player-card,
.detail-side,
.content-card {
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.player-card {
    padding: 18px;
}

.video-player {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 20px;
    background: #020617;
}

.video-player video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    cursor: pointer;
}

.player-layer {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #ffffff;
    background:
        radial-gradient(circle at center, rgba(217, 119, 6, 0.22), transparent 36%),
        linear-gradient(0deg, rgba(0, 0, 0, 0.70), rgba(0, 0, 0, 0.18));
    transition: opacity 0.25s ease;
}

.video-player.is-playing .player-layer {
    opacity: 0;
    pointer-events: none;
}

.player-start {
    width: 86px;
    height: 86px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--color-amber), var(--color-orange));
    cursor: pointer;
    font-size: 30px;
    box-shadow: 0 18px 45px rgba(217, 119, 6, 0.42);
}

.player-state {
    position: absolute;
    left: 18px;
    bottom: 14px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 14px;
}

.video-player.has-error .player-state::after {
    content: "播放源加载失败，请刷新后重试";
}

.detail-side {
    padding: 18px;
}

.detail-side img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 18px;
    background: #111827;
}

.detail-side h1 {
    margin: 18px 0 12px;
    font-size: 28px;
    line-height: 1.18;
    letter-spacing: -0.04em;
}

.detail-meta {
    display: grid;
    gap: 8px;
    color: #4b5563;
    font-size: 14px;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.tag-list span {
    padding: 6px 10px;
    border-radius: 999px;
    color: var(--color-amber-dark);
    background: #ffedd5;
    font-weight: 800;
    font-size: 13px;
}

.content-card {
    width: min(1180px, calc(100% - 32px));
    margin: 26px auto 0;
    padding: 26px;
}

.content-card h2 {
    margin: 0 0 14px;
    font-size: 26px;
}

.content-card p {
    margin: 0 0 18px;
    color: #374151;
}

.search-hero {
    width: min(900px, calc(100% - 32px));
    margin: 52px auto 20px;
    text-align: center;
}

.search-hero form {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.search-hero input {
    width: 100%;
    height: 48px;
}

.search-hero button {
    height: 48px;
}

.site-footer {
    margin-top: 64px;
    padding: 40px 0;
    color: #d1d5db;
    background: #111827;
}

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

.footer-inner p {
    max-width: 540px;
    margin: 10px 0 0;
    color: #9ca3af;
}

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

.footer-links a {
    padding: 8px 12px;
    border-radius: 999px;
    color: #f9fafb;
    background: rgba(255, 255, 255, 0.08);
}

.no-results {
    display: none;
    padding: 32px;
    color: var(--color-muted);
    text-align: center;
    border-radius: var(--radius-md);
    background: #ffffff;
}

.no-results.show {
    display: block;
}

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

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

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

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

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

    .detail-side h1 {
        margin-top: 0;
    }
}

@media (max-width: 760px) {
    .desktop-nav {
        display: none;
    }

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

    .header-inner {
        min-height: 64px;
    }

    .brand {
        font-size: 20px;
    }

    .hero-slider {
        height: 520px;
        border-radius: 22px;
    }

    .hero-slide::after {
        background: linear-gradient(0deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.18));
    }

    .hero-content {
        left: 22px;
        right: 22px;
        bottom: 72px;
    }

    .hero-content h1,
    .hero-content h2 {
        font-size: 34px;
    }

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

    .hero-controls {
        right: 20px;
        bottom: 18px;
    }

    .hero-dots {
        left: 22px;
        bottom: 22px;
    }

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

    .movie-grid,
    .movie-grid.small,
    .category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .movie-card-body {
        padding: 12px;
    }

    .movie-card-body strong {
        font-size: 15px;
    }

    .card-desc {
        min-height: auto;
        font-size: 13px;
    }

    .rank-row {
        grid-template-columns: 46px 62px 1fr;
    }

    .rank-score {
        display: none;
    }

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

    .detail-side img {
        max-width: 260px;
    }

    .content-card {
        padding: 20px;
    }

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

    .mobile-nav input {
        width: 100%;
    }

    .footer-inner {
        flex-direction: column;
    }

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

@media (max-width: 460px) {
    .movie-grid,
    .movie-grid.small,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .hero-slider {
        height: 500px;
    }
}
