* {
    box-sizing: border-box;
}

:root {
    --amber: #f59e0b;
    --amber-dark: #d97706;
    --rose: #e11d48;
    --rose-dark: #be123c;
    --sky: #0284c7;
    --teal: #0f766e;
    --slate: #1f2937;
    --muted: #6b7280;
    --paper: rgba(255, 255, 255, 0.78);
    --line: rgba(148, 163, 184, 0.28);
    --shadow: 0 20px 48px rgba(15, 23, 42, 0.16);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
    color: #1f2937;
    background: linear-gradient(135deg, #fffbeb 0%, #fff1f2 50%, #ecfeff 100%);
    min-height: 100vh;
}

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

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

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(255, 251, 235, 0.92), rgba(255, 241, 242, 0.92), rgba(240, 249, 255, 0.92));
    backdrop-filter: blur(14px);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-mark,
.footer-brand span {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--amber), var(--rose));
    box-shadow: 0 10px 22px rgba(225, 29, 72, 0.25);
    font-size: 14px;
}

.brand-text {
    font-size: 24px;
    background: linear-gradient(90deg, var(--amber-dark), var(--rose), var(--sky));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-link {
    color: #374151;
    font-size: 15px;
    font-weight: 700;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--rose);
}

.menu-toggle {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    padding: 0 10px;
    background: rgba(255, 255, 255, 0.72);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    height: 2px;
    border-radius: 999px;
    background: #374151;
}

.mobile-menu {
    display: none;
    padding: 12px 18px 18px;
    background: rgba(255, 255, 255, 0.94);
    border-top: 1px solid var(--line);
}

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

.mobile-link,
.mobile-category-row a {
    display: inline-flex;
    margin: 6px 10px 6px 0;
    padding: 8px 12px;
    border-radius: 999px;
    background: #fff;
    color: #475569;
    font-size: 14px;
    font-weight: 700;
}

.mobile-link.active {
    color: #fff;
    background: linear-gradient(90deg, var(--amber), var(--rose));
}

main {
    padding-top: 68px;
}

.hero {
    position: relative;
    min-height: 620px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: #fff;
}

.hero-media,
.hero-media img,
.hero-overlay {
    position: absolute;
    inset: 0;
}

.hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
}

.hero-overlay {
    z-index: 1;
    background:
        radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.34), transparent 30%),
        linear-gradient(90deg, rgba(120, 53, 15, 0.92), rgba(136, 19, 55, 0.9), rgba(12, 74, 110, 0.9));
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(980px, calc(100% - 32px));
    text-align: center;
    padding: 80px 0;
}

.kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #fde68a;
    font-weight: 800;
    backdrop-filter: blur(12px);
}

.hero h1 {
    margin: 24px 0 16px;
    font-size: clamp(42px, 7vw, 78px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

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

.hero-feature {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 28px;
    padding: 14px 18px;
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(16px);
}

.hero-feature strong {
    color: #fff;
    font-size: 18px;
}

.hero-feature span {
    color: #fde68a;
    font-weight: 700;
}

.hero-actions,
.section-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    margin-top: 34px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
    color: #fff;
    background: linear-gradient(90deg, var(--amber), var(--rose));
    box-shadow: 0 16px 36px rgba(225, 29, 72, 0.28);
}

.btn-ghost {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.32);
    backdrop-filter: blur(12px);
}

.page-hero {
    padding: 88px 0 48px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.14), rgba(225, 29, 72, 0.12), rgba(2, 132, 199, 0.14));
}

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

.page-hero h1,
.section-title h2,
.detail-title {
    margin: 0;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.15;
    background: linear-gradient(90deg, var(--rose), var(--amber-dark), var(--sky));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.page-hero p {
    max-width: 820px;
    color: #475569;
    font-size: 18px;
    line-height: 1.8;
}

.section {
    padding: 58px 0;
}

.section-soft {
    width: 100%;
    margin: 0;
    padding: 62px 0;
    background: rgba(255, 255, 255, 0.46);
    backdrop-filter: blur(10px);
}

.section-soft > .section {
    padding: 0;
}

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

.section-title p {
    max-width: 620px;
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

.text-link {
    color: var(--rose);
    font-weight: 800;
}

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

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

.movie-card {
    min-width: 0;
}

.movie-card-link {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.72);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card-link:hover {
    transform: translateY(-6px) scale(1.015);
    box-shadow: 0 28px 58px rgba(15, 23, 42, 0.2);
}

.movie-poster {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(135deg, #fef3c7, #ffe4e6, #e0f2fe);
}

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

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

.movie-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 35%, rgba(15, 23, 42, 0.62));
    opacity: 0.72;
}

.movie-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #fff;
    background: rgba(245, 158, 11, 0.9);
    font-size: 12px;
    font-weight: 900;
}

.movie-card-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 18px;
}

.movie-title {
    color: #111827;
    font-size: 17px;
    line-height: 1.35;
    font-weight: 850;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-meta,
.movie-desc {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.movie-desc {
    min-height: 40px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 2px;
}

.movie-tags span,
.detail-tag,
.category-chip {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    color: #9f1239;
    background: #ffe4e6;
    font-size: 12px;
    font-weight: 800;
}

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

.category-card {
    min-height: 170px;
    padding: 24px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.72);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.16);
}

.category-card strong {
    display: block;
    margin-bottom: 10px;
    color: var(--rose);
    font-size: 22px;
}

