:root {
    --bg: #fff7f2;
    --surface: #ffffff;
    --surface-soft: #fff1e8;
    --text: #1f2937;
    --muted: #6b7280;
    --line: #f3d6c7;
    --primary: #dc2626;
    --primary-dark: #991b1b;
    --accent: #f97316;
    --gold: #f59e0b;
    --shadow: 0 18px 45px rgba(127, 29, 29, 0.13);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(249, 115, 22, 0.13), transparent 32rem),
        linear-gradient(180deg, #fffaf6 0%, #fff7f2 45%, #ffffff 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(255, 210, 190, 0.7);
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(18px);
    box-shadow: 0 10px 30px rgba(127, 29, 29, 0.06);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 72px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

.brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 14px;
    color: white;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 12px 26px rgba(220, 38, 38, 0.28);
}

.brand-text,
.footer-brand {
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -0.02em;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-left: auto;
    font-weight: 700;
}

.desktop-nav a,
.nav-drop button {
    border: 0;
    background: transparent;
    color: #374151;
    cursor: pointer;
    font-weight: 700;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.nav-drop button:hover {
    color: var(--primary);
}

.nav-drop {
    position: relative;
}

.nav-drop-panel {
    position: absolute;
    top: calc(100% + 18px);
    left: -18px;
    display: grid;
    width: 240px;
    gap: 2px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: white;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: 0.2s ease;
}

.nav-drop:hover .nav-drop-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-drop-panel a {
    padding: 9px 12px;
    border-radius: 12px;
}

.nav-drop-panel a:hover {
    background: #fff1e8;
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search input,
.big-search input,
.search-page-form input {
    min-width: 230px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 12px 16px;
    color: var(--text);
    background: white;
    outline: none;
    transition: 0.2s ease;
}

.header-search input:focus,
.big-search input:focus,
.search-page-form input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.12);
}

.header-search button,
.big-search button,
.button {
    border: 0;
    border-radius: 999px;
    padding: 12px 18px;
    color: white;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    cursor: pointer;
    box-shadow: 0 14px 30px rgba(220, 38, 38, 0.2);
}

.button-secondary {
    color: #7f1d1d;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: inset 0 0 0 1px rgba(220, 38, 38, 0.14);
}

.mobile-menu-button {
    display: none;
    margin-left: auto;
    border: 0;
    border-radius: 14px;
    padding: 9px 12px;
    background: #fff1e8;
    color: var(--primary);
    font-weight: 900;
}

.mobile-nav {
    display: none;
    padding: 0 16px 16px;
    border-top: 1px solid var(--line);
    background: white;
}

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

.mobile-nav a {
    display: block;
    padding: 10px 0;
    font-weight: 700;
}

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

.hero-carousel {
    position: relative;
    min-height: 680px;
    overflow: hidden;
    color: white;
    background: #210806;
}

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

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

.hero-bg {
    position: absolute;
    inset: 0;
    background-position: center;
    background-size: cover;
    filter: blur(8px) saturate(1.2);
    transform: scale(1.06);
    opacity: 0.36;
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 78% 20%, rgba(249, 115, 22, 0.36), transparent 22rem),
        linear-gradient(90deg, rgba(36, 8, 8, 0.94), rgba(127, 29, 29, 0.78) 42%, rgba(127, 29, 29, 0.28));
}

.hero-content {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 54px;
    align-items: center;
    padding: 90px 0 110px;
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border-radius: 999px;
    padding: 6px 12px;
    color: #b91c1c;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.08em;
    background: #fff1e8;
}

.hero-copy .eyebrow {
    color: #ffd7c2;
    background: rgba(255, 255, 255, 0.13);
    backdrop-filter: blur(12px);
}

