:root {
    --bg: #fff7ed;
    --card: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --soft: #fff1f2;
    --primary: #ef4444;
    --secondary: #f97316;
    --pink: #ec4899;
    --line: rgba(31, 41, 55, 0.09);
    --shadow: 0 20px 60px rgba(127, 29, 29, 0.12);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 12% 5%, rgba(249, 115, 22, 0.15), transparent 28rem),
        radial-gradient(circle at 92% 18%, rgba(236, 72, 153, 0.12), transparent 24rem),
        linear-gradient(180deg, #fff7ed 0%, #ffffff 42%, #fff7ed 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.86);
    border-bottom: 1px solid rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(18px);
    box-shadow: 0 10px 35px rgba(127, 29, 29, 0.08);
}

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

.logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    font-size: 22px;
    color: #991b1b;
    letter-spacing: -0.02em;
}

.logo-mark {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    color: #ffffff;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), var(--secondary), var(--pink));
    box-shadow: 0 12px 30px rgba(239, 68, 68, 0.28);
}

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

.main-nav a,
.mobile-nav a {
    padding: 10px 14px;
    border-radius: 999px;
    color: #4b5563;
    font-weight: 700;
    transition: 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active,
.mobile-nav a:hover {
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    box-shadow: 0 10px 24px rgba(239, 68, 68, 0.18);
}

.top-search {
    margin-left: auto;
    display: flex;
    width: min(360px, 36vw);
    padding: 5px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.74);
}

.top-search input,
.mobile-nav input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    border: 0;
    outline: 0;
    background: #ffffff;
    color: var(--text);
}

.top-search input {
    padding: 0 14px;
    background: transparent;
}

.top-search button,
.mobile-nav button {
    border: 0;
    color: #ffffff;
    cursor: pointer;
    font-weight: 800;
    padding: 9px 18px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    background: #fff1f2;
    cursor: pointer;
    padding: 10px;
}

.menu-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    border-radius: 99px;
    background: #b91c1c;
}

.mobile-nav {
    display: none;
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto 16px;
    padding: 14px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.mobile-nav form {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.mobile-nav input {
    padding: 12px 14px;
    border-radius: 14px;
    background: #fff7ed;
}

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

.hero-track,
.hero-slide {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.7s ease;
}

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

.hero-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
    filter: saturate(1.05);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(17, 24, 39, 0.92), rgba(127, 29, 29, 0.58), rgba(17, 24, 39, 0.18)),
        linear-gradient(0deg, rgba(17, 24, 39, 0.9), transparent 48%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1200px, calc(100% - 32px));
    height: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 90px 0 160px;
    max-width: 1200px;
}

.eyebrow,
.section-heading span,
.page-hero span {
    display: inline-flex;
    width: max-content;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    color: #991b1b;
    font-weight: 900;
    background: linear-gradient(135deg, #fee2e2, #ffedd5);
}

.hero-content .eyebrow {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
}

.hero-content h1 {
    margin: 20px 0 6px;
    font-size: clamp(34px, 6vw, 76px);
    line-height: 0.98;
    letter-spacing: -0.06em;
    max-width: 900px;
}

.hero-content h2 {
    margin: 0;
    font-size: clamp(26px, 4vw, 46px);
    color: #fed7aa;
}

.hero-content p {
    max-width: 680px;
    margin: 18px 0 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 18px;
    line-height: 1.9;
}

.hero-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.hero-tags span {
    padding: 7px 12px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(12px);
    font-weight: 700;
    font-size: 13px;
}

.hero-actions,
.center-action,
.page-actions,
.detail-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 28px;
}

.primary-btn,
.secondary-btn,
.text-link {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 900;
    transition: 0.2s ease;
}

.primary-btn {
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--secondary), var(--pink));
    box-shadow: 0 18px 35px rgba(239, 68, 68, 0.28);
}

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

.secondary-btn.dark {
    color: #991b1b;
    border-color: rgba(239, 68, 68, 0.16);
    background: #ffffff;
}

.primary-btn:hover,
.secondary-btn:hover,
.text-link:hover {
    transform: translateY(-2px) scale(1.02);
}

