:root {
    --rose: #f43f5e;
    --rose-dark: #be123c;
    --pink: #ec4899;
    --orange: #f97316;
    --yellow: #fde68a;
    --slate: #111827;
    --muted: #6b7280;
    --line: rgba(17, 24, 39, 0.10);
    --card: rgba(255, 255, 255, 0.88);
    --shadow: 0 22px 60px rgba(190, 18, 60, 0.14);
    --soft-shadow: 0 14px 38px rgba(17, 24, 39, 0.10);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--slate);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at 5% 0%, rgba(244, 63, 94, 0.18), transparent 31rem),
        radial-gradient(circle at 95% 8%, rgba(249, 115, 22, 0.16), transparent 34rem),
        linear-gradient(135deg, #fff1f2 0%, #fdf2f8 45%, #fff7ed 100%);
}

body.nav-open {
    overflow: hidden;
}

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: 80;
    color: #fff;
    background: linear-gradient(90deg, rgba(244, 63, 94, 0.98), rgba(236, 72, 153, 0.96), rgba(249, 115, 22, 0.98));
    box-shadow: 0 18px 45px rgba(190, 18, 60, 0.25);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: var(--rose-dark);
    background: #fff;
    border-radius: 999px;
    box-shadow: inset 0 0 0 4px rgba(253, 230, 138, 0.60), 0 10px 25px rgba(0, 0, 0, 0.15);
}

.brand-text {
    font-size: clamp(20px, 2vw, 28px);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    padding: 10px 15px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.88);
    font-weight: 700;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 0;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.18);
}

.menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    margin: 5px auto;
    background: #fff;
    border-radius: 999px;
}

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

.hero {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    color: #fff;
    background: #0f172a;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.7s ease;
}

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

.hero-slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.12) contrast(1.06);
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.62) 45%, rgba(15, 23, 42, 0.24)),
        linear-gradient(0deg, rgba(15, 23, 42, 0.88), transparent 45%, rgba(15, 23, 42, 0.25));
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 96px 0 130px;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.20);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(18px);
    font-weight: 800;
}

.hero h1 {
    max-width: 780px;
    margin: 0 0 18px;
    font-size: clamp(42px, 7vw, 78px);
    line-height: 0.95;
    letter-spacing: -0.06em;
}

.hero p {
    max-width: 720px;
    margin: 0 0 28px;
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.75;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 22px;
    border: 0;
    border-radius: 999px;
    font-weight: 900;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    color: var(--rose-dark);
    background: #fff;
    box-shadow: 0 14px 32px rgba(255, 255, 255, 0.18);
}

.btn-ghost {
    color: #fff;
    background: rgba(255, 255, 255, 0.17);
    backdrop-filter: blur(14px);
}

.hero-panel {
    position: absolute;
    z-index: 5;
    right: max(16px, calc((100% - 1180px) / 2));
    bottom: 34px;
    width: min(460px, calc(100% - 32px));
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.54);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(20px);
}

