:root {
    --bg: #f6f7fb;
    --surface: #ffffff;
    --surface-soft: #f9fafb;
    --text: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --primary: #dc2626;
    --primary-dark: #b91c1c;
    --accent: #f97316;
    --blue: #2563eb;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.10);
    --radius: 18px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
    backdrop-filter: blur(16px);
}

.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    max-width: 1180px;
    height: 68px;
    margin: 0 auto;
    padding: 0 22px;
}

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

.brand-icon {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: #ffffff;
    font-size: 18px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 12px 24px rgba(220, 38, 38, 0.28);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-text strong {
    font-size: 20px;
    letter-spacing: -0.02em;
}

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

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
}

.nav-link,
.mobile-nav-link {
    color: #374151;
    font-size: 14px;
    font-weight: 600;
    border-radius: 10px;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link {
    padding: 10px 12px;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover,
.mobile-nav-link.is-active {
    color: var(--blue);
    background: #eff6ff;
}

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

.header-search input,
.mobile-search input,
.search-panel input {
    width: 230px;
    border: 1px solid #d1d5db;
    outline: none;
    border-radius: 999px;
    padding: 10px 16px;
    color: #111827;
    background: #ffffff;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.search-panel input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.header-search button,
.mobile-search button,
.search-panel button {
    border: 0;
    color: #ffffff;
    border-radius: 999px;
    padding: 10px 16px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--blue), #0ea5e9);
    cursor: pointer;
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: #f3f4f6;
    color: #111827;
    font-size: 22px;
}

.mobile-nav {
    display: none;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 22px 18px;
    border-top: 1px solid var(--line);
}

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

.mobile-nav-link {
    display: block;
    padding: 11px 12px;
}

.mobile-search {
    margin: 14px 0 6px;
}

.mobile-search input {
    width: 100%;
}

.page-main {
    max-width: 1180px;
    margin: 0 auto;
    padding: 36px 22px 70px;
}

.hero {
    position: relative;
    overflow: hidden;
    min-height: 520px;
    margin: 28px auto 42px;
    border-radius: 30px;
    color: #ffffff;
    background: #0f172a;
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    background-position: center;
    background-size: cover;
    transition: opacity 0.75s ease;
}

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

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.62), rgba(15, 23, 42, 0.18));
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 48%;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.88), transparent);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    align-content: center;
    gap: 22px;
    width: min(650px, 90%);
    min-height: 520px;
    padding: 58px;
}

.hero-kicker {
    width: fit-content;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    padding: 7px 12px;
    color: #fee2e2;
    font-size: 13px;
    font-weight: 700;
    background: rgba(220, 38, 38, 0.35);
    backdrop-filter: blur(10px);
}

.hero h1,
.hero h2 {
    margin: 0;
    font-size: clamp(34px, 5vw, 62px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.hero p {
    max-width: 590px;
    margin: 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 18px;
    line-height: 1.8;
}

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

.hero-tags span,
.detail-tags span,
.card-tags span {
    border-radius: 999px;
    padding: 6px 10px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.18);
}

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

.button-primary,
.button-secondary,
.button-light {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 999px;
    padding: 13px 18px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button-primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 14px 28px rgba(220, 38, 38, 0.28);
}

.button-secondary {
    color: #111827;
    background: #ffffff;
}

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

.button-primary:hover,
.button-secondary:hover,
.button-light:hover {
    transform: translateY(-2px);
}

.hero-controls {
    position: absolute;
    right: 34px;
    bottom: 34px;
    z-index: 5;
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 36px;
    height: 7px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.38);
    cursor: pointer;
}

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

.section {
    margin: 44px 0;
}

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

.section-eyebrow {
    color: var(--primary);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.section-title {
    margin: 6px 0 0;
    color: #111827;
    font-size: clamp(26px, 3vw, 38px);
    font-weight: 900;
    letter-spacing: -0.04em;
}

.section-desc {
    max-width: 720px;
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.8;
}

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

.movie-card,
.category-card,
.rank-card,
.info-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border 0.22s ease;
}

.movie-card:hover,
.category-card:hover,
.rank-card:hover,
.info-card:hover {
    transform: translateY(-4px);
    border-color: rgba(37, 99, 235, 0.24);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.12);
}

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

.movie-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.42s ease, filter 0.42s ease;
}

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

.poster-badge {
    position: absolute;
    right: 10px;
    bottom: 10px;
    border-radius: 999px;
    padding: 5px 9px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    background: rgba(17, 24, 39, 0.78);
    backdrop-filter: blur(10px);
}

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

.movie-title {
    display: -webkit-box;
    overflow: hidden;
    min-height: 48px;
    color: #111827;
    font-size: 17px;
    font-weight: 900;
    line-height: 1.42;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

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

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

.movie-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--muted);
    font-size: 12px;
}

.movie-meta span:first-child {
    max-width: 55%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    border-radius: 8px;
    padding: 4px 7px;
    color: #374151;
    background: #f3f4f6;
}

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

.category-card {
    display: block;
    padding: 22px;
}

.category-card strong {
    display: block;
    font-size: 20px;
    font-weight: 900;
}

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

.banner-panel {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 22px;
    align-items: stretch;
}

.featured-card {
    position: relative;
    overflow: hidden;
    min-height: 360px;
    border-radius: 26px;
    color: #ffffff;
    background: #111827;
    box-shadow: var(--shadow);
}

.featured-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.12));
}

.featured-card-body {
    position: absolute;
    inset: auto 0 0;
    z-index: 2;
    padding: 28px;
}

.featured-card h3 {
    margin: 0 0 10px;
    font-size: 30px;
    font-weight: 900;
}

.featured-card p {
    margin: 0 0 18px;
    color: rgba(255, 255, 255, 0.86);
    line-height: 1.75;
}

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

