:root {
    --bg: #fff7ed;
    --surface: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --line: rgba(15, 23, 42, 0.10);
    --brand: #f97316;
    --brand-dark: #dc2626;
    --brand-pink: #ec4899;
    --shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
    --radius: 28px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at 12% 8%, rgba(249, 115, 22, 0.16), transparent 28%),
        radial-gradient(circle at 90% 2%, rgba(236, 72, 153, 0.12), transparent 30%),
        linear-gradient(180deg, #fff7ed 0%, #fff 45%, #fff7ed 100%);
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, var(--brand), var(--brand-dark), var(--brand-pink));
    color: #fff;
    box-shadow: 0 14px 34px rgba(220, 38, 38, 0.25);
}

.nav-wrap {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
    min-height: 68px;
    display: flex;
    align-items: center;
    gap: 22px;
}

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

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

.nav-links {
    display: flex;
    align-items: center;
    gap: 18px;
    flex: 1;
}

.nav-links a {
    padding: 8px 0;
    font-weight: 700;
    opacity: 0.92;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
    opacity: 1;
    transform: translateY(-1px);
    color: #fef3c7;
}

.nav-search {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 280px;
}

.nav-search input,
.hero-search input,
.page-filter input {
    width: 100%;
    border: 0;
    outline: 0;
    color: #fff;
    border-radius: 999px;
    padding: 11px 16px;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(14px);
}

.nav-search input::placeholder,
.hero-search input::placeholder,
.page-filter input::placeholder {
    color: rgba(255, 255, 255, 0.78);
}

.nav-search button,
.hero-search button,
.page-filter button {
    border: 0;
    color: #dc2626;
    border-radius: 999px;
    padding: 11px 17px;
    font-weight: 800;
    background: #fff;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-search button:hover,
.hero-search button:hover,
.page-filter button:hover,
.primary-btn:hover,
.ghost-btn:hover,
.rank-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.18);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.18);
    cursor: pointer;
}

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

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

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    opacity: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.02);
    transition: opacity 0.7s ease, transform 1.1s ease;
}

.hero-slide.active {
    opacity: 1;
    transform: scale(1);
}

.hero-content {
    width: min(1240px, calc(100% - 48px));
    margin: 0 auto;
    padding-top: 36px;
    max-width: 1240px;
}

.hero-content > * {
    max-width: 720px;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 9px 18px;
    margin-bottom: 18px;
    border-radius: 999px;
    color: #fff;
    font-weight: 900;
    background: linear-gradient(90deg, var(--brand), var(--brand-pink));
    box-shadow: 0 16px 42px rgba(249, 115, 22, 0.32);
}

.hero-content h1,
.detail-info h1,
.page-hero h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(38px, 7vw, 78px);
    line-height: 1.05;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.hero-content p,
.page-hero p,
.detail-line {
    margin: 22px 0 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.8;
}

.hero-tags,
.detail-meta,
.tag-cloud,
.rank-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.hero-tags span,
.detail-meta span,
.tag-cloud span,
.rank-tags span {
    padding: 8px 13px;
    border-radius: 999px;
    color: #fff;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(12px);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 34px;
}

.primary-btn,
.ghost-btn,
.rank-action,
.wide-cta a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 14px 24px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary-btn {
    color: #fff;
    background: linear-gradient(90deg, var(--brand), var(--brand-dark));
}

.ghost-btn {
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
    backdrop-filter: blur(14px);
}

.hero-bottom {
    position: absolute;
    left: 50%;
    bottom: 34px;
    width: min(1240px, calc(100% - 48px));
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.hero-search {
    display: flex;
    gap: 10px;
    width: min(540px, 100%);
    padding: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.13);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(18px);
}

.hero-search input {
    color: #fff;
    background: transparent;
    box-shadow: none;
}

