/* =============== 新首页通用布局 =============== */

body {
    background-color: #000;
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.md-ru-hero {
    position: relative;
    min-height: min(760px, calc(100vh - 28px));
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    padding: 112px 50px 58px;
    background: #060606;
}

.md-ru-hero__bg {
    position: absolute;
    inset: 0;
}

.md-ru-hero__bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 18%;
    opacity: 0.48;
    filter: saturate(1.05) contrast(1.08);
}

.md-ru-hero::before,
.md-ru-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.md-ru-hero::before {
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.58) 42%, rgba(0, 0, 0, 0.22) 100%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.86) 0%, rgba(0, 0, 0, 0.2) 38%, #000 100%);
}

.md-ru-hero::after {
    inset: auto 0 0;
    height: 150px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0), #000);
}

.md-ru-hero__layout {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(310px, 410px);
    gap: 42px;
    align-items: end;
}

.md-ru-hero__copy {
    max-width: 710px;
}

.md-ru-hero__kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    color: #ffd7a1;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0;
}

.md-ru-hero__kicker i {
    color: #ff4463;
}

.md-ru-hero h1 {
    margin: 0;
    max-width: 780px;
    color: #fff;
    font-size: clamp(44px, 8vw, 84px);
    line-height: 0.95;
    font-weight: 900;
    letter-spacing: 0;
    text-shadow: 0 18px 46px rgba(0, 0, 0, 0.58);
}

.md-ru-hero__lead {
    max-width: 660px;
    margin: 20px 0 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.5;
}

.md-ru-hero__actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.md-ru-primary-btn,
.md-ru-store-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 50px;
    border-radius: 8px;
    border: 1px solid transparent;
    padding: 0 20px;
    color: #fff;
    font-weight: 800;
    text-decoration: none;
    letter-spacing: 0;
    cursor: pointer;
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.md-ru-primary-btn {
    background: #ff4463;
    box-shadow: 0 16px 36px rgba(255, 68, 99, 0.34);
    font-size: 16px;
}

.md-ru-store-btn {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.18);
    font-size: 15px;
}

.md-ru-primary-btn:hover,
.md-ru-store-btn:hover {
    transform: translateY(-2px);
    color: #fff;
}

.md-ru-store-btn:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.32);
}

.md-ru-hero__note {
    max-width: 620px;
    margin: 14px 0 0;
    color: rgba(255, 255, 255, 0.62);
    font-size: 13px;
    line-height: 1.45;
}

.md-ru-hero__signals {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.md-ru-hero__signals span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.88);
    background: rgba(255, 255, 255, 0.11);
    border: 1px solid rgba(255, 255, 255, 0.14);
    font-size: 13px;
    font-weight: 700;
}

.md-ru-hero__signals i {
    color: #35d0a0;
}

.md-ru-phone-wall {
    position: relative;
    min-height: 440px;
}

.md-ru-phone {
    position: absolute;
    overflow: hidden;
    border-radius: 8px;
    background: #111;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 24px 58px rgba(0, 0, 0, 0.56);
}

.md-ru-phone img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.md-ru-phone--main {
    right: 56px;
    bottom: 0;
    width: 210px;
    aspect-ratio: 9 / 16;
}

.md-ru-phone--side {
    width: 150px;
    aspect-ratio: 9 / 16;
    opacity: 0.88;
}

.md-ru-phone--top {
    right: 0;
    bottom: 142px;
}

.md-ru-phone--bottom {
    right: 238px;
    bottom: 42px;
}

.md-ru-phone__badge {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 38px;
    border-radius: 8px;
    color: #fff;
    background: rgba(255, 68, 99, 0.94);
    font-size: 13px;
    font-weight: 800;
}

.md-ru-proof,
.md-ru-safety,
.md-ru-catalog-intro {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 50px;
}

.md-ru-proof {
    padding-top: 8px;
    padding-bottom: 34px;
}

.md-ru-section-title span,
.md-ru-catalog-intro span {
    display: block;
    color: #35d0a0;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.md-ru-section-title h2,
.md-ru-catalog-intro h2 {
    margin: 8px 0 0;
    color: #fff;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.08;
    font-weight: 900;
    letter-spacing: 0;
}

.md-ru-proof__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 22px;
}

.md-ru-proof__grid article {
    min-height: 190px;
    padding: 22px;
    border-radius: 8px;
    background: #111;
    border: 1px solid rgba(255, 255, 255, 0.09);
}

.md-ru-proof__grid i {
    color: #ff4463;
    font-size: 22px;
}

.md-ru-proof__grid h3 {
    margin: 18px 0 8px;
    color: #fff;
    font-size: 20px;
    line-height: 1.2;
    font-weight: 850;
    letter-spacing: 0;
}

.md-ru-proof__grid p {
    margin: 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 15px;
    line-height: 1.55;
}

