* {
    box-sizing: border-box;
}

:root {
    --rose: #f43f5e;
    --rose-deep: #be123c;
    --orange: #f97316;
    --amber: #f59e0b;
    --ink: #1f2937;
    --muted: #6b7280;
    --soft: #fff7ed;
    --line: rgba(244, 63, 94, 0.14);
    --shadow: 0 24px 60px rgba(127, 29, 29, 0.14);
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--ink);
    background: linear-gradient(135deg, #fff1f2 0%, #fffbeb 46%, #fdf2f8 100%);
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(244, 63, 94, 0.12);
}

.nav-shell {
    max-width: 1240px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 24px;
}

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

.logo-mark {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--rose), var(--orange));
    box-shadow: 0 12px 26px rgba(244, 63, 94, 0.28);
    font-size: 14px;
}

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

.nav-link {
    font-weight: 700;
    color: #4b5563;
    padding: 8px 2px;
    position: relative;
}

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

.nav-link.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--rose), var(--orange));
}

.header-search,
.mobile-search {
    display: flex;
    align-items: center;
    border: 1px solid rgba(244, 63, 94, 0.18);
    background: #fff;
    border-radius: 999px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(244, 63, 94, 0.08);
}

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

.header-search input,
.mobile-search input {
    width: 220px;
    padding: 10px 14px;
}

.header-search button,
.mobile-search button,
.primary-button,
.ghost-button,
.text-link,
.pager-link,
.play-cover button {
    cursor: pointer;
}

.header-search button,
.mobile-search button {
    border: 0;
    padding: 10px 16px;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(90deg, var(--rose), var(--orange));
}

.menu-toggle {
    display: none;
    border: 0;
    border-radius: 14px;
    background: #fff1f2;
    color: var(--rose);
    font-size: 24px;
    padding: 8px 12px;
}

.mobile-panel {
    display: none;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px 18px;
}

.mobile-panel nav {
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
}

.main-shell {
    max-width: 1240px;
    margin: 0 auto;
    padding: 42px 20px 64px;
}

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

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

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

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(244, 63, 94, 0.58), transparent 32%),
        linear-gradient(90deg, rgba(17, 24, 39, 0.9) 0%, rgba(17, 24, 39, 0.58) 46%, rgba(17, 24, 39, 0.18) 100%),
        linear-gradient(0deg, rgba(17, 24, 39, 0.85), transparent 48%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1240px;
    margin: 0 auto;
    min-height: 560px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 96px 20px 82px;
    color: #fff;
}

.hero-kicker,
.cover-label,
.rank-badge,
.tag-chip,
.meta-pill {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border-radius: 999px;
    font-weight: 800;
}

.hero-kicker {
    padding: 8px 16px;
    margin-bottom: 18px;
    background: linear-gradient(90deg, var(--rose), var(--orange));
    box-shadow: 0 14px 34px rgba(244, 63, 94, 0.32);
}

.hero-content h1 {
    max-width: 760px;
    margin: 0 0 18px;
    font-size: clamp(42px, 7vw, 76px);
    line-height: 0.98;
    letter-spacing: -0.055em;
}

.hero-content p {
    max-width: 680px;
    margin: 0 0 22px;
    color: #f3f4f6;
    font-size: 19px;
    line-height: 1.8;
}

.hero-tags,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags span,
.tag-chip,
.meta-pill {
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(14px);
}

