:root {
    --bg: #fffaf2;
    --surface: #ffffff;
    --surface-soft: #fff7ed;
    --pudding-50: #fff7ed;
    --pudding-100: #ffedd5;
    --pudding-200: #fed7aa;
    --pudding-500: #f59e0b;
    --pudding-600: #d97706;
    --moonlight-50: #f5f3ff;
    --moonlight-100: #ede9fe;
    --moonlight-400: #a78bfa;
    --moonlight-500: #8b5cf6;
    --moonlight-600: #7c3aed;
    --text: #1f2937;
    --muted: #6b7280;
    --border: rgba(251, 191, 36, 0.28);
    --shadow: 0 10px 30px rgba(124, 58, 237, 0.10);
    --shadow-lg: 0 24px 60px rgba(124, 58, 237, 0.18);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at 10% 0%, rgba(255, 237, 213, 0.85), transparent 28rem),
        radial-gradient(circle at 88% 12%, rgba(237, 233, 254, 0.92), transparent 32rem),
        linear-gradient(180deg, #fffaf2 0%, #ffffff 46%, #fff7ed 100%);
    min-height: 100vh;
}

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

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.82);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(18px);
    box-shadow: 0 10px 24px rgba(217, 119, 6, 0.06);
}

.header-inner {
    height: 76px;
    display: flex;
    align-items: center;
    gap: 22px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    font-size: 22px;
    letter-spacing: -0.02em;
    color: var(--moonlight-600);
    white-space: nowrap;
}

.brand-icon {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, #fbbf24, #a78bfa 55%, #7c3aed);
    box-shadow: 0 12px 28px rgba(124, 58, 237, 0.22);
    font-size: 14px;
}

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

.nav-link,
.mobile-link {
    padding: 10px 14px;
    border-radius: 999px;
    color: #374151;
    font-weight: 700;
    transition: 0.22s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    color: var(--moonlight-600);
    background: var(--moonlight-50);
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--pudding-50);
}

.header-search input,
.mobile-search input,
.search-panel input,
.search-panel select {
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
    font: inherit;
}

.header-search input {
    width: 180px;
    padding: 8px 4px 8px 12px;
}

.header-search button,
.mobile-search button,
.btn,
.player-button,
.filter-button {
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--pudding-500), var(--moonlight-500));
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(124, 58, 237, 0.18);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.header-search button,
.mobile-search button {
    padding: 8px 14px;
}

.header-search button:hover,
.mobile-search button:hover,
.btn:hover,
.player-button:hover,
.filter-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(124, 58, 237, 0.24);
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: var(--pudding-50);
    color: var(--moonlight-600);
    font-size: 24px;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    padding: 0 16px 16px;
    border-top: 1px solid var(--border);
}

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

.mobile-link {
    display: block;
    margin-top: 8px;
}

.mobile-search {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding: 8px;
    border-radius: 20px;
    background: var(--pudding-50);
}

.mobile-search input {
    min-width: 0;
    flex: 1;
    padding: 10px;
}

.hero {
    position: relative;
    overflow: hidden;
    padding: 42px 0 36px;
}

.hero-shell {
    position: relative;
    min-height: 560px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.62);
    border-radius: 34px;
    background:
        linear-gradient(135deg, rgba(255, 247, 237, 0.88), rgba(245, 243, 255, 0.82)),
        radial-gradient(circle at 28% 10%, rgba(251, 191, 36, 0.35), transparent 24rem),
        radial-gradient(circle at 70% 20%, rgba(139, 92, 246, 0.25), transparent 28rem);
    box-shadow: var(--shadow-lg);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.8fr);
    gap: 30px;
    align-items: center;
    padding: 54px;
    opacity: 0;
    pointer-events: none;
    transform: translateX(26px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.hero-slide.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 13px;
    border-radius: 999px;
    color: var(--moonlight-600);
    background: rgba(237, 233, 254, 0.88);
    font-weight: 800;
    font-size: 14px;
}

.hero h1 {
    margin: 18px 0 16px;
    font-size: clamp(40px, 5.4vw, 76px);
    line-height: 1.02;
    letter-spacing: -0.055em;
    color: #111827;
}

