:root {
    --site-rose: #e11d48;
    --site-rose-dark: #9f1239;
    --site-amber: #92400e;
    --site-text: #111827;
    --site-muted: #6b7280;
    --site-border: #e5e7eb;
    --site-card: #ffffff;
    --site-bg: #f9fafb;
    --site-shadow: 0 16px 35px rgba(15, 23, 42, 0.08);
}

body {
    min-height: 100vh;
    background: linear-gradient(180deg, #f9fafb 0%, #ffffff 55%, #fff7ed 100%);
    color: var(--site-text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

img {
    background: linear-gradient(135deg, #fff1f2, #fffbeb);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(229, 231, 235, 0.9);
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(14px);
}

.site-header-inner,
.container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
    gap: 18px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--site-text);
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.logo-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 13px;
    color: #ffffff;
    background: linear-gradient(135deg, #e11d48, #f59e0b);
    box-shadow: 0 12px 24px rgba(225, 29, 72, 0.28);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 18px;
}

.main-nav a,
.mobile-panel a {
    color: #374151;
    font-weight: 700;
    transition: color 180ms ease;
}

.main-nav a:hover,
.mobile-panel a:hover,
.logo:hover {
    color: var(--site-rose);
}

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

.header-search input,
.filter-input,
.filter-select {
    width: 100%;
    border: 1px solid var(--site-border);
    border-radius: 999px;
    background: #ffffff;
    color: var(--site-text);
    padding: 11px 16px;
    outline: none;
    transition: border-color 180ms ease, box-shadow 180ms ease;
}

.header-search input:focus,
.filter-input:focus,
.filter-select:focus {
    border-color: #fb7185;
    box-shadow: 0 0 0 4px rgba(251, 113, 133, 0.15);
}

.icon-button,
.header-search button,
.primary-button,
.secondary-button,
.player-start {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 999px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.header-search button,
.primary-button,
.player-start {
    color: #ffffff;
    background: linear-gradient(135deg, #e11d48, #be123c);
    box-shadow: 0 14px 28px rgba(225, 29, 72, 0.26);
}

.header-search button {
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
}

.primary-button,
.secondary-button {
    min-height: 46px;
    padding: 0 22px;
}

.secondary-button {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(6px);
}

.primary-button:hover,
.header-search button:hover,
.player-start:hover,
.secondary-button:hover,
.icon-button:hover {
    transform: translateY(-2px);
}

.mobile-toggle {
    display: none;
    width: 44px;
    height: 44px;
    color: #374151;
    background: #f3f4f6;
}

.mobile-panel {
    display: none;
    border-top: 1px solid var(--site-border);
    background: #ffffff;
}

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

.mobile-panel-inner {
    display: grid;
    gap: 14px;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 22px;
}

.hero-section {
    position: relative;
    min-height: 560px;
    height: 72vh;
    overflow: hidden;
    background: linear-gradient(115deg, #881337, #92400e);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 600ms ease, visibility 600ms ease;
}

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.03);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 68% 32%, rgba(251, 191, 36, 0.24), transparent 34%),
        linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.54), rgba(0, 0, 0, 0.1));
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    min-height: 560px;
    height: 72vh;
}

.hero-text {
    max-width: 670px;
    color: #ffffff;
}

.hero-badge,
.card-badge,
.detail-badge,
.rank-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.hero-badge {
    padding: 8px 14px;
    color: #ffffff;
    background: rgba(225, 29, 72, 0.94);
}

.hero-title {
    margin-top: 18px;
    font-size: clamp(40px, 7vw, 76px);
    line-height: 1.02;
    font-weight: 900;
    letter-spacing: -0.06em;
    text-shadow: 0 18px 38px rgba(0, 0, 0, 0.36);
}

.hero-desc {
    max-width: 620px;
    margin-top: 20px;
    color: #f3f4f6;
    font-size: clamp(17px, 2.2vw, 22px);
    line-height: 1.75;
}

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

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 34px;
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 9px;
    transform: translateX(-50%);
}

.hero-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    border: 0;
    background: rgba(255, 255, 255, 0.55);
    transition: width 180ms ease, background 180ms ease;
}

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

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 46px;
    height: 46px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
    transform: translateY(-50%);
}

.hero-arrow:hover {
    background: rgba(255, 255, 255, 0.28);
}

.hero-arrow.prev {
    left: 18px;
}

.hero-arrow.next {
    right: 18px;
}

.section {
    padding: 72px 0;
}

.section.soft {
    background: linear-gradient(90deg, #fffbeb, #fff1f2);
}

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

.section-kicker {
    color: var(--site-rose);
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.section-title {
    margin-top: 7px;
    color: var(--site-text);
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.15;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.section-desc {
    max-width: 760px;
    margin-top: 10px;
    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 {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    background: var(--site-card);
    border: 1px solid rgba(229, 231, 235, 0.78);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
    transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(251, 113, 133, 0.48);
    box-shadow: var(--site-shadow);
}

.movie-poster {
    position: relative;
    display: block;
    height: 250px;
    overflow: hidden;
    background: linear-gradient(135deg, #fff1f2, #fffbeb);
}

.movie-grid.compact .movie-poster {
    height: 210px;
}

.movie-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 500ms ease;
}

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

.movie-poster::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 58%;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.66), transparent);
    opacity: 0.82;
}

.card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    padding: 6px 10px;
    color: #ffffff;
    background: rgba(225, 29, 72, 0.94);
}