.category-card p {
    margin: 0;
    color: #64748b;
    line-height: 1.7;
}

.rank-layout {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 28px;
}

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

.compact-card {
    display: grid;
    grid-template-columns: auto 112px 1fr;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.72);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.09);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.compact-card:hover {
    transform: translateX(4px);
    box-shadow: 0 20px 38px rgba(15, 23, 42, 0.14);
}

.compact-card img {
    width: 112px;
    height: 70px;
    object-fit: cover;
    border-radius: 14px;
    background: linear-gradient(135deg, #fef3c7, #ffe4e6, #e0f2fe);
}

.rank-num {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, var(--amber), var(--rose));
    font-size: 15px;
    font-weight: 900;
}

.compact-info strong,
.compact-info em {
    display: block;
}

.compact-info strong {
    color: #111827;
    font-size: 15px;
    line-height: 1.35;
}

.compact-info em {
    margin-top: 5px;
    color: #64748b;
    font-size: 12px;
    font-style: normal;
}

.search-panel {
    padding: 24px;
    margin-bottom: 28px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(255, 255, 255, 0.74);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.1);
}

.search-row {
    display: flex;
    gap: 14px;
    align-items: center;
}

.search-input {
    width: 100%;
    height: 52px;
    border: 1px solid rgba(148, 163, 184, 0.36);
    border-radius: 999px;
    padding: 0 20px;
    outline: 0;
    color: #111827;
    background: #fff;
    font-size: 15px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-input:focus {
    border-color: rgba(225, 29, 72, 0.65);
    box-shadow: 0 0 0 4px rgba(225, 29, 72, 0.12);
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.filter-chip {
    border: 0;
    padding: 9px 13px;
    border-radius: 999px;
    color: #475569;
    background: #fff;
    font-weight: 800;
    cursor: pointer;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.22);
}

.filter-chip.active,
.filter-chip:hover {
    color: #fff;
    background: linear-gradient(90deg, var(--rose), var(--amber));
}

.empty-state {
    display: none;
    padding: 32px;
    text-align: center;
    color: #64748b;
}

.empty-state.show {
    display: block;
}

.detail-wrap {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 94px 0 58px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    color: #64748b;
    font-size: 14px;
}

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

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) 360px;
    gap: 30px;
    align-items: start;
}

.player-card,
.detail-panel,
.side-panel {
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.72);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.player-card {
    background: #0f172a;
}

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

.player-frame video,
.player-poster,
.player-cover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.player-frame video {
    object-fit: contain;
    z-index: 1;
}

.player-poster {
    object-fit: cover;
    z-index: 2;
    opacity: 0.9;
}

.player-cover {
    z-index: 3;
    display: grid;
    place-items: center;
    border: 0;
    color: #fff;
    background:
        linear-gradient(180deg, rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.72)),
        radial-gradient(circle at center, rgba(245, 158, 11, 0.22), transparent 42%);
    cursor: pointer;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.player.is-playing .player-cover,
.player.is-playing .player-poster {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.play-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--amber), var(--rose));
    box-shadow: 0 20px 42px rgba(225, 29, 72, 0.35);
    font-size: 18px;
    font-weight: 900;
}

.play-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    color: var(--rose);
    background: #fff;
}

.detail-panel {
    margin-top: 24px;
    padding: 28px;
}

.detail-title {
    margin-bottom: 16px;
}

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

.detail-meta span {
    padding: 7px 11px;
    border-radius: 999px;
    color: #475569;
    background: rgba(241, 245, 249, 0.9);
    font-size: 13px;
    font-weight: 800;
}

.detail-panel h2,
.side-panel h2 {
    margin: 24px 0 10px;
    color: #111827;
    font-size: 22px;
}

.detail-panel p {
    color: #374151;
    line-height: 1.9;
    font-size: 16px;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.side-panel {
    padding: 22px;
}

.side-panel h2:first-child {
    margin-top: 0;
}

.prev-next {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 18px;
}

.prev-next a {
    padding: 14px;
    border-radius: 16px;
    color: #475569;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.22);
    font-weight: 800;
    line-height: 1.4;
}

.prev-next a:hover {
    color: var(--rose);
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 0.8fr 0.8fr 1fr;
    gap: 28px;
    padding: 46px 0;
}

.footer-brand {
    color: #fff;
    font-size: 20px;
}

.site-footer p {
    color: #94a3b8;
    line-height: 1.8;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: #fff;
    font-size: 17px;
}

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

.site-footer li {
    margin: 9px 0;
}

.site-footer a:hover {
    color: #fbbf24;
}

.footer-bottom {
    padding: 20px 0 26px;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    color: #94a3b8;
    text-align: center;
}

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

    .rank-layout,
    .detail-layout,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .side-panel {
        order: 2;
    }
}

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

    .menu-toggle {
        display: flex;
    }

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

    .hero {
        min-height: 580px;
    }

    .hero-content {
        text-align: left;
    }

    .hero-actions,
    .section-actions {
        justify-content: flex-start;
    }

    .section-title {
        display: block;
    }

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

    .compact-card {
        grid-template-columns: auto 94px 1fr;
    }

    .compact-card img {
        width: 94px;
        height: 62px;
    }

    .search-row {
        display: block;
    }

    .prev-next {
        grid-template-columns: 1fr;
    }
}
