* {
    box-sizing: border-box;
}

:root {
    --rose-50: #fff1f2;
    --rose-100: #ffe4e6;
    --rose-300: #fda4af;
    --rose-500: #f43f5e;
    --rose-600: #e11d48;
    --amber-400: #fbbf24;
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-500: #64748b;
    --slate-700: #334155;
    --slate-900: #0f172a;
    --shadow-soft: 0 24px 80px rgba(148, 27, 67, 0.14);
    --shadow-card: 0 16px 45px rgba(15, 23, 42, 0.10);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--slate-900);
    background: linear-gradient(135deg, var(--slate-50) 0%, var(--rose-50) 46%, #fffbeb 100%);
    min-height: 100vh;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.84);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(255, 228, 230, 0.95);
    box-shadow: 0 8px 28px rgba(225, 29, 72, 0.08);
}

.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    height: 76px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

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

.logo-mark {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--rose-500), var(--amber-400));
    border-radius: 14px;
    box-shadow: 0 12px 30px rgba(244, 63, 94, 0.32);
    font-size: 14px;
}

.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
}

.brand-name {
    font-size: 23px;
    letter-spacing: -0.03em;
    background: linear-gradient(90deg, var(--rose-500), #ec4899, var(--amber-400));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-tagline {
    margin-top: 4px;
    font-size: 12px;
    color: var(--slate-500);
    font-weight: 600;
}

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

.nav-link,
.mobile-link {
    display: inline-flex;
    align-items: center;
    padding: 10px 15px;
    border-radius: 14px;
    color: var(--slate-700);
    font-weight: 650;
    transition: 0.24s ease;
}

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

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-search,
.mobile-search,
.search-page-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search input,
.mobile-search input,
.search-page-form input,
.local-filter,
.filter-bar select {
    border: 1px solid var(--rose-100);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.74);
    padding: 12px 16px;
    min-width: 230px;
    outline: none;
    color: var(--slate-900);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

.header-search input:focus,
.mobile-search input:focus,
.search-page-form input:focus,
.local-filter:focus,
.filter-bar select:focus {
    border-color: var(--rose-300);
    box-shadow: 0 0 0 4px rgba(244, 63, 94, 0.12);
}

.header-search button,
.mobile-search button,
.search-page-form button,
.primary-button,
.ghost-button,
.section-link {
    border: 0;
    cursor: pointer;
    border-radius: 999px;
    padding: 12px 18px;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, var(--rose-500), #ec4899 58%, var(--amber-400));
    box-shadow: 0 16px 36px rgba(244, 63, 94, 0.26);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.search-page-form button:hover,
.primary-button:hover,
.ghost-button:hover,
.section-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 42px rgba(244, 63, 94, 0.34);
}

.ghost-button,
.section-link {
    color: var(--rose-600);
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: var(--rose-50);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    border-radius: 2px;
    background: var(--slate-700);
}

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

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

.mobile-search {
    margin-bottom: 12px;
}

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

.mobile-nav {
    display: grid;
    gap: 8px;
}

main {
    overflow: hidden;
}

.hero {
    max-width: 1280px;
    margin: 32px auto 0;
    padding: 0 24px;
    position: relative;
}

.hero-track {
    position: relative;
    min-height: 620px;
    border-radius: 36px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    background: var(--slate-900);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    align-items: center;
    gap: 42px;
    padding: 70px;
    opacity: 0;
    pointer-events: none;
    transform: scale(1.015);
    transition: opacity 0.55s ease, transform 0.55s ease;
    color: #fff;
}

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

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--hero-image);
    background-size: cover;
    background-position: center;
    filter: blur(22px) saturate(1.15);
    transform: scale(1.08);
    opacity: 0.55;
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(244, 63, 94, 0.42), transparent 34%),
        linear-gradient(110deg, rgba(15, 23, 42, 0.94), rgba(88, 28, 64, 0.72) 56%, rgba(15, 23, 42, 0.68));
}

.hero-content,
.hero-poster {
    position: relative;
    z-index: 1;
}

.eyebrow {
    color: var(--rose-500);
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin: 0 0 12px;
}

.hero .eyebrow {
    color: #fecdd3;
}

.hero h1,
.hero h2 {
    margin: 0;
    font-size: clamp(42px, 7vw, 84px);
    line-height: 0.95;
    letter-spacing: -0.06em;
    max-width: 820px;
}

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

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

.hero-tags {
    margin: 28px 0;
}

.hero-tags span,
.tag-row span,
.chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 13px;
    font-weight: 750;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.hero-poster {
    display: block;
    aspect-ratio: 3 / 4.15;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.38);
    transform: rotate(2deg);
}

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

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 18px;
    z-index: 5;
}

.hero-prev,
.hero-next,
.hero-dot {
    border: 0;
    cursor: pointer;
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
    transition: 0.2s ease;
}

