:root {
    --rose-50: #fff1f2;
    --rose-100: #ffe4e6;
    --rose-200: #fecdd3;
    --rose-400: #fb7185;
    --rose-500: #f43f5e;
    --rose-600: #e11d48;
    --pink-50: #fdf2f8;
    --pink-500: #ec4899;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-500: #6b7280;
    --gray-700: #374151;
    --gray-900: #111827;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px rgb(15 23 42 / 0.08);
    --shadow-md: 0 12px 30px rgb(15 23 42 / 0.10);
    --shadow-xl: 0 25px 55px rgb(15 23 42 / 0.18);
    --radius-lg: 18px;
    --radius-xl: 24px;
    --radius-2xl: 32px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--gray-900);
    background: linear-gradient(180deg, #ffffff 0%, #fff7f8 48%, #ffffff 100%);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgb(229 231 235 / 0.9);
    background: rgb(255 255 255 / 0.94);
    backdrop-filter: blur(14px);
    box-shadow: var(--shadow-sm);
}

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

.site-logo,
.footer-logo {
    font-size: 26px;
    font-weight: 900;
    letter-spacing: -0.04em;
    background: linear-gradient(90deg, var(--rose-500), var(--pink-500), var(--rose-400));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

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

.nav-link {
    color: var(--gray-700);
    font-weight: 700;
    transition: color 0.2s ease;
}

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

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

.header-search input,
.mobile-search input,
.search-line input,
.filter-line select {
    min-height: 42px;
    border: 1px solid var(--gray-200);
    border-radius: 999px;
    background: var(--white);
    color: var(--gray-900);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
    width: 200px;
    padding: 0 18px;
}

.header-search input:focus,
.mobile-search input:focus,
.search-line input:focus,
.filter-line select:focus {
    border-color: transparent;
    box-shadow: 0 0 0 3px rgb(244 63 94 / 0.25);
}

.header-search button,
.mobile-search button,
.search-line button {
    min-height: 42px;
    border: 0;
    border-radius: 999px;
    padding: 0 18px;
    color: var(--white);
    background: linear-gradient(90deg, var(--rose-500), var(--pink-500));
    font-weight: 800;
}

.menu-button {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    background: var(--rose-50);
    padding: 10px;
}

.menu-button span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: var(--rose-600);
    border-radius: 999px;
}

.mobile-panel {
    display: none;
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 16px 0 20px;
    border-top: 1px solid var(--gray-200);
}

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

.mobile-search {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.mobile-search input {
    flex: 1;
    padding: 0 16px;
}

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

.mobile-nav-link {
    color: var(--gray-700);
    font-weight: 800;
}

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

.hero-section {
    position: relative;
    min-height: 620px;
    margin: 32px auto 72px;
    border-radius: var(--radius-2xl);
    overflow: hidden;
    background: linear-gradient(135deg, #fff1f2 0%, #fdf2f8 44%, #fff 100%);
    box-shadow: var(--shadow-xl);
}

.hero-glow {
    position: absolute;
    inset: -20% auto auto -10%;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    background: radial-gradient(circle, rgb(244 63 94 / 0.22), transparent 62%);
}

.hero-carousel {
    position: relative;
    min-height: 620px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
    align-items: center;
    gap: 44px;
    padding: 64px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(18px);
    transition: opacity 0.45s ease, transform 0.45s ease;
}

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

.hero-kicker,
.section-eyebrow {
    margin: 0 0 10px;
    color: var(--rose-500);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero-copy h1 {
    margin: 0;
    max-width: 760px;
    font-size: clamp(40px, 7vw, 78px);
    line-height: 0.98;
    letter-spacing: -0.07em;
}

.hero-copy p {
    max-width: 640px;
    margin: 24px 0 0;
    color: var(--gray-700);
    font-size: 19px;
}

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

.hero-tags {
    margin-top: 24px;
}

.hero-tags span,
.tag-row span,
.detail-tags a,
.poster-badge {
    border-radius: 999px;
    background: rgb(255 255 255 / 0.78);
    color: var(--rose-600);
    font-size: 12px;
    font-weight: 800;
    padding: 6px 11px;
    box-shadow: 0 8px 18px rgb(244 63 94 / 0.10);
}

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

.button-primary,
.button-secondary,
.text-link,
.category-link,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.button-primary {
    min-height: 48px;
    padding: 0 24px;
    color: var(--white);
    background: linear-gradient(90deg, var(--rose-500), var(--pink-500));
    box-shadow: 0 16px 30px rgb(244 63 94 / 0.25);
}

.button-secondary {
    min-height: 48px;
    padding: 0 24px;
    color: var(--rose-600);
    background: rgb(255 255 255 / 0.78);
    border: 1px solid rgb(255 255 255 / 0.7);
    backdrop-filter: blur(10px);
}

.button-primary:hover,
.button-secondary:hover,
.movie-card:hover,
.category-tile:hover,
.category-card-large:hover {
    transform: translateY(-4px);
}

.hero-poster {
    position: relative;
    display: block;
    min-height: 440px;
    border-radius: 32px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    transform: rotate(1deg);
}

.hero-poster img {
    width: 100%;
    height: 100%;
    min-height: 440px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--rose-100), var(--pink-50));
}

.hero-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgb(17 24 39 / 0.35));
}