.hero-control-row {
    position: absolute;
    z-index: 5;
    left: 50%;
    bottom: 26px;
    width: min(1200px, calc(100% - 32px));
    transform: translateX(-50%);
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: flex-end;
}

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

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

.hero-dots button.is-active {
    background: #ffffff;
}

.hero-mini-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    width: min(560px, 48vw);
}

.hero-mini {
    position: relative;
    min-height: 88px;
    overflow: hidden;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
}

.hero-mini img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.7);
}

.hero-mini span {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 8px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 900;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hero-mini.is-active {
    outline: 3px solid #ffffff;
}

.section-block {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 76px 0;
}

.soft-panel {
    width: 100%;
    max-width: none;
    padding: 76px max(16px, calc((100% - 1200px) / 2));
    background: linear-gradient(135deg, rgba(255, 237, 213, 0.92), rgba(252, 231, 243, 0.9));
}

.section-heading {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 38px;
}

.section-heading span,
.page-hero span {
    margin: 0 auto 14px;
}

.section-heading h2,
.page-hero h1 {
    margin: 0;
    font-size: clamp(30px, 5vw, 48px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.section-heading p,
.page-hero p {
    margin: 14px auto 0;
    max-width: 700px;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.8;
}

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: var(--card);
    box-shadow: 0 12px 32px rgba(127, 29, 29, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.76);
    transition: 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 24px 60px rgba(127, 29, 29, 0.18);
}

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

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

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

.poster-hover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #ffffff;
    font-weight: 900;
    font-size: 18px;
    background: rgba(17, 24, 39, 0);
    opacity: 0;
    transition: 0.25s ease;
}

.movie-card:hover .poster-hover {
    opacity: 1;
    background: rgba(17, 24, 39, 0.42);
}

.corner-label,
.year-label,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    color: #ffffff;
    font-weight: 900;
    font-size: 12px;
}

.corner-label {
    top: 12px;
    right: 12px;
    padding: 6px 10px;
    background: rgba(239, 68, 68, 0.92);
}

.year-label {
    left: 12px;
    bottom: 12px;
    padding: 5px 9px;
    background: rgba(17, 24, 39, 0.72);
}

.rank-badge {
    top: 10px;
    left: 10px;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    box-shadow: 0 8px 22px rgba(239, 68, 68, 0.32);
}

.card-body {
    padding: 18px;
}

.card-body h3 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-body h3 a:hover {
    color: var(--primary);
}

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

.meta-row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    color: #9f1239;
    font-size: 12px;
    font-weight: 800;
}

.meta-row span {
    max-width: 50%;
    padding: 5px 8px;
    border-radius: 999px;
    background: #fff1f2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.category-section {
    padding-bottom: 96px;
}

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

.category-card {
    overflow: hidden;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: var(--shadow);
    transition: 0.25s ease;
}

.category-card:hover {
    transform: translateY(-6px);
}

.category-cover {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3px;
    height: 142px;
    overflow: hidden;
    background: linear-gradient(135deg, #fee2e2, #fed7aa);
}

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

.category-body {
    padding: 22px;
}

.category-body h2 {
    margin: 0 0 8px;
    font-size: 22px;
}

.category-body p {
    margin: 0 0 16px;
    color: var(--muted);
    line-height: 1.7;
}

.text-link {
    min-height: auto;
    padding: 0;
    color: var(--primary);
}

.center-action {
    justify-content: center;
}

.page-hero {
    min-height: 330px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 16px;
    background:
        linear-gradient(135deg, rgba(239, 68, 68, 0.16), rgba(249, 115, 22, 0.16), rgba(236, 72, 153, 0.12)),
        #ffffff;
}

.ranking-hero,
.category-page-hero {
    color: #ffffff;
    background: linear-gradient(135deg, #ef4444, #f97316, #ec4899);
}

.ranking-hero p,
.category-page-hero p {
    color: rgba(255, 255, 255, 0.88);
}

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

.filter-panel {
    display: grid;
    grid-template-columns: 1fr 180px 180px;
    gap: 14px;
    margin: 0 0 28px;
    padding: 14px;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.filter-panel input,
.filter-panel select {
    min-height: 48px;
    padding: 0 16px;
    border-radius: 16px;
    border: 1px solid var(--line);
}

.empty-state {
    display: none;
    margin: 32px auto 0;
    padding: 28px;
    border-radius: 22px;
    text-align: center;
    color: var(--muted);
    background: #ffffff;
    box-shadow: var(--shadow);
}

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

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

.detail-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(16px) saturate(1.2);
    transform: scale(1.08);
}

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(17, 24, 39, 0.95), rgba(127, 29, 29, 0.72)),
        linear-gradient(0deg, #111827, transparent 65%);
}

.detail-layout {
    position: relative;
    z-index: 2;
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 56px 0;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
    gap: 34px;
    align-items: center;
}

.player-frame {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000000;
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.44);
    aspect-ratio: 16 / 9;
}

