:root {
    --bg: #f8fafc;
    --paper: #ffffff;
    --ink: #0f172a;
    --muted: #64748b;
    --soft: #e2e8f0;
    --primary: #e11d48;
    --primary-dark: #9f1239;
    --accent: #f97316;
    --shadow: 0 18px 55px rgba(15, 23, 42, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: radial-gradient(circle at 5% 0%, rgba(225, 29, 72, 0.08), transparent 28%), var(--bg);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(18px);
}

.header-inner,
.footer-inner,
.section,
.hero-shell,
.detail-shell,
.page-hero,
.player-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

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

.logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    font-weight: 900;
    letter-spacing: -0.03em;
    white-space: nowrap;
}

.logo-icon {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    color: #ffffff;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 10px 24px rgba(225, 29, 72, 0.3);
}

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

.nav-links a {
    padding: 10px 14px;
    color: #334155;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 700;
}

.nav-links a:hover,
.nav-links a.is-active {
    color: var(--primary);
    background: #fff1f2;
}

.top-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border: 1px solid var(--soft);
    border-radius: 999px;
    background: #ffffff;
}

.top-search input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    color: var(--ink);
    background: transparent;
    font-size: 14px;
}

.top-search input {
    width: 210px;
    padding: 8px 8px 8px 12px;
}

.top-search button,
.primary-button,
.secondary-button,
.filter-panel button,
.player-button {
    border: 0;
    cursor: pointer;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.top-search button,
.primary-button,
.filter-panel button,
.player-button {
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 12px 26px rgba(225, 29, 72, 0.25);
}

.top-search button {
    padding: 8px 15px;
    border-radius: 999px;
}

.primary-button,
.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 999px;
}

.secondary-button {
    color: var(--ink);
    border: 1px solid rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.88);
}

.primary-button:hover,
.secondary-button:hover,
.top-search button:hover,
.filter-panel button:hover,
.player-button:hover {
    transform: translateY(-2px);
}

.menu-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    color: var(--ink);
    background: transparent;
    font-size: 26px;
}

.hero {
    position: relative;
    overflow: hidden;
    padding: 34px 0 48px;
}

.hero-shell {
    position: relative;
    min-height: 540px;
    overflow: hidden;
    color: #ffffff;
    border-radius: 34px;
    background: #111827;
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    gap: 28px;
    align-items: center;
    padding: 70px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.7s ease;
}

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

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08);
}

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

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

.hero-copy {
    max-width: 660px;
}

.hero-kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-bottom: 14px;
    padding: 7px 12px;
    color: #fff1f2;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.eyebrow {
    color: var(--primary);
    border-color: #fecdd3;
    background: #fff1f2;
}

.hero h1 {
    margin: 0 0 18px;
    font-size: clamp(38px, 6vw, 74px);
    line-height: 0.96;
    letter-spacing: -0.06em;
}

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

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

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags span,
.tag-list span,
.detail-tags span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.hero-tags span {
    padding: 8px 12px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
}

.hero-poster {
    justify-self: end;
    width: min(360px, 100%);
    overflow: hidden;
    border: 10px solid rgba(255, 255, 255, 0.15);
    border-radius: 32px;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.42);
}

