:root {
    --site-bg: #f8fafc;
    --site-panel: #ffffff;
    --site-dark: #0f172a;
    --site-muted: #64748b;
    --site-line: #e2e8f0;
    --site-red: #dc2626;
    --site-red-dark: #b91c1c;
    --site-blue: #2563eb;
    --site-pink: #db2777;
    --site-radius: 1.25rem;
    --site-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--site-dark);
    background: radial-gradient(circle at top left, rgba(239, 68, 68, 0.12), transparent 34rem), var(--site-bg);
    min-width: 320px;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.navbar {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 76px;
    display: flex;
    align-items: center;
    gap: 24px;
}

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

.brand-mark {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    color: #ffffff;
    font-size: 22px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--site-red), var(--site-pink));
    box-shadow: 0 12px 28px rgba(220, 38, 38, 0.28);
}

.brand-text strong {
    display: block;
    font-size: 20px;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

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

.nav-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    border-radius: 999px;
    padding: 10px 14px;
    color: #ffffff;
    background: var(--site-dark);
    cursor: pointer;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.nav-links a {
    padding: 10px 14px;
    border-radius: 999px;
    color: #475569;
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a.is-active {
    color: var(--site-red);
    background: #fee2e2;
    transform: translateY(-1px);
}

.nav-search {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 260px;
}

.nav-search input,
.search-panel input,
.search-panel select {
    width: 100%;
    border: 1px solid var(--site-line);
    border-radius: 999px;
    padding: 12px 16px;
    outline: none;
    background: #ffffff;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

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

.nav-search button,
.primary-button,
.secondary-button,
.filter-button {
    border: 0;
    border-radius: 999px;
    padding: 12px 18px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.nav-search button,
.primary-button {
    color: #ffffff;
    background: linear-gradient(135deg, var(--site-red), var(--site-pink));
    box-shadow: 0 12px 26px rgba(220, 38, 38, 0.24);
}

.secondary-button,
.filter-button {
    color: var(--site-dark);
    background: #ffffff;
    border: 1px solid var(--site-line);
}

.nav-search button:hover,
.primary-button:hover,
.secondary-button:hover,
.filter-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
}

.page-shell {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
}

.hero-slider {
    position: relative;
    margin-top: 28px;
    border-radius: 32px;
    min-height: 560px;
    overflow: hidden;
    color: #ffffff;
    background: #111827;
    box-shadow: var(--site-shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.72fr);
    align-items: stretch;
    gap: 24px;
    padding: clamp(28px, 5vw, 70px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

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

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.72) 48%, rgba(220, 38, 38, 0.36));
    z-index: 1;
}

.hero-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.15) contrast(1.05);
    opacity: 0.64;
}

.hero-copy,
.hero-poster-card {
    position: relative;
    z-index: 2;
}

.hero-copy {
    max-width: 690px;
    align-self: center;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    font-weight: 700;
}

.hero-copy h1,
.hero-copy h2 {
    margin: 18px 0 18px;
    font-size: clamp(36px, 6vw, 72px);
    line-height: 1.04;
    letter-spacing: -0.06em;
}

.hero-copy p {
    margin: 0;
    max-width: 650px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 18px;
    line-height: 1.85;
}

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

.hero-poster-card {
    align-self: center;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
    transform: rotate(1.5deg);
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-poster-card img {
    aspect-ratio: 3 / 4.2;
    height: auto;
    object-fit: cover;
}

.hero-dots {
    position: absolute;
    z-index: 4;
    left: clamp(28px, 5vw, 70px);
    bottom: 28px;
    display: flex;
    gap: 10px;
}

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

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

.section {
    margin: 54px 0;
}

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

.section-eyebrow {
    margin: 0 0 8px;
    color: var(--site-red);
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.section h2,
.page-title h1,
.detail-main h1 {
    margin: 0;
    color: var(--site-dark);
    letter-spacing: -0.03em;
}

.section h2 {
    font-size: clamp(26px, 3vw, 38px);
}

.section-desc,
.page-title p,
.category-intro,
.detail-intro {
    color: var(--site-muted);
    line-height: 1.8;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--site-radius);
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.88);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(220, 38, 38, 0.28);
    box-shadow: 0 24px 50px rgba(15, 23, 42, 0.15);
}

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

.poster-link img {
    aspect-ratio: 3 / 4.25;
    object-fit: cover;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

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

.year-badge,
.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    border-radius: 999px;
    padding: 6px 10px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--site-red), var(--site-pink));
    box-shadow: 0 8px 18px rgba(220, 38, 38, 0.28);
}

.card-body {
    padding: 18px;
}

.meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--site-muted);
    font-size: 13px;
    font-weight: 700;
}

.card-body h3 {
    margin: 10px 0 10px;
    font-size: 19px;
    line-height: 1.35;
}

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