.player-frame video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000000;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    color: #ffffff;
    cursor: pointer;
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.38), rgba(127, 29, 29, 0.42));
}

.player-frame.is-playing .player-cover {
    display: none;
}

.play-icon {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    padding-left: 4px;
    border-radius: 50%;
    color: #ef4444;
    background: #ffffff;
    box-shadow: 0 18px 42px rgba(255, 255, 255, 0.2);
    font-size: 34px;
}

.detail-info {
    padding: 28px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(18px);
}

.breadcrumbs {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.78);
    font-weight: 700;
}

.breadcrumbs a:hover {
    color: #fed7aa;
}

.detail-info h1 {
    margin: 18px 0 12px;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.lead-text {
    margin: 0;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.8;
    font-size: 17px;
}

.detail-meta {
    display: grid;
    gap: 10px;
    margin-top: 18px;
    color: rgba(255, 255, 255, 0.88);
    font-weight: 700;
}

.detail-section {
    display: grid;
    gap: 22px;
}

.detail-copy {
    padding: 30px;
    border-radius: 26px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.detail-copy h2 {
    margin: 0 0 14px;
    font-size: 28px;
}

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

.next-prev {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.next-prev a {
    padding: 18px 20px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(127, 29, 29, 0.09);
    color: #991b1b;
    font-weight: 900;
}

.site-footer {
    margin-top: 40px;
    color: #ffffff;
    background: linear-gradient(135deg, #111827, #7f1d1d 56%, #9f1239);
}

.footer-grid {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 56px 0 34px;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 34px;
}

.footer-grid h2 {
    margin: 0 0 16px;
    font-size: 18px;
}

.footer-grid p,
.footer-grid a {
    display: block;
    color: rgba(255, 255, 255, 0.76);
    line-height: 1.8;
    margin: 0 0 8px;
}

.footer-grid a:hover {
    color: #ffffff;
}

.copyright {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 20px 0 28px;
    color: rgba(255, 255, 255, 0.66);
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    text-align: center;
}

.back-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 40;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    color: #ffffff;
    cursor: pointer;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    box-shadow: 0 14px 32px rgba(239, 68, 68, 0.3);
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: 0.2s ease;
}

.back-top.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

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

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

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

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

@media (max-width: 780px) {
    .nav-wrap {
        height: 68px;
    }

    .main-nav {
        display: none;
    }

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

    .mobile-nav.open {
        display: block;
    }

    .hero-slider {
        min-height: 720px;
    }

    .hero-content {
        padding: 82px 0 220px;
    }

    .hero-mini-row {
        width: 100%;
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-control-row {
        flex-direction: column;
        align-items: stretch;
    }

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

    .section-block,
    .soft-panel {
        padding-top: 52px;
        padding-bottom: 52px;
    }

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

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

    .next-prev {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .logo {
        font-size: 18px;
    }

    .logo-mark {
        width: 34px;
        height: 34px;
    }

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

    .hero-content h2 {
        font-size: 26px;
    }

    .hero-content p,
    .lead-text {
        font-size: 15px;
    }

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

    .category-cover {
        height: 168px;
    }

    .detail-info,
    .detail-copy {
        padding: 22px;
    }

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