* {
    box-sizing: border-box;
}

:root {
    --amber-50: #fffbeb;
    --amber-100: #fef3c7;
    --amber-400: #fbbf24;
    --amber-500: #f59e0b;
    --amber-600: #d97706;
    --rose-50: #fff1f2;
    --rose-500: #f43f5e;
    --rose-600: #e11d48;
    --sky-50: #f0f9ff;
    --sky-500: #0ea5e9;
    --sky-700: #0369a1;
    --ink: #1f2937;
    --muted: #6b7280;
    --soft: #f8fafc;
    --line: #e5e7eb;
    --shadow: 0 24px 80px rgba(15, 23, 42, 0.12);
    --radius-lg: 28px;
    --radius-md: 18px;
    --radius-sm: 12px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Inter", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(251, 191, 36, 0.16), transparent 32rem),
        radial-gradient(circle at top right, rgba(244, 63, 94, 0.13), transparent 36rem),
        linear-gradient(180deg, #fffaf0 0%, #ffffff 34%, #f8fafc 100%);
}

body.player-page {
    background:
        radial-gradient(circle at top left, rgba(15, 23, 42, 0.48), transparent 34rem),
        linear-gradient(180deg, #111827 0%, #1f2937 24rem, #f8fafc 24rem, #ffffff 100%);
}

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;
    background: linear-gradient(90deg, rgba(255, 251, 235, 0.96), rgba(255, 241, 242, 0.96), rgba(240, 249, 255, 0.96));
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(251, 191, 36, 0.24);
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

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

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

.brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 13px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--amber-500), var(--rose-500), var(--sky-500));
    box-shadow: 0 12px 32px rgba(244, 63, 94, 0.28);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

.desktop-nav a,
.mobile-nav a {
    padding: 10px 14px;
    border-radius: 999px;
    color: #4b5563;
    font-weight: 700;
    transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
    color: var(--rose-600);
    background: rgba(255, 255, 255, 0.76);
    transform: translateY(-1px);
}

.mobile-menu-button {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.mobile-menu-button span {
    display: block;
    width: 22px;
    height: 2px;
    margin: 5px auto;
    border-radius: 999px;
    background: #111827;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 16px;
    padding: 12px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.86);
}

.hero {
    position: relative;
    min-height: 660px;
    overflow: hidden;
    color: #ffffff;
    background: #111827;
}

.hero-slider {
    position: absolute;
    inset: 0;
}

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

.hero-slide.active {
    opacity: 1;
}

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

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(120, 53, 15, 0.92), rgba(136, 19, 55, 0.86), rgba(12, 74, 110, 0.88)),
        radial-gradient(circle at 22% 30%, rgba(251, 191, 36, 0.35), transparent 22rem);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    min-height: 660px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) 380px;
    align-items: center;
    gap: 42px;
    padding: 56px 0;
}

.hero-kicker,
.section-kicker,
.detail-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    padding: 8px 14px;
    border-radius: 999px;
    color: #fff7ed;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(12px);
    font-weight: 800;
}

.hero h1 {
    margin: 22px 0 18px;
    font-size: clamp(42px, 7vw, 84px);
    line-height: 0.98;
    letter-spacing: -0.07em;
}

.hero p {
    max-width: 760px;
    margin: 0 0 28px;
    color: #ffedd5;
    font-size: clamp(18px, 2vw, 24px);
    line-height: 1.8;
}

.hero-actions,
.detail-actions,
.filter-bar,
.inline-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}

.button-primary,
.button-soft,
.button-dark,
.player-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 12px 20px;
    border: 0;
    border-radius: 999px;
    font-weight: 900;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.button-primary,
.player-button {
    color: #ffffff;
    background: linear-gradient(90deg, var(--amber-500), var(--rose-500));
    box-shadow: 0 18px 48px rgba(225, 29, 72, 0.28);
}

.button-soft {
    color: #fff7ed;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.24);
}

.button-dark {
    color: #ffffff;
    background: #111827;
}

.button-primary:hover,
.button-soft:hover,
.button-dark:hover,
.player-button:hover {
    transform: translateY(-2px) scale(1.01);
}

.hero-panel {
    position: relative;
    padding: 24px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: var(--shadow);
    backdrop-filter: blur(24px);
}

.hero-panel img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.3), rgba(244, 63, 94, 0.3));
}

.hero-panel h2 {
    margin: 18px 0 10px;
    font-size: 28px;
}

.hero-panel p {
    margin: 0 0 18px;
    color: #fff7ed;
    font-size: 15px;
}

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

.hero-dots button {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.42);
}

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

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

.section {
    padding: 70px 0;
}

.page-hero {
    padding: 74px 0 34px;
}

.page-hero h1,
.section-title h2,
.detail-title h1 {
    margin: 0;
    color: #111827;
    font-size: clamp(32px, 4vw, 54px);
    line-height: 1.1;
    letter-spacing: -0.05em;
}

.page-hero p,
.section-title p,
.detail-title p {
    max-width: 780px;
    color: var(--muted);
    line-height: 1.85;
    font-size: 17px;
}

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

.section-title p {
    margin: 10px 0 0;
}

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

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

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

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

.movie-card,
.category-card,
.info-card,
.stat-card,
.related-box {
    overflow: hidden;
    border: 1px solid rgba(229, 231, 235, 0.92);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 18px 60px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover,
.category-card:hover,
.info-card:hover {
    transform: translateY(-6px);
    border-color: rgba(244, 63, 94, 0.26);
    box-shadow: 0 26px 80px rgba(15, 23, 42, 0.14);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: linear-gradient(135deg, var(--amber-100), var(--rose-50), var(--sky-50));
}

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

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

.poster-shade {
    position: absolute;
    inset: auto 0 0;
    height: 42%;
    background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.82));
}

