:root {
    color-scheme: light;
    --bg: #fff7ed;
    --bg-soft: #fff1f2;
    --panel: rgba(255, 255, 255, 0.82);
    --panel-solid: #ffffff;
    --text: #18181b;
    --muted: #71717a;
    --line: rgba(244, 63, 94, 0.16);
    --brand: #e11d48;
    --brand-2: #f97316;
    --brand-3: #ec4899;
    --shadow: 0 24px 70px rgba(190, 18, 60, 0.16);
    --radius: 28px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(251, 113, 133, 0.22), transparent 36rem),
        radial-gradient(circle at 80% 10%, rgba(251, 146, 60, 0.22), transparent 34rem),
        linear-gradient(135deg, #fff7ed 0%, #fff1f2 48%, #fdf2f8 100%);
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(255, 255, 255, 0.55);
    background: rgba(255, 247, 237, 0.82);
    backdrop-filter: blur(18px);
}

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

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    font-size: 22px;
    letter-spacing: -0.04em;
}

.logo-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    color: #ffffff;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 14px 34px rgba(225, 29, 72, 0.26);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border: 1px solid rgba(244, 63, 94, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.55);
}

.nav-links a {
    padding: 10px 16px;
    color: #52525b;
    border-radius: 999px;
    font-weight: 700;
}

.nav-links a:hover,
.nav-links a.active {
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    color: #ffffff;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

.hero-carousel {
    position: relative;
    min-height: 650px;
    overflow: hidden;
    background: linear-gradient(120deg, #be123c, #db2777 45%, #f97316);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 700ms ease, transform 700ms ease;
    transform: scale(1.02);
}

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

.hero-backdrop {
    position: absolute;
    inset: 0;
}

.hero-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.26;
}

.hero-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.36)),
        radial-gradient(circle at 70% 30%, rgba(255, 255, 255, 0.26), transparent 28rem);
}

.hero-content {
    position: relative;
    z-index: 1;
    width: min(1200px, calc(100% - 32px));
    min-height: 650px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 380px;
    align-items: center;
    gap: 56px;
    padding: 70px 0 88px;
}

.hero-copy {
    color: #ffffff;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fb7185;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero-copy .eyebrow,
.page-hero .eyebrow {
    color: #ffe4e6;
}

.hero-copy h1 {
    max-width: 780px;
    margin: 18px 0 16px;
    font-size: clamp(36px, 5.2vw, 70px);
    line-height: 0.98;
    letter-spacing: -0.07em;
}

.hero-copy h2 {
    margin: 0 0 18px;
    font-size: clamp(26px, 3vw, 42px);
    letter-spacing: -0.05em;
}

.hero-copy p {
    max-width: 680px;
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
    line-height: 1.9;
}

.hero-tags,
.movie-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.movie-tags span,
.detail-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    color: #9f1239;
    border-radius: 999px;
    background: rgba(255, 228, 230, 0.95);
    font-size: 12px;
    font-weight: 800;
}

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

.btn-primary,
.btn-ghost,
.quick-search button,
.search-page-form button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border: 0;
    border-radius: 16px;
    font-weight: 900;
    cursor: pointer;
}

.btn-primary,
.quick-search button,
.search-page-form button {
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 16px 34px rgba(225, 29, 72, 0.28);
}

.btn-ghost {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.34);
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(12px);
}

.hero-poster {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 36px;
    box-shadow: 0 36px 90px rgba(0, 0, 0, 0.38);
    transform: rotate(2deg);
}

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

.cover-frame {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(225, 29, 72, 0.88), rgba(249, 115, 22, 0.78)),
        radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.52), transparent 22rem);
}

.cover-frame img.image-missing {
    opacity: 0;
}

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

.hero-prev,
.hero-next,
.hero-dot {
    border: 0;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(10px);
    cursor: pointer;
}

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

.hero-dots {
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.hero-dot.active {
    width: 30px;
    background: #ffffff;
}

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

.quick-search {
    position: relative;
    z-index: 2;
    margin-top: -48px;
    padding: 22px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.quick-search form,
.search-page-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
}

.quick-search input,
.search-page-form input,
.filter-input {
    width: 100%;
    min-height: 50px;
    padding: 0 18px;
    border: 1px solid rgba(244, 63, 94, 0.14);
    border-radius: 16px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.9);
    outline: none;
}

.quick-search input:focus,
.search-page-form input:focus,
.filter-input:focus {
    border-color: rgba(225, 29, 72, 0.6);
    box-shadow: 0 0 0 4px rgba(244, 63, 94, 0.12);
}

.quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.quick-links a {
    padding: 8px 12px;
    color: #9f1239;
    border-radius: 999px;
    background: #ffe4e6;
    font-size: 13px;
    font-weight: 800;
}

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

.section-heading h2 {
    margin: 8px 0 0;
    font-size: clamp(28px, 3vw, 42px);
    line-height: 1.08;
    letter-spacing: -0.05em;
}

