:root {
    --rose-950: #3b0717;
    --rose-900: #5b0b24;
    --rose-800: #7f1238;
    --rose-700: #9f174d;
    --amber-500: #f59e0b;
    --amber-300: #fcd34d;
    --cream: #fff7ed;
    --paper: #ffffff;
    --ink: #2b1221;
    --muted: #7b6471;
    --line: rgba(127, 18, 56, 0.12);
    --shadow: 0 24px 70px rgba(91, 11, 36, 0.16);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    color: var(--ink);
    background: linear-gradient(180deg, #fff1f2 0%, #fffbeb 42%, #ffffff 100%);
}

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

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

button,
input,
select {
    font: inherit;
}

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

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, var(--rose-900), var(--rose-800), #78350f);
    box-shadow: 0 14px 36px rgba(91, 11, 36, 0.28);
}

.header-inner {
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-weight: 900;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.brand-icon {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, #fb7185, #f59e0b);
    box-shadow: 0 10px 25px rgba(245, 158, 11, 0.32);
}

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

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

.nav-link {
    color: rgba(255, 255, 255, 0.88);
    padding: 10px 12px;
    border-radius: 999px;
    transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
}

.top-search {
    display: flex;
    align-items: center;
    width: min(340px, 32vw);
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    padding: 4px;
}

.top-search input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: #fff;
    padding: 9px 12px;
}

.top-search input::placeholder {
    color: rgba(255, 255, 255, 0.72);
}

.top-search button,
.primary-btn,
.secondary-btn,
.filter-btn {
    border: 0;
    cursor: pointer;
    border-radius: 999px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.top-search button {
    color: var(--rose-900);
    background: #fff;
    padding: 8px 14px;
    white-space: nowrap;
}

.top-search button:hover,
.primary-btn:hover,
.secondary-btn:hover,
.filter-btn:hover {
    transform: translateY(-1px);
}

.hero-slider {
    position: relative;
    min-height: 610px;
    overflow: hidden;
    color: #fff;
    background: #1f0710;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
}

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

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 70% 45%, rgba(245, 158, 11, 0.2), transparent 30%),
        linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.64), rgba(0, 0, 0, 0.18));
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 610px;
    display: flex;
    align-items: center;
}

.hero-copy {
    max-width: 680px;
    padding: 72px 0;
}

.kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #ffe8a3;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    padding: 8px 14px;
    border-radius: 999px;
    backdrop-filter: blur(10px);
}

.hero-copy h1 {
    margin: 22px 0 18px;
    font-size: clamp(38px, 6vw, 76px);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.hero-copy p {
    margin: 0 0 26px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 18px;
    line-height: 1.85;
}

.hero-actions,
.section-actions,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.primary-btn,
.secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 12px 20px;
    font-weight: 800;
}

.primary-btn {
    color: #4a1207;
    background: linear-gradient(135deg, #fcd34d, #fb7185);
    box-shadow: 0 18px 42px rgba(245, 158, 11, 0.32);
}

.secondary-btn {
    color: #fff;
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.24);
}

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

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

.hero-dot.is-active {
    background: #fcd34d;
}

.page-hero {
    padding: 76px 0 36px;
}

.page-hero h1 {
    margin: 0 0 14px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.08;
}

.page-hero p {
    max-width: 780px;
    color: var(--muted);
    line-height: 1.8;
    font-size: 17px;
}

.section {
    padding: 44px 0;
}

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

.section-title {
    margin: 0;
    font-size: clamp(25px, 3vw, 38px);
}

