:root {
    --text: #111827;
    --muted: #6b7280;
    --soft: #f9fafb;
    --line: #e5e7eb;
    --pink: #ec4899;
    --pink-dark: #db2777;
    --yellow: #f59e0b;
    --green: #22c55e;
    --shadow: 0 18px 45px rgba(17, 24, 39, 0.10);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background: #ffffff;
}

img,
video {
    max-width: 100%;
}

img {
    display: block;
}

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(229, 231, 235, 0.9);
    box-shadow: 0 8px 24px rgba(17, 24, 39, 0.04);
    backdrop-filter: blur(18px);
}

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

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    white-space: nowrap;
}

.logo-mark {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    border-radius: 999px;
    background: linear-gradient(135deg, #facc15, #f9a8d4, #86efac);
    box-shadow: 0 10px 24px rgba(236, 72, 153, 0.24);
    transition: transform 0.25s ease;
}

.site-logo:hover .logo-mark {
    transform: scale(1.08) rotate(6deg);
}

.logo-text {
    font-size: 22px;
    line-height: 1;
    color: transparent;
    background: linear-gradient(90deg, #ca8a04, #ec4899, #16a34a);
    -webkit-background-clip: text;
    background-clip: text;
}

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

.nav-link,
.mobile-nav-link {
    font-size: 15px;
    color: #374151;
    font-weight: 600;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: var(--pink-dark);
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    color: #111827;
    background: #f3f4f6;
    cursor: pointer;
}

.mobile-panel {
    display: none;
    border-top: 1px solid var(--line);
    background: #ffffff;
}

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

.mobile-nav {
    display: grid;
    gap: 12px;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 22px;
}

.hero {
    position: relative;
    min-height: 600px;
    overflow: hidden;
    background: linear-gradient(135deg, #fef3c7 0%, #fce7f3 50%, #dcfce7 100%);
}

.hero-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.55;
    background-image: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.95) 0, rgba(255, 255, 255, 0) 30%), radial-gradient(circle at 80% 70%, rgba(236, 72, 153, 0.18) 0, rgba(236, 72, 153, 0) 34%), linear-gradient(rgba(255, 255, 255, 0.32) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.32) 1px, transparent 1px);
    background-size: auto, auto, 60px 60px, 60px 60px;
}

.hero-inner {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
}

.hero-slide {
    display: none;
    width: 100%;
    grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.72fr);
    gap: 56px;
    align-items: center;
    animation: heroIn 0.55s ease both;
}

.hero-slide.is-active {
    display: grid;
}

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

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 8px 14px;
    border-radius: 999px;
    color: var(--pink-dark);
    background: rgba(252, 231, 243, 0.88);
    font-size: 14px;
    font-weight: 700;
}

.hero h1,
.page-hero h1 {
    margin: 0 0 22px;
    font-size: clamp(42px, 7vw, 68px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.hero p,
.page-hero p {
    margin: 0 0 28px;
    color: #374151;
    font-size: 20px;
    line-height: 1.75;
}

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

.hero-tags span,
.tag-cloud span,
.footer-tags span {
    display: inline-flex;
    padding: 7px 12px;
    border-radius: 999px;
    color: #374151;
    background: rgba(255, 255, 255, 0.68);
    border: 1px solid rgba(255, 255, 255, 0.8);
    font-size: 13px;
    font-weight: 600;
}

.hero-actions,
.detail-actions,
.center-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    margin-top: 28px;
}

.primary-button,
.secondary-button,
.home-search button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 24px;
    border: 0;
    border-radius: 999px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button,
.home-search button {
    color: #ffffff;
    background: linear-gradient(90deg, #ec4899, #f59e0b);
    box-shadow: 0 16px 28px rgba(236, 72, 153, 0.22);
}

.secondary-button {
    color: #111827;
    background: #ffffff;
    box-shadow: 0 14px 30px rgba(17, 24, 39, 0.08);
}

.primary-button:hover,
.secondary-button:hover,
.home-search button:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 18px 38px rgba(236, 72, 153, 0.24);
}

.hero-visual {
    position: relative;
    display: block;
    width: min(360px, 100%);
    justify-self: center;
    border: 12px solid rgba(255, 255, 255, 0.72);
    border-radius: 34px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transform: rotate(2deg);
    background: rgba(255, 255, 255, 0.35);
}

.hero-visual img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: transform 0.55s ease;
}

.hero-visual:hover img {
    transform: scale(1.06);
}

.hero-play,
.play-badge {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--pink);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 12px 24px rgba(17, 24, 39, 0.14);
}

.hero-play {
    left: 24px;
    bottom: 24px;
    width: 64px;
    height: 64px;
    border-radius: 999px;
    font-size: 28px;
}