.movie-body {
    padding: 18px;
}

.movie-title {
    color: var(--site-text);
    font-size: 18px;
    line-height: 1.35;
    font-weight: 900;
    transition: color 180ms ease;
}

.movie-card:hover .movie-title {
    color: var(--site-rose);
}

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

.movie-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
    padding-top: 13px;
    border-top: 1px solid #f3f4f6;
    color: #6b7280;
    font-size: 13px;
}

.movie-meta strong {
    color: var(--site-rose);
}

.scroller {
    display: flex;
    gap: 22px;
    padding: 4px 0 18px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
}

.scroller .movie-card {
    flex: 0 0 286px;
    scroll-snap-align: start;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 210px;
    padding: 28px;
    border-radius: 24px;
    color: #ffffff;
    background: linear-gradient(135deg, #9f1239, #b45309);
    box-shadow: 0 20px 42px rgba(136, 19, 55, 0.18);
}

.category-card:nth-child(2n) {
    background: linear-gradient(135deg, #be123c, #92400e);
}

.category-card:nth-child(3n) {
    background: linear-gradient(135deg, #831843, #7c2d12);
}

.category-card h2,
.category-card h3 {
    position: relative;
    z-index: 1;
    font-size: 28px;
    font-weight: 900;
}

.category-card p {
    position: relative;
    z-index: 1;
    margin-top: 12px;
    color: rgba(255, 255, 255, 0.84);
    line-height: 1.75;
}

.category-card span {
    position: relative;
    z-index: 1;
    display: inline-flex;
    margin-top: 20px;
    font-weight: 900;
}

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

.rank-item {
    display: grid;
    grid-template-columns: auto 84px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--site-border);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.rank-number {
    width: 46px;
    height: 46px;
    color: #ffffff;
    background: linear-gradient(135deg, #e11d48, #f59e0b);
}

.rank-poster {
    width: 84px;
    height: 60px;
    overflow: hidden;
    border-radius: 12px;
}

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

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

.rank-text {
    margin-top: 4px;
    color: var(--site-muted);
    font-size: 14px;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) repeat(3, minmax(140px, 0.55fr));
    gap: 14px;
    margin-bottom: 28px;
    padding: 18px;
    border: 1px solid var(--site-border);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.page-hero {
    padding: 70px 0;
    color: #ffffff;
    background:
        radial-gradient(circle at 70% 30%, rgba(251, 191, 36, 0.28), transparent 30%),
        linear-gradient(135deg, #881337, #92400e);
}

.page-hero h1 {
    max-width: 900px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.12;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.page-hero p {
    max-width: 760px;
    margin-top: 16px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 18px;
    line-height: 1.8;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.78);
    font-weight: 700;
}

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

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.65fr);
    gap: 32px;
    align-items: start;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    background: #050505;
    box-shadow: 0 24px 52px rgba(0, 0, 0, 0.24);
}

.video-element {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #050505;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    cursor: pointer;
    background: radial-gradient(circle at center, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.58));
    transition: opacity 180ms ease, visibility 180ms ease;
}

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

.player-start {
    width: 88px;
    height: 88px;
    font-size: 31px;
    border-radius: 999px;
}

.detail-card,
.info-card {
    border: 1px solid var(--site-border);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.detail-card {
    padding: 28px;
}

.info-card {
    overflow: hidden;
}

.info-card img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

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

.detail-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0;
}

.detail-badge {
    padding: 8px 12px;
    color: #9f1239;
    background: #fff1f2;
}

.detail-card h2 {
    margin-top: 28px;
    font-size: 26px;
    font-weight: 900;
}

.detail-card p {
    margin-top: 12px;
    color: #374151;
    font-size: 16px;
    line-height: 1.95;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.tag-list span {
    padding: 8px 12px;
    border-radius: 999px;
    color: #be123c;
    background: #fff1f2;
    font-weight: 800;
}

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

.footer {
    margin-top: 70px;
    border-top: 1px solid var(--site-border);
    background: linear-gradient(180deg, #f9fafb, #f3f4f6);
}

.footer-inner {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 28px;
    padding: 46px 0;
}

.footer h3 {
    font-size: 18px;
    font-weight: 900;
}

.footer p,
.footer a {
    color: var(--site-muted);
    line-height: 1.8;
}

.footer a:hover {
    color: var(--site-rose);
}

.footer-links {
    display: grid;
    gap: 9px;
    margin-top: 14px;
}

.footer-bottom {
    padding: 20px 0;
    border-top: 1px solid #d1d5db;
    color: var(--site-muted);
    text-align: center;
}

@media (max-width: 1080px) {
    .header-search {
        min-width: 220px;
    }

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

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

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

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

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

    .hero-section,
    .hero-content {
        min-height: 520px;
        height: 66vh;
    }

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

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

    .rank-item {
        grid-template-columns: auto 74px minmax(0, 1fr);
    }

    .rank-item .primary-button {
        grid-column: 1 / -1;
    }

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

@media (max-width: 560px) {
    .site-header-inner,
    .container,
    .mobile-panel-inner {
        width: min(100% - 22px, 1180px);
    }

    .logo {
        font-size: 18px;
    }

    .hero-arrow {
        display: none;
    }

    .hero-actions {
        display: grid;
    }

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

    .movie-poster,
    .movie-grid.compact .movie-poster {
        height: 260px;
    }

    .section {
        padding: 52px 0;
    }

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