.hero-actions,
.section-head,
.category-head,
.detail-actions,
.pager,
.rank-line {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.hero-actions {
    margin-top: 28px;
}

.primary-button,
.ghost-button,
.pager-link {
    border: 0;
    border-radius: 999px;
    padding: 12px 22px;
    font-weight: 900;
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.primary-button {
    color: #fff;
    background: linear-gradient(90deg, var(--rose), var(--orange));
    box-shadow: 0 16px 34px rgba(244, 63, 94, 0.3);
}

.ghost-button,
.pager-link {
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(14px);
}

.primary-button:hover,
.ghost-button:hover,
.pager-link:hover,
.movie-card:hover,
.category-card:hover,
.rank-card:hover {
    transform: translateY(-3px);
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(14px);
    font-size: 24px;
    cursor: pointer;
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

.hero-dots button {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: width 180ms ease, background 180ms ease;
}

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

.section {
    margin-bottom: 52px;
}

.section-head {
    justify-content: space-between;
    margin-bottom: 22px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title span {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--rose), var(--orange));
    box-shadow: 0 14px 30px rgba(244, 63, 94, 0.24);
}

.section h2,
.category-head h1,
.detail-title,
.page-hero h1 {
    margin: 0;
    color: #111827;
    letter-spacing: -0.035em;
}

.section h2 {
    font-size: clamp(26px, 4vw, 36px);
}

.section-intro,
.page-hero p,
.category-head p,
.detail-intro,
.text-panel p,
.movie-desc {
    color: var(--muted);
    line-height: 1.8;
}

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

.category-card,
.rank-card,
.text-panel,
.player-card,
.detail-card,
.catalog-toolbar,
.movie-card {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.category-card {
    min-height: 148px;
    border-radius: 24px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    position: relative;
}

.category-card::after {
    content: "";
    position: absolute;
    width: 110px;
    height: 110px;
    right: -34px;
    bottom: -42px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(244, 63, 94, 0.16), rgba(249, 115, 22, 0.16));
}

.category-card strong {
    font-size: 20px;
    color: #111827;
}

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

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

.movie-card {
    border-radius: 22px;
    overflow: hidden;
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.movie-cover {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #111827, #7f1d1d);
}

.movie-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 400ms ease;
}

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

.cover-label {
    position: absolute;
    left: 10px;
    bottom: 10px;
    padding: 6px 10px;
    color: #fff;
    font-size: 12px;
    background: linear-gradient(90deg, var(--rose), var(--orange));
}

.rank-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    min-width: 34px;
    height: 34px;
    justify-content: center;
    color: #fff;
    background: rgba(17, 24, 39, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

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

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

.movie-card h3 a:hover,
.text-link:hover,
.footer-grid a:hover,
.breadcrumb a:hover {
    color: var(--rose);
}

.movie-meta {
    margin: 0 0 8px;
    color: #9ca3af;
    font-size: 13px;
}

.movie-desc {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    min-height: 48px;
    margin: 0 0 12px;
    font-size: 14px;
}

.text-link {
    display: inline-flex;
    align-items: center;
    font-weight: 900;
    color: var(--rose);
}

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

.rank-card {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 14px;
    padding: 12px;
    border-radius: 22px;
    align-items: center;
}

.rank-card img {
    width: 96px;
    height: 128px;
    object-fit: cover;
    border-radius: 16px;
}

.rank-card h3 {
    margin: 0 0 8px;
    line-height: 1.35;
}

.rank-card p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}

.page-hero,
.category-head {
    border-radius: 34px;
    padding: 42px;
    margin-bottom: 32px;
    color: #fff;
    background:
        radial-gradient(circle at 80% 0%, rgba(253, 186, 116, 0.5), transparent 32%),
        linear-gradient(135deg, #9f1239 0%, #f43f5e 48%, #f97316 100%);
    box-shadow: 0 28px 80px rgba(190, 18, 60, 0.28);
}

.page-hero h1,
.category-head h1,
.page-hero p,
.category-head p {
    color: #fff;
}

.page-hero h1,
.category-head h1 {
    font-size: clamp(34px, 5vw, 56px);
}

.page-hero p,
.category-head p {
    max-width: 780px;
    margin: 16px 0 0;
    font-size: 18px;
}

.catalog-toolbar {
    display: grid;
    grid-template-columns: 1fr 180px 180px;
    gap: 12px;
    margin-bottom: 22px;
    padding: 14px;
    border-radius: 22px;
}

.catalog-toolbar input,
.catalog-toolbar select {
    width: 100%;
    padding: 12px 14px;
    border-radius: 16px;
    background: #fff7ed;
    border: 1px solid rgba(249, 115, 22, 0.16);
}

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

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 26px;
}

.player-card,
.detail-card,
.text-panel {
    border-radius: 28px;
    overflow: hidden;
}

.video-wrap {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
}

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

.play-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: radial-gradient(circle, rgba(17, 24, 39, 0.25), rgba(17, 24, 39, 0.72));
    transition: opacity 180ms ease;
    z-index: 3;
}

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

.play-cover button {
    width: 92px;
    height: 92px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    font-size: 34px;
    padding-left: 6px;
    background: linear-gradient(135deg, var(--rose), var(--orange));
    box-shadow: 0 18px 44px rgba(244, 63, 94, 0.42);
}

.detail-card {
    padding: 26px;
}

.detail-title {
    font-size: clamp(32px, 5vw, 52px);
    line-height: 1.1;
    margin-bottom: 14px;
}

.detail-intro {
    margin: 16px 0 22px;
    font-size: 18px;
}

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

.meta-pill {
    color: var(--rose-deep);
    background: #fff1f2;
    border-color: rgba(244, 63, 94, 0.18);
}

.text-panel {
    padding: 24px;
    margin-top: 20px;
}

.text-panel h2 {
    margin: 0 0 12px;
    color: #111827;
}

.text-panel p {
    margin: 0;
}

.side-panel {
    position: sticky;
    top: 88px;
    align-self: start;
}

.side-panel .movie-grid {
    grid-template-columns: 1fr;
    gap: 14px;
}

.side-panel .movie-card {
    display: grid;
    grid-template-columns: 96px 1fr;
}

.side-panel .movie-cover {
    aspect-ratio: 2 / 3;
}

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

.side-panel .movie-desc {
    -webkit-line-clamp: 2;
}

.pager {
    justify-content: center;
    margin-top: 28px;
}

.pager-link {
    color: var(--rose-deep);
    background: #fff;
    border-color: rgba(244, 63, 94, 0.18);
}

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

.footer-grid {
    max-width: 1240px;
    margin: 0 auto;
    padding: 48px 20px;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 28px;
}

.footer-logo {
    margin-bottom: 14px;
}

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

.footer-grid p,
.footer-bottom {
    color: #d1d5db;
    line-height: 1.8;
}

.footer-grid a {
    display: block;
    color: #d1d5db;
    margin: 8px 0;
}

.footer-bottom {
    max-width: 1240px;
    margin: 0 auto;
    padding: 18px 20px 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.empty-state {
    display: none;
    padding: 32px;
    border-radius: 24px;
    background: #fff;
    color: var(--muted);
    text-align: center;
}

@media (max-width: 1100px) {
    .movie-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

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

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

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

    .side-panel {
        position: static;
    }
}

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

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

    .mobile-panel.is-open {
        display: block;
    }

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

    .hero-control {
        display: none;
    }

    .main-shell {
        padding-top: 28px;
    }

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

    .category-grid,
    .rank-grid,
    .footer-grid,
    .catalog-toolbar {
        grid-template-columns: 1fr;
    }

    .page-hero,
    .category-head {
        padding: 28px;
        border-radius: 26px;
    }

    .rank-card {
        grid-template-columns: 84px 1fr;
    }

    .rank-card img {
        width: 84px;
        height: 112px;
    }
}

@media (max-width: 520px) {
    .nav-shell {
        padding-inline: 14px;
    }

    .site-logo {
        font-size: 18px;
    }

    .logo-mark {
        width: 30px;
        height: 30px;
    }

    .hero-content {
        padding-inline: 16px;
    }

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

    .main-shell {
        padding-inline: 14px;
    }

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

    .side-panel .movie-card {
        grid-template-columns: 88px 1fr;
    }
}