.md-ru-safety {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    margin-top: 8px;
    margin-bottom: 38px;
    padding-top: 20px;
    padding-bottom: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.md-ru-safety strong {
    display: block;
    color: #fff;
    font-size: 18px;
    line-height: 1.25;
}

.md-ru-safety p {
    max-width: 650px;
    margin: 6px 0 0;
    color: rgba(255, 255, 255, 0.66);
    font-size: 14px;
    line-height: 1.5;
}

.md-ru-safety nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.md-ru-safety a {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 8px;
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    text-decoration: none;
    font-size: 13px;
    font-weight: 800;
}

.md-ru-safety a:hover {
    background: rgba(255, 255, 255, 0.14);
}

.md-ru-catalog-intro {
    padding-bottom: 20px;
}

.md-ru-catalog-intro p {
    max-width: 640px;
    margin: 10px 0 0;
    color: rgba(255, 255, 255, 0.66);
    font-size: 16px;
    line-height: 1.5;
}

.md-ru-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 28px 50px 42px;
    color: rgba(255, 255, 255, 0.58);
    background: #000;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 13px;
}

.md-ru-footer__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-weight: 800;
}

.md-ru-footer__brand img {
    height: 28px;
    width: auto;
}

.md-ru-footer nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 14px;
}

.md-ru-footer a {
    color: rgba(255, 255, 255, 0.72);
    text-decoration: none;
}

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

@media (max-width: 920px) {
    .md-ru-hero {
        min-height: auto;
        padding: 92px 24px 44px;
    }

    .md-ru-hero__layout {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .md-ru-phone-wall {
        min-height: 270px;
        max-width: 430px;
    }

    .md-ru-phone--main {
        right: 94px;
        width: 138px;
    }

    .md-ru-phone--side {
        width: 98px;
    }

    .md-ru-phone--top {
        right: 26px;
        bottom: 82px;
    }

    .md-ru-phone--bottom {
        right: 226px;
        bottom: 24px;
    }

    .md-ru-proof,
    .md-ru-safety,
    .md-ru-catalog-intro {
        padding-left: 24px;
        padding-right: 24px;
    }

    .md-ru-proof__grid {
        grid-template-columns: 1fr;
    }

    .md-ru-safety {
        align-items: flex-start;
        flex-direction: column;
    }

    .md-ru-safety nav {
        justify-content: flex-start;
    }

    .md-ru-footer {
        align-items: flex-start;
        flex-direction: column;
        padding-left: 24px;
        padding-right: 24px;
    }

    .md-ru-footer nav {
        justify-content: flex-start;
    }
}

@media (max-width: 540px) {
    .md-ru-hero {
        padding: 82px 16px 36px;
    }

    .md-ru-primary-btn,
    .md-ru-store-btn {
        width: 100%;
    }

    .md-ru-hero__signals span {
        width: 100%;
        justify-content: center;
    }

    .md-ru-phone-wall {
        display: none;
    }

    .md-ru-proof,
    .md-ru-safety,
    .md-ru-catalog-intro {
        padding-left: 16px;
        padding-right: 16px;
    }

    .md-ru-footer {
        padding-left: 16px;
        padding-right: 16px;
        padding-bottom: 34px;
    }
}

.md-home-v2 {
    width: 100%;
    min-height: 100vh;
    background-color: #000;
    padding-bottom: 48px;
}

.md-home-v2-inner {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}

/* =============== 顶部 Banner 轮播 =============== */

.md-banner {
    position: relative;
    width: 100%;
    margin-bottom: 32px;
}

.md-banner-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.md-banner-track {
    position: relative;
    width: 100%;
    aspect-ratio: 1440 / 540;
}

.md-banner-slide {
    position: absolute;
    inset: 0;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
}

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

/* Banner 顶部渐变遮罩 */
.md-banner-carousel::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 128px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0) 50%);
    pointer-events: none;
    z-index: 1;
}

/* Banner 底部渐变遮罩 */
.md-banner-carousel::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 128px;
    background: linear-gradient(to top, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0) 100%);
    pointer-events: none;
    z-index: 1;
}

/* Banner 内容区（title + 按钮） */
.md-banner-content {
    position: absolute;
    left: 130px;
    bottom: 120px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    z-index: 2;
}

.md-banner-title {
    font-size: 36px;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    margin: 0;
    max-width: 500px;
    line-height: 1.3;
}

.md-banner-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 999px;
    background: #ff4463;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease;
}

.md-banner-btn:hover {
    background: #e63950;
    transform: scale(1.05);
}

.md-banner-slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.md-banner-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border-radius: 999px;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    transition: background 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

.md-banner-arrow--prev {
    left: 16px;
}

.md-banner-arrow--next {
    right: 16px;
}