.hero-controls {
    position: absolute;
    left: 64px;
    bottom: 42px;
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: var(--rose-200);
    transition: width 0.2s ease, background 0.2s ease;
}

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

.section-panel,
.search-panel,
.player-section,
.article-panel {
    margin-bottom: 72px;
}

.section-panel {
    border-radius: var(--radius-2xl);
}

.soft-panel,
.ranking-panel,
.search-panel,
.article-panel {
    padding: 34px;
    background: linear-gradient(135deg, rgb(255 241 242 / 0.85), rgb(253 242 248 / 0.78));
}

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

.section-heading h2,
.page-hero h1,
.article-panel h2 {
    margin: 0;
    font-size: clamp(26px, 4vw, 38px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.section-more,
.text-link {
    color: var(--rose-500);
}

.section-more:hover,
.text-link:hover,
.category-link:hover {
    color: var(--rose-700);
}

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl);
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    border-color: var(--rose-200);
    box-shadow: var(--shadow-md);
}

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

.featured-card .poster-link {
    aspect-ratio: 16 / 10;
}

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

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

.poster-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    background: rgb(255 255 255 / 0.88);
}

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

.movie-title {
    display: -webkit-box;
    min-height: 2.9em;
    overflow: hidden;
    color: var(--gray-900);
    font-size: 18px;
    font-weight: 900;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-title:hover {
    color: var(--rose-500);
}

.movie-meta,
.movie-desc {
    margin: 8px 0 0;
    color: var(--gray-500);
    font-size: 14px;
}

.movie-desc {
    display: -webkit-box;
    min-height: 3.1em;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tag-row {
    margin-top: 14px;
}

.tag-row span {
    background: var(--rose-50);
    box-shadow: none;
}

.card-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 18px;
}

.category-link {
    color: var(--gray-500);
    font-size: 13px;
}

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

.category-tile,
.category-card-large {
    position: relative;
    min-height: 170px;
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: var(--gray-900);
    box-shadow: var(--shadow-md);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-tile img,
.category-card-large img {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
    object-fit: cover;
    opacity: 0.68;
}

.category-tile::after,
.category-card-large::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent, rgb(17 24 39 / 0.82));
}

.category-tile span,
.category-card-large span {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 20px;
    z-index: 1;
    color: var(--white);
}

.category-tile strong,
.category-card-large strong {
    display: block;
    font-size: 21px;
    font-weight: 900;
}

.category-tile em,
.category-card-large em {
    display: block;
    margin-top: 6px;
    color: rgb(255 255 255 / 0.78);
    font-style: normal;
    font-size: 14px;
}

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

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

.rank-row {
    display: grid;
    grid-template-columns: 42px 58px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    padding: 12px;
    border: 1px solid rgb(255 255 255 / 0.8);
    border-radius: 20px;
    background: rgb(255 255 255 / 0.72);
    transition: background 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
    transform: translateY(-2px);
    background: var(--white);
}

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

.rank-row img {
    width: 58px;
    height: 76px;
    object-fit: cover;
    border-radius: 14px;
    background: var(--rose-100);
}

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

.rank-info strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 900;
}