.hero-prev,
.hero-next {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    font-size: 32px;
    line-height: 1;
}

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    padding: 0;
}

.hero-dot.active,
.hero-prev:hover,
.hero-next:hover {
    background: var(--rose-500);
}

.hero-dots {
    display: flex;
    gap: 10px;
}

.quick-panel,
.content-section,
.page-hero,
.detail-hero,
.player-section,
.detail-section {
    max-width: 1280px;
    margin: 32px auto;
    padding: 0 24px;
}

.quick-panel {
    padding: 28px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.70);
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(255, 228, 230, 0.9);
}

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

.section-head.compact,
.section-head.inside {
    margin-bottom: 18px;
}

.section-head h2,
.page-hero h1,
.detail-copy h1,
.detail-section h2 {
    margin: 0;
    letter-spacing: -0.04em;
    color: var(--slate-900);
}

.section-head h2 {
    font-size: clamp(28px, 4vw, 44px);
}

.chip {
    color: var(--rose-600);
    background: #fff;
    border: 1px solid var(--rose-100);
    box-shadow: 0 10px 24px rgba(225, 29, 72, 0.08);
}

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

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

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

.movie-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 24px 58px rgba(225, 29, 72, 0.16);
}

.poster {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4.15;
    overflow: hidden;
    background: linear-gradient(135deg, var(--rose-100), #fef3c7);
}

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

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

.poster-badge,
.poster-score {
    position: absolute;
    top: 12px;
    border-radius: 999px;
    padding: 7px 10px;
    color: #fff;
    font-weight: 900;
    font-size: 12px;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(10px);
}

.poster-badge {
    left: 12px;
}

.poster-score {
    right: 12px;
    background: linear-gradient(135deg, var(--rose-500), var(--amber-400));
}

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

.movie-card h2,
.compact-card h3,
.ranking-info h2 {
    margin: 0;
    font-size: 18px;
    line-height: 1.35;
}

.movie-card h2 a:hover,
.compact-card h3 a:hover,
.ranking-info h2 a:hover {
    color: var(--rose-600);
}

.movie-meta,
.movie-line,
.compact-card p,
.detail-line,
.detail-section p,
.page-hero p,
.site-footer p,
.ranking-info p {
    color: var(--slate-500);
    line-height: 1.75;
}

.movie-meta {
    margin: 8px 0;
    font-size: 13px;
}

.movie-line {
    margin: 0 0 14px;
    font-size: 14px;
}

.tag-row span {
    color: var(--rose-600);
    background: var(--rose-50);
    border-color: var(--rose-100);
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    gap: 24px;
}

.split-layout > div,
.ranking-wrap,
.detail-section,
.player-shell {
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.74);
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(255, 228, 230, 0.9);
    padding: 24px;
}

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

.compact-card {
    display: grid;
    grid-template-columns: 42px 72px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 12px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--rose-100);
}

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

.compact-poster {
    border-radius: 14px;
    overflow: hidden;
    aspect-ratio: 3 / 4;
}

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

.compact-card p {
    margin: 5px 0;
    font-size: 13px;
}

.compact-card span:last-child {
    color: var(--rose-600);
    font-size: 13px;
    font-weight: 800;
}

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

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

.category-card {
    position: relative;
    min-height: 190px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    border-radius: 26px;
    overflow: hidden;
    color: #fff;
    box-shadow: var(--shadow-card);
    background: var(--slate-900);
}

.category-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--cat-image);
    background-size: cover;
    background-position: center;
    opacity: 0.42;
    transition: transform 0.32s ease;
}

.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 15%, rgba(15, 23, 42, 0.92));
}

.category-card:hover::before {
    transform: scale(1.08);
}

.category-card span,
.category-card strong {
    position: relative;
    z-index: 1;
}

.category-card span {
    font-size: 24px;
    font-weight: 900;
    margin-bottom: 10px;
}

.category-card strong {
    font-size: 14px;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.82);
}

.page-hero.soft,
.detail-hero {
    border-radius: 34px;
    padding: 44px;
    background:
        radial-gradient(circle at 20% 20%, rgba(244, 63, 94, 0.16), transparent 34%),
        rgba(255, 255, 255, 0.74);
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(255, 228, 230, 0.9);
}

.page-hero h1 {
    font-size: clamp(36px, 5vw, 60px);
}

.page-hero p {
    max-width: 780px;
    margin-bottom: 0;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: var(--slate-500);
    margin-bottom: 22px;
    font-weight: 700;
}

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

.filter-bar {
    margin-top: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.filter-bar.wide input {
    min-width: min(460px, 100%);
}

.ranking-wrap {
    display: grid;
    gap: 16px;
}

.ranking-card {
    display: grid;
    grid-template-columns: 58px 110px minmax(0, 1fr) 72px;
    gap: 18px;
    align-items: center;
    padding: 16px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.70);
    border: 1px solid var(--rose-100);
}

