:root {
    --bg: #fff7ed;
    --bg-soft: #fff1f2;
    --text: #1f2937;
    --muted: #6b7280;
    --card: rgba(255, 255, 255, 0.82);
    --line: rgba(255, 255, 255, 0.72);
    --brand: #f97316;
    --brand-2: #ec4899;
    --brand-3: #3b82f6;
    --shadow: 0 24px 70px rgba(249, 115, 22, 0.16);
    --radius: 28px;
    --max: 1240px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(236, 72, 153, 0.22), transparent 30rem),
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.18), transparent 32rem),
        linear-gradient(135deg, #fff7ed 0%, #fff1f2 48%, #eff6ff 100%);
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    max-width: var(--max);
    margin: 0 auto;
    padding: 18px 24px;
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-top: 0;
    border-radius: 0 0 30px 30px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 18px 45px rgba(148, 163, 184, 0.18);
    backdrop-filter: blur(20px);
}

.brand,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: -0.04em;
    background: linear-gradient(90deg, var(--brand-2), var(--brand));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand {
    font-size: 24px;
}

.brand-mark {
    display: inline-flex;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, var(--brand-2), var(--brand));
    box-shadow: 0 16px 35px rgba(236, 72, 153, 0.28);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.main-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 8px 13px;
    border-radius: 999px;
    color: #475569;
    font-size: 14px;
    font-weight: 700;
    transition: 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: #fff;
    background: linear-gradient(135deg, var(--brand-2), var(--brand));
    box-shadow: 0 12px 25px rgba(249, 115, 22, 0.22);
}

.nav-group {
    display: inline-flex;
    gap: 6px;
    flex-wrap: wrap;
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: 16px;
    border: 1px solid rgba(249, 115, 22, 0.18);
    background: #fff;
}

.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    border-radius: 999px;
    background: #fb7185;
}

main {
    width: min(var(--max), calc(100% - 32px));
    margin: 0 auto;
}

.home-hero {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: 28px;
    min-height: 650px;
    align-items: center;
    padding: 54px 0 40px;
}

.hero-heading {
    position: relative;
    z-index: 1;
    padding: 44px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 36px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(255, 245, 248, 0.72));
    box-shadow: var(--shadow);
    overflow: hidden;
}

.hero-heading::before,
.page-hero::before,
.hot-panel::before {
    content: "";
    position: absolute;
    width: 180px;
    height: 180px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.24), rgba(249, 115, 22, 0.18));
    filter: blur(8px);
    right: -60px;
    top: -60px;
}

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

h1,
h2,
h3 {
    margin: 0;
    line-height: 1.12;
    letter-spacing: -0.04em;
}

h1 {
    font-size: clamp(36px, 5vw, 66px);
}

h2 {
    font-size: clamp(24px, 3vw, 38px);
}

h3 {
    font-size: 20px;
}

p {
    color: var(--muted);
    line-height: 1.8;
}

.hero-search,
.filter-row {
    display: flex;
    gap: 12px;
    margin-top: 28px;
}

.hero-search input,
.filter-row input,
.filter-row select {
    min-width: 0;
    width: 100%;
    border: 1px solid rgba(251, 113, 133, 0.2);
    border-radius: 999px;
    padding: 14px 18px;
    color: #334155;
    background: rgba(255, 255, 255, 0.88);
    outline: none;
}

.hero-search input:focus,
.filter-row input:focus,
.filter-row select:focus {
    border-color: rgba(236, 72, 153, 0.52);
    box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.12);
}

.hero-search button,
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
    border: 0;
    border-radius: 999px;
    padding: 14px 22px;
    font-weight: 900;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hero-search button,
.btn.primary {
    color: #fff;
    background: linear-gradient(135deg, var(--brand-2), var(--brand));
    box-shadow: 0 18px 38px rgba(249, 115, 22, 0.26);
}

.btn.ghost {
    color: #f97316;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(249, 115, 22, 0.18);
}

.hero-search button:hover,
.btn:hover {
    transform: translateY(-2px);
}

.hero-stage {
    position: relative;
    min-height: 600px;
    border-radius: 42px;
    overflow: hidden;
    background: #111827;
    box-shadow: 0 34px 100px rgba(15, 23, 42, 0.28);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.03);
    transition: opacity 0.8s ease, transform 1.1s ease;
}

.hero-slide.is-active {
    opacity: 1;
    transform: scale(1);
}

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

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.35), rgba(15, 23, 42, 0.08)),
        linear-gradient(0deg, rgba(15, 23, 42, 0.78), transparent 52%);
}