.hero-copy h1 {
    margin: 22px 0 18px;
    font-size: clamp(42px, 7vw, 88px);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

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

.hero-tags,
.detail-tags,
.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.tag {
    border-radius: 999px;
    padding: 7px 12px;
    color: #7f1d1d;
    font-size: 13px;
    font-weight: 800;
    background: #fff1e8;
}

.hero-tags span {
    color: white;
    background: rgba(255, 255, 255, 0.18);
}

.hero-actions,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.hero-poster {
    border-radius: 32px;
    overflow: hidden;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.38);
    transform: rotate(2deg);
}

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

.hero-controls {
    position: absolute;
    right: 0;
    bottom: 38px;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.hero-controls button {
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 50%;
    color: white;
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
    backdrop-filter: blur(12px);
}

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

.hero-dots button {
    width: 12px;
    height: 12px;
    padding: 0;
}

.hero-dots button.is-active {
    width: 34px;
    border-radius: 999px;
    background: white;
}

.section-block {
    padding: 54px 0;
}

.section-heading {
    margin-bottom: 26px;
}

.section-heading h2,
.page-hero h1,
.category-hero h1 {
    margin: 10px 0 0;
    color: #111827;
    font-size: clamp(28px, 4vw, 46px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

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

.text-link {
    color: var(--primary);
    font-weight: 900;
}

.big-search {
    display: flex;
    gap: 12px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: white;
    box-shadow: var(--shadow);
}

.big-search input {
    flex: 1;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: white;
    box-shadow: 0 14px 32px rgba(127, 29, 29, 0.08);
    transition: 0.22s ease;
}

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

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
}

.poster-link img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.poster-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    border-radius: 999px;
    padding: 5px 10px;
    color: white;
    font-size: 12px;
    font-weight: 900;
    background: rgba(220, 38, 38, 0.92);
}

.movie-card-body {
    padding: 16px;
}

.movie-meta-line,
.ranking-meta,
.detail-meta,
.category-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.movie-card h3 {
    min-height: 56px;
    margin: 8px 0;
    font-size: 19px;
    line-height: 1.32;
}

.movie-card p {
    display: -webkit-box;
    min-height: 48px;
    margin: 0 0 12px;
    overflow: hidden;
    color: var(--muted);
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.tag-small {
    padding: 5px 9px;
    font-size: 12px;
}

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

.category-tile {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
    background: linear-gradient(180deg, #ffffff, #fff7f2);
    box-shadow: 0 14px 32px rgba(127, 29, 29, 0.08);
}

.category-tile span {
    color: var(--primary);
    font-weight: 900;
}

.category-tile strong {
    display: block;
    margin: 12px 0 6px;
    font-size: 30px;
}

.category-tile p {
    min-height: 70px;
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.category-preview-links {
    display: grid;
    gap: 6px;
    margin-top: 12px;
    font-size: 13px;
    font-weight: 700;
}

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

.ranking-item {
    display: grid;
    grid-template-columns: 52px 86px minmax(0, 1fr) 120px;
    gap: 18px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 14px;
    background: white;
    box-shadow: 0 12px 26px rgba(127, 29, 29, 0.07);
}

.rank-number {
    color: var(--primary);
    font-size: 26px;
    font-weight: 950;
}

.ranking-cover {
    overflow: hidden;
    border-radius: 14px;
}

.ranking-cover img {
    width: 86px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.ranking-info h3 {
    margin: 0 0 6px;
    font-size: 20px;
}

.ranking-info p {
    margin: 0 0 8px;
    color: var(--muted);
}

.ranking-score {
    text-align: right;
}

.ranking-score strong {
    display: block;
    color: var(--primary);
    font-size: 30px;
    line-height: 1;
}

.ranking-score span,
.ranking-score small {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.page-hero,
.category-hero {
    color: white;
    background:
        radial-gradient(circle at 70% 20%, rgba(249, 115, 22, 0.35), transparent 20rem),
        linear-gradient(135deg, #7f1d1d, #1f0909 70%);
}

.compact-hero .container,
.category-hero-inner {
    padding: 76px 0;
}

.page-hero h1,
.category-hero h1,
.page-hero p,
.category-hero p {
    color: white;
}

.category-stats span,
.detail-meta span {
    border-radius: 999px;
    padding: 6px 10px;
    color: inherit;
    background: rgba(255, 255, 255, 0.13);
}

.detail-hero {
    position: relative;
    overflow: hidden;
    color: white;
    background: #210806;
}

.detail-bg {
    position: absolute;
    inset: 0;
    background-position: center;
    background-size: cover;
    opacity: 0.32;
    filter: blur(10px) saturate(1.2);
    transform: scale(1.08);
}

.detail-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(25, 5, 5, 0.96), rgba(127, 29, 29, 0.74), rgba(127, 29, 29, 0.22));
}

.detail-hero-inner {
    position: relative;
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 46px;
    align-items: center;
    padding: 70px 0;
}

.detail-poster {
    overflow: hidden;
    border-radius: 30px;
    box-shadow: 0 36px 70px rgba(0, 0, 0, 0.42);
}

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

.detail-copy h1 {
    margin: 18px 0;
    font-size: clamp(38px, 6vw, 76px);
    line-height: 1;
    letter-spacing: -0.05em;
}

.detail-one-line {
    max-width: 820px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 19px;
}

.detail-tags {
    margin-top: 16px;
}

.player-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 30px;
    background: white;
    box-shadow: var(--shadow);
}

.player-screen {
    position: relative;
    background: #0f0f12;
}

.movie-video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #0f0f12;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 12px;
    border: 0;
    color: white;
    font-size: 20px;
    font-weight: 900;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.52));
    cursor: pointer;
}

.play-overlay.is-hidden {
    display: none;
}

.play-icon {
    display: grid;
    width: 76px;
    height: 76px;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 18px 40px rgba(220, 38, 38, 0.35);
}

.player-info {
    padding: 24px;
}

.player-info h2 {
    margin: 0 0 8px;
}

.player-info p,
.source-line {
    margin: 0;
    color: var(--muted);
}

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

.text-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 28px;
    background: white;
    box-shadow: 0 14px 32px rgba(127, 29, 29, 0.07);
}