.gradient-text {
    background: linear-gradient(135deg, var(--pudding-600), var(--moonlight-600));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-desc {
    max-width: 680px;
    margin: 0 0 26px;
    color: #4b5563;
    font-size: 18px;
    line-height: 1.85;
}

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

.hero-meta span,
.detail-meta span,
.card-meta span,
.rank-meta span,
.tag-row span,
.meta-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--pudding-50);
    color: #7c2d12;
    font-size: 13px;
    font-weight: 700;
    padding: 6px 10px;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 20px;
}

.btn.secondary {
    color: var(--moonlight-600);
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid var(--border);
}

.hero-poster {
    position: relative;
    min-height: 430px;
    border-radius: 32px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--pudding-100), var(--moonlight-100));
    box-shadow: 0 30px 60px rgba(17, 24, 39, 0.20);
}

.hero-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 38%, rgba(17, 24, 39, 0.78));
}

.hero-poster img {
    width: 100%;
    height: 100%;
    min-height: 430px;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.hero-slide.active .hero-poster img {
    transform: scale(1.04);
}

.hero-poster-info {
    position: absolute;
    left: 22px;
    right: 22px;
    bottom: 22px;
    z-index: 2;
    color: #ffffff;
}

.hero-poster-info strong {
    display: block;
    margin-bottom: 8px;
    font-size: 24px;
}

.hero-dots {
    position: absolute;
    left: 54px;
    bottom: 34px;
    z-index: 6;
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 34px;
    height: 8px;
    border: 0;
    border-radius: 999px;
    background: rgba(124, 58, 237, 0.22);
    cursor: pointer;
}

.hero-dot.active {
    background: linear-gradient(135deg, var(--pudding-500), var(--moonlight-500));
}

.hero-quick {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-top: 18px;
}

.quick-card,
.category-tile,
.stat-card {
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.72);
    box-shadow: var(--shadow);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.quick-card:hover,
.category-tile:hover,
.stat-card:hover,
.movie-card:hover,
.rank-row:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.quick-card strong,
.category-tile strong {
    display: block;
    color: #111827;
    font-size: 18px;
    margin-bottom: 6px;
}

.quick-card span,
.category-tile span {
    color: var(--muted);
    line-height: 1.7;
}

.page-section {
    padding: 38px 0;
}

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

.section-head h1,
.section-head h2,
.page-title h1,
.detail-title h1 {
    margin: 0;
    color: #111827;
    font-size: clamp(28px, 3.6vw, 46px);
    letter-spacing: -0.04em;
}

.section-head p,
.page-title p {
    max-width: 780px;
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.9;
}

.section-more {
    color: var(--moonlight-600);
    font-weight: 900;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: var(--shadow);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.card-cover {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, var(--pudding-100), var(--moonlight-100));
}

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

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

.card-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 30%, rgba(17, 24, 39, 0.68));
    opacity: 0;
    transition: opacity 0.22s ease;
}

.movie-card:hover .card-cover::after {
    opacity: 1;
}

.card-play {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    width: 58px;
    height: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--moonlight-600);
    background: rgba(255, 255, 255, 0.90);
    transform: translate(-50%, -50%) scale(0.82);
    opacity: 0;
    transition: 0.22s ease;
}

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

.card-category,
.rank-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
}

.card-category {
    left: 12px;
    bottom: 12px;
    padding: 6px 10px;
    background: rgba(124, 58, 237, 0.86);
}

.rank-badge {
    left: 12px;
    top: 12px;
    min-width: 34px;
    height: 34px;
    background: linear-gradient(135deg, var(--pudding-500), var(--moonlight-500));
}

.card-body {
    padding: 16px;
}

.card-body h3 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.35;
}

.card-body h3 a:hover {
    color: var(--moonlight-600);
}

.card-body p {
    min-height: 54px;
    margin: 0 0 12px;
    color: var(--muted);
    line-height: 1.75;
    font-size: 14px;
}

.card-meta {
    margin-bottom: 10px;
}

.card-meta span {
    color: var(--muted);
    background: #f9fafb;
    padding: 4px 8px;
}

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

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

.page-title {
    padding: 48px 0 18px;
}

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

.breadcrumb a {
    color: var(--moonlight-600);
    font-weight: 800;
}