.hero-content {
    position: absolute;
    left: 42px;
    right: 42px;
    bottom: 42px;
    max-width: 640px;
    color: #fff;
}

.hero-content h2 {
    margin-bottom: 16px;
    font-size: clamp(34px, 5vw, 60px);
}

.hero-content p {
    color: rgba(255, 255, 255, 0.82);
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.hero-dots {
    position: absolute;
    right: 30px;
    bottom: 30px;
    display: flex;
    gap: 8px;
}

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

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

.section-block,
.filter-panel,
.ranking-list,
.catalog-grid,
.detail-info {
    margin: 34px 0;
}

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

.section-head.left {
    align-items: center;
}

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

.text-link {
    color: var(--brand-2);
    font-weight: 900;
}

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

.category-tile,
.catalog-card,
.movie-card,
.hot-panel,
.filter-panel,
.ranking-row,
.detail-info,
.detail-side {
    border: 1px solid rgba(255, 255, 255, 0.76);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: 0 16px 44px rgba(148, 163, 184, 0.16);
    backdrop-filter: blur(18px);
}

.category-tile {
    padding: 16px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover,
.movie-card:hover,
.catalog-card:hover,
.ranking-row:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 60px rgba(249, 115, 22, 0.18);
}

.tile-covers {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 14px;
}

.tile-covers img {
    aspect-ratio: 2 / 3;
    width: 100%;
    border-radius: 14px;
    object-fit: cover;
    background: linear-gradient(135deg, #fdf2f8, #ffedd5);
}

.category-tile strong {
    display: block;
    font-size: 20px;
    margin-bottom: 8px;
}

.category-tile span {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
}

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

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

.search-grid,
.category-movie-grid {
    margin-top: 22px;
}

.movie-card {
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.poster {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: var(--radius) var(--radius) 18px 18px;
    background: linear-gradient(135deg, #fdf2f8, #ffedd5);
}

.poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.score {
    position: absolute;
    right: 10px;
    top: 10px;
    padding: 5px 9px;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--brand-2), var(--brand));
    font-size: 12px;
    font-weight: 900;
}

.card-body {
    padding: 16px;
}

.card-meta {
    margin: 0 0 8px;
    color: #fb7185;
    font-size: 12px;
    font-weight: 900;
}

.card-body h2,
.card-body h3 {
    display: -webkit-box;
    min-height: 2.2em;
    overflow: hidden;
    font-size: 18px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-body p {
    display: -webkit-box;
    min-height: 3.4em;
    overflow: hidden;
    margin: 10px 0 0;
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tag-list {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.tag-list span {
    padding: 5px 8px;
    border-radius: 999px;
    color: #be185d;
    background: rgba(252, 231, 243, 0.9);
    font-size: 12px;
    font-weight: 800;
}

.tag-list.large span {
    padding: 8px 12px;
    font-size: 14px;
}

.split-block {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 24px;
}

.hot-panel {
    position: sticky;
    top: 100px;
    align-self: start;
    padding: 18px;
    overflow: hidden;
}

.rank-item {
    display: grid;
    grid-template-columns: 38px 58px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(251, 113, 133, 0.12);
}

.rank-item img {
    width: 58px;
    height: 76px;
    border-radius: 14px;
    object-fit: cover;
    background: linear-gradient(135deg, #fdf2f8, #ffedd5);
}

.rank-no {
    color: #fb7185;
    font-weight: 900;
}

.rank-item strong,
.rank-item em {
    display: block;
}

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

.rank-item em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.rank-item b {
    color: #f97316;
}

.page-hero {
    position: relative;
    overflow: hidden;
    margin: 34px 0;
    padding: 48px;
    border-radius: 36px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 241, 242, 0.74)),
        radial-gradient(circle at bottom right, rgba(59, 130, 246, 0.16), transparent 24rem);
    box-shadow: var(--shadow);
}

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

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

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

.catalog-card {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 20px;
    padding: 18px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.catalog-cover img {
    width: 150px;
    aspect-ratio: 2 / 3;
    border-radius: 24px;
    object-fit: cover;
    background: linear-gradient(135deg, #fdf2f8, #ffedd5);
}

.inline-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.inline-links a {
    padding: 7px 10px;
    border-radius: 999px;
    color: #be185d;
    background: rgba(252, 231, 243, 0.85);
    font-size: 13px;
    font-weight: 800;
}

.filter-panel {
    padding: 20px;
}

.filter-row select {
    max-width: 180px;
}

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

.ranking-row {
    display: grid;
    grid-template-columns: 90px 54px minmax(0, 1fr) 60px;
    gap: 18px;
    align-items: center;
    padding: 16px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ranking-poster img {
    width: 90px;
    height: 120px;
    border-radius: 18px;
    object-fit: cover;
    background: linear-gradient(135deg, #fdf2f8, #ffedd5);
}

.ranking-number {
    color: #fb7185;
    font-size: 28px;
    font-weight: 900;
}

.ranking-row h2 {
    font-size: 24px;
}

.ranking-row p {
    margin: 8px 0 0;
}

.ranking-score {
    color: #f97316;
    font-size: 24px;
}

.breadcrumb {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 30px 0 16px;
    color: var(--muted);
    font-weight: 800;
}

.breadcrumb a {
    color: #ec4899;
}

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

.player-card {
    position: relative;
    overflow: hidden;
    border-radius: 36px;
    background: #0f172a;
    box-shadow: 0 34px 100px rgba(15, 23, 42, 0.25);
}

.movie-video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #0f172a;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    color: #fff;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.74), rgba(15, 23, 42, 0.25));
    cursor: pointer;
}

.play-overlay span {
    display: inline-flex;
    width: 82px;
    height: 82px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--brand-2), var(--brand));
    box-shadow: 0 20px 45px rgba(249, 115, 22, 0.35);
    font-size: 34px;
}

.player-card.is-playing .play-overlay {
    display: none;
}

.detail-side {
    padding: 16px;
}

.detail-poster {
    width: 100%;
    border-radius: 24px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    background: linear-gradient(135deg, #fdf2f8, #ffedd5);
}

.detail-actions {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.detail-info {
    padding: 34px;
}

.detail-info h1 {
    max-width: 900px;
}

.detail-one-line {
    color: #374151;
    font-size: 20px;
    font-weight: 800;
}

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

.detail-meta span {
    padding: 9px 12px;
    border-radius: 999px;
    color: #9f1239;
    background: rgba(255, 228, 230, 0.78);
    font-weight: 800;
}

.detail-info h2 {
    margin-top: 30px;
    font-size: 28px;
}

.site-footer {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 24px;
    width: min(var(--max), calc(100% - 32px));
    margin: 60px auto 0;
    padding: 34px 24px 42px;
    border-top: 1px solid rgba(251, 113, 133, 0.16);
}

.footer-logo {
    font-size: 24px;
}

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

.footer-links a {
    padding: 8px 12px;
    border-radius: 999px;
    color: #475569;
    background: rgba(255, 255, 255, 0.64);
    font-weight: 800;
}

.is-hidden {
    display: none !important;
}

@media (max-width: 1180px) {
    .home-hero,
    .split-block,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .hot-panel {
        position: static;
    }

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

@media (max-width: 820px) {
    .site-header {
        width: calc(100% - 20px);
        margin: 0 10px;
        padding: 14px;
    }

    .menu-toggle {
        display: block;
    }

    .main-nav {
        position: absolute;
        top: 74px;
        left: 0;
        right: 0;
        display: none;
        justify-content: flex-start;
        padding: 16px;
        border-radius: 24px;
        background: rgba(255, 255, 255, 0.94);
        box-shadow: 0 24px 70px rgba(15, 23, 42, 0.16);
    }

    .main-nav.is-open {
        display: flex;
    }

    .home-hero {
        min-height: auto;
        padding-top: 28px;
    }

    .hero-heading,
    .page-hero,
    .detail-info {
        padding: 26px;
    }

    .hero-stage {
        min-height: 520px;
    }

    .hero-content {
        left: 24px;
        right: 24px;
        bottom: 28px;
    }

    .hero-search,
    .filter-row,
    .site-footer {
        flex-direction: column;
        display: flex;
    }

    .filter-row select {
        max-width: none;
    }

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

    .catalog-card,
    .ranking-row {
        grid-template-columns: 1fr;
    }

    .catalog-cover img,
    .ranking-poster img {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }

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

@media (max-width: 520px) {
    main {
        width: min(100% - 20px, var(--max));
    }

    .brand {
        font-size: 19px;
    }

    .brand-mark {
        width: 36px;
        height: 36px;
    }

    h1 {
        font-size: 34px;
    }

    .hero-stage {
        min-height: 470px;
        border-radius: 30px;
    }

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

    .rank-item {
        grid-template-columns: 32px 48px minmax(0, 1fr);
    }

    .rank-item b {
        grid-column: 3;
    }

    .detail-meta {
        flex-direction: column;
    }
}