.hero-thumbs {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.hero-thumb {
    min-height: 64px;
    overflow: hidden;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
}

.hero-thumb.active {
    border-color: #fff;
}

.hero-thumb img {
    width: 100%;
    height: 64px;
    object-fit: cover;
}

.section {
    padding: 56px 0;
}

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

.section-head h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.section-head p {
    max-width: 720px;
    margin: 9px 0 0;
    color: var(--muted);
    line-height: 1.8;
}

.section-more {
    flex: 0 0 auto;
    color: var(--rose-dark);
    font-weight: 900;
}

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

.category-tile {
    position: relative;
    min-height: 150px;
    overflow: hidden;
    padding: 24px;
    border-radius: var(--radius);
    color: #fff;
    box-shadow: var(--soft-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-tile h3 {
    position: relative;
    margin: 0 0 8px;
    font-size: 24px;
}

.category-tile p {
    position: relative;
    margin: 0;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.65;
}

.category-tile::after {
    content: "";
    position: absolute;
    right: -36px;
    bottom: -42px;
    width: 132px;
    height: 132px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
}

.from-rose { background: linear-gradient(135deg, #f43f5e, #fb7185); }
.from-violet { background: linear-gradient(135deg, #7c3aed, #db2777); }
.from-orange { background: linear-gradient(135deg, #f97316, #f43f5e); }
.from-pink { background: linear-gradient(135deg, #ec4899, #f97316); }
.from-blue { background: linear-gradient(135deg, #2563eb, #7c3aed); }
.from-amber { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.from-red { background: linear-gradient(135deg, #dc2626, #7f1d1d); }
.from-slate { background: linear-gradient(135deg, #111827, #475569); }
.from-green { background: linear-gradient(135deg, #16a34a, #0f766e); }
.from-cyan { background: linear-gradient(135deg, #0891b2, #2563eb); }

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

.movie-list {
    display: grid;
    gap: 18px;
}

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: var(--soft-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.movie-card-row {
    display: grid;
    grid-template-columns: 180px 1fr;
}

.card-poster {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, #111827, #881337);
}

.movie-card-row .card-poster {
    aspect-ratio: auto;
    min-height: 220px;
}

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

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

.card-poster::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 46%;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.78), transparent);
}

.card-score {
    position: absolute;
    z-index: 2;
    right: 12px;
    top: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #7f1d1d;
    background: #fde68a;
    font-weight: 900;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.22);
}

.card-body {
    padding: 18px;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.card-meta a,
.card-meta span {
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(244, 63, 94, 0.08);
}

.card-meta a {
    color: var(--rose-dark);
}

.movie-card h3 {
    margin: 0 0 10px;
    font-size: 20px;
    line-height: 1.35;
}

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

.movie-card p {
    display: -webkit-box;
    min-height: 58px;
    margin: 0 0 14px;
    overflow: hidden;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    color: #4b5563;
    line-height: 1.62;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-list span {
    padding: 6px 10px;
    border-radius: 999px;
    color: #9f1239;
    background: #ffe4e6;
    font-size: 12px;
    font-weight: 800;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 58px 84px 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.76);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: var(--soft-shadow);
}

.rank-num {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    color: #fff;
    background: linear-gradient(135deg, var(--rose), var(--orange));
    border-radius: 18px;
    font-size: 20px;
    font-weight: 900;
}

.rank-cover {
    width: 84px;
    height: 112px;
    overflow: hidden;
    border-radius: 16px;
    background: #111827;
}

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

.rank-main h3 {
    margin: 0 0 8px;
    font-size: 21px;
}

.rank-main p {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

.rank-score {
    min-width: 76px;
    text-align: center;
    color: var(--rose-dark);
    font-size: 28px;
    font-weight: 900;
}

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

.page-hero-card {
    padding: clamp(28px, 5vw, 54px);
    border-radius: 34px;
    color: #fff;
    background:
        radial-gradient(circle at 92% 12%, rgba(255, 255, 255, 0.28), transparent 18rem),
        linear-gradient(135deg, #f43f5e, #ec4899 48%, #f97316);
    box-shadow: var(--shadow);
}

.page-hero-card h1 {
    margin: 0 0 14px;
    font-size: clamp(34px, 5vw, 60px);
    line-height: 1.06;
    letter-spacing: -0.05em;
}

.page-hero-card p {
    max-width: 760px;
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 18px;
    line-height: 1.8;
}

.filters {
    display: grid;
    grid-template-columns: 1.6fr repeat(3, minmax(150px, 0.6fr));
    gap: 14px;
    margin-bottom: 26px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.74);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: var(--soft-shadow);
}

.filters input,
.filters select {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--slate);
    background: #fff;
    outline: 0;
}

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

.no-result {
    display: none;
    padding: 28px;
    border-radius: 22px;
    text-align: center;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.80);
}

.detail-hero {
    display: grid;
    grid-template-columns: minmax(260px, 360px) 1fr;
    gap: 34px;
    align-items: end;
    padding: 44px 0;
}

.detail-poster {
    overflow: hidden;
    border-radius: 32px;
    box-shadow: var(--shadow);
    background: #111827;
}

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

.detail-info h1 {
    margin: 12px 0 16px;
    font-size: clamp(36px, 5vw, 64px);
    line-height: 1.04;
    letter-spacing: -0.05em;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-weight: 800;
}

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

.detail-intro {
    margin: 0 0 20px;
    color: #374151;
    font-size: 18px;
    line-height: 1.8;
}

.info-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 22px 0;
}

.info-pills span {
    padding: 9px 13px;
    border-radius: 999px;
    color: #9f1239;
    background: rgba(255, 228, 230, 0.94);
    font-weight: 900;
}

.player-section {
    padding: 0 0 56px;
}

.player-box {
    position: relative;
    overflow: hidden;
    border-radius: 34px;
    background: #000;
    box-shadow: 0 28px 70px rgba(17, 24, 39, 0.25);
}

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

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    cursor: pointer;
    background: radial-gradient(circle at center, rgba(244, 63, 94, 0.16), rgba(0, 0, 0, 0.78));
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-start {
    display: grid;
    place-items: center;
    width: 92px;
    height: 92px;
    border: 0;
    border-radius: 999px;
    color: var(--rose-dark);
    background: #fff;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.32);
    font-size: 34px;
    font-weight: 900;
}

.player-error {
    display: none;
    margin-top: 12px;
    padding: 14px 18px;
    border-radius: 18px;
    color: #991b1b;
    background: #fee2e2;
    font-weight: 800;
}

.player-error.show {
    display: block;
}

.content-block {
    margin-bottom: 34px;
    padding: 26px;
    border: 1px solid rgba(255, 255, 255, 0.76);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.84);
    box-shadow: var(--soft-shadow);
}

.content-block h2 {
    margin: 0 0 14px;
    font-size: 28px;
}

.content-block p {
    margin: 0 0 16px;
    color: #374151;
    line-height: 1.9;
}

.content-block p:last-child {
    margin-bottom: 0;
}

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

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 28px;
}

.footer-brand {
    margin-bottom: 10px;
    color: #fff;
    font-size: 24px;
    font-weight: 900;
}

.footer-inner p {
    margin: 0;
    line-height: 1.75;
}

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

.footer-links a {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.footer-links a:hover {
    color: #fff;
    background: rgba(244, 63, 94, 0.55);
}

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
    color: #9ca3af;
}

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

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

    .detail-hero {
        grid-template-columns: 280px 1fr;
    }
}

@media (max-width: 780px) {
    .menu-toggle {
        display: block;
    }

    .site-nav {
        position: fixed;
        inset: 72px 16px auto;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
        border-radius: 22px;
        background: rgba(17, 24, 39, 0.96);
        box-shadow: 0 22px 60px rgba(0, 0, 0, 0.30);
    }

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

    .hero {
        min-height: 700px;
    }

    .hero-content {
        padding-top: 80px;
    }

    .hero-panel {
        left: 16px;
        right: 16px;
        bottom: 22px;
        width: auto;
    }

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

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

    .movie-card-row,
    .detail-hero,
    .footer-inner,
    .rank-item {
        grid-template-columns: 1fr;
    }

    .movie-card-row .card-poster {
        min-height: auto;
        aspect-ratio: 3 / 4;
    }

    .rank-cover {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }

    .rank-score {
        text-align: left;
    }

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

@media (max-width: 560px) {
    .header-inner,
    .main-wrap,
    .page-wrap,
    .hero-content,
    .footer-inner,
    .footer-bottom {
        width: min(100% - 24px, 1180px);
    }

    .brand-text {
        font-size: 19px;
    }

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

    .hero h1,
    .page-hero-card h1,
    .detail-info h1 {
        letter-spacing: -0.035em;
    }

    .hero-thumb {
        min-height: 54px;
    }

    .hero-thumb img {
        height: 54px;
    }
}