.hero-dots {
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.hero-dot.active {
    width: 42px;
    background: var(--brand);
}

.section-wrap {
    width: min(1240px, calc(100% - 48px));
    margin: 0 auto;
    padding: 68px 0 0;
}

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

.section-heading span {
    display: block;
    color: var(--brand);
    font-weight: 950;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.section-heading h2 {
    margin: 6px 0 0;
    color: #111827;
    font-size: clamp(26px, 4vw, 42px);
    line-height: 1.1;
    font-weight: 950;
    letter-spacing: -0.03em;
}

.section-heading a {
    color: var(--brand-dark);
    font-weight: 900;
}

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

.category-card {
    position: relative;
    min-height: 235px;
    overflow: hidden;
    border-radius: 26px;
    padding: 22px;
    color: #fff;
    box-shadow: var(--shadow);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 30px 76px rgba(15, 23, 42, 0.18);
}

.category-card::after {
    content: "";
    position: absolute;
    width: 140px;
    height: 140px;
    right: -55px;
    bottom: -45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
}

.category-main-link {
    display: grid;
    gap: 6px;
    position: relative;
    z-index: 1;
}

.category-icon {
    font-size: 36px;
}

.category-card strong {
    font-size: 22px;
}

.category-card em {
    font-style: normal;
    opacity: 0.88;
    font-weight: 800;
}

.category-card p {
    position: relative;
    z-index: 1;
    margin: 14px 0 0;
    line-height: 1.7;
    opacity: 0.9;
}

.category-card ul {
    position: relative;
    z-index: 1;
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 7px;
}

.category-card li a {
    opacity: 0.9;
    font-weight: 700;
}

.category-orange { background: linear-gradient(135deg, #f97316, #ef4444); }
.category-pink { background: linear-gradient(135deg, #ec4899, #f43f5e); }
.category-purple { background: linear-gradient(135deg, #8b5cf6, #d946ef); }
.category-red { background: linear-gradient(135deg, #ef4444, #991b1b); }
.category-amber { background: linear-gradient(135deg, #f59e0b, #ea580c); }
.category-blue { background: linear-gradient(135deg, #2563eb, #06b6d4); }
.category-slate { background: linear-gradient(135deg, #334155, #0f172a); }
.category-brown { background: linear-gradient(135deg, #92400e, #b45309); }
.category-green { background: linear-gradient(135deg, #16a34a, #15803d); }
.category-cyan { background: linear-gradient(135deg, #0891b2, #0d9488); }

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

.movie-card {
    overflow: hidden;
    border-radius: 24px;
    background: var(--surface);
    box-shadow: 0 18px 46px rgba(15, 23, 42, 0.10);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 28px 76px rgba(15, 23, 42, 0.16);
}

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

.poster-link img,
.detail-poster img,
.rank-thumb img {
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.movie-card:hover .poster-link img,
.detail-poster:hover img,
.rank-row:hover .rank-thumb img {
    transform: scale(1.06);
}

.year-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 6px 11px;
    color: #fff;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 900;
    background: rgba(15, 23, 42, 0.62);
    backdrop-filter: blur(10px);
}

.poster-play {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    color: #fff;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    transform: translate(-50%, -50%) scale(0.86);
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.card-body {
    padding: 18px;
}

.card-title,
.rank-title {
    display: block;
    color: #111827;
    font-size: 19px;
    line-height: 1.3;
    font-weight: 950;
}

.card-title:hover,
.rank-title:hover {
    color: var(--brand-dark);
}

.card-meta,
.card-desc,
.rank-content p {
    color: var(--muted);
    line-height: 1.7;
}

.card-meta {
    margin: 8px 0 0;
    font-size: 13px;
}

.card-desc {
    margin: 10px 0 0;
    min-height: 58px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
    font-size: 13px;
    font-weight: 900;
}

.card-foot span {
    color: #f59e0b;
}

.card-foot a {
    color: var(--brand-dark);
}

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

.rank-row {
    display: grid;
    grid-template-columns: 58px 96px minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 16px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 16px 42px rgba(15, 23, 42, 0.08);
}

.rank-number {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 18px;
    color: var(--brand-dark);
    font-size: 22px;
    font-weight: 950;
    background: #fff7ed;
}

.rank-number.top-rank {
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--brand-pink));
}

.rank-thumb {
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 16px;
    background: #fed7aa;
}

.rank-content p {
    margin: 7px 0 0;
}

.rank-tags {
    margin-top: 10px;
}

.rank-tags span {
    color: #64748b;
    background: #f8fafc;
    box-shadow: inset 0 0 0 1px var(--line);
}

.rank-action {
    color: #fff;
    background: linear-gradient(90deg, var(--brand), var(--brand-dark));
}

.wide-cta,
.page-hero {
    width: min(1240px, calc(100% - 48px));
    margin: 68px auto 0;
    color: #fff;
    border-radius: 32px;
    padding: 54px;
    background: linear-gradient(90deg, var(--brand), var(--brand-dark), var(--brand-pink));
    box-shadow: var(--shadow);
}

.wide-cta h2 {
    margin: 0;
    font-size: clamp(30px, 5vw, 48px);
    font-weight: 950;
}

.wide-cta p {
    margin: 16px 0 28px;
    font-size: 19px;
    opacity: 0.9;
}

.wide-cta div {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.wide-cta a {
    color: var(--brand-dark);
    background: #fff;
}

.page-hero {
    position: relative;
    overflow: hidden;
    min-height: 320px;
    display: flex;
    align-items: center;
}

.page-hero::after {
    content: "";
    position: absolute;
    width: 260px;
    height: 260px;
    right: -70px;
    bottom: -100px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
}

.page-hero > div {
    position: relative;
    z-index: 1;
    max-width: 840px;
}

.page-hero span {
    font-weight: 950;
    letter-spacing: 0.08em;
}

.page-filter {
    display: flex;
    gap: 10px;
    width: min(620px, 100%);
    margin-top: 28px;
    padding: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(16px);
}

.page-filter input {
    background: transparent;
    box-shadow: none;
}

.detail-hero {
    min-height: 650px;
    color: #fff;
    background-size: cover;
    background-position: center;
}

.detail-hero-inner {
    width: min(1240px, calc(100% - 48px));
    margin: 0 auto;
    padding: 44px 0 72px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    color: rgba(255, 255, 255, 0.74);
    font-weight: 700;
}

.breadcrumb a:hover {
    color: #fff;
}

.detail-top {
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr);
    gap: 46px;
    align-items: center;
    padding-top: 48px;
}

.detail-poster {
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 28px;
    background: #fed7aa;
    box-shadow: 0 30px 82px rgba(0, 0, 0, 0.35);
}

.detail-info h1 {
    font-size: clamp(36px, 6vw, 72px);
}

.detail-info .primary-btn {
    margin-top: 32px;
}

.watch-section {
    padding-top: 56px;
}

.video-shell {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    background: #020617;
    box-shadow: 0 30px 90px rgba(15, 23, 42, 0.22);
    aspect-ratio: 16 / 9;
}

.movie-player {
    width: 100%;
    height: 100%;
    background: #020617;
    object-fit: contain;
}

.player-start {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 12px;
    color: #fff;
    border: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.52));
    cursor: pointer;
}

.player-start span {
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    border-radius: 50%;
    font-size: 30px;
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    box-shadow: 0 18px 40px rgba(220, 38, 38, 0.35);
}

.player-start strong {
    font-size: 21px;
}

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

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

.detail-article,
.detail-side {
    padding: 32px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 18px 52px rgba(15, 23, 42, 0.08);
}

.detail-article h2,
.detail-side h2 {
    margin: 0 0 18px;
    color: #111827;
    font-size: 26px;
    font-weight: 950;
}

.detail-article h2:not(:first-child) {
    margin-top: 34px;
}

.detail-article p {
    margin: 0 0 16px;
    color: #374151;
    font-size: 17px;
    line-height: 2;
}

.detail-side dl {
    margin: 0;
    display: grid;
    gap: 14px;
}

.detail-side dl div {
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}

.detail-side dt {
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
}

.detail-side dd {
    margin: 6px 0 0;
    color: #111827;
    font-weight: 850;
    line-height: 1.7;
}

.detail-side a {
    color: var(--brand-dark);
}

.related-grid .compact-card .card-desc {
    min-height: auto;
}

.site-footer {
    margin-top: 80px;
    color: #fff;
    background: #111827;
}

.footer-inner {
    width: min(1240px, calc(100% - 48px));
    margin: 0 auto;
    padding: 42px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.footer-inner p {
    margin: 0;
    color: rgba(255, 255, 255, 0.68);
}

.footer-links {
    display: flex;
    gap: 16px;
    font-weight: 800;
}

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

.is-filtered-out {
    display: none !important;
}

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

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

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

@media (max-width: 860px) {
    .nav-wrap {
        min-height: 64px;
    }

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

    .nav-links {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 76px;
        display: none;
        padding: 20px;
        border-radius: 24px;
        background: rgba(220, 38, 38, 0.96);
        box-shadow: 0 28px 60px rgba(15, 23, 42, 0.25);
        flex-direction: column;
        align-items: flex-start;
    }

    .nav-links.is-open {
        display: flex;
    }

    .hero-carousel {
        min-height: 620px;
    }

    .hero-bottom {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .rank-row {
        grid-template-columns: 46px 82px minmax(0, 1fr);
    }

    .rank-action {
        grid-column: 3;
        width: fit-content;
    }

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

    .detail-poster {
        max-width: 310px;
    }

    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 560px) {
    .nav-wrap,
    .hero-content,
    .hero-bottom,
    .section-wrap,
    .wide-cta,
    .page-hero,
    .detail-hero-inner,
    .footer-inner {
        width: min(100% - 28px, 1240px);
    }

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

    .hero-carousel {
        min-height: 670px;
    }

    .hero-content h1,
    .page-hero h1,
    .detail-info h1 {
        font-size: 34px;
    }

    .hero-search,
    .page-filter {
        border-radius: 22px;
        flex-direction: column;
    }

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

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

    .wide-cta,
    .page-hero,
    .detail-article,
    .detail-side {
        padding: 28px;
        border-radius: 24px;
    }

    .rank-row {
        grid-template-columns: 42px minmax(0, 1fr);
    }

    .rank-thumb {
        display: none;
    }

    .rank-action {
        grid-column: 2;
    }
}
