:root {
    --rose-50: #fff1f4;
    --rose-100: #ffe4ea;
    --rose-500: #f43f5e;
    --rose-600: #e11d48;
    --orange-50: #fff7ed;
    --orange-400: #fb923c;
    --orange-500: #f97316;
    --pink-50: #fdf2f8;
    --text: #1f2937;
    --muted: #6b7280;
    --line: #f1d7de;
    --card: #ffffff;
    --shadow: 0 20px 50px rgba(244, 63, 94, 0.16);
    --soft-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: linear-gradient(135deg, var(--rose-50), var(--orange-50), var(--pink-50));
    line-height: 1.65;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(255, 241, 244, 0.96), rgba(255, 247, 237, 0.96));
    border-bottom: 1px solid rgba(244, 63, 94, 0.12);
    box-shadow: 0 10px 30px rgba(244, 63, 94, 0.12);
    backdrop-filter: blur(18px);
}

.header-inner,
.footer-inner,
.section-inner,
.hero-copy,
.hero-dots-inner {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
}

.header-inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 22px;
}

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

.logo-text,
.footer-logo span:last-child {
    font-size: 24px;
    background: linear-gradient(90deg, var(--rose-500), var(--orange-500));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.logo-mark {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--rose-500), var(--orange-400));
    box-shadow: 0 12px 24px rgba(244, 63, 94, 0.28);
}

.logo-mark span {
    width: 0;
    height: 0;
    margin-left: 4px;
    border-top: 9px solid transparent;
    border-bottom: 9px solid transparent;
    border-left: 15px solid #ffffff;
}

.main-nav {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 18px;
    overflow-x: auto;
    scrollbar-width: none;
}

.main-nav::-webkit-scrollbar {
    display: none;
}

.main-nav a {
    color: #4b5563;
    font-weight: 700;
    font-size: 15px;
    white-space: nowrap;
    transition: color 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover {
    color: var(--rose-500);
    transform: translateY(-1px);
}

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

.header-search input,
.filter-input,
.filter-select {
    width: 220px;
    border: 1px solid rgba(244, 63, 94, 0.2);
    background: rgba(255, 255, 255, 0.85);
    color: var(--text);
    border-radius: 999px;
    padding: 11px 16px;
    outline: none;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.header-search input:focus,
.filter-input:focus,
.filter-select:focus {
    border-color: var(--rose-500);
    box-shadow: 0 0 0 4px rgba(244, 63, 94, 0.12);
}

.header-search button,
.btn,
.player-start,
.filter-button {
    border: 0;
    border-radius: 999px;
    padding: 11px 18px;
    color: #ffffff;
    font-weight: 800;
    background: linear-gradient(90deg, var(--rose-500), var(--orange-500));
    box-shadow: 0 14px 26px rgba(244, 63, 94, 0.24);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.header-search button:hover,
.btn:hover,
.player-start:hover,
.filter-button:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 18px 34px rgba(244, 63, 94, 0.32);
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    background: rgba(244, 63, 94, 0.09);
    border-radius: 14px;
    padding: 10px;
}

.nav-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: var(--rose-500);
    border-radius: 999px;
}

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

.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;
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(17, 24, 39, 0.88), rgba(17, 24, 39, 0.46), rgba(17, 24, 39, 0.08));
}

.hero-copy {
    position: absolute;
    left: 50%;
    bottom: 76px;
    z-index: 2;
    transform: translateX(-50%);
    color: #ffffff;
}

.hero-kicker,
.card-kicker,
.page-kicker,
.poster-badge,
.rank-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding: 6px 12px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
    background: linear-gradient(90deg, var(--rose-500), var(--orange-500));
}

.hero-copy h1 {
    max-width: 760px;
    margin: 18px 0 14px;
    font-size: clamp(34px, 6vw, 62px);
    line-height: 1.08;
    letter-spacing: -1px;
}

.hero-copy p {
    max-width: 760px;
    margin: 0 0 26px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 19px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.btn.secondary {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
    cursor: pointer;
    transform: translateY(-50%);
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-control:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.05);
}

.hero-control.prev {
    left: 22px;
}

.hero-control.next {
    right: 22px;
}

.hero-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 28px;
    z-index: 3;
}

.hero-dots-inner {
    display: flex;
    justify-content: center;
    gap: 8px;
}

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

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

.section-inner {
    padding: 48px 0;
}

.section-title,
.page-title {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 26px;
}

.section-title h2,
.page-title h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.15;
}

.section-title p,
.page-title p {
    margin: 7px 0 0;
    color: var(--muted);
}

.section-icon {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--rose-500), var(--orange-500));
    box-shadow: 0 12px 26px rgba(244, 63, 94, 0.25);
}

.category-pills,
.tag-row,
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-pills a,
.tag-row span,
.info-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 8px 14px;
    color: #7f1d1d;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(244, 63, 94, 0.14);
    font-size: 14px;
    font-weight: 700;
}

.category-pills a:hover {
    color: #ffffff;
    background: linear-gradient(90deg, var(--rose-500), var(--orange-500));
}

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

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

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

.movie-card,
.category-card,
.content-card,
.rank-card,
.detail-card {
    background: var(--card);
    border: 1px solid rgba(244, 63, 94, 0.12);
    border-radius: var(--radius);
    box-shadow: var(--soft-shadow);
    overflow: hidden;
}

.movie-card {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
}

.poster-box {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: radial-gradient(circle at 30% 20%, rgba(244, 63, 94, 0.28), transparent 30%), linear-gradient(135deg, #1f2937, #111827);
}

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

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

.poster-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    box-shadow: 0 8px 16px rgba(17, 24, 39, 0.18);
}

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

