:root {
    --pink: #ec4899;
    --pink-dark: #be185d;
    --orange: #f97316;
    --yellow: #f59e0b;
    --ink: #1f2937;
    --muted: #6b7280;
    --soft: #fff7ed;
    --line: #f3e8ff;
    --card: #ffffff;
    --shadow: 0 20px 55px rgba(190, 24, 93, 0.16);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    color: var(--ink);
    background: linear-gradient(180deg, #fff7ed 0%, #fff 26%, #fff7ed 100%);
    min-height: 100vh;
}

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

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

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);
    box-shadow: 0 10px 35px rgba(236, 72, 153, 0.14);
    backdrop-filter: blur(16px);
}

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

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

.logo-icon {
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--pink), var(--orange));
    box-shadow: 0 10px 30px rgba(236, 72, 153, 0.35);
    font-size: 15px;
}

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

.nav-link {
    border: 0;
    background: transparent;
    color: #374151;
    font-weight: 700;
    cursor: pointer;
    transition: color 0.2s ease;
}

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

.category-dropdown {
    position: relative;
}

.dropdown-panel {
    position: absolute;
    top: calc(100% + 18px);
    left: 0;
    width: 210px;
    padding: 10px;
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--shadow);
    display: grid;
    gap: 4px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: all 0.18s ease;
}

.category-dropdown:hover .dropdown-panel,
.category-dropdown:focus-within .dropdown-panel {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.dropdown-panel a {
    padding: 10px 12px;
    border-radius: 10px;
    color: #4b5563;
    font-size: 14px;
}

.dropdown-panel a:hover {
    background: #fdf2f8;
    color: var(--pink);
}

.header-search,
.mobile-search {
    display: flex;
    align-items: center;
    background: #f3f4f6;
    border-radius: 999px;
    padding: 4px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.header-search:focus-within,
.mobile-search:focus-within {
    background: #fff;
    border-color: #f9a8d4;
    box-shadow: 0 0 0 4px rgba(249, 168, 212, 0.2);
}

.header-search input,
.mobile-search input {
    width: 260px;
    border: 0;
    background: transparent;
    outline: none;
    padding: 9px 12px;
    color: var(--ink);
}

.header-search button,
.mobile-search button,
.primary-button,
.ghost-button {
    border: 0;
    border-radius: 999px;
    padding: 10px 18px;
    font-weight: 800;
    cursor: pointer;
}

.header-search button,
.mobile-search button,
.primary-button {
    color: #fff;
    background: linear-gradient(90deg, var(--pink), var(--orange));
    box-shadow: 0 10px 25px rgba(236, 72, 153, 0.28);
}

.ghost-button {
    color: #fff;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.42);
}

.primary-button:hover,
.ghost-button:hover,
.header-search button:hover,
.mobile-search button:hover {
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: #fdf2f8;
    cursor: pointer;
    padding: 9px;
}

.menu-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    border-radius: 2px;
    background: var(--pink);
}

.mobile-panel {
    display: none;
    padding: 0 16px 18px;
    border-top: 1px solid #fce7f3;
}

.mobile-panel.is-open {
    display: grid;
    gap: 10px;
}

.mobile-panel a {
    padding: 10px 12px;
    border-radius: 12px;
    color: #4b5563;
    background: #fff;
}

.home-hero,
.page-hero {
    width: min(1180px, calc(100% - 32px));
    margin: 34px auto 0;
    position: relative;
    overflow: hidden;
    border-radius: 34px;
    background: linear-gradient(120deg, var(--pink) 0%, var(--orange) 58%, var(--yellow) 100%);
    color: #fff;
    box-shadow: var(--shadow);
}

.home-hero {
    min-height: 520px;
    display: grid;
    place-items: center;
}

.hero-background {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 28%, rgba(255, 255, 255, 0.30), transparent 34%),
        radial-gradient(circle at 84% 78%, rgba(255, 255, 255, 0.18), transparent 30%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.12));
}

.hero-content {
    position: relative;
    z-index: 1;
    width: min(920px, calc(100% - 28px));
    text-align: center;
    padding: 58px 0;
}

.hero-eyebrow {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #fff7ed;
}

.home-hero h1,
.page-hero h1 {
    margin: 0;
    font-size: clamp(34px, 6vw, 64px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.hero-copy,
.page-hero p {
    max-width: 780px;
    margin: 18px auto 0;
    font-size: 18px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.92);
}

.hero-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
    margin: 30px 0;
}

.hero-picks {
    display: flex;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
}

