:root {
    color-scheme: light;
    --page-bg: #fff7f9;
    --surface: #ffffff;
    --surface-soft: #fff1f4;
    --surface-strong: #111827;
    --text-main: #111827;
    --text-muted: #6b7280;
    --line: rgba(17, 24, 39, 0.08);
    --brand: #f43f5e;
    --brand-dark: #be123c;
    --brand-soft: #ffe4e6;
    --gold: #f59e0b;
    --shadow: 0 18px 55px rgba(244, 63, 94, 0.16);
    --shadow-card: 0 16px 35px rgba(17, 24, 39, 0.10);
    --radius-large: 30px;
    --radius-medium: 22px;
    --radius-small: 14px;
    --max-width: 1240px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(244, 63, 94, 0.16), transparent 32rem),
        linear-gradient(180deg, #fff7f9 0%, #ffffff 34%, #fff7f9 100%);
    color: var(--text-main);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

button,
input,
select {
    font: inherit;
}

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

.site-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-main {
    flex: 1;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

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

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: -0.03em;
    white-space: nowrap;
}

.logo-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), #fb7185 48%, var(--gold));
    box-shadow: 0 12px 25px rgba(244, 63, 94, 0.24);
}

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

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

.nav-link:hover,
.nav-link.is-active {
    color: var(--brand-dark);
    background: var(--brand-soft);
    transform: translateY(-1px);
}

.header-search {
    width: 250px;
    position: relative;
}

.header-search input {
    width: 100%;
    height: 42px;
    border: 1px solid #fecdd3;
    border-radius: 999px;
    padding: 0 46px 0 18px;
    outline: none;
    background: #ffffff;
    color: var(--text-main);
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(244, 63, 94, 0.12);
}

.header-search button {
    position: absolute;
    right: 5px;
    top: 5px;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    color: #ffffff;
    cursor: pointer;
    background: var(--brand);
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: var(--brand-soft);
    color: var(--brand-dark);
    cursor: pointer;
}

.mobile-panel {
    display: none;
    border-top: 1px solid var(--line);
    padding: 12px 0 18px;
}

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

.mobile-panel .nav-links {
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
}

.mobile-panel .header-search {
    width: 100%;
    margin-bottom: 12px;
}

.hero {
    position: relative;
    overflow: hidden;
    min-height: 680px;
    display: flex;
    align-items: stretch;
    color: #ffffff;
    background: #111827;
}

.hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 160px;
    background: linear-gradient(180deg, transparent, var(--page-bg));
    pointer-events: none;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.8s ease, transform 1.4s ease;
    background-size: cover;
    background-position: center;
}

.hero-slide.is-active {
    opacity: 1;
    transform: scale(1);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(100% - 32px, var(--max-width));
    margin: 0 auto;
    padding: 112px 0 120px;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.62fr);
    align-items: center;
    gap: 46px;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 13px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    color: #ffe4e6;
    font-weight: 800;
    font-size: 14px;
}

.hero h1 {
    margin: 22px 0 18px;
    max-width: 820px;
    font-size: clamp(42px, 7vw, 84px);
    line-height: 0.98;
    letter-spacing: -0.07em;
}

.hero-lead {
    max-width: 720px;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(17px, 2.2vw, 22px);
    line-height: 1.8;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 26px 0;
}

.pill {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    font-weight: 800;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    font-weight: 900;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    box-shadow: 0 15px 34px rgba(244, 63, 94, 0.28);
}

.btn-light {
    color: #111827;
    background: rgba(255, 255, 255, 0.92);
}

.btn-soft {
    color: var(--brand-dark);
    background: var(--brand-soft);
}

.btn-dark {
    color: #ffffff;
    background: #111827;
}

.hero-card {
    border: 1px solid rgba(255, 255, 255, 0.20);
    border-radius: 34px;
    background: rgba(17, 24, 39, 0.36);
    box-shadow: 0 35px 80px rgba(0, 0, 0, 0.30);
    backdrop-filter: blur(20px);
    overflow: hidden;
}

.hero-poster {
    min-height: 420px;
    background-size: cover;
    background-position: center;
}

.hero-card-body {
    padding: 22px;
}

.hero-card-title {
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 900;
}

.hero-card-text {
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.7;
}

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

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

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

.section {
    padding: 56px 0;
}

.section-title-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 22px;
    margin-bottom: 26px;
}

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

