* {
    box-sizing: border-box;
}

:root {
    --rose-50: #fff1f2;
    --rose-100: #ffe4e6;
    --rose-500: #f43f5e;
    --rose-600: #e11d48;
    --rose-700: #be123c;
    --amber-50: #fffbeb;
    --amber-100: #fef3c7;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --shadow: 0 18px 42px rgba(17, 24, 39, 0.12);
    --soft-shadow: 0 10px 26px rgba(17, 24, 39, 0.09);
    --radius: 18px;
}

body {
    margin: 0;
    color: var(--gray-800);
    background: linear-gradient(180deg, var(--gray-50), #ffffff 38%, #ffffff);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 4px 18px rgba(17, 24, 39, 0.08);
    backdrop-filter: blur(16px);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 21px;
    font-weight: 800;
    color: var(--gray-800);
}

.brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: inline-grid;
    place-items: center;
    color: #ffffff;
    font-size: 13px;
    background: linear-gradient(135deg, var(--rose-600), #f59e0b);
    box-shadow: 0 10px 22px rgba(225, 29, 72, 0.3);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    color: var(--gray-700);
    font-weight: 650;
    white-space: nowrap;
}

.desktop-nav a,
.mobile-nav a {
    transition: color 0.25s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.brand:hover {
    color: var(--rose-600);
}

.menu-button {
    width: 42px;
    height: 42px;
    border: 0;
    background: transparent;
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
}

.menu-button span {
    display: block;
    height: 2px;
    width: 24px;
    margin: 0 auto;
    background: var(--gray-800);
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 10px 0 18px;
    border-top: 1px solid var(--gray-200);
}

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

.hero-carousel {
    position: relative;
    height: 70vh;
    min-height: 520px;
    overflow: hidden;
    background: linear-gradient(120deg, #881337, #78350f);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease;
}

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-overlay,
.detail-backdrop span {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.08));
}

.hero-content {
    position: absolute;
    inset: 0;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    color: #ffffff;
    max-width: min(1180px, calc(100% - 32px));
}

.hero-content h1 {
    max-width: 760px;
    margin: 18px 0 18px;
    font-size: clamp(40px, 7vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.hero-content p {
    max-width: 680px;
    margin: 0 0 28px;
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(17px, 2.4vw, 22px);
}

.hero-pill {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 5px 14px;
    border-radius: 999px;
    color: #ffffff;
    background: var(--rose-600);
    font-weight: 700;
    font-size: 14px;
    box-shadow: 0 10px 22px rgba(225, 29, 72, 0.28);
}

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

.primary-button,
.ghost-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 44px;
    border-radius: 12px;
    padding: 0 24px;
    font-weight: 800;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.primary-button {
    color: #ffffff;
    background: var(--rose-600);
    box-shadow: 0 12px 26px rgba(225, 29, 72, 0.32);
}

.primary-button:hover {
    background: var(--rose-700);
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(225, 29, 72, 0.38);
}

.primary-button.small {
    min-height: 40px;
    padding: 0 18px;
}

.ghost-button {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(12px);
}

.ghost-button.dark {
    color: var(--gray-800);
    border-color: rgba(31, 41, 55, 0.12);
    background: rgba(255, 255, 255, 0.72);
}

.ghost-button:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.28);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(255, 255, 255, 0.34);
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

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

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

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

.content-section {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 72px 0;
}

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

.section-heading.center {
    display: block;
    text-align: center;
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

.section-title-line {
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-icon {
    width: 40px;
    height: 40px;
    display: inline-grid;
    place-items: center;
    border-radius: 14px;
    color: var(--rose-600);
    background: var(--rose-50);
    font-weight: 900;
}

.section-heading h2 {
    margin: 0;
    color: var(--gray-800);
    font-size: clamp(26px, 4vw, 36px);
    line-height: 1.2;
}

.section-heading p {
    max-width: 560px;
    margin: 8px 0 0;
    color: var(--gray-600);
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 180px 180px;
    gap: 14px;
    margin: 22px 0 8px;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    height: 48px;
    border: 1px solid var(--gray-200);
    border-radius: 14px;
    background: #ffffff;
    padding: 0 16px;
    color: var(--gray-700);
    font-size: 15px;
    outline: none;
    box-shadow: 0 6px 16px rgba(17, 24, 39, 0.05);
}

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

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

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

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

.movie-card {
    display: block;
    overflow: hidden;
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--soft-shadow);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

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

.poster-frame {
    position: relative;
    display: block;
    height: 210px;
    overflow: hidden;
    background: var(--gray-200);
}

.movie-card.large .poster-frame {
    height: 270px;
}

.movie-card.compact .poster-frame {
    height: 160px;
}

.movie-card.mini .poster-frame {
    height: 120px;
}

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

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

.type-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    padding: 3px 9px;
    border-radius: 999px;
    color: #ffffff;
    background: var(--rose-600);
    font-size: 12px;
    font-weight: 800;
}

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.58), transparent 56%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.movie-card:hover .poster-shade {
    opacity: 1;
}

.card-body {
    display: grid;
    gap: 9px;
    padding: 16px;
}

.card-body strong {
    color: var(--gray-800);
    font-size: 18px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-card:hover .card-body strong {
    color: var(--rose-600);
}

.card-desc {
    min-height: 44px;
    color: var(--gray-600);
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--gray-100);
    color: var(--gray-500);
    font-size: 12px;
}

.scroll-row {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 4px 2px 22px;
}

.scroll-row .movie-card {
    flex: 0 0 286px;
    scroll-snap-align: start;
}

.gradient-section {
    background: linear-gradient(90deg, var(--amber-50), var(--rose-50));
}

.ranking-strip {
    background: linear-gradient(135deg, var(--rose-100), var(--amber-50), #fdf2f8);
}

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

.category-tile,
.category-head,
.story-card,
.side-card,
.category-overview-card,
.soft-panel {
    border: 1px solid rgba(229, 231, 235, 0.92);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--soft-shadow);
}

.category-tile {
    min-height: 140px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: linear-gradient(135deg, #ffffff, var(--rose-50));
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-tile strong,
.category-head h2 {
    color: var(--gray-800);
    font-size: 21px;
}

.category-tile span,
.category-head p {
    color: var(--gray-600);
    font-size: 14px;
}

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

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

.rank-card {
    display: grid;
    grid-template-columns: 52px 90px 1fr;
    align-items: center;
    gap: 16px;
    padding: 12px;
}

.rank-card img {
    width: 90px;
    height: 78px;
    object-fit: cover;
    border-radius: 14px;
}

.rank-no {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--rose-600), #f59e0b);
    font-weight: 900;
}

.rank-info {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.rank-info strong {
    color: var(--gray-800);
    font-size: 17px;
}

.rank-info span {
    color: var(--gray-600);
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rank-info em {
    color: var(--rose-600);
    font-style: normal;
    font-size: 12px;
}

.more-link {
    margin-top: 26px;
    text-align: center;
}

.sub-hero {
    min-height: 330px;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #881337, #78350f);
    color: #ffffff;
}

.sub-hero > div {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.sub-hero h1 {
    max-width: 860px;
    margin: 18px 0 12px;
    font-size: clamp(36px, 6vw, 58px);
    line-height: 1.1;
}

.sub-hero p {
    max-width: 720px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 18px;
}

.category-overview-list {
    display: grid;
    gap: 26px;
}

.category-overview-card {
    padding: 22px;
}

.category-head {
    display: block;
    padding: 20px;
    margin-bottom: 18px;
    background: linear-gradient(135deg, #ffffff, var(--rose-50));
}

.category-head h2,
.category-head p {
    margin: 0;
}

.mini-card-row {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
}

.movie-card.mini .card-body {
    padding: 11px;
}

.movie-card.mini .card-body strong {
    font-size: 14px;
}

.movie-card.mini .card-desc,
.movie-card.mini .card-meta {
    display: none;
}

.detail-hero {
    position: relative;
    min-height: 560px;
    overflow: hidden;
    color: #ffffff;
    background: #111827;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
}

.detail-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(4px);
    transform: scale(1.04);
}

.detail-intro {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    min-height: 560px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 38px;
    align-items: center;
}

.detail-poster {
    width: 300px;
    height: 420px;
    object-fit: cover;
    border-radius: 24px;
    box-shadow: 0 28px 54px rgba(0, 0, 0, 0.35);
}

.breadcrumb {
    display: flex;
    gap: 9px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 14px;
    margin-bottom: 14px;
}

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

.detail-copy h1 {
    margin: 0 0 12px;
    font-size: clamp(38px, 6vw, 64px);
    line-height: 1.1;
}

.one-line {
    max-width: 760px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 20px;
}

.meta-pills,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0;
}

.meta-pills span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.24);
    backdrop-filter: blur(10px);
    font-size: 13px;
}

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

.detail-main,
.detail-side {
    display: grid;
    gap: 22px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #050505;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

.movie-video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    background: #000000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    background: radial-gradient(circle at center, rgba(225, 29, 72, 0.22), rgba(0, 0, 0, 0.48));
    cursor: pointer;
    transition: opacity 0.25s ease;
}

.play-overlay span {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    background: var(--rose-600);
    font-size: 28px;
    box-shadow: 0 18px 38px rgba(225, 29, 72, 0.34);
}

.player-shell.is-playing .play-overlay {
    opacity: 0;
    pointer-events: none;
}

.story-card,
.side-card {
    padding: 24px;
}

.story-card h2,
.side-card h2 {
    margin: 0 0 14px;
    color: var(--gray-800);
    font-size: 24px;
}

.story-card p {
    margin: 0 0 14px;
    color: var(--gray-700);
}

.side-card dl {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 10px 12px;
    margin: 0;
}

.side-card dt {
    color: var(--gray-500);
}

.side-card dd {
    margin: 0;
    color: var(--gray-800);
    font-weight: 700;
}

.side-recommend {
    display: grid;
    gap: 12px;
}

.movie-card.side {
    display: grid;
    grid-template-columns: 98px 1fr;
    align-items: stretch;
}

.movie-card.side .poster-frame {
    height: 128px;
}

.movie-card.side .card-body {
    padding: 12px;
}

.movie-card.side .card-body strong {
    font-size: 15px;
}

.movie-card.side .card-desc {
    min-height: 38px;
    font-size: 12px;
}

.movie-card.side .card-meta {
    font-size: 11px;
}

.site-footer {
    margin-top: 24px;
    background: linear-gradient(180deg, var(--gray-50), var(--gray-100));
    border-top: 1px solid var(--gray-200);
}

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

.footer-grid h2 {
    margin: 0 0 12px;
    font-size: 20px;
}

.footer-grid p,
.footer-grid li {
    color: var(--gray-600);
    font-size: 14px;
}

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

.footer-grid a:hover {
    color: var(--rose-600);
}

.copyright {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 30px;
    color: var(--gray-500);
    border-top: 1px solid var(--gray-200);
    text-align: center;
    font-size: 13px;
}

.is-hidden {
    display: none !important;
}

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

    .menu-button {
        display: flex;
    }

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

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

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

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

@media (max-width: 760px) {
    .hero-carousel {
        height: 72vh;
        min-height: 540px;
    }

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

    .hero-arrow {
        display: none;
    }

    .content-section {
        padding: 46px 0;
    }

    .section-heading {
        display: block;
    }

    .filter-panel {
        grid-template-columns: 1fr;
    }

    .movie-grid,
    .featured-grid,
    .all-grid,
    .compact-grid,
    .mini-card-row,
    .category-grid,
    .compact-ranking,
    .footer-grid,
    .detail-side {
        grid-template-columns: 1fr;
    }

    .detail-intro {
        min-height: auto;
        grid-template-columns: 1fr;
        gap: 22px;
        padding: 46px 0;
    }

    .detail-poster {
        width: min(280px, 100%);
        height: 380px;
    }

    .rank-card {
        grid-template-columns: 44px 78px 1fr;
        gap: 12px;
    }

    .rank-card img {
        width: 78px;
        height: 70px;
    }

    .poster-frame,
    .movie-card.large .poster-frame {
        height: 230px;
    }
}
