:root {
    --page-bg: #f8fafc;
    --text: #0f172a;
    --muted: #64748b;
    --border: #e2e8f0;
    --card: #ffffff;
    --accent: #dc2626;
    --accent-2: #ea580c;
    --blue: #2563eb;
    --purple: #9333ea;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.10);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.85);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.nav-shell {
    max-width: 1280px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #fff;
    font-size: 22px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 14px 25px rgba(220, 38, 38, 0.30);
}

.brand-text {
    display: grid;
    line-height: 1.15;
}

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

.brand-text small {
    color: #ef4444;
    font-size: 12px;
}

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

.nav-link {
    padding: 9px 14px;
    border-radius: 999px;
    color: #475569;
    transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
}

.hero-carousel {
    position: relative;
    min-height: 660px;
    overflow: hidden;
    background: radial-gradient(circle at 10% 10%, rgba(239, 68, 68, 0.35), transparent 25%),
                linear-gradient(135deg, #0f172a 0%, #1e1b4b 46%, #450a0a 100%);
}

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

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

.hero-bg,
.detail-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.28;
    filter: blur(2px) saturate(1.08);
}

.hero-shade,
.detail-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.76), rgba(15, 23, 42, 0.36));
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    min-height: 660px;
    margin: 0 auto;
    padding: 80px 24px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: center;
    gap: 50px;
}

.hero-copy {
    max-width: 760px;
    color: #fff;
}

.hero-chip,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 14px;
    padding: 7px 12px;
    border-radius: 999px;
    color: #fee2e2;
    background: rgba(239, 68, 68, 0.22);
    border: 1px solid rgba(248, 113, 113, 0.35);
    font-size: 14px;
    font-weight: 700;
}

.hero-copy h1 {
    margin: 0;
    font-size: clamp(38px, 5vw, 72px);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.hero-copy h2 {
    margin: 18px 0 10px;
    font-size: clamp(26px, 3vw, 44px);
}

.hero-copy p {
    margin: 0;
    max-width: 690px;
    color: #cbd5e1;
    font-size: 18px;
}

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

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 999px;
    font-weight: 800;
    transition: 0.2s ease;
}

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

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

.ghost-button {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.12);
}

.ghost-button.light {
    color: #fff;
}

.hero-poster {
    position: relative;
    aspect-ratio: 3 / 4;
    border-radius: 28px;
    overflow: hidden;
    background: linear-gradient(135deg, #1e293b, #334155);
    box-shadow: 0 35px 80px rgba(0, 0, 0, 0.45);
    transform: rotate(2deg);
}

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

.hero-poster span,
.play-mark {
    position: absolute;
    display: grid;
    place-items: center;
    color: #fff;
    background: rgba(220, 38, 38, 0.88);
    box-shadow: 0 12px 30px rgba(220, 38, 38, 0.40);
}

.hero-poster span {
    left: 50%;
    top: 50%;
    width: 72px;
    height: 72px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    font-size: 26px;
}

.hero-dots {
    position: absolute;
    z-index: 3;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 38px;
    height: 6px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
}

.hero-dot.active {
    background: #fff;
}

.search-panel,
.content-section,
.page-shell {
    max-width: 1280px;
    margin: 0 auto;
    padding: 42px 24px;
}

.search-panel {
    margin-top: -46px;
    position: relative;
    z-index: 4;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 20px;
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow);
}

.search-box label,
.filter-input label {
    display: block;
    margin-bottom: 9px;
    color: #334155;
    font-weight: 800;
}

.search-box div {
    display: flex;
    gap: 10px;
}

.search-box input,
.filter-input input {
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
    border: 1px solid var(--border);
    border-radius: 16px;
    outline: none;
    background: #f8fafc;
}

.search-box input:focus,
.filter-input input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