.search-panel {
    display: grid;
    grid-template-columns: 1fr 180px 180px auto;
    gap: 12px;
    align-items: center;
    margin: 16px 0 28px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: var(--shadow);
}

.search-panel input,
.search-panel select {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #ffffff;
}

.filter-button {
    padding: 13px 18px;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 72px 160px 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.84);
    box-shadow: var(--shadow);
    transition: 0.22s ease;
}

.rank-number {
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--pudding-500), var(--moonlight-500));
    font-weight: 900;
}

.rank-thumb {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--pudding-100), var(--moonlight-100));
}

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

.rank-info h3 {
    margin: 0 0 8px;
    font-size: 20px;
}

.rank-info p {
    margin: 0 0 10px;
    color: var(--muted);
    line-height: 1.75;
}

.rank-hot {
    color: var(--moonlight-600);
    font-size: 20px;
    font-weight: 900;
    white-space: nowrap;
}

.detail-hero {
    padding: 42px 0;
}

.detail-shell {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 34px;
    align-items: center;
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: 34px;
    background: rgba(255, 255, 255, 0.80);
    box-shadow: var(--shadow-lg);
}

.detail-poster {
    overflow: hidden;
    border-radius: 28px;
    background: linear-gradient(135deg, var(--pudding-100), var(--moonlight-100));
    box-shadow: 0 24px 60px rgba(17, 24, 39, 0.18);
}

.detail-poster img {
    width: 100%;
    height: 100%;
    min-height: 420px;
    object-fit: cover;
}

.detail-title h1 {
    margin: 14px 0;
}

.detail-title p {
    color: var(--muted);
    font-size: 18px;
    line-height: 1.9;
}

.watch-panel {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #0f172a;
    box-shadow: var(--shadow-lg);
}

.watch-panel video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #0f172a;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 16px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.12), rgba(15, 23, 42, 0.70));
    cursor: pointer;
}

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

.player-icon {
    width: 86px;
    height: 86px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: var(--moonlight-600);
    font-size: 34px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.24);
}

.player-cover span:last-child {
    font-size: 20px;
    font-weight: 900;
}

.content-card {
    padding: 26px;
    border: 1px solid var(--border);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: var(--shadow);
}

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

.content-card p {
    margin: 0;
    color: #4b5563;
    line-height: 2;
    font-size: 16px;
}

.content-stack {
    display: grid;
    gap: 20px;
}

.empty-tip {
    display: none;
    padding: 30px;
    text-align: center;
    color: var(--muted);
    border: 1px dashed var(--border);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.72);
}

.site-footer {
    margin-top: 52px;
    padding: 44px 0 24px;
    border-top: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.72);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr;
    gap: 28px;
}

.footer-grid p {
    max-width: 520px;
    color: var(--muted);
    line-height: 1.85;
}

.footer-grid h3 {
    margin: 0 0 12px;
}

.footer-grid a {
    display: block;
    margin: 8px 0;
    color: var(--muted);
}

.footer-grid a:hover {
    color: var(--moonlight-600);
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 28px;
    padding-top: 18px;
    color: var(--muted);
    border-top: 1px solid var(--border);
}

.cover-hidden {
    opacity: 0;
}

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

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

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

    .hero-slide {
        grid-template-columns: 1fr;
        padding: 38px;
    }

    .hero-poster {
        min-height: 300px;
    }

    .hero-poster img {
        min-height: 300px;
    }

    .hero-shell {
        min-height: 820px;
    }
}

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

    .menu-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-left: auto;
    }

    .header-inner {
        height: 68px;
    }

    .brand {
        font-size: 19px;
    }

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

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

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

    .rank-row,
    .detail-shell {
        grid-template-columns: 1fr;
    }

    .rank-thumb {
        width: 100%;
    }

    .rank-hot {
        justify-self: start;
    }

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

@media (max-width: 560px) {
    .container {
        width: min(100% - 22px, 1200px);
    }

    .hero {
        padding-top: 22px;
    }

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

    .hero-slide {
        padding: 24px;
    }

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

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

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

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

    .detail-shell {
        padding: 18px;
        border-radius: 24px;
    }

    .detail-poster img {
        min-height: 300px;
    }

    .card-body p {
        min-height: auto;
    }
}