.hero-poster {
    position: relative;
    width: 160px;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 24px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.22);
    background: rgba(255, 255, 255, 0.22);
    transition: transform 0.28s ease;
}

.hero-poster:hover {
    transform: translateY(-6px) scale(1.04);
}

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

.hero-poster span {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 14px;
    color: #fff;
    font-weight: 900;
    background: rgba(0, 0, 0, 0.42);
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}

.quick-channels {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
    margin-top: 28px;
}

.quick-channels a,
.category-tile,
.movie-card,
.player-card,
.detail-content,
.detail-side,
.search-panel,
.ranking-list a {
    background: #fff;
    box-shadow: 0 12px 32px rgba(236, 72, 153, 0.10);
}

.quick-channels a {
    min-height: 122px;
    padding: 18px;
    border-radius: 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid #fce7f3;
    transition: all 0.22s ease;
}

.quick-channels a:hover,
.category-tile:hover,
.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 48px rgba(236, 72, 153, 0.18);
}

.quick-channels strong {
    color: var(--ink);
    font-size: 18px;
}

.quick-channels span,
.category-tile p {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.content-section {
    margin-top: 58px;
}

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

.section-heading h2 {
    margin: 0;
    color: var(--ink);
    font-size: 28px;
}

.section-heading p {
    margin: 8px 0 0;
    color: var(--muted);
}

.section-link {
    color: var(--pink);
    font-weight: 900;
}

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

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

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    border: 1px solid #fce7f3;
    transition: all 0.22s ease;
}

.card-link-focus {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.card-cover {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(135deg, #fdf2f8, #ffedd5);
}

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

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

.card-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.55));
    opacity: 0.8;
}

.card-badge,
.card-duration,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 12px;
    font-weight: 900;
    color: #fff;
}

.card-badge {
    top: 10px;
    left: 10px;
    background: linear-gradient(90deg, var(--pink), var(--orange));
}

.card-duration {
    right: 10px;
    bottom: 10px;
    background: rgba(0, 0, 0, 0.68);
}

.rank-badge {
    right: 10px;
    top: 10px;
    background: rgba(245, 158, 11, 0.94);
}

.card-body {
    padding: 16px;
}

.card-body.compact {
    padding: 14px;
}

.card-body h3 {
    margin: 0 0 8px;
    font-size: 17px;
    line-height: 1.35;
    color: var(--ink);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

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

.card-meta,
.card-stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: #9ca3af;
    font-size: 12px;
}

.card-stats {
    margin-top: 10px;
    color: #db2777;
    font-weight: 800;
}

.ranking-preview {
    padding: 34px;
    border-radius: 28px;
    background: linear-gradient(135deg, #fff, #fff7ed);
    box-shadow: var(--shadow);
}

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

.ranking-list a {
    display: grid;
    grid-template-columns: 42px 1fr;
    align-items: center;
    gap: 10px;
    padding: 14px;
    border-radius: 16px;
    border: 1px solid #fce7f3;
}

.ranking-list a:hover {
    border-color: #f9a8d4;
}

.ranking-list span {
    grid-row: span 2;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: #fff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--pink), var(--orange));
}

.ranking-list strong {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

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

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

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

.category-tile {
    min-height: 184px;
    padding: 24px;
    border-radius: 24px;
    border: 1px solid #fce7f3;
    transition: all 0.22s ease;
}

.category-tile span {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: #fff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--pink), var(--orange));
}

.category-tile h2,
.category-tile h3 {
    margin: 18px 0 8px;
    font-size: 22px;
}

.page-main {
    padding-bottom: 64px;
}

.page-hero {
    padding: 52px;
    min-height: 280px;
}

.compact-hero,
.category-hero,
.search-hero,
.ranking-hero {
    margin-top: 28px;
}

.inline-filter,
.search-panel {
    margin-top: 28px;
}

.inline-filter input,
.search-panel input,
.search-panel select {
    width: 100%;
    border: 0;
    outline: none;
    border-radius: 999px;
    padding: 14px 18px;
    color: var(--ink);
    background: #fff;
    box-shadow: 0 12px 30px rgba(190, 24, 93, 0.12);
}

.search-panel {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 12px;
    padding: 12px;
    border-radius: 28px;
}

.search-panel select {
    appearance: none;
}

.empty-state {
    display: none;
    margin-top: 26px;
    padding: 28px;
    text-align: center;
    border-radius: 22px;
    color: var(--muted);
    background: #fff;
    border: 1px dashed #f9a8d4;
}

.empty-state.is-visible {
    display: block;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 26px 0 18px;
    color: var(--muted);
    font-size: 14px;
}

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

.detail-main {
    padding-bottom: 68px;
}

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

.player-card,
.detail-side,
.detail-content {
    border-radius: 28px;
    border: 1px solid #fce7f3;
}

.player-card {
    padding: 14px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    aspect-ratio: 16 / 9;
    background: #111827;
}

.player-video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    background: #0f172a;
    cursor: pointer;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 14px;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.66));
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-button {
    width: 78px;
    height: 78px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--pink), var(--orange));
    box-shadow: 0 18px 40px rgba(236, 72, 153, 0.45);
    cursor: pointer;
    font-size: 28px;
}