.search-box button {
    min-width: 110px;
    border: 0;
    border-radius: 16px;
    color: #fff;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.quick-links,
.year-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.quick-links a,
.year-pills button {
    padding: 9px 13px;
    border-radius: 999px;
    color: #475569;
    border: 1px solid var(--border);
    background: #fff;
    transition: 0.2s ease;
}

.quick-links a:hover,
.year-pills button:hover,
.year-pills button.active {
    color: #fff;
    background: #0f172a;
    border-color: #0f172a;
}

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

.section-head h2,
.page-hero h1 {
    margin: 0;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.08;
    letter-spacing: -0.03em;
}

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

.section-more,
.text-link {
    color: var(--accent);
    font-weight: 800;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: 22px;
    background: #fff;
    border: 1px solid rgba(226, 232, 240, 0.85);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
    transition: 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 50px rgba(15, 23, 42, 0.13);
}

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

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

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

.play-mark {
    right: 12px;
    bottom: 12px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
}

.rank-badge {
    position: absolute;
    z-index: 2;
    left: 12px;
    top: 12px;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: #fff;
    font-weight: 900;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
}

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

.movie-card-body h3 {
    margin: 0 0 7px;
    font-size: 18px;
    line-height: 1.25;
}

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

.movie-meta,
.movie-line {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.movie-line {
    display: -webkit-box;
    min-height: 44px;
    margin-top: 8px;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 12px;
}

.tag {
    padding: 4px 9px;
    border-radius: 999px;
    color: #1d4ed8;
    background: #dbeafe;
    font-size: 12px;
    font-weight: 700;
}

.rank-feature {
    padding-top: 24px;
}

.rank-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.rank-row {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid var(--border);
    transition: 0.2s ease;
}

.rank-row:hover {
    transform: translateX(4px);
    border-color: rgba(239, 68, 68, 0.4);
}

.rank-no {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    color: #fff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.rank-title {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-weight: 800;
}

.rank-score {
    color: var(--muted);
    font-size: 13px;
}

.page-hero {
    position: relative;
    overflow: hidden;
    margin-top: 26px;
    padding: 52px;
    border-radius: 34px;
    color: #fff;
    background: linear-gradient(135deg, #0f172a, #312e81 55%, #7f1d1d);
    box-shadow: var(--shadow);
}

.slim-hero {
    color: var(--text);
    background: linear-gradient(135deg, #fff, #eff6ff 55%, #fff1f2);
}

.rank-hero {
    background: linear-gradient(135deg, #7f1d1d, #111827 70%);
}

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

.category-card {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 18px;
    padding: 18px;
    border-radius: 24px;
    background: #fff;
    border: 1px solid var(--border);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
}

.category-cover {
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 18px;
    background: linear-gradient(135deg, #dbeafe, #fee2e2);
}

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

.category-card h2 {
    margin: 0 0 8px;
}

.category-card p,
.category-card li {
    color: var(--muted);
}

.category-card ul {
    padding: 0;
    margin: 14px 0;
    list-style: none;
}

.category-card li a {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 6px 0;
    border-bottom: 1px solid #f1f5f9;
}

.filter-bar {
    display: grid;
    gap: 20px;
}

.filter-input.large {
    max-width: 720px;
}

.movie-card.is-hidden {
    display: none;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    min-height: 560px;
    background: #0f172a;
}

.detail-shell {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    min-height: 560px;
    margin: 0 auto;
    padding: 70px 24px;
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr);
    gap: 42px;
    align-items: center;
    color: #fff;
}

.detail-poster {
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 26px;
    background: linear-gradient(135deg, #1e293b, #334155);
    box-shadow: 0 32px 70px rgba(0, 0, 0, 0.45);
}

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

.detail-info h1 {
    margin: 0;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.04;
    letter-spacing: -0.05em;
}

.detail-meta {
    margin: 18px 0 0;
    color: #e2e8f0;
    font-weight: 700;
}

.detail-one-line {
    max-width: 760px;
    color: #cbd5e1;
    font-size: 18px;
}

.player-section {
    max-width: 1180px;
    margin: -72px auto 0;
    padding: 0 24px;
    position: relative;
    z-index: 4;
}

.player-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 28px;
    background: #020617;
    box-shadow: 0 35px 90px rgba(2, 6, 23, 0.38);
}

.movie-player {
    width: 100%;
    height: 100%;
    background: #020617;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 14px;
    border: 0;
    color: #fff;
    background: radial-gradient(circle, rgba(220, 38, 38, 0.18), rgba(2, 6, 23, 0.62));
    transition: opacity 0.2s ease;
}

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

.big-play {
    display: grid;
    place-items: center;
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 20px 45px rgba(220, 38, 38, 0.45);
    font-size: 34px;
}

.player-message {
    position: absolute;
    left: 20px;
    bottom: 20px;
    color: #fff;
    background: rgba(15, 23, 42, 0.76);
    border-radius: 12px;
    padding: 8px 12px;
    display: none;
}

.player-message.visible {
    display: block;
}

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

.prose-card,
.side-card {
    padding: 28px;
    border-radius: 24px;
    background: #fff;
    border: 1px solid var(--border);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
}

.prose-card h2,
.side-card h2 {
    margin: 0 0 14px;
}

.prose-card p {
    margin: 0 0 24px;
    color: #475569;
}

.side-card dl {
    display: grid;
    grid-template-columns: 80px minmax(0, 1fr);
    gap: 10px 14px;
    margin: 0;
}

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

.side-card dd {
    margin: 0;
    font-weight: 800;
}

.site-footer {
    margin-top: 48px;
    background: #0f172a;
    color: #cbd5e1;
}

.footer-shell {
    max-width: 1280px;
    margin: 0 auto;
    padding: 42px 24px;
    display: flex;
    justify-content: space-between;
    gap: 24px;
}

.footer-brand {
    display: inline-block;
    margin-bottom: 10px;
    color: #fff;
    font-size: 22px;
    font-weight: 900;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

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

@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
    }

    .hero-poster {
        display: none;
    }

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

    .category-overview,
    .detail-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .nav-shell {
        flex-wrap: wrap;
    }

    .mobile-menu-button {
        display: block;
    }

    .nav-links {
        display: none;
        width: 100%;
        padding-top: 12px;
        flex-direction: column;
        align-items: stretch;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-link {
        text-align: center;
    }

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

    .hero-content {
        padding-top: 54px;
    }

    .search-panel {
        grid-template-columns: 1fr;
        margin-top: -28px;
    }

    .search-box div {
        flex-direction: column;
    }

    .section-head,
    .footer-shell {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .rank-list {
        grid-template-columns: 1fr;
    }

    .rank-row {
        grid-template-columns: 38px minmax(0, 1fr);
    }

    .rank-score {
        grid-column: 2;
    }

    .category-card {
        grid-template-columns: 120px minmax(0, 1fr);
    }

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

    .detail-shell {
        grid-template-columns: 1fr;
        padding-top: 44px;
    }

    .detail-poster {
        width: min(260px, 80vw);
    }

    .player-section {
        margin-top: -32px;
    }
}

@media (max-width: 460px) {
    .movie-grid,
    .compact-grid,
    .rank-grid {
        grid-template-columns: 1fr;
    }

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