.ranking-index,
.ranking-score {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    font-weight: 900;
}

.ranking-index {
    color: #fff;
    background: linear-gradient(135deg, var(--rose-500), var(--amber-400));
}

.ranking-score {
    color: var(--rose-600);
    background: var(--rose-50);
}

.ranking-poster {
    border-radius: 18px;
    overflow: hidden;
    aspect-ratio: 3 / 4;
}

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

.detail-grid {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 36px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border-radius: 30px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
    aspect-ratio: 3 / 4.15;
}

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

.detail-copy h1 {
    font-size: clamp(38px, 6vw, 72px);
    line-height: 0.98;
}

.detail-line {
    font-size: 18px;
    max-width: 860px;
}

.detail-meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 24px 0;
}

.detail-meta div {
    padding: 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--rose-100);
}

.detail-meta dt {
    color: var(--slate-500);
    font-size: 13px;
    margin-bottom: 6px;
}

.detail-meta dd {
    margin: 0;
    font-weight: 900;
    color: var(--slate-900);
}

.detail-tags {
    margin-bottom: 24px;
}

.player-section {
    scroll-margin-top: 90px;
}

.player-shell {
    position: relative;
    padding: 0;
    overflow: hidden;
    background: #020617;
    aspect-ratio: 16 / 9;
}

.movie-player {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #020617;
    object-fit: contain;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: radial-gradient(circle, rgba(244, 63, 94, 0.22), rgba(2, 6, 23, 0.74));
    cursor: pointer;
    z-index: 2;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.player-start {
    width: 96px;
    height: 96px;
    border: 0;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(135deg, var(--rose-500), var(--amber-400));
    box-shadow: 0 24px 54px rgba(0, 0, 0, 0.35);
}

.player-start span {
    font-size: 36px;
    transform: translateX(3px);
}

.detail-section {
    padding: 34px;
}

.detail-section h2 {
    font-size: clamp(26px, 4vw, 38px);
    margin-bottom: 14px;
}

.detail-section p {
    font-size: 17px;
    margin: 0;
}

.review-box {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.84), rgba(255, 241, 242, 0.80));
}

.related-section {
    margin-bottom: 64px;
}

.search-page-form {
    margin-top: 24px;
    max-width: 720px;
}

.search-page-form input {
    flex: 1;
    min-width: 0;
}

.site-footer {
    margin-top: 80px;
    color: #fff;
    background: linear-gradient(135deg, #0f172a, #4c0519 58%, #111827);
}

.footer-grid {
    max-width: 1280px;
    margin: 0 auto;
    padding: 52px 24px;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 32px;
}

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

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

.site-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 10px;
}

.site-footer a,
.site-footer p,
.footer-bottom {
    color: rgba(255, 255, 255, 0.72);
}

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

.footer-bottom {
    max-width: 1280px;
    margin: 0 auto;
    padding: 22px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.hidden-by-filter {
    display: none !important;
}

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

    .menu-toggle {
        display: block;
    }

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

    .hero-poster {
        display: none;
    }

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

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

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

    .detail-poster {
        max-width: 360px;
    }
}

@media (max-width: 760px) {
    .header-inner {
        height: 68px;
        padding: 0 16px;
    }

    .brand-name {
        font-size: 19px;
    }

    .brand-tagline {
        display: none;
    }

    .hero,
    .quick-panel,
    .content-section,
    .page-hero,
    .detail-hero,
    .player-section,
    .detail-section {
        padding-left: 16px;
        padding-right: 16px;
    }

    .hero-track {
        min-height: 560px;
        border-radius: 24px;
    }

    .hero-slide {
        padding: 34px 24px 84px;
    }

    .hero h1,
    .hero h2 {
        font-size: clamp(36px, 13vw, 56px);
    }

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

    .page-hero.soft,
    .detail-hero,
    .quick-panel,
    .split-layout > div,
    .ranking-wrap,
    .detail-section {
        border-radius: 22px;
        padding: 24px;
    }

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

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

    .movie-card h2 {
        font-size: 16px;
    }

    .movie-line {
        display: none;
    }

    .ranking-card {
        grid-template-columns: 44px 82px minmax(0, 1fr);
    }

    .ranking-score {
        grid-column: 3;
        width: auto;
        height: auto;
        padding: 8px 12px;
        justify-self: start;
    }

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

    .player-start {
        width: 76px;
        height: 76px;
    }

    .footer-grid {
        padding: 38px 16px;
    }

    .footer-bottom {
        padding: 20px 16px;
        flex-direction: column;
    }
}

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

    .compact-card {
        grid-template-columns: 38px 64px minmax(0, 1fr);
    }

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