.section-heading a {
    color: #e11d48;
    font-weight: 900;
}

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

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

.movie-card-link {
    display: block;
    height: 100%;
    overflow: hidden;
    border: 1px solid rgba(244, 63, 94, 0.13);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 18px 50px rgba(190, 18, 60, 0.11);
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.movie-card-link:hover {
    transform: translateY(-6px);
    border-color: rgba(225, 29, 72, 0.28);
    box-shadow: 0 28px 70px rgba(190, 18, 60, 0.18);
}

.movie-card .cover-frame {
    display: block;
    aspect-ratio: 2 / 3;
}

.card-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 1;
    padding: 6px 10px;
    color: #ffffff;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.46);
    backdrop-filter: blur(10px);
    font-size: 12px;
    font-weight: 800;
}

.movie-card-body {
    display: grid;
    gap: 10px;
    padding: 16px;
}

.movie-card-body strong {
    overflow: hidden;
    font-size: 18px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.movie-card-body em,
.ranking-info em,
.rank-row em {
    color: var(--muted);
    font-style: normal;
    font-size: 13px;
}

.movie-card-body small,
.ranking-info small {
    display: -webkit-box;
    overflow: hidden;
    min-height: 48px;
    color: #52525b;
    line-height: 1.65;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.movie-card-compact .movie-card-link {
    display: grid;
    grid-template-columns: 92px 1fr;
    border-radius: 22px;
}

.movie-card-compact .cover-frame {
    aspect-ratio: auto;
    min-height: 138px;
}

.movie-card-compact .movie-card-body strong {
    white-space: normal;
}

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

.category-tile,
.category-card {
    position: relative;
    overflow: hidden;
    min-height: 180px;
    padding: 22px;
    border-radius: 28px;
    color: #ffffff;
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.34), transparent 13rem),
        linear-gradient(135deg, var(--accent), #fb7185);
    box-shadow: 0 24px 60px rgba(190, 18, 60, 0.15);
}

.category-tile span,
.category-card span {
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.86;
}

.category-tile strong {
    display: block;
    margin: 16px 0 10px;
    font-size: 24px;
    letter-spacing: -0.04em;
}

.category-tile em,
.category-card p {
    display: block;
    margin: 0;
    color: rgba(255, 255, 255, 0.84);
    font-style: normal;
    line-height: 1.7;
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: start;
    gap: 34px;
}

.ranking-panel,
.ranking-list-large,
.ranking-feature,
.filter-bar,
.detail-content,
.video-shell,
.category-card {
    border: 1px solid rgba(244, 63, 94, 0.13);
    background: rgba(255, 255, 255, 0.76);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.ranking-panel,
.filter-bar,
.detail-content {
    border-radius: 28px;
    padding: 22px;
}

.compact-heading {
    align-items: center;
    margin-bottom: 16px;
}

.compact-heading h2 {
    font-size: 28px;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 8px 12px;
    padding: 14px;
    border-radius: 18px;
    background: rgba(255, 241, 242, 0.8);
}

.rank-row span {
    grid-row: span 2;
    display: grid;
    place-items: center;
    color: #ffffff;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    font-weight: 900;
}

.rank-row strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.site-footer {
    margin-top: 30px;
    padding: 44px 0;
    color: #fecdd3;
    background: linear-gradient(135deg, #881337, #9f1239 45%, #c2410c);
}

.footer-inner {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 34px;
}

.footer-inner strong {
    display: block;
    margin-bottom: 10px;
    color: #ffffff;
    font-size: 24px;
}

.footer-inner p {
    max-width: 580px;
    margin: 0;
    line-height: 1.8;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.footer-links a {
    padding: 8px 12px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
}

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

.page-hero {
    margin: 34px 0 20px;
    padding: 54px;
    overflow: hidden;
    border-radius: 36px;
    color: #ffffff;
    background:
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.28), transparent 22rem),
        linear-gradient(135deg, var(--accent, #e11d48), #f97316);
    box-shadow: var(--shadow);
}

.page-hero h1 {
    max-width: 860px;
    margin: 14px 0 14px;
    font-size: clamp(34px, 5vw, 62px);
    line-height: 1;
    letter-spacing: -0.06em;
}

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

.slim-hero {
    min-height: 260px;
}

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

.category-card {
    min-height: 240px;
}

.category-card a {
    display: block;
}

.category-card div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.category-card div a {
    padding: 8px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    font-size: 13px;
    font-weight: 800;
}

.filter-bar {
    display: grid;
    gap: 14px;
    margin-bottom: 26px;
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-chip {
    padding: 9px 14px;
    border: 1px solid rgba(244, 63, 94, 0.15);
    border-radius: 999px;
    color: #9f1239;
    background: #fff1f2;
    cursor: pointer;
    font-weight: 800;
}

.filter-chip.active,
.filter-chip:hover {
    color: #ffffff;
    border-color: transparent;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

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

.ranking-layout {
    display: grid;
    grid-template-columns: 360px 1fr;
    align-items: start;
    gap: 28px;
}

.ranking-feature,
.ranking-list-large {
    display: grid;
    gap: 14px;
    padding: 18px;
    border-radius: 28px;
}

.ranking-card a {
    display: grid;
    grid-template-columns: 62px 96px 1fr;
    gap: 16px;
    align-items: center;
    padding: 12px;
    border-radius: 22px;
    background: rgba(255, 241, 242, 0.7);
}

.ranking-index {
    display: grid;
    place-items: center;
    width: 50px;
    height: 50px;
    color: #ffffff;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    font-weight: 900;
}

.ranking-card .cover-frame {
    aspect-ratio: 2 / 3;
    border-radius: 16px;
}

.ranking-info {
    display: grid;
    gap: 7px;
}

.ranking-info strong {
    font-size: 19px;
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 26px 0;
    color: #71717a;
    font-size: 14px;
}

.breadcrumb a {
    color: #e11d48;
    font-weight: 800;
}

.detail-hero {
    display: grid;
    grid-template-columns: 330px 1fr;
    gap: 36px;
    align-items: center;
    padding: 34px;
    border-radius: 38px;
    color: #ffffff;
    background:
        radial-gradient(circle at 82% 20%, rgba(255, 255, 255, 0.28), transparent 26rem),
        linear-gradient(135deg, #be123c, #db2777 48%, #f97316);
    box-shadow: var(--shadow);
}

.detail-poster {
    aspect-ratio: 2 / 3;
    border-radius: 30px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.32);
}

.detail-copy h1 {
    margin: 14px 0;
    font-size: clamp(34px, 5vw, 64px);
    line-height: 1;
    letter-spacing: -0.06em;
}

.detail-one-line {
    max-width: 760px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 18px;
    line-height: 1.85;
}

.detail-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    max-width: 720px;
    margin: 24px 0;
    padding: 0;
    list-style: none;
}

.detail-meta li {
    padding: 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.14);
}

.detail-meta span {
    display: block;
    margin-bottom: 6px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 12px;
}

.detail-meta strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.player-section {
    padding: 40px 0 0;
}

.video-shell {
    position: relative;
    overflow: hidden;
    border-radius: 34px;
    background: #09090b;
}

.video-shell video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #09090b;
}

.player-start {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    border: 0;
    color: #ffffff;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.42), rgba(136, 19, 55, 0.24));
    cursor: pointer;
}

.player-start span {
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    padding-left: 6px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 22px 60px rgba(225, 29, 72, 0.35);
    font-size: 36px;
}

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

.narrow-shell {
    max-width: 940px;
}

.detail-content h2 {
    margin: 0 0 12px;
    font-size: 30px;
    letter-spacing: -0.04em;
}

.detail-content h2:not(:first-child) {
    margin-top: 30px;
}

.detail-content p {
    margin: 0;
    color: #3f3f46;
    font-size: 17px;
    line-height: 2;
}

.is-hidden-card {
    display: none;
}

.no-results {
    grid-column: 1 / -1;
    padding: 28px;
    border-radius: 24px;
    color: #9f1239;
    background: #fff1f2;
    font-weight: 900;
    text-align: center;
}

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

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

    .hero-content,
    .split-layout,
    .ranking-layout,
    .detail-hero {
        grid-template-columns: 1fr;
    }

    .hero-poster,
    .detail-poster {
        width: min(340px, 100%);
    }

    .ranking-panel {
        order: -1;
    }
}

@media (max-width: 760px) {
    .header-inner {
        height: 64px;
    }

    .menu-toggle {
        display: grid;
        place-items: center;
    }

    .nav-links {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 72px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        border-radius: 24px;
        padding: 12px;
        box-shadow: var(--shadow);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links a {
        text-align: center;
    }

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

    .hero-content {
        gap: 28px;
        padding-top: 42px;
        padding-bottom: 108px;
    }

    .hero-copy p,
    .page-hero p,
    .detail-one-line {
        font-size: 16px;
    }

    .quick-search form,
    .search-page-form,
    .footer-inner,
    .detail-meta,
    .ranking-card a {
        grid-template-columns: 1fr;
    }

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

    .movie-card-compact .movie-card-link {
        grid-template-columns: 1fr;
    }

    .movie-card-compact .cover-frame {
        aspect-ratio: 2 / 3;
    }

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

    .section-heading {
        align-items: start;
        flex-direction: column;
    }

    .page-hero,
    .detail-hero {
        padding: 28px;
        border-radius: 30px;
    }

    .footer-links {
        justify-content: flex-start;
    }
}

@media (max-width: 520px) {
    .logo {
        font-size: 18px;
    }

    .movie-grid,
    .compact-grid,
    .page-grid,
    .category-grid,
    .category-overview {
        grid-template-columns: 1fr;
    }

    .hero-copy h1,
    .detail-copy h1,
    .page-hero h1 {
        letter-spacing: -0.04em;
    }

    .quick-search {
        margin-top: -28px;
    }
}
