* {
    box-sizing: border-box;
}

:root {
    --pink: #ec4899;
    --pink-light: #f9a8d4;
    --purple: #a855f7;
    --purple-light: #c084fc;
    --orange-soft: #fff4e6;
    --rose-soft: #ffe8e0;
    --paper: rgba(255, 255, 255, 0.92);
    --text: #1f2937;
    --muted: #6b7280;
    --line: rgba(236, 72, 153, 0.16);
    --shadow: 0 18px 40px rgba(31, 41, 55, 0.12);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background: linear-gradient(135deg, #fff4e6 0%, #ffe8e0 46%, #f8e8ee 100%);
    line-height: 1.6;
}

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

a {
    color: inherit;
    text-decoration: none;
    transition: transform 0.25s ease, color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

button,
input {
    font: inherit;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    box-shadow: 0 8px 24px rgba(31, 41, 55, 0.08);
    border-bottom: 1px solid var(--line);
}

.header-inner {
    max-width: 1280px;
    height: 64px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 22px;
}

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 800;
    white-space: nowrap;
    background: linear-gradient(90deg, var(--pink-light), var(--purple-light));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.logo-icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    font-size: 14px;
    background: linear-gradient(135deg, var(--pink-light), var(--purple-light));
    box-shadow: 0 10px 24px rgba(236, 72, 153, 0.28);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.desktop-nav a {
    color: #4b5563;
    font-weight: 650;
    white-space: nowrap;
}

.desktop-nav a:hover,
.footer-links a:hover {
    color: var(--pink);
    transform: translateY(-2px);
}

.top-search {
    position: relative;
    flex: 0 0 250px;
}

.top-search input,
.mobile-panel input,
.quick-search-panel input,
.search-page-form input,
.catalog-filter input {
    width: 100%;
    border: 2px solid #fbcfe8;
    border-radius: 999px;
    background: #ffffff;
    color: var(--text);
    outline: none;
    padding: 10px 16px;
    transition: border 0.25s ease, box-shadow 0.25s ease;
}

.top-search input:focus,
.mobile-panel input:focus,
.quick-search-panel input:focus,
.search-page-form input:focus,
.catalog-filter input:focus {
    border-color: var(--pink-light);
    box-shadow: 0 0 0 4px rgba(244, 114, 182, 0.16);
}

.menu-button {
    display: none;
    border: 0;
    color: var(--text);
    background: #fdf2f8;
    border-radius: 12px;
    padding: 8px 12px;
    cursor: pointer;
}

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

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

.mobile-panel nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.mobile-panel a {
    padding: 10px 12px;
    background: #fdf2f8;
    border-radius: 14px;
    color: #4b5563;
    font-weight: 700;
}

.main-content {
    padding-top: 64px;
}

.hero-carousel {
    position: relative;
    height: 600px;
    overflow: hidden;
    background: #111827;
    margin-bottom: 48px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 1s ease;
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
}

.hero-slide.is-active img {
    animation: heroZoom 7s ease forwards;
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.52) 48%, rgba(0, 0, 0, 0.12));
}

.hero-content {
    position: absolute;
    left: 50%;
    bottom: 72px;
    width: min(1180px, calc(100% - 48px));
    transform: translateX(-50%);
    color: #ffffff;
}

.hero-kicker,
.detail-kicker,
.section-title span,
.page-hero span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--pink-light);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-content h1 {
    max-width: 780px;
    margin: 14px 0 18px;
    font-size: clamp(42px, 7vw, 72px);
    line-height: 1.02;
    letter-spacing: -0.04em;
}

.hero-content p {
    max-width: 760px;
    margin: 0 0 20px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 18px;
}

.hero-tags,
.tag-list,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags span,
.tag-list span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 12px;
    color: #be185d;
    background: #fdf2f8;
    font-size: 13px;
    font-weight: 700;
}

.hero-tags span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
}

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

.primary-button,
.ghost-button,
.quick-search-panel button,
.search-page-form button,
.catalog-filter button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    padding: 12px 22px;
    font-weight: 800;
    cursor: pointer;
}

.primary-button,
.quick-search-panel button,
.search-page-form button,
.catalog-filter button {
    color: #ffffff;
    background: linear-gradient(135deg, var(--pink), var(--purple));
    box-shadow: 0 12px 26px rgba(236, 72, 153, 0.26);
}