.rank-info em {
    margin-top: 4px;
    overflow: hidden;
    color: var(--gray-500);
    font-size: 13px;
    font-style: normal;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.page-hero {
    margin: 32px 0 52px;
    padding: 52px;
    border-radius: var(--radius-2xl);
    background: linear-gradient(135deg, var(--rose-50), var(--pink-50));
    box-shadow: var(--shadow-md);
}

.compact-hero p,
.category-hero p {
    max-width: 780px;
    margin: 14px 0 0;
    color: var(--gray-700);
    font-size: 18px;
}

.search-line {
    display: flex;
    gap: 12px;
}

.search-line input {
    flex: 1;
    padding: 0 18px;
}

.filter-line {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.filter-line select {
    width: 100%;
    padding: 0 16px;
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin: 34px 0 24px;
    color: var(--gray-500);
    font-size: 14px;
}

.breadcrumb a {
    color: var(--rose-500);
    font-weight: 800;
}

.detail-layout {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 42px;
    align-items: start;
    margin-bottom: 62px;
}

.detail-poster-card {
    position: sticky;
    top: 92px;
    overflow: hidden;
    border-radius: var(--radius-2xl);
    background: var(--white);
    box-shadow: var(--shadow-xl);
    padding: 16px;
}

.detail-poster-card img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 24px;
    background: var(--rose-100);
}

.full-button {
    width: 100%;
    margin-top: 16px;
}

.detail-info {
    min-height: 470px;
    padding: 42px;
    border-radius: var(--radius-2xl);
    background: linear-gradient(135deg, var(--white), var(--rose-50));
    box-shadow: var(--shadow-md);
}

.detail-info h1 {
    margin: 0;
    font-size: clamp(36px, 6vw, 66px);
    line-height: 1;
    letter-spacing: -0.06em;
}

.detail-one-line {
    max-width: 800px;
    margin: 22px 0 0;
    color: var(--gray-700);
    font-size: 20px;
}

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

.detail-meta-grid div {
    border: 1px solid var(--gray-200);
    border-radius: 18px;
    background: rgb(255 255 255 / 0.82);
    padding: 16px;
}

.detail-meta-grid dt {
    color: var(--gray-500);
    font-size: 13px;
}

.detail-meta-grid dd {
    margin: 4px 0 0;
    font-weight: 900;
}

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

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

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-2xl);
    background: #09090b;
    box-shadow: var(--shadow-xl);
    aspect-ratio: 16 / 9;
}

.movie-player,
.player-cover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.movie-player {
    background: #09090b;
}

.player-cover {
    border: 0;
    padding: 0;
    opacity: 1;
    overflow: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

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

.player-cover-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgb(9 9 11 / 0.22), rgb(9 9 11 / 0.72));
}

.player-button {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    color: var(--rose-500);
    background: rgb(255 255 255 / 0.92);
    font-size: 34px;
    line-height: 1;
    box-shadow: 0 20px 40px rgb(0 0 0 / 0.28);
}

.article-panel h2 {
    margin-top: 0;
    margin-bottom: 14px;
}

.article-panel h2 + p {
    margin-top: 0;
}

.article-panel p {
    color: var(--gray-700);
    font-size: 18px;
}

.article-panel p + h2 {
    margin-top: 34px;
}

.site-footer {
    margin-top: 90px;
    border-top: 1px solid var(--gray-200);
    background: linear-gradient(135deg, var(--gray-50), var(--gray-100));
}

.footer-inner {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 44px 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.8fr);
    gap: 38px;
}

.footer-inner p {
    max-width: 650px;
    margin: 12px 0 0;
    color: var(--gray-500);
}

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

.footer-links a {
    color: var(--gray-600);
    font-weight: 800;
}

.footer-links a:hover {
    color: var(--rose-500);
}

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

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

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

    .hero-poster {
        display: none;
    }

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

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

    .menu-button {
        display: block;
    }

    .header-inner {
        height: 64px;
    }

    .hero-section,
    .hero-carousel {
        min-height: 560px;
    }

    .hero-section {
        margin-top: 20px;
    }

    .hero-slide {
        padding: 36px 26px 72px;
    }

    .hero-controls {
        left: 26px;
        bottom: 30px;
    }

    .movie-grid,
    .featured-grid,
    .category-grid,
    .category-overview-grid,
    .rank-list,
    .wide-rank-list,
    .filter-line,
    .detail-layout,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .detail-poster-card {
        position: static;
    }

    .detail-info,
    .page-hero,
    .soft-panel,
    .ranking-panel,
    .search-panel,
    .article-panel {
        padding: 24px;
    }

    .search-line,
    .mobile-search,
    .section-heading {
        align-items: stretch;
        flex-direction: column;
    }

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

@media (max-width: 540px) {
    main,
    .header-inner,
    .mobile-panel,
    .footer-inner {
        width: min(100% - 20px, 1200px);
    }

    .site-logo,
    .footer-logo {
        font-size: 22px;
    }

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

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

    .hero-actions,
    .page-hero-actions {
        flex-direction: column;
    }

    .button-primary,
    .button-secondary {
        width: 100%;
    }

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

    .player-button {
        width: 66px;
        height: 66px;
        font-size: 26px;
    }
}
