
:root {
    --color-red: #ef4444;
    --color-pink: #ec4899;
    --color-orange: #f97316;
    --color-purple: #9333ea;
    --color-blue: #2563eb;
    --color-dark: #111827;
    --color-muted: #6b7280;
    --color-soft: #fdf2f8;
    --color-card: #ffffff;
    --shadow-card: 0 18px 40px rgba(31, 41, 55, 0.12);
    --shadow-soft: 0 10px 24px rgba(31, 41, 55, 0.10);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 14px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(135deg, #fff7ed 0%, #fdf2f8 38%, #eef2ff 100%);
    color: var(--color-dark);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, var(--color-red), var(--color-pink), var(--color-orange));
    box-shadow: 0 10px 24px rgba(239, 68, 68, 0.28);
}

.nav-wrap {
    width: min(1280px, calc(100% - 32px));
    height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: 0.02em;
}

.brand {
    color: #ffffff;
    font-size: 24px;
    white-space: nowrap;
}

.brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

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

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

.nav-search {
    width: min(280px, 24vw);
}

.search-input {
    width: 100%;
    border: 0;
    outline: none;
    border-radius: 999px;
    padding: 12px 18px;
    color: #374151;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.26), 0 8px 18px rgba(17, 24, 39, 0.08);
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
}

.mobile-menu-button span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: #ffffff;
    border-radius: 2px;
}

.mobile-nav {
    display: none;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
}

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

.mobile-nav a {
    padding: 12px 16px;
    border-radius: 14px;
    color: #ffffff;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.18);
}

.container {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    background-size: cover;
    background-position: center;
    transition: opacity 0.65s ease, visibility 0.65s ease;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
}

.hero-content {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 88px 0 120px;
    color: #ffffff;
}

.hero-kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 8px 14px;
    border-radius: 999px;
    color: #fde68a;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(6px);
    font-weight: 800;
}

.hero-content h1 {
    max-width: 760px;
    margin: 0 0 16px;
    font-size: clamp(42px, 7vw, 78px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

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

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

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

.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
}

.hero-tags span {
    padding: 8px 12px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
}

.tag-row span {
    padding: 5px 9px;
    color: #be185d;
    background: #fce7f3;
}

.hero-actions,
.page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.primary-button,
.secondary-button,
.card-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 22px;
    border-radius: 999px;
    font-weight: 900;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.primary-button,
.card-button {
    color: #ffffff;
    background: linear-gradient(90deg, var(--color-red), var(--color-pink));
    box-shadow: 0 12px 28px rgba(236, 72, 153, 0.32);
}

.secondary-button {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.primary-button:hover,
.secondary-button:hover,
.card-button:hover {
    transform: translateY(-2px) scale(1.02);
}

.hero-panel {
    position: absolute;
    right: max(24px, calc((100% - 1280px) / 2));
    top: 50%;
    width: min(330px, calc(100% - 48px));
    padding: 18px;
    transform: translateY(-50%);
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.16);
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(16px);
}

.hero-panel-title {
    margin-bottom: 12px;
    color: #ffffff;
    font-size: 18px;
    font-weight: 900;
}

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

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

.hero-dot.active {
    background: #ffffff;
}

.main-content {
    padding: 48px 0 70px;
}

.section-block {
    margin: 0 0 60px;
}

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

.section-head p {
    margin: 0 0 6px;
    color: var(--color-pink);
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.08em;
}

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

.section-head a {
    flex: 0 0 auto;
    color: var(--color-purple);
    font-weight: 900;
}

.filter-panel {
    display: grid;
    gap: 16px;
    margin-bottom: 26px;
    padding: 18px;
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(10px);
}

.filter-panel .search-input {
    background: #ffffff;
    box-shadow: inset 0 0 0 1px #e5e7eb;
}

.category-grid,
.movie-grid {
    display: grid;
    gap: 22px;
}

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

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

.category-tile {
    min-height: 170px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 22px;
    border-radius: var(--radius-xl);
    color: #ffffff;
    background: linear-gradient(135deg, var(--color-purple), var(--color-pink), var(--color-orange));
    box-shadow: var(--shadow-card);
    overflow: hidden;
    position: relative;
    isolation: isolate;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile::after {
    content: "";
    position: absolute;
    right: -36px;
    bottom: -36px;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    z-index: -1;
}

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

.category-tile span {
    font-size: 24px;
    font-weight: 900;
}

.category-tile strong {
    color: rgba(255, 255, 255, 0.88);
    font-size: 14px;
}

.category-tile em {
    font-style: normal;
    font-weight: 900;
}

.movie-card {
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: var(--color-card);
    box-shadow: var(--shadow-soft);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card-cover {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #f9a8d4, #c4b5fd);
}

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

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

.year-badge,
.score-badge {
    position: absolute;
    top: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
    backdrop-filter: blur(8px);
}

.year-badge {
    left: 12px;
    background: rgba(17, 24, 39, 0.62);
}

.score-badge {
    right: 12px;
    background: linear-gradient(90deg, #facc15, #f97316);
}

.card-body {
    padding: 18px;
}

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

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

.card-body h2,
.card-body h3 {
    margin: 0 0 8px;
    font-size: 20px;
    line-height: 1.25;
}

.card-body p {
    min-height: 52px;
    margin: 0 0 14px;
    color: #4b5563;
    font-size: 14px;
}

.rank-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(290px, 0.9fr);
    gap: 26px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 46px 58px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 8px 18px rgba(31, 41, 55, 0.08);
    transition: transform 0.2s ease, background 0.2s ease;
}

.rank-item:hover {
    transform: translateX(4px);
    background: #ffffff;
}

.rank-num {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 50%;
    color: #ffffff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--color-red), var(--color-pink));
}

.rank-item img {
    width: 58px;
    height: 78px;
    object-fit: cover;
    border-radius: 12px;
}

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

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

.rank-text strong {
    font-size: 16px;
}

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

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

.page-card {
    padding: clamp(24px, 4vw, 42px);
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.86);
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(14px);
}

.page-card h1 {
    margin: 0 0 12px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.08;
}

.page-card p {
    margin: 0;
    max-width: 780px;
    color: #4b5563;
    font-size: 18px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    color: var(--color-muted);
    font-size: 14px;
    font-weight: 700;
}

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

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

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: #000000;
    box-shadow: var(--shadow-card);
}

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

.player-cover-button {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 10px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.18));
    cursor: pointer;
    font-size: 18px;
    font-weight: 900;
}

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

