:root {
    --page-bg: #f7f7f8;
    --surface: #ffffff;
    --surface-soft: #fff5f5;
    --text: #1f2937;
    --muted: #6b7280;
    --border: #e5e7eb;
    --primary: #dc2626;
    --primary-dark: #b91c1c;
    --primary-soft: #fee2e2;
    --dark: #111827;
    --shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--page-bg);
    color: var(--text);
    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%;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(229, 231, 235, 0.85);
    backdrop-filter: blur(16px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
    gap: 22px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 190px;
}

.brand-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), #fb7185);
    border-radius: 12px;
    box-shadow: 0 12px 22px rgba(220, 38, 38, 0.25);
}

.brand-text strong,
.footer-logo {
    display: block;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.1;
}

.brand-text em {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    color: #374151;
    font-size: 15px;
    font-weight: 650;
}

.desktop-nav a,
.nav-dropdown button {
    color: #374151;
    background: transparent;
    border: 0;
    font: inherit;
    cursor: pointer;
    transition: color 0.2s ease;
}

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

.nav-dropdown {
    position: relative;
}

.dropdown-panel {
    position: absolute;
    top: calc(100% + 14px);
    right: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(92px, 1fr));
    gap: 8px;
    width: 260px;
    padding: 14px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.2s ease;
}

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

.dropdown-panel a {
    padding: 9px 10px;
    border-radius: 10px;
    font-size: 14px;
}

.dropdown-panel a:hover {
    background: var(--primary-soft);
}

.header-search {
    display: flex;
    align-items: center;
    width: min(320px, 30vw);
    padding: 5px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
}

.header-search input {
    flex: 1;
    min-width: 0;
    padding: 10px 12px;
    color: var(--text);
    background: transparent;
    border: 0;
    outline: 0;
}

.header-search button,
.primary-button,
.secondary-button,
.play-button,
.control-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 18px;
    color: #ffffff;
    background: var(--primary);
    border: 0;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.header-search button:hover,
.primary-button:hover,
.play-button:hover,
.control-button:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 12px 22px rgba(220, 38, 38, 0.24);
}

.secondary-button {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.34);
}

.secondary-button:hover {
    background: rgba(255, 255, 255, 0.26);
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    color: var(--text);
    background: #f3f4f6;
    border: 0;
    border-radius: 12px;
    font-size: 22px;
}

.mobile-panel {
    display: none;
    padding: 10px 16px 18px;
    border-top: 1px solid var(--border);
    background: #ffffff;
}

.mobile-panel a {
    display: block;
    padding: 12px 8px;
    border-radius: 10px;
    font-weight: 650;
}

.mobile-panel a:hover {
    background: #f9fafb;
    color: var(--primary);
}

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

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

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.04);
}

.hero-backdrop {
    background: radial-gradient(circle at 18% 32%, rgba(220, 38, 38, 0.48), transparent 32%), linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.55) 46%, rgba(0, 0, 0, 0.18)), linear-gradient(0deg, #111827, transparent 42%);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    min-height: 600px;
    padding: 80px 0;
    color: #ffffff;
}

.hero-copy {
    width: min(720px, 100%);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 7px 12px;
    color: #fecaca;
    background: rgba(220, 38, 38, 0.18);
    border: 1px solid rgba(254, 202, 202, 0.2);
    border-radius: 999px;
    font-size: 14px;
    font-weight: 800;
}

.hero h1,
.page-hero h1,
.detail-title h1 {
    margin: 0;
    font-size: clamp(34px, 5vw, 64px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.hero p {
    margin: 20px 0 0;
    max-width: 680px;
    color: rgba(255, 255, 255, 0.82);
    font-size: clamp(17px, 2vw, 22px);
}

.hero-meta,
.detail-meta,
.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.hero-meta span,
.detail-meta span,
.card-meta span,
.movie-tags span,
.tag-list span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    color: #7f1d1d;
    background: #fee2e2;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.hero .hero-meta span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
}

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

.hero-controls {
    position: absolute;
    right: max(24px, calc((100vw - 1180px) / 2));
    bottom: 44px;
    z-index: 3;
    display: flex;
    gap: 10px;
}

.control-button {
    width: 46px;
    min-height: 46px;
    padding: 0;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.28);
}

.section {
    padding: 56px 0 0;
}

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

.section-head h2,
.page-headline h1,
.content-block h2,
.player-section h2,
.related-section h2 {
    margin: 0;
    color: var(--dark);
    font-size: clamp(24px, 3vw, 36px);
    line-height: 1.2;
}

.section-head p,
.page-headline p {
    margin: 8px 0 0;
    max-width: 680px;
    color: var(--muted);
}

.more-link {
    color: var(--primary);
    font-weight: 800;
}

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