.card-body p {
    margin: 0;
    color: #475569;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 14px;
}

.tag-list span,
.tag-list a {
    border-radius: 999px;
    padding: 5px 9px;
    color: #991b1b;
    background: #fee2e2;
    font-size: 12px;
    font-weight: 800;
}

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

.category-card {
    border-radius: 24px;
    padding: 24px;
    min-height: 170px;
    background: linear-gradient(135deg, #ffffff, #fff1f2);
    border: 1px solid rgba(254, 202, 202, 0.72);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 24px 45px rgba(15, 23, 42, 0.12);
}

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

.category-card p {
    margin: 0;
    color: var(--site-muted);
    line-height: 1.7;
}

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

.ranking-item {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 16px;
    padding: 16px;
    border-radius: 22px;
    background: #ffffff;
    border: 1px solid var(--site-line);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.ranking-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 42px rgba(15, 23, 42, 0.11);
}

.ranking-thumb {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    background: #111827;
}

.ranking-thumb img {
    height: 124px;
    object-fit: cover;
}

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

.ranking-info p {
    margin: 0;
    color: var(--site-muted);
    line-height: 1.7;
}

.page-title {
    margin: 38px 0 28px;
    padding: 34px;
    border-radius: 30px;
    background: linear-gradient(135deg, #ffffff, #fff1f2 58%, #eff6ff);
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: var(--site-shadow);
}

.page-title h1 {
    font-size: clamp(32px, 5vw, 58px);
}

.search-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 190px 160px;
    gap: 14px;
    padding: 20px;
    margin: 20px 0 32px;
    border-radius: 24px;
    background: #ffffff;
    border: 1px solid var(--site-line);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.detail-hero {
    margin: 34px 0 34px;
    padding: clamp(22px, 4vw, 44px);
    border-radius: 34px;
    color: #ffffff;
    background: radial-gradient(circle at 85% 20%, rgba(244, 63, 94, 0.45), transparent 30rem), linear-gradient(135deg, #0f172a, #1e293b 56%, #7f1d1d);
    box-shadow: var(--site-shadow);
}

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

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

.detail-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: clamp(24px, 4vw, 46px);
    align-items: center;
}

.detail-cover {
    border-radius: 26px;
    overflow: hidden;
    box-shadow: 0 24px 65px rgba(0, 0, 0, 0.36);
    background: #111827;
}

.detail-cover img {
    aspect-ratio: 3 / 4.2;
    object-fit: cover;
}

.detail-main h1 {
    color: #ffffff;
    font-size: clamp(34px, 5vw, 64px);
    line-height: 1.08;
}

.detail-intro {
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 22px 0;
}

.detail-meta span {
    border-radius: 999px;
    padding: 8px 12px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
    font-weight: 800;
}

.content-card {
    margin: 28px 0;
    padding: clamp(22px, 3vw, 34px);
    border-radius: 28px;
    background: #ffffff;
    border: 1px solid var(--site-line);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.content-card h2 {
    margin: 0 0 16px;
    font-size: clamp(24px, 3vw, 34px);
}

.content-card p {
    color: #475569;
    line-height: 1.95;
    font-size: 17px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #020617;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #ffffff;
    background: linear-gradient(135deg, rgba(2, 6, 23, 0.52), rgba(127, 29, 29, 0.22));
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-overlay.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.play-icon {
    width: 88px;
    height: 88px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    padding-left: 6px;
    font-size: 42px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: 0 22px 55px rgba(0, 0, 0, 0.32);
    backdrop-filter: blur(12px);
}

.site-footer {
    margin-top: 80px;
    padding: 46px 0;
    color: #cbd5e1;
    background: linear-gradient(135deg, #0f172a, #111827);
}

.footer-inner {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 24px;
    align-items: center;
}

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

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

.hidden-by-filter {
    display: none !important;
}

@media (max-width: 1024px) {
    .navbar {
        flex-wrap: wrap;
        padding: 12px 0;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .nav-links,
    .nav-search {
        display: none;
        width: 100%;
    }

    .nav-links.is-open,
    .nav-search.is-open {
        display: flex;
    }

    .nav-links {
        flex-wrap: wrap;
        margin-left: 0;
    }

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

    .hero-poster-card {
        max-width: 320px;
        justify-self: start;
    }

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

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

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

@media (max-width: 720px) {
    .page-shell,
    .navbar,
    .footer-inner {
        width: min(100% - 22px, 1220px);
    }

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

    .brand-text span {
        font-size: 11px;
    }

    .hero-slider {
        min-height: 760px;
        border-radius: 24px;
    }

    .hero-slide {
        padding: 26px;
    }

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

    .section-head,
    .footer-inner {
        display: block;
    }

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

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

    .page-title,
    .detail-hero,
    .content-card {
        border-radius: 22px;
    }

    .detail-cover {
        max-width: 240px;
    }
}