.movie-card-meta {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    color: var(--rose-600);
    font-size: 13px;
    font-weight: 800;
}

.movie-card h3 {
    min-height: 48px;
    margin: 8px 0;
    color: #111827;
    font-size: 17px;
    line-height: 1.38;
}

.movie-card h3 a:hover,
.mini-card:hover strong {
    color: var(--rose-500);
}

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

.movie-card.compact p {
    display: none;
}

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

.category-card {
    padding: 22px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

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

.category-card p {
    margin: 0 0 16px;
    color: var(--muted);
}

.category-stat {
    display: flex;
    justify-content: space-between;
    color: var(--rose-600);
    font-weight: 900;
}

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

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

.rank-card {
    display: grid;
    grid-template-columns: 70px 110px minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 16px;
}

.rank-index {
    width: 54px;
    height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--rose-500), var(--orange-500));
    font-weight: 900;
    font-size: 20px;
}

.rank-cover {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 16px;
    background: #111827;
}

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

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

.rank-card p {
    margin: 0;
    color: var(--muted);
}

.rank-score {
    color: var(--rose-600);
    font-weight: 900;
    white-space: nowrap;
}

.side-panel {
    position: sticky;
    top: 96px;
    align-self: start;
    padding: 22px;
    background: #ffffff;
    border: 1px solid rgba(244, 63, 94, 0.12);
    border-radius: var(--radius);
    box-shadow: var(--soft-shadow);
}

.side-panel h2,
.side-panel h3 {
    margin: 0 0 16px;
    font-size: 22px;
}

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

.mini-card {
    display: grid;
    grid-template-columns: 106px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
}

.mini-thumb {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 14px;
    background: #111827;
}

.mini-info {
    min-width: 0;
}

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

.mini-info strong {
    color: #111827;
    font-size: 15px;
}

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

.rank-num {
    color: var(--rose-500);
    font-weight: 900;
}

.page-hero {
    padding: 58px 0 22px;
}

.page-title {
    align-items: flex-start;
    padding: 36px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(244, 63, 94, 0.12);
    border-radius: 28px;
    box-shadow: var(--soft-shadow);
}

.content-card,
.detail-card {
    padding: 26px;
}

.content-card h2,
.detail-card h2,
.detail-card h3 {
    margin: 0 0 14px;
}

.content-card p,
.detail-card p {
    color: var(--muted);
}

.filter-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 24px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(244, 63, 94, 0.12);
    border-radius: 20px;
}

.filter-input {
    width: min(360px, 100%);
    border-radius: 16px;
}

.filter-select {
    width: auto;
    border-radius: 16px;
}

.search-count {
    color: var(--muted);
    font-weight: 800;
}

.player-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 24px 24px 0 0;
    background: #000000;
}

.player-wrap video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.player-start {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    transform: translate(-50%, -50%);
    padding: 14px 24px;
}

.player-start:hover {
    transform: translate(-50%, -50%) scale(1.03);
}

.player-start.is-hidden {
    display: none;
}

.detail-main {
    overflow: hidden;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.detail-body {
    padding: 28px;
}

.detail-body h1 {
    margin: 12px 0 12px;
    font-size: clamp(30px, 5vw, 48px);
    line-height: 1.12;
}

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

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

.info-box {
    padding: 14px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--rose-50), var(--orange-50));
}

.info-box b,
.info-box span {
    display: block;
}

.info-box b {
    color: var(--muted);
    font-size: 13px;
}

.info-box span {
    color: #111827;
    font-weight: 800;
}

.review-box {
    margin-top: 24px;
    padding: 22px;
    border-radius: 20px;
    background: linear-gradient(90deg, var(--rose-50), var(--orange-50));
}

.review-box p {
    margin-bottom: 0;
    color: #374151;
}

.site-footer {
    margin-top: 48px;
    color: #d1d5db;
    background: #111827;
}

.footer-inner {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 34px;
    padding: 42px 0;
}

.footer-logo span:last-child {
    color: #ffffff;
    background: none;
    -webkit-background-clip: initial;
    background-clip: initial;
}

.site-footer p {
    max-width: 430px;
    color: #9ca3af;
}

.site-footer h2 {
    margin: 0 0 12px;
    color: #ffffff;
    font-size: 18px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
}

.footer-links a {
    color: #9ca3af;
    font-size: 14px;
}

.footer-links a:hover {
    color: #fb7185;
}

.hide-by-filter {
    display: none !important;
}

@media (max-width: 1100px) {
    .header-search {
        display: none;
    }

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

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

    .rank-layout,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .side-panel {
        position: static;
    }
}

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

    .main-nav {
        display: none;
        order: 3;
        width: 100%;
        padding: 12px 0 4px;
        flex-wrap: wrap;
    }

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

    .nav-toggle {
        display: block;
        margin-left: auto;
    }

    .hero-carousel {
        height: 540px;
    }

    .hero-copy {
        bottom: 64px;
    }

    .hero-copy p {
        font-size: 16px;
    }

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

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

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

    .rank-score {
        grid-column: 3 / 4;
    }

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

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

@media (max-width: 520px) {
    .hero-carousel {
        height: 500px;
    }

    .hero-control {
        display: none;
    }

    .section-inner {
        padding: 34px 0;
    }

    .page-title {
        padding: 24px;
    }

    .movie-grid,
    .movie-grid.medium,
    .movie-grid.search-grid {
        grid-template-columns: 1fr;
    }

    .mini-card {
        grid-template-columns: 92px minmax(0, 1fr) auto;
    }

    .detail-body {
        padding: 22px;
    }
}