.hero-score {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 8px 12px;
    border-radius: 999px;
    color: #111827;
    background: #facc15;
    font-weight: 900;
}

.hero-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 26px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.hero-dot {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.20);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
    width: 34px;
    background: var(--pink);
}

.search-strip {
    padding: 34px 0;
    background: #ffffff;
    border-bottom: 1px solid var(--line);
}

.search-strip-inner {
    display: grid;
    grid-template-columns: 1fr minmax(320px, 470px);
    gap: 28px;
    align-items: center;
}

.search-strip h2 {
    margin: 0 0 8px;
    font-size: 28px;
}

.search-strip p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.home-search {
    display: flex;
    gap: 10px;
    padding: 8px;
    border-radius: 999px;
    background: #f3f4f6;
}

.home-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    padding: 0 14px;
    color: #111827;
    background: transparent;
}

.section {
    padding-top: 72px;
    padding-bottom: 72px;
}

.gradient-section {
    background: linear-gradient(90deg, #f0fdf4, #fefce8);
}

.pastel-section {
    background: linear-gradient(135deg, #fce7f3, #fef3c7, #dcfce7);
}

.section-heading {
    max-width: 720px;
    margin: 0 auto 38px;
    text-align: center;
}

.left-heading {
    margin-left: 0;
    text-align: left;
}

.section-heading h2 {
    margin: 0 0 12px;
    font-size: clamp(30px, 5vw, 44px);
    line-height: 1.12;
    letter-spacing: -0.03em;
}

.section-heading p {
    margin: 0;
    color: var(--muted);
    line-height: 1.75;
}

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

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

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

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

.movie-card {
    overflow: hidden;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 6px 20px rgba(17, 24, 39, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 36px rgba(17, 24, 39, 0.14);
}

.movie-poster {
    position: relative;
    overflow: hidden;
    background: #f3f4f6;
}

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

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

.play-badge {
    top: 14px;
    right: 14px;
    width: 44px;
    height: 44px;
    border-radius: 999px;
}

.region-badge,
.rank-mark {
    position: absolute;
    left: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
}

.region-badge {
    bottom: 12px;
    background: rgba(236, 72, 153, 0.92);
}

.rank-mark {
    top: 12px;
    background: rgba(17, 24, 39, 0.82);
}

.movie-info {
    padding: 18px;
}

.movie-info h3 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.35;
    transition: color 0.2s ease;
}

.movie-card:hover h3 {
    color: var(--pink-dark);
}

.movie-meta,
.genre-line,
.card-desc {
    margin: 0;
}

.movie-meta {
    color: var(--pink-dark);
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 8px;
}

.genre-line {
    color: #4b5563;
    font-size: 13px;
    margin-bottom: 8px;
}

.card-desc {
    display: -webkit-box;
    min-height: 43px;
    overflow: hidden;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.card-stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 14px;
    color: #4b5563;
    font-size: 13px;
    font-weight: 700;
}

.movie-card-small .movie-info {
    padding: 13px;
}

.movie-card-small .movie-info h3 {
    font-size: 15px;
}

.movie-card-small .card-desc {
    display: none;
}

.center-actions {
    justify-content: center;
}

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

.category-card {
    display: block;
    padding: 18px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 10px 28px rgba(17, 24, 39, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 38px rgba(17, 24, 39, 0.12);
}

.category-thumbs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.category-thumbs img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 14px;
    background: #f3f4f6;
}

.category-card h3,
.category-card h2 {
    margin: 0 0 9px;
    font-size: 20px;
}

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

.large-category span {
    display: inline-flex;
    margin-top: 14px;
    color: var(--pink-dark);
    font-weight: 800;
}

.page-hero {
    padding: 88px 0;
    background: linear-gradient(135deg, #fef3c7, #fce7f3, #dcfce7);
}

.slim-hero,
.category-hero,
.rank-hero,
.search-hero {
    position: relative;
    overflow: hidden;
}

.filter-bar {
    display: grid;
    grid-template-columns: auto minmax(220px, 1fr) minmax(140px, 220px) minmax(140px, 220px);
    gap: 12px;
    align-items: center;
    margin-bottom: 30px;
    padding: 12px;
    border-radius: 22px;
    background: #f9fafb;
    border: 1px solid var(--line);
}

.filter-bar label {
    color: #111827;
    font-weight: 900;
    padding: 0 8px;
}

.filter-bar input,
.filter-bar select {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 999px;
    outline: 0;
    padding: 0 16px;
    color: #111827;
    background: #ffffff;
}

.movie-card[hidden],
.rank-row[hidden] {
    display: none;
}

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

.rank-row a {
    display: grid;
    grid-template-columns: 62px 62px minmax(160px, 1fr) minmax(180px, 1fr) 80px;
    gap: 16px;
    align-items: center;
    min-height: 78px;
    padding: 10px 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 6px 20px rgba(17, 24, 39, 0.05);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-row a:hover {
    transform: translateX(6px);
    border-color: rgba(236, 72, 153, 0.35);
}

.rank-number {
    color: var(--pink-dark);
    font-size: 22px;
    font-weight: 900;
}

.rank-row img {
    width: 54px;
    height: 72px;
    object-fit: cover;
    border-radius: 10px;
    background: #f3f4f6;
}

.rank-title {
    font-weight: 900;
}

.rank-meta {
    color: var(--muted);
    font-size: 14px;
}

.rank-score {
    color: #ca8a04;
    font-weight: 900;
    text-align: right;
}

.detail-top {
    padding: 62px 0;
    background: linear-gradient(135deg, #fff7ed, #fdf2f8, #f0fdf4);
}

.detail-top-grid {
    display: grid;
    grid-template-columns: minmax(240px, 330px) minmax(0, 1fr);
    gap: 44px;
    align-items: center;
}

.detail-poster {
    position: relative;
    overflow: hidden;
    border: 12px solid rgba(255, 255, 255, 0.75);
    border-radius: 32px;
    box-shadow: var(--shadow);
    background: #f3f4f6;
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.detail-poster span {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 8px 12px;
    border-radius: 999px;
    background: #facc15;
    color: #111827;
    font-weight: 900;
}

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

.breadcrumb a {
    color: var(--pink-dark);
    font-weight: 700;
}

.detail-intro h1 {
    margin: 0 0 18px;
    font-size: clamp(38px, 6vw, 62px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.detail-one-line {
    margin: 0;
    color: #374151;
    font-size: 20px;
    line-height: 1.75;
}

.detail-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.detail-badges span {
    padding: 8px 12px;
    border-radius: 999px;
    color: #374151;
    background: rgba(255, 255, 255, 0.75);
    font-size: 14px;
    font-weight: 800;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #111827;
    box-shadow: var(--shadow);
}

.player-shell video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
    object-fit: cover;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle, rgba(17, 24, 39, 0.10), rgba(17, 24, 39, 0.72));
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover span {
    width: 86px;
    height: 86px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--pink-dark);
    background: rgba(255, 255, 255, 0.94);
    font-size: 34px;
    box-shadow: 0 18px 44px rgba(17, 24, 39, 0.22);
}

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

.detail-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
}

.detail-main {
    display: grid;
    gap: 18px;
}

.story-card,
.side-panel {
    padding: 28px;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 8px 28px rgba(17, 24, 39, 0.06);
}

.soft-card,
.side-panel {
    background: linear-gradient(135deg, #fffbeb, #fdf2f8, #f0fdf4);
}

.story-card h2,
.side-panel h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

.story-card p {
    margin: 0;
    color: #4b5563;
    line-height: 1.9;
}

.detail-side {
    align-self: start;
    position: sticky;
    top: 90px;
}

.side-panel dl {
    display: grid;
    gap: 12px;
    margin: 0;
}

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

.side-panel dd {
    margin: 0 0 8px;
    color: #111827;
    font-weight: 800;
}

.site-footer {
    margin-top: 30px;
    background: #f9fafb;
    border-top: 1px solid var(--line);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 34px;
    padding: 46px 0;
}

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

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

.site-footer h2 {
    margin: 0 0 14px;
    font-size: 18px;
}

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

.site-footer a {
    color: var(--muted);
}

.site-footer a:hover {
    color: var(--pink-dark);
}

.footer-tags span {
    background: #ffffff;
}

.footer-bottom {
    padding: 18px 0;
    color: var(--muted);
    text-align: center;
    border-top: 1px solid var(--line);
}

@keyframes heroIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

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

    .mobile-menu-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .hero,
    .hero-inner {
        min-height: auto;
    }

    .hero-inner {
        padding-top: 56px;
        padding-bottom: 76px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        gap: 34px;
    }

    .hero-visual {
        width: min(300px, 100%);
        justify-self: start;
    }

    .search-strip-inner,
    .detail-top-grid,
    .detail-content {
        grid-template-columns: 1fr;
    }

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

    .detail-side {
        position: static;
    }

    .rank-row a {
        grid-template-columns: 44px 52px 1fr 72px;
    }

    .rank-meta {
        display: none;
    }
}

@media (max-width: 620px) {
    .container {
        width: min(100% - 22px, 1180px);
    }

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

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

    .home-search {
        display: grid;
        border-radius: 22px;
    }

    .home-search input {
        min-height: 44px;
    }

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

    .movie-info {
        padding: 13px;
    }

    .movie-info h3 {
        font-size: 15px;
    }

    .card-desc {
        display: none;
    }

    .section {
        padding-top: 52px;
        padding-bottom: 52px;
    }

    .page-hero {
        padding: 60px 0;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}