.ghost-button {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
}

.primary-button:hover,
.ghost-button:hover,
.quick-search-panel button:hover,
.search-page-form button:hover,
.catalog-filter button:hover {
    transform: translateY(-3px);
}

.hero-control {
    position: absolute;
    top: 50%;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    font-size: 34px;
    line-height: 1;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    cursor: pointer;
    transform: translateY(-50%);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 24px;
    display: flex;
    gap: 10px;
    transform: translateX(-50%);
}

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

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

.quick-search-panel,
.section-block,
.page-hero,
.detail-hero,
.breadcrumb {
    width: min(1240px, calc(100% - 40px));
    margin-left: auto;
    margin-right: auto;
}

.quick-search-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 460px);
    gap: 28px;
    align-items: center;
    margin-bottom: 44px;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: var(--paper);
    box-shadow: var(--shadow);
}

.quick-search-panel h2,
.section-title h2,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    line-height: 1.15;
}

.quick-search-panel p,
.page-hero p {
    margin: 8px 0 0;
    color: var(--muted);
}

.quick-search-panel form,
.search-page-form,
.catalog-filter {
    display: flex;
    gap: 12px;
}

.section-block {
    margin-bottom: 54px;
}

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

.section-title h2 {
    font-size: clamp(26px, 4vw, 38px);
    color: #111827;
}

.section-title a {
    color: var(--pink);
    font-weight: 800;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 12px 26px rgba(31, 41, 55, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 44px rgba(31, 41, 55, 0.16);
}

.movie-card-large {
    grid-row: span 2;
}

.movie-poster {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #111827;
}

.movie-card-large .movie-poster {
    aspect-ratio: 4 / 5;
}

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

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

.play-mark {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--pink);
    background: rgba(255, 255, 255, 0.9);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.92);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-mark {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

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

.movie-card-meta {
    display: flex;
    gap: 10px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.movie-card h3 {
    margin: 8px 0 8px;
    font-size: 19px;
    line-height: 1.25;
}

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

.movie-card p {
    display: -webkit-box;
    min-height: 48px;
    margin: 0 0 14px;
    overflow: hidden;
    color: var(--muted);
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

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

.category-card {
    position: relative;
    min-height: 210px;
    overflow: hidden;
    border-radius: 26px;
    padding: 24px;
    color: #ffffff;
    box-shadow: var(--shadow);
}

.category-card img,
.category-layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.category-card img {
    object-fit: cover;
    transition: transform 0.5s ease;
}

.category-layer {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.3));
}

.category-card strong,
.category-card em {
    position: relative;
    z-index: 1;
    display: block;
}

.category-card strong {
    margin-top: 70px;
    font-size: 26px;
}

.category-card em {
    max-width: 520px;
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.86);
    font-style: normal;
}

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

.ranking-panel,
.latest-panel,
.ranking-page-block {
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: 24px;
    background: var(--paper);
    box-shadow: var(--shadow);
}

.ranking-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
}

.ranking-list li a {
    display: grid;
    grid-template-columns: 44px 64px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 10px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
}

.ranking-list li a:hover {
    background: #fdf2f8;
    transform: translateY(-2px);
}

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

.ranking-list img {
    width: 64px;
    height: 52px;
    border-radius: 14px;
    object-fit: cover;
}

.rank-text {
    min-width: 0;
}