.rank-card {
    display: grid;
    grid-template-columns: 54px 92px 1fr;
    gap: 14px;
    align-items: center;
    padding: 12px;
}

.rank-number {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    color: #ffffff;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    font-weight: 900;
}

.rank-card img {
    width: 92px;
    height: 120px;
    object-fit: cover;
    border-radius: 12px;
    background: #111827;
}

.rank-card h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 900;
}

.rank-card p {
    display: -webkit-box;
    overflow: hidden;
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.7;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.page-hero {
    border-radius: 28px;
    padding: 44px;
    color: #ffffff;
    background:
        radial-gradient(circle at 20% 20%, rgba(249, 115, 22, 0.34), transparent 30%),
        linear-gradient(135deg, #111827, #1f2937 48%, #7f1d1d);
    box-shadow: var(--shadow);
}

.page-hero h1 {
    margin: 0;
    font-size: clamp(32px, 4vw, 50px);
    font-weight: 900;
    letter-spacing: -0.04em;
}

.page-hero p {
    max-width: 780px;
    margin: 14px 0 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: 17px;
    line-height: 1.8;
}

.detail-hero {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 30px;
    align-items: end;
    border-radius: 30px;
    padding: 34px;
    color: #ffffff;
    background:
        linear-gradient(90deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.76)),
        var(--detail-bg, #111827);
    background-position: center;
    background-size: cover;
    box-shadow: var(--shadow);
}

.detail-poster {
    overflow: hidden;
    border-radius: 22px;
    box-shadow: 0 24px 45px rgba(0, 0, 0, 0.38);
}

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

.detail-info h1 {
    margin: 0 0 12px;
    font-size: clamp(34px, 5vw, 58px);
    font-weight: 950;
    line-height: 1.08;
    letter-spacing: -0.05em;
}

.detail-subtitle {
    margin: 0 0 20px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 18px;
    line-height: 1.8;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.detail-meta span {
    border-radius: 10px;
    padding: 8px 10px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.16);
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #020617;
    box-shadow: var(--shadow);
}

.player-shell video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #020617;
    cursor: pointer;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.48));
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.play-overlay span {
    display: grid;
    place-items: center;
    width: 82px;
    height: 82px;
    padding-left: 5px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 34px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 18px 44px rgba(220, 38, 38, 0.44);
}

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

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

.article-panel,
.side-panel,
.search-panel {
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 26px;
    background: var(--surface);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.article-panel h2,
.side-panel h2,
.search-panel h2 {
    margin: 0 0 16px;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.article-panel p {
    margin: 0 0 18px;
    color: #374151;
    font-size: 16px;
    line-height: 1.9;
}

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

.side-item {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 12px;
    align-items: center;
}

.side-item img {
    width: 72px;
    height: 96px;
    object-fit: cover;
    border-radius: 12px;
    background: #111827;
}

.side-item strong {
    display: -webkit-box;
    overflow: hidden;
    font-size: 15px;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.side-item span {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 20px;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumb a {
    color: var(--blue);
}

.search-panel {
    display: grid;
    gap: 16px;
}

.search-panel form {
    display: flex;
    gap: 10px;
}

.search-panel input {
    width: 100%;
}

#search-results {
    display: grid;
    gap: 16px;
    margin-top: 10px;
}

.search-result-item {
    display: grid;
    grid-template-columns: 86px 1fr;
    gap: 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #ffffff;
}

.search-result-item img {
    width: 86px;
    height: 116px;
    object-fit: cover;
    border-radius: 12px;
    background: #111827;
}

.search-result-item h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 900;
}

.search-result-item p {
    margin: 8px 0;
    color: var(--muted);
    line-height: 1.7;
}

.site-footer {
    color: #d1d5db;
    background: #111827;
}

.footer-inner {
    display: grid;
    grid-template-columns: 1.2fr 0.7fr 1.1fr;
    gap: 28px;
    max-width: 1180px;
    margin: 0 auto;
    padding: 40px 22px;
}

.footer-brand {
    margin-bottom: 10px;
    color: #ffffff;
    font-size: 22px;
    font-weight: 900;
}

.footer-inner p {
    margin: 0;
    color: #9ca3af;
    line-height: 1.8;
}

.footer-links,
.footer-category-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    align-content: start;
}

.footer-links a,
.footer-category-links a {
    color: #d1d5db;
}

.footer-links a:hover,
.footer-category-links a:hover {
    color: #ffffff;
}

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

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

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

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

    .banner-panel,
    .content-layout,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .detail-hero {
        grid-template-columns: 240px 1fr;
    }
}

@media (max-width: 760px) {
    .brand-text em {
        display: none;
    }

    .site-header-inner {
        height: 64px;
    }

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

    .hero-content {
        width: 100%;
        padding: 34px 24px 84px;
    }

    .hero p {
        font-size: 16px;
    }

    .hero-controls {
        right: 24px;
        bottom: 24px;
        left: 24px;
    }

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

    .section-header {
        display: block;
    }

    .detail-hero {
        grid-template-columns: 1fr;
        padding: 22px;
    }

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

    .page-hero {
        padding: 30px 24px;
    }

    .rank-card {
        grid-template-columns: 46px 78px 1fr;
    }

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

@media (max-width: 520px) {
    .page-main {
        padding: 24px 14px 54px;
    }

    .site-header-inner {
        padding: 0 14px;
    }

    .brand {
        min-width: 0;
    }

    .brand-text strong {
        font-size: 17px;
    }

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

    .movie-card {
        display: grid;
        grid-template-columns: 110px 1fr;
    }

    .movie-poster {
        height: 100%;
        aspect-ratio: auto;
    }

    .movie-card-body p {
        min-height: auto;
    }

    .search-panel form {
        display: grid;
    }
}