.movie-card,
.category-card,
.info-panel,
.content-block,
.search-panel,
.rank-list,
.detail-shell,
.player-card {
    background: var(--surface);
    border: 1px solid rgba(229, 231, 235, 0.95);
    border-radius: var(--radius);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.movie-card {
    overflow: hidden;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #111827, #7f1d1d);
}

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

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

.poster-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 8px;
    color: #ffffff;
    background: rgba(220, 38, 38, 0.92);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.movie-info {
    padding: 14px;
}

.movie-title {
    display: -webkit-box;
    min-height: 48px;
    overflow: hidden;
    color: var(--dark);
    font-size: 16px;
    font-weight: 800;
    line-height: 1.4;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.movie-title:hover {
    color: var(--primary);
}

.movie-info p {
    display: -webkit-box;
    min-height: 44px;
    margin: 8px 0 12px;
    overflow: hidden;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.65;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.movie-tags,
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.movie-tags span {
    min-height: 24px;
    padding: 3px 8px;
    font-size: 12px;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    padding: 22px;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card::after {
    content: "";
    position: absolute;
    right: -40px;
    bottom: -40px;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(220, 38, 38, 0.16), transparent 70%);
}

.category-card h2 {
    margin: 0 0 10px;
    font-size: 22px;
}

.category-card p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

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

.rank-list {
    margin: 0;
    padding: 14px;
    list-style: none;
}

.rank-item + .rank-item {
    border-top: 1px solid var(--border);
}

.rank-link {
    display: grid;
    grid-template-columns: 44px 64px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 12px 4px;
}

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

.rank-link img {
    width: 64px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    background: #111827;
    border-radius: 10px;
}

.rank-text strong,
.rank-text em {
    display: block;
}

.rank-text strong {
    overflow: hidden;
    color: var(--dark);
    font-size: 16px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.page-hero {
    padding: 54px 0;
    color: #ffffff;
    background: radial-gradient(circle at 20% 20%, rgba(248, 113, 113, 0.38), transparent 30%), linear-gradient(135deg, #111827, #7f1d1d 62%, #111827);
}

.page-hero p {
    max-width: 760px;
    margin: 14px 0 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 18px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
    color: rgba(255, 255, 255, 0.74);
    font-size: 14px;
}

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

.filter-bar,
.search-panel {
    margin-bottom: 24px;
    padding: 18px;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 18px;
}

.filter-bar a,
.filter-bar button {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 14px;
    color: #374151;
    background: #f9fafb;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-weight: 700;
    cursor: pointer;
}

.filter-bar .is-active,
.filter-bar a:hover,
.filter-bar button:hover {
    color: #ffffff;
    background: var(--primary);
    border-color: var(--primary);
}

.detail-page {
    background: #f3f4f6;
}

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

.detail-hero-bg,
.detail-hero-bg img,
.detail-hero-shade {
    position: absolute;
    inset: 0;
}

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

.detail-hero-shade {
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.56), rgba(0, 0, 0, 0.18)), linear-gradient(0deg, #f3f4f6, transparent 18%);
}

.detail-shell {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(220px, 310px) minmax(0, 1fr);
    gap: 36px;
    align-items: end;
    margin-top: 54px;
    margin-bottom: -72px;
    padding: 26px;
    color: var(--text);
}

.detail-poster {
    overflow: hidden;
    aspect-ratio: 2 / 3;
    background: linear-gradient(135deg, #111827, #7f1d1d);
    border-radius: 18px;
}

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

.detail-title h1 {
    color: var(--dark);
}

.detail-title p {
    margin: 18px 0 0;
    color: var(--muted);
    font-size: 17px;
}

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

.detail-main {
    padding-top: 110px;
}

.player-card {
    overflow: hidden;
    padding: 0;
}

.video-wrap {
    position: relative;
    background: #020617;
}

.video-player {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.video-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.85), rgba(127, 29, 29, 0.68));
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.video-cover.is-hidden {
    opacity: 0;
    visibility: hidden;
}

.play-button {
    min-width: 150px;
    min-height: 54px;
    font-size: 17px;
}

.player-caption {
    padding: 16px 18px;
    color: var(--muted);
    font-size: 14px;
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 24px;
    margin-top: 24px;
}

.content-block,
.info-panel {
    padding: 24px;
}

.content-block + .content-block {
    margin-top: 18px;
}

.content-block p {
    margin: 14px 0 0;
    color: #374151;
    font-size: 16px;
}

.info-list {
    display: grid;
    gap: 12px;
    margin: 0;
}

.info-list div {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.info-list dt {
    color: var(--muted);
}

.info-list dd {
    margin: 0;
    color: var(--dark);
    font-weight: 750;
}

.related-section {
    margin-top: 36px;
}

.search-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
}

.search-panel input {
    width: 100%;
    min-height: 50px;
    padding: 0 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    outline: 0;
    font-size: 16px;
}

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

.empty-tip {
    display: none;
    padding: 30px;
    color: var(--muted);
    text-align: center;
    background: #ffffff;
    border: 1px dashed var(--border);
    border-radius: 18px;
}

.static-page {
    min-height: 60vh;
}

.site-footer {
    margin-top: 72px;
    color: #d1d5db;
    background: #111827;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 0.8fr 1fr;
    gap: 34px;
    padding: 46px 0;
}

.site-footer h2 {
    margin: 0 0 12px;
    color: #ffffff;
    font-size: 18px;
}

.site-footer p {
    margin: 8px 0;
    color: #9ca3af;
}

.site-footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer li + li {
    margin-top: 8px;
}

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

.footer-bottom {
    padding: 20px 16px;
    color: #9ca3af;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

    .menu-toggle {
        display: inline-grid;
        place-items: center;
    }

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

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

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

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

    .detail-shell {
        align-items: start;
        margin-bottom: -52px;
    }

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

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

    .hero,
    .hero-content {
        min-height: 560px;
    }

    .hero-content {
        padding: 62px 0;
    }

    .hero-actions,
    .section-head,
    .page-headline {
        align-items: stretch;
        flex-direction: column;
    }

    .hero-controls {
        right: 16px;
        bottom: 18px;
    }

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

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

    .movie-info {
        padding: 12px;
    }

    .movie-title {
        min-height: 44px;
        font-size: 15px;
    }

    .rank-link {
        grid-template-columns: 38px 56px minmax(0, 1fr);
        gap: 10px;
    }

    .rank-number {
        font-size: 20px;
    }

    .rank-link img {
        width: 56px;
    }

    .detail-shell {
        padding: 18px;
    }

    .detail-main {
        padding-top: 86px;
    }

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