.play-dot,
.rank-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 900;
}

.play-dot {
    right: 14px;
    bottom: 14px;
    padding: 8px 12px;
    color: #ffffff;
    background: rgba(244, 63, 94, 0.92);
}

.rank-badge {
    top: 12px;
    left: 12px;
    min-width: 34px;
    height: 34px;
    color: #111827;
    background: #fef3c7;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
}

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

.movie-meta-line,
.card-foot,
.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
}

.movie-meta-line span,
.tag-row span,
.info-pill {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 9px;
    border-radius: 999px;
    background: #f3f4f6;
}

.movie-card h3 {
    margin: 12px 0 8px;
    font-size: 19px;
    line-height: 1.28;
}

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

.card-summary {
    min-height: 74px;
    margin: 0 0 12px;
    color: #4b5563;
    font-size: 14px;
    line-height: 1.75;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-summary.compact {
    min-height: 48px;
    -webkit-line-clamp: 2;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 32px;
    margin-bottom: 12px;
}

.tag-row span {
    color: #9f1239;
    background: #fff1f2;
    font-size: 12px;
    font-weight: 800;
}

.card-foot {
    justify-content: space-between;
    border-top: 1px solid #f1f5f9;
    padding-top: 12px;
}

.card-foot strong {
    color: var(--amber-600);
    font-size: 18px;
}

.category-card {
    display: block;
    min-height: 180px;
    padding: 24px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 251, 235, 0.88)),
        radial-gradient(circle at top right, rgba(244, 63, 94, 0.18), transparent 12rem);
}

.category-card small {
    color: var(--rose-600);
    font-weight: 900;
}

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

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

.filter-panel {
    margin: 24px 0 30px;
    padding: 18px;
    border: 1px solid rgba(229, 231, 235, 0.92);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 18px 60px rgba(15, 23, 42, 0.06);
}

.filter-panel input,
.filter-panel select {
    min-height: 46px;
    min-width: 180px;
    padding: 0 15px;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    background: #ffffff;
    outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--rose-500);
    box-shadow: 0 0 0 4px rgba(244, 63, 94, 0.12);
}

.search-result-count {
    margin-left: auto;
    color: var(--muted);
    font-weight: 800;
}

.stats-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin: -38px auto 0;
    position: relative;
    z-index: 3;
}

.stat-card {
    padding: 22px;
}

.stat-card strong {
    display: block;
    color: #111827;
    font-size: 34px;
    line-height: 1;
}

.stat-card span {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-weight: 800;
}

.detail-hero {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 48px 0 28px;
    color: #ffffff;
}

.detail-hero .breadcrumb {
    margin-bottom: 22px;
    color: #fed7aa;
}

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

.player-shell {
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: #020617;
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.32);
}

.player-stage {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.player-stage video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #020617;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.26), rgba(136, 19, 55, 0.28));
    pointer-events: none;
}

.player-button {
    pointer-events: auto;
    font-size: 18px;
}

.player-note {
    padding: 14px 18px;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.92);
    font-size: 14px;
}

.detail-title h1 {
    color: #ffffff;
}

.detail-title p {
    color: #e5e7eb;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0 24px;
}

.detail-meta span {
    padding: 8px 12px;
    border-radius: 999px;
    color: #fff7ed;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
    font-weight: 800;
}

.detail-section {
    padding: 34px 0;
}

.content-card {
    padding: 28px;
    border: 1px solid rgba(229, 231, 235, 0.92);
    border-radius: var(--radius-lg);
    background: #ffffff;
    box-shadow: 0 20px 70px rgba(15, 23, 42, 0.08);
}

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

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

.content-card + .content-card {
    margin-top: 20px;
}

.side-card {
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: #ffffff;
    box-shadow: 0 20px 70px rgba(15, 23, 42, 0.12);
}

.side-card img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    background: linear-gradient(135deg, var(--amber-100), var(--rose-50));
}

.side-card-body {
    padding: 22px;
}

.side-card-body h2 {
    margin: 0 0 14px;
    font-size: 22px;
}

.info-list {
    display: grid;
    gap: 10px;
}

.info-list div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f1f5f9;
    color: var(--muted);
}

.info-list strong {
    color: #111827;
}

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

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

.site-footer {
    margin-top: 60px;
    color: #d1d5db;
    background: #111827;
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 46px 0;
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 34px;
}

.footer-inner p {
    max-width: 520px;
    color: #9ca3af;
    line-height: 1.85;
}

.footer-small {
    font-size: 14px;
}

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

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

.footer-links a {
    color: #d1d5db;
}

.footer-links a:hover {
    color: var(--amber-400);
}

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

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

    .hero-panel {
        max-width: 430px;
    }

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

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

    .mobile-menu-button {
        display: block;
    }

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

    .hero,
    .hero-content {
        min-height: auto;
    }

    .hero-content {
        padding: 48px 0 82px;
    }

    .hero h1 {
        font-size: 44px;
    }

    .hero-panel {
        display: none;
    }

    .section-title,
    .filter-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .filter-panel input,
    .filter-panel select,
    .button-dark {
        width: 100%;
    }

    .search-result-count {
        margin-left: 0;
    }

    .movie-grid,
    .rank-grid,
    .category-grid,
    .related-grid,
    .stats-strip,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 44px 0;
    }

    .content-card {
        padding: 22px;
    }
}