.hero-poster img {
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.hero-control {
    position: absolute;
    z-index: 6;
    bottom: 28px;
    right: 38px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hero-dot,
.hero-arrow {
    border: 0;
    cursor: pointer;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(14px);
}

.hero-dot {
    width: 11px;
    height: 11px;
    padding: 0;
    border-radius: 999px;
}

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

.hero-arrow {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    font-size: 22px;
}

.section {
    padding: 42px 0;
}

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

.section-heading h2,
.page-hero h1,
.detail-title h1 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.section-heading p,
.page-hero p,
.detail-title p,
.category-card p,
.footer-inner p {
    color: var(--muted);
    line-height: 1.75;
}

.section-action {
    flex-shrink: 0;
    color: var(--primary);
    font-weight: 900;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.82);
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    transition: transform 0.26s ease, box-shadow 0.26s ease, border-color 0.26s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(225, 29, 72, 0.28);
    box-shadow: var(--shadow);
}

.movie-cover {
    position: relative;
    display: block;
    overflow: hidden;
    background: #0f172a;
}

.movie-cover img {
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.movie-card:hover .movie-cover img,
.related-card:hover img,
.rank-card:hover img {
    transform: scale(1.08);
}

.play-mark {
    position: absolute;
    top: 50%;
    left: 50%;
    display: grid;
    width: 56px;
    height: 56px;
    place-items: center;
    color: var(--ink);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    transform: translate(-50%, -50%) scale(0.86);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-mark {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.movie-info {
    padding: 16px;
}

.movie-meta,
.detail-meta,
.rank-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.movie-meta span,
.detail-meta span,
.rank-meta span {
    padding: 5px 8px;
    border-radius: 999px;
    background: #f1f5f9;
}

.movie-info h3 {
    margin: 0 0 9px;
    font-size: 18px;
    line-height: 1.35;
}

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

.tag-list,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-list span,
.detail-tags span {
    padding: 6px 9px;
    color: #be123c;
    background: #fff1f2;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 180px;
    padding: 24px;
    border: 1px solid rgba(226, 232, 240, 0.88);
    border-radius: var(--radius);
    background: linear-gradient(135deg, #ffffff, #fff1f2);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.category-card::after {
    position: absolute;
    right: -34px;
    bottom: -48px;
    width: 150px;
    height: 150px;
    content: "";
    border-radius: 50%;
    background: rgba(225, 29, 72, 0.12);
}

.category-card h2,
.category-card h3 {
    position: relative;
    z-index: 1;
    margin: 0 0 10px;
    font-size: 24px;
}

.category-card p,
.category-card a {
    position: relative;
    z-index: 1;
}

.category-card a {
    display: inline-flex;
    margin-top: 18px;
    color: var(--primary);
    font-weight: 900;
}

.page-hero {
    align-items: center;
    padding: 50px 0 24px;
}

.filter-panel {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 12px;
    margin-bottom: 26px;
    padding: 14px;
    border: 1px solid var(--soft);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

.filter-panel label {
    display: flex;
    align-items: center;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid var(--soft);
    border-radius: 15px;
    background: #ffffff;
}

.filter-panel button {
    min-height: 46px;
    padding: 0 18px;
    border-radius: 15px;
}

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

.rank-card {
    display: grid;
    grid-template-columns: 74px 120px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border: 1px solid rgba(226, 232, 240, 0.86);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

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

.rank-card img {
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 16px;
    transition: transform 0.4s ease;
}

.rank-card h3 {
    margin: 0 0 8px;
    font-size: 22px;
}

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

.detail-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
    gap: 34px;
    padding: 48px 0 28px;
}

.detail-poster {
    overflow: hidden;
    border-radius: 30px;
    box-shadow: var(--shadow);
}

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

.detail-title {
    align-self: center;
}

.detail-title h1 {
    margin-bottom: 16px;
}

.detail-title p {
    margin: 18px 0;
    font-size: 17px;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.breadcrumbs a {
    color: var(--primary);
}

.player-shell {
    padding: 28px 0 36px;
}

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

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

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    cursor: pointer;
    background: rgba(2, 6, 23, 0.32);
    transition: opacity 0.25s ease;
}

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

.player-button {
    display: inline-grid;
    min-width: 96px;
    min-height: 96px;
    place-items: center;
    border-radius: 999px;
    font-size: 34px;
}

.content-card {
    padding: 28px;
    border: 1px solid rgba(226, 232, 240, 0.86);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

.content-card h2 {
    margin: 0 0 16px;
    font-size: 26px;
}

.content-card p {
    margin: 0 0 16px;
    color: #334155;
    font-size: 16px;
    line-height: 1.9;
}

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

.related-card {
    overflow: hidden;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.related-card img {
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.related-card h3 {
    margin: 0;
    padding: 12px;
    font-size: 15px;
    line-height: 1.4;
}

.empty-state {
    display: none;
    padding: 34px;
    color: var(--muted);
    text-align: center;
    border: 1px dashed var(--soft);
    border-radius: 22px;
    background: #ffffff;
}

.site-footer {
    margin-top: 46px;
    padding: 42px 0;
    border-top: 1px solid rgba(226, 232, 240, 0.86);
    background: #ffffff;
}

.footer-inner {
    display: grid;
    grid-template-columns: 1fr 2fr auto;
    gap: 24px;
    align-items: center;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    color: var(--primary);
    font-weight: 800;
}

@media (max-width: 980px) {
    .header-inner {
        flex-wrap: wrap;
    }

    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        order: 4;
        width: 100%;
        margin-left: 0;
        padding-bottom: 14px;
    }

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

    .top-search {
        order: 3;
        width: 100%;
        margin-left: 0;
    }

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

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

    .hero-slide {
        padding: 46px 28px;
    }

    .hero-poster {
        display: none;
    }

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

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

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

    .rank-card {
        grid-template-columns: 56px 88px minmax(0, 1fr);
    }

    .rank-card .primary-button {
        grid-column: 2 / -1;
        width: fit-content;
    }

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

@media (max-width: 640px) {
    .header-inner,
    .footer-inner,
    .section,
    .hero-shell,
    .detail-shell,
    .page-hero,
    .player-shell {
        width: min(100% - 22px, 1180px);
    }

    .hero-shell {
        min-height: 600px;
        border-radius: 24px;
    }

    .hero h1 {
        font-size: 42px;
    }

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

    .page-hero,
    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .rank-card img {
        display: none;
    }
}