.section-title {
    margin: 0;
    font-size: clamp(26px, 3vw, 42px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

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

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

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

.movie-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 24px;
    overflow: hidden;
    background: var(--surface);
    box-shadow: 0 12px 32px rgba(17, 24, 39, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(244, 63, 94, 0.28);
    box-shadow: var(--shadow-card);
}

.movie-cover {
    position: relative;
    min-height: 250px;
    display: flex;
    align-items: flex-end;
    padding: 12px;
    color: #ffffff;
    background-color: #111827;
    background-size: cover;
    background-position: center;
}

.movie-card.is-horizontal {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
}

.movie-card.is-horizontal .movie-cover {
    min-height: 100%;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(244, 63, 94, 0.92);
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
}

.badge.is-dark {
    background: rgba(17, 24, 39, 0.78);
}

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

.movie-title {
    margin: 0 0 8px;
    font-size: 17px;
    line-height: 1.35;
    font-weight: 900;
}

.movie-title a:hover {
    color: var(--brand-dark);
}

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

.movie-desc {
    margin: 10px 0 0;
    color: #4b5563;
    line-height: 1.7;
    font-size: 14px;
}

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

.tag {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 9px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #4b5563;
    font-size: 12px;
    font-weight: 800;
}

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

.category-tile {
    position: relative;
    overflow: hidden;
    min-height: 190px;
    padding: 22px;
    border-radius: 26px;
    border: 1px solid rgba(244, 63, 94, 0.14);
    background: linear-gradient(135deg, #ffffff 0%, #fff1f4 100%);
    box-shadow: 0 14px 38px rgba(244, 63, 94, 0.10);
}

.category-tile::after {
    content: "";
    position: absolute;
    right: -38px;
    bottom: -38px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(244, 63, 94, 0.18);
}

.category-tile h3 {
    margin: 0 0 10px;
    font-size: 22px;
    font-weight: 900;
}

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

.category-tile .btn {
    margin-top: 18px;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr) 90px;
    align-items: center;
    gap: 16px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 8px 25px rgba(17, 24, 39, 0.05);
}

.rank-num {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--gold));
    font-size: 18px;
    font-weight: 900;
}

.rank-title {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 900;
}

.rank-title a:hover {
    color: var(--brand-dark);
}

.rank-meta {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 700;
}

.rank-heat {
    justify-self: end;
    font-weight: 900;
    color: var(--brand-dark);
}

.page-hero {
    padding: 72px 0 42px;
    background:
        radial-gradient(circle at top right, rgba(244, 63, 94, 0.16), transparent 30rem),
        linear-gradient(180deg, #ffffff 0%, #fff7f9 100%);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 800;
}

.breadcrumb a:hover {
    color: var(--brand-dark);
}

.page-title {
    margin: 0;
    font-size: clamp(34px, 5vw, 62px);
    line-height: 1.08;
    letter-spacing: -0.06em;
}

.page-lead {
    margin: 16px 0 0;
    max-width: 760px;
    color: var(--text-muted);
    font-size: 18px;
    line-height: 1.8;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 30px;
    align-items: start;
}

.player-card,
.detail-panel,
.sidebar-card,
.search-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius-large);
    background: #ffffff;
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.player-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #05060a;
}

.player-shell video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000000;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 30px;
    background-size: cover;
    background-position: center;
    z-index: 2;
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-button {
    width: 86px;
    height: 86px;
    border: 0;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    box-shadow: 0 20px 45px rgba(244, 63, 94, 0.32);
    cursor: pointer;
}

.play-button span {
    margin-left: 5px;
    width: 0;
    height: 0;
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
    border-left: 22px solid #ffffff;
}

.player-info {
    padding: 22px;
}

.player-info h2,
.detail-panel h2,
.sidebar-card h2 {
    margin: 0 0 12px;
    font-size: 24px;
    font-weight: 900;
}

.player-info p,
.detail-panel p,
.sidebar-card p {
    color: #4b5563;
    line-height: 1.85;
}

.detail-panel {
    padding: 26px;
}

.detail-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 22px 0;
}

.meta-box {
    padding: 14px;
    border-radius: 16px;
    background: #fff7f9;
}

.meta-label {
    display: block;
    margin-bottom: 4px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 800;
}

.meta-value {
    font-weight: 900;
}

.sidebar-card {
    padding: 22px;
}

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

.mini-card {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.mini-cover {
    height: 112px;
    border-radius: 16px;
    background-color: #111827;
    background-size: cover;
    background-position: center;
}

.mini-title {
    margin: 0 0 6px;
    font-weight: 900;
    line-height: 1.35;
}

.mini-meta {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 700;
}

.next-prev {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.next-prev a {
    padding: 15px;
    border-radius: 18px;
    background: #fff7f9;
    font-weight: 900;
}

.next-prev span {
    display: block;
    margin-bottom: 5px;
    color: var(--text-muted);
    font-size: 12px;
}

.search-panel {
    padding: 24px;
    margin-bottom: 28px;
}

.search-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 160px 160px 160px;
    gap: 12px;
}

.search-controls input,
.search-controls select {
    height: 48px;
    border: 1px solid #fecdd3;
    border-radius: 16px;
    padding: 0 14px;
    outline: none;
    background: #ffffff;
}

.search-controls input:focus,
.search-controls select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(244, 63, 94, 0.12);
}

.site-footer {
    margin-top: 70px;
    padding: 46px 0;
    color: rgba(255, 255, 255, 0.78);
    background: #111827;
}

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

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

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

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

@media (max-width: 1120px) {
    .movie-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

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

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

@media (max-width: 900px) {
    .nav-links,
    .header-inner > .header-search {
        display: none;
    }

    .mobile-toggle {
        display: inline-grid;
        place-items: center;
        margin-left: auto;
    }

    .hero {
        min-height: 780px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        padding-top: 86px;
    }

    .hero-card {
        max-width: 520px;
    }

    .hero-poster {
        min-height: 300px;
    }

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

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

@media (max-width: 680px) {
    .container {
        width: min(100% - 22px, var(--max-width));
    }

    .hero h1,
    .page-title {
        letter-spacing: -0.04em;
    }

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

    .movie-cover {
        min-height: 210px;
    }

    .movie-card.is-horizontal {
        grid-template-columns: 1fr;
    }

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

    .rank-heat {
        grid-column: 2;
        justify-self: start;
    }

    .detail-meta-grid,
    .next-prev {
        grid-template-columns: 1fr;
    }
}