.rank-text strong,
.rank-text em {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.rank-heat {
    color: #be185d;
    font-weight: 800;
    white-space: nowrap;
}

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

.small-movie {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
}

.small-movie img {
    width: 76px;
    height: 58px;
    border-radius: 14px;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.small-movie span,
.small-movie em {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.small-movie span {
    display: block;
    font-weight: 800;
}

.small-movie em {
    display: block;
    color: var(--muted);
    font-style: normal;
}

.page-main {
    padding-top: 104px;
}

.page-hero {
    padding: 46px;
    border-radius: 32px;
    color: #ffffff;
    background: radial-gradient(circle at top left, rgba(244, 114, 182, 0.85), transparent 32%), linear-gradient(135deg, #111827, #4c1d95 56%, #be185d);
    box-shadow: var(--shadow);
    margin-bottom: 44px;
}

.page-hero h1 {
    margin-top: 10px;
    font-size: clamp(36px, 6vw, 62px);
}

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

.catalog-filter,
.search-page-form {
    max-width: 620px;
    margin-top: 24px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 28px 0 18px;
    color: var(--muted);
    font-weight: 700;
}

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

.detail-main {
    padding-top: 82px;
}

.detail-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.16fr) minmax(320px, 0.84fr);
    gap: 28px;
    align-items: stretch;
    margin-bottom: 44px;
}

.player-section {
    position: relative;
    min-height: 420px;
    overflow: hidden;
    border-radius: 30px;
    background: #000000;
    box-shadow: var(--shadow);
}

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

.movie-player {
    object-fit: contain;
    background: #000000;
}

.player-cover {
    border: 0;
    padding: 0;
    cursor: pointer;
    overflow: hidden;
    background: #000000;
}

.player-cover.hidden {
    display: none;
}

.player-cover img {
    object-fit: cover;
}

.player-shade {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.2));
}

.player-button {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 86px;
    height: 86px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--pink);
    background: rgba(255, 255, 255, 0.92);
    font-size: 38px;
    transform: translate(-50%, -50%);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.detail-info {
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: 30px;
    background: var(--paper);
    box-shadow: var(--shadow);
}

.detail-info h1 {
    margin-top: 12px;
    font-size: clamp(34px, 5vw, 54px);
}

.detail-line {
    color: #4b5563;
    font-size: 18px;
}

.detail-meta {
    margin: 18px 0;
}

.detail-copy {
    border: 1px solid var(--line);
    border-radius: 30px;
    padding: 30px;
    background: var(--paper);
    box-shadow: var(--shadow);
}

.detail-copy h2 {
    margin: 0 0 10px;
    font-size: 28px;
}

.detail-copy p {
    margin: 0 0 24px;
    color: #374151;
    font-size: 17px;
}

.site-footer {
    margin-top: 72px;
    padding: 46px 24px 24px;
    background: rgba(255, 255, 255, 0.78);
    border-top: 1px solid var(--line);
}

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

.footer-grid p {
    max-width: 520px;
    color: var(--muted);
}

.footer-grid h3 {
    margin: 0 0 14px;
}

.footer-links {
    display: grid;
    gap: 10px;
}

.footer-links a {
    color: #4b5563;
    font-weight: 700;
}

.footer-bottom {
    width: min(1240px, 100%);
    margin: 28px auto 0;
    padding-top: 22px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    text-align: center;
}

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

@keyframes heroZoom {
    from {
        transform: scale(1.04);
    }

    to {
        transform: scale(1.1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

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

    .top-search {
        margin-left: auto;
    }

    .menu-button {
        display: inline-flex;
    }

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

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

    .split-section,
    .detail-hero {
        grid-template-columns: 1fr;
    }
}

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

    .site-logo span:last-child {
        font-size: 20px;
    }

    .top-search {
        display: none;
    }

    .hero-carousel {
        height: 560px;
    }

    .hero-content {
        bottom: 64px;
    }

    .hero-control {
        display: none;
    }

    .quick-search-panel {
        grid-template-columns: 1fr;
    }

    .quick-search-panel form,
    .search-page-form,
    .catalog-filter {
        flex-direction: column;
    }

    .movie-grid,
    .featured-grid,
    .small-movie-grid,
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .movie-card-large {
        grid-row: span 1;
    }

    .page-hero {
        padding: 30px;
    }

    .ranking-list li a {
        grid-template-columns: 34px 56px minmax(0, 1fr);
    }

    .rank-heat {
        grid-column: 3;
    }
}

@media (max-width: 560px) {
    .quick-search-panel,
    .section-block,
    .page-hero,
    .detail-hero,
    .breadcrumb {
        width: min(100% - 24px, 1240px);
    }

    .hero-carousel {
        height: 520px;
    }

    .hero-content h1 {
        font-size: 38px;
    }

    .movie-grid,
    .featured-grid,
    .category-grid,
    .category-grid-wide,
    .small-movie-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .mobile-panel nav {
        grid-template-columns: 1fr;
    }

    .player-section {
        min-height: 260px;
    }

    .detail-info,
    .detail-copy,
    .ranking-panel,
    .latest-panel,
    .ranking-page-block {
        padding: 20px;
    }
}