.text-panel h2 {
    margin-top: 0;
}

.index-page {
    display: grid;
    gap: 32px;
}

.index-group {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px;
    background: white;
}

.index-group h2 {
    margin-top: 0;
}

.index-links {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px 16px;
}

.index-links a {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    border-bottom: 1px dashed #f0d0bf;
    padding-bottom: 6px;
    color: #374151;
    font-weight: 700;
}

.index-links span {
    color: var(--muted);
    font-size: 12px;
}

.site-footer {
    margin-top: 50px;
    color: #d1d5db;
    background: linear-gradient(180deg, #1f0909, #09090b);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 36px;
    padding: 48px 0;
}

.footer-grid h3 {
    color: white;
}

.footer-links {
    display: grid;
    gap: 8px;
}

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

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding: 18px 0 28px;
    color: #9ca3af;
}

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

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

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

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

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

    .mobile-menu-button {
        display: inline-flex;
    }

    .hero-carousel {
        min-height: auto;
    }

    .hero-content,
    .detail-hero-inner {
        grid-template-columns: 1fr;
        padding: 58px 0 96px;
    }

    .hero-poster,
    .detail-poster {
        width: min(300px, 78vw);
        margin: 0 auto;
    }

    .movie-grid,
    .category-grid,
    .detail-content,
    .footer-grid,
    .index-links {
        grid-template-columns: 1fr;
    }

    .section-heading.with-action,
    .footer-bottom,
    .big-search {
        align-items: stretch;
        flex-direction: column;
    }

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

    .ranking-score {
        grid-column: 2 / -1;
        text-align: left;
    }
}

@media (max-width: 540px) {
    .container {
        width: min(100% - 22px, 1180px);
    }

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

    .hero-copy h1,
    .detail-copy h1 {
        font-size: 40px;
    }

    .section-block {
        padding: 38px 0;
    }
}