.play-button span {
    margin-left: 5px;
}

.player-overlay strong {
    width: min(90%, 640px);
    text-align: center;
    font-size: clamp(22px, 4vw, 38px);
    text-shadow: 0 8px 25px rgba(0, 0, 0, 0.35);
}

.detail-side {
    padding: 16px;
}

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

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.detail-tags span {
    padding: 7px 10px;
    border-radius: 999px;
    background: #fdf2f8;
    color: var(--pink-dark);
    font-size: 13px;
    font-weight: 800;
}

.detail-content {
    margin-top: 24px;
    padding: 34px;
}

.detail-content .hero-eyebrow {
    color: var(--pink);
}

.detail-content h1 {
    margin: 0 0 14px;
    font-size: clamp(30px, 5vw, 52px);
    letter-spacing: -0.04em;
}

.lead-text {
    margin: 0;
    color: #4b5563;
    font-size: 20px;
    line-height: 1.75;
}

.movie-info {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    margin: 28px 0;
}

.movie-info div {
    padding: 14px;
    border-radius: 16px;
    background: #fff7ed;
}

.movie-info dt {
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 12px;
}

.movie-info dd {
    margin: 0;
    color: var(--ink);
    font-weight: 900;
}

.detail-content section {
    margin-top: 26px;
}

.detail-content h2 {
    margin: 0 0 12px;
    font-size: 24px;
}

.detail-content section p {
    margin: 0;
    color: #4b5563;
    line-height: 1.95;
    font-size: 17px;
}

.related-section {
    margin-top: 36px;
}

.site-footer {
    margin-top: 76px;
    padding: 48px 0 0;
    color: #fff;
    background: linear-gradient(90deg, #831843, #9a3412, #854d0e);
}

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

.footer-logo {
    color: #fff;
    background: none;
    -webkit-background-clip: initial;
    background-clip: initial;
}

.site-footer p,
.site-footer a {
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.8;
}

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

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

.site-footer a:hover {
    color: #fff;
}

.footer-bottom {
    margin-top: 36px;
    padding: 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.72);
    border-top: 1px solid rgba(255, 255, 255, 0.16);
}

@media (max-width: 1100px) {
    .quick-channels {
        grid-template-columns: repeat(3, 1fr);
    }

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

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

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

    .menu-toggle {
        display: block;
    }

    .header-inner {
        min-height: 64px;
    }

    .home-hero {
        min-height: auto;
        border-radius: 26px;
    }

    .hero-content,
    .page-hero {
        padding: 38px 20px;
    }

    .hero-poster {
        width: 128px;
    }

    .quick-channels,
    .category-grid,
    .category-grid.wide,
    .ranking-list,
    .footer-grid,
    .detail-layout,
    .search-panel {
        grid-template-columns: 1fr;
    }

    .movie-grid,
    .movie-grid.three-col,
    .movie-grid.all-grid,
    .movie-grid.related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .detail-side {
        display: grid;
        grid-template-columns: 150px 1fr;
        gap: 16px;
        align-items: center;
    }
}

@media (max-width: 560px) {
    .container,
    .home-hero,
    .page-hero {
        width: min(100% - 20px, 1180px);
    }

    .site-logo {
        font-size: 19px;
    }

    .logo-icon {
        width: 32px;
        height: 32px;
    }

    .home-hero h1,
    .page-hero h1 {
        font-size: 34px;
    }

    .hero-picks {
        gap: 12px;
    }

    .hero-poster {
        width: 112px;
        border-radius: 18px;
    }

    .movie-grid,
    .movie-grid.three-col,
    .movie-grid.all-grid,
    .movie-grid.related-grid {
        grid-template-columns: 1fr;
    }

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

    .ranking-preview,
    .detail-content {
        padding: 22px;
        border-radius: 22px;
    }

    .movie-info {
        grid-template-columns: 1fr 1fr;
    }

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

    .play-button {
        width: 64px;
        height: 64px;
    }
}