.md-banner-arrow:hover {
    background: #ffffff;
    transform: translateY(-50%) scale(1.08);
}

.md-banner-dots {
    position: absolute;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 4;
}

.md-banner-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.md-banner-dot.is-active {
    background: #ff4463;
    transform: scale(1.15);
}

@media (max-width: 767px) {
    .md-banner {
        margin-top: 8px;
        margin-bottom: 24px;
    }

    .md-banner-track {
        aspect-ratio: 16 / 9;
    }

    .md-banner-arrow {
        display: none;
    }

    .md-banner-content {
        left: 10px;
        right: auto;
        bottom: 36px;
        transform: none;
        align-items: flex-start;
        text-align: left;
    }

    .md-banner-title {
        font-size: 12px;
        max-width: 100%;
        width: 100%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .md-banner-btn {
        display: none;
    }
}

/* =============== 分类区 & 横向剧集列表 =============== */

.md-section {
    margin-bottom: 32px;
}

.md-section-header {
    margin-bottom: 16px;
    padding-left: 50px;
    padding-right: 50px;
}

.md-section-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.md-section-link:hover .md-section-arrow {
    border-color: #ffffff;
    color: #ffffff;
}

.md-section-title {
    font-family: 'Lalezar', cursive;
    font-size: 24px;
    font-weight: 400;
    letter-spacing: 0.02em;
}

.md-section-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    transition: border-color 0.2s ease, color 0.2s ease;
}

/* 横向列表容器 */

.md-row {
    position: relative;
    width: 100%;
}

.md-row-viewport {
    overflow: hidden;
    width: 100%;
}

.md-row-track {
    display: flex;
    flex-wrap: nowrap;
    transition: transform 0.4s ease;
    will-change: transform;
}

.md-row-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border-radius: 999px;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3;
    transition: background 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

.md-row-arrow--prev {
    left: 30px;
}

.md-row-arrow--next {
    right: 30px;
}

.md-row-arrow:hover {
    background: #ffffff;
    transform: translateY(-50%) scale(1.08);
}

.md-row-arrow:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.md-row:not(.is-scrollable) .md-row-arrow {
    display: none;
}

/* 卡片 */

.md-card {
    position: relative;
    display: block;
    text-decoration: none;
    color: inherit;
    flex: 0 0 auto;
}

.md-card-inner {
    position: relative;
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    background: #141414;
}

.md-card-poster {
    position: relative;
    width: 100%;
    aspect-ratio: 7 / 10;
    border-radius: 10px;
    overflow: hidden;
}

.md-card-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

/* 黑色遮罩 */
.md-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity 0.25s ease;
    z-index: 5;
    pointer-events: none;
    border-radius: 10px;
}

.md-card:hover .md-card-overlay {
    opacity: 1;
}

/* 卡片占位背景 */
.md-card-poster--placeholder {
    background: linear-gradient(180deg, #2b2550 0%, #1a1a2e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    font-weight: 500;
}

.md-card-play {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 52px;
    height: 52px;
    border-radius: 999px;
    background: #ff4463;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 10;
}

.md-card-play i {
    margin-left: 3px;
}

.md-card-play-label {
    position: absolute;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.75);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    opacity: 0;
    pointer-events: none;
    white-space: nowrap;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.md-card:hover .md-card-poster img {
    transform: scale(1.05);
}

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

.md-card:hover .md-card-play-label {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

@media (max-width: 767px) {
    /* 移动端隐藏 Banner 顶部和底部渐变遮罩 */
    .md-banner-carousel::before,
    .md-banner-carousel::after {
        display: none;
    }

    .md-section {
        margin-bottom: 24px;
    }

    .md-section-header {
        padding-left: 10px;
        padding-right: 10px;
    }

    .md-section-title {
        font-size: 18px;
    }

    .md-row-arrow {
        width: 24px;
        height: 24px;
    }

    .md-row-arrow--prev {
        left: 10px;
    }

    .md-row-arrow--next {
        right: 10px;
    }

    .md-card-overlay,
    .md-card-play,
    .md-card-play-label {
        display: none;
    }

    .md-banner-dot {
        width: 4px;
        height: 4px;
    }

    .md-banner-dot.is-active {
        width: 6px;
        height: 6px;
    }
}

/* =============== 滚动加载指示器 =============== */
.scroll-load-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 0;
    margin: 12px 0 4px;
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top: 2px solid #ff4463;
    border-radius: 50%;
    animation: md-spin 1.2s ease-in-out infinite;
    margin-right: 10px;
}

.loading-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.2px;
}

.load-complete-indicator {
    text-align: center;
    padding: 8px 0 0;
    margin: 8px 0 12px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    font-weight: 400;
    font-style: italic;
    letter-spacing: 0.2px;
}

@keyframes md-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}