.play-circle {
    display: grid;
    width: 82px;
    height: 82px;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-red), var(--color-pink));
    box-shadow: 0 0 0 12px rgba(255, 255, 255, 0.14), 0 20px 45px rgba(0, 0, 0, 0.32);
    font-size: 34px;
}

.detail-info,
.sidebar-card {
    margin-top: 22px;
    padding: 26px;
    border-radius: var(--radius-xl);
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.detail-info h1 {
    margin: 0 0 12px;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.08;
}

.info-line {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 18px;
}

.info-line span {
    padding: 7px 12px;
    border-radius: 999px;
    color: #6d28d9;
    background: #f3e8ff;
    font-weight: 800;
    font-size: 13px;
}

.detail-info h2,
.sidebar-card h2 {
    margin: 22px 0 10px;
    font-size: 24px;
}

.detail-info p {
    margin: 0 0 14px;
    color: #374151;
}

.poster-card {
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: #ffffff;
    box-shadow: var(--shadow-card);
}

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

.poster-card div {
    padding: 18px;
}

.poster-card strong {
    display: block;
    font-size: 20px;
}

.related-list {
    display: grid;
    gap: 12px;
}

.site-footer {
    margin-top: 70px;
    color: #ffffff;
    background: linear-gradient(90deg, #581c87, #1e3a8a, #312e81);
}

.footer-grid {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 0.7fr 0.7fr;
    gap: 28px;
    padding: 48px 0;
}

.footer-grid p {
    max-width: 460px;
    color: rgba(255, 255, 255, 0.74);
}

.footer-grid h2 {
    margin: 0 0 14px;
    color: #fde68a;
    font-size: 18px;
}

.footer-grid a {
    display: block;
    margin: 8px 0;
    color: rgba(255, 255, 255, 0.82);
}

.footer-brand {
    color: #fde68a;
    font-size: 24px;
}

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

.empty-result {
    display: none;
    padding: 22px;
    border-radius: var(--radius-lg);
    background: #ffffff;
    color: var(--color-muted);
    text-align: center;
    font-weight: 800;
}

.empty-result.show {
    display: block;
}

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

    .hero-panel {
        display: none;
    }

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

    .poster-card {
        max-width: 360px;
    }
}

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

    .mobile-menu-button {
        display: block;
        margin-left: auto;
    }

    .nav-wrap {
        height: 66px;
    }

    .brand {
        font-size: 20px;
    }

    .hero {
        min-height: 560px;
    }

    .hero-content {
        padding: 58px 0 110px;
    }

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

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

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

@media (max-width: 540px) {
    .container,
    .nav-wrap,
    .mobile-nav,
    .hero-content,
    .footer-grid,
    .footer-bottom {
        width: min(100% - 22px, 1280px);
    }

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

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

    .hero-content p,
    .page-card p {
        font-size: 16px;
    }

    .card-cover {
        aspect-ratio: 16 / 10;
    }

    .rank-item {
        grid-template-columns: 38px 52px minmax(0, 1fr);
    }
}