.section-subtitle {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

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

.category-card {
    min-height: 160px;
    border-radius: var(--radius-lg);
    padding: 22px;
    color: #fff;
    background:
        radial-gradient(circle at 80% 12%, rgba(252, 211, 77, 0.34), transparent 30%),
        linear-gradient(135deg, var(--rose-900), var(--rose-700));
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

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

.category-card p {
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.65;
}

.movie-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 18px;
}

.movie-card {
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 16px 40px rgba(91, 11, 36, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.poster-link {
    display: block;
    position: relative;
    aspect-ratio: 3 / 4;
    background: linear-gradient(135deg, #5b0b24, #f59e0b);
    overflow: hidden;
}

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

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

.score-badge {
    position: absolute;
    right: 10px;
    top: 10px;
    color: #4a1207;
    background: #fcd34d;
    border-radius: 999px;
    padding: 5px 8px;
    font-weight: 900;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
}

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

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

.movie-card h3 a:hover,
.rank-info h3 a:hover,
.text-link:hover {
    color: var(--rose-700);
}

.movie-meta,
.movie-desc {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.movie-desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: 8px;
}

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

.tag-row span,
.info-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 9px;
    background: #fff1f2;
    color: var(--rose-800);
    font-size: 13px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 88px 54px 1fr;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 12px 34px rgba(91, 11, 36, 0.08);
}

.rank-poster {
    border-radius: 14px;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: linear-gradient(135deg, #5b0b24, #f59e0b);
}

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

.rank-number {
    color: var(--rose-800);
    font-size: 28px;
    font-weight: 950;
}

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

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

.rank-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--rose-800);
    font-size: 14px;
}

.rank-meta span {
    background: #fff1f2;
    border-radius: 999px;
    padding: 5px 9px;
}

.filter-panel {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: 0 12px 34px rgba(91, 11, 36, 0.08);
    margin-bottom: 24px;
}

.filter-panel input {
    min-height: 48px;
    border: 1px solid rgba(127, 18, 56, 0.18);
    border-radius: 999px;
    padding: 0 16px;
    outline: 0;
    background: #fff;
}

.filter-btn {
    color: #fff;
    background: linear-gradient(135deg, var(--rose-800), var(--amber-500));
    padding: 0 22px;
    font-weight: 800;
}

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

.player-card,
.detail-card,
.side-card {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    overflow: hidden;
}

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

.player-stage video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.3));
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.56;
}

.play-button {
    position: relative;
    z-index: 2;
    width: 90px;
    height: 90px;
    border-radius: 999px;
    border: 0;
    display: grid;
    place-items: center;
    color: #4a1207;
    background: linear-gradient(135deg, #fcd34d, #fb7185);
    font-size: 32px;
    cursor: pointer;
    box-shadow: 0 22px 55px rgba(0, 0, 0, 0.34);
}

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

.detail-card h1 {
    margin: 0 0 14px;
    font-size: clamp(30px, 5vw, 50px);
    line-height: 1.12;
}

.detail-card p {
    color: var(--muted);
    line-height: 1.9;
}

.info-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0 20px;
}

.side-card {
    padding: 18px;
}

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

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

.side-link {
    display: grid;
    grid-template-columns: 62px 1fr;
    gap: 12px;
    align-items: center;
}

.side-link img {
    aspect-ratio: 3 / 4;
    width: 62px;
    height: 82px;
    object-fit: cover;
    border-radius: 12px;
    background: linear-gradient(135deg, #5b0b24, #f59e0b);
}

.side-link strong {
    display: block;
    line-height: 1.35;
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 28px 0 16px;
    color: var(--muted);
}

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

.site-footer {
    margin-top: 64px;
    color: rgba(255, 255, 255, 0.84);
    background: linear-gradient(90deg, var(--rose-950), var(--rose-900));
}

.footer-inner {
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-brand {
    color: #fff;
    font-weight: 900;
    font-size: 22px;
}

.footer-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    padding: 9px 12px;
    border-radius: 999px;
}

.empty-state {
    display: none;
    padding: 30px;
    text-align: center;
    color: var(--muted);
    border: 1px dashed rgba(127, 18, 56, 0.22);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.78);
}

.empty-state.is-visible {
    display: block;
}

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

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

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

    .top-search {
        width: 260px;
    }
}

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

    .main-nav {
        order: 3;
        width: 100%;
        overflow-x: auto;
        padding-bottom: 2px;
    }

    .top-search {
        width: 100%;
        order: 2;
    }

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

    .category-grid,
    .movie-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .rank-item {
        grid-template-columns: 76px 42px 1fr;
        gap: 12px;
    }

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

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

    .hero-copy p {
        font-size: 16px;
    }

    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
        padding: 26px 0;
    }
}
