/* ============================================================
   Magic TV 下载落地页 — 单页响应式
   尺寸参照实测（桌面 1125 视口）：
     hero    : 圆角 38px / 2px 粉边 rgba(255,124,194,.3) / 内边距 40.5px
               背景 radial-gradient(circle at 88% 18%, rgba(255,79,168,.27), transparent 38%)
               两栏 486 : 440，间距 50.6px
     h1      : 45px / 行高 0.98 / 字距 -2.61px
     sub     : 14px / 行高 1.65 / 字重 600 / rgba(248,244,245,.7) / 上间距 24px
     下载按钮: 360×72 / 圆角 19px / rgba(255,79,168,.92) / 内边距 12 18 12 20 / 间距 16
     对比图  : 223×391（≈4:7）/ 圆角 30px
     视频卡  : 264×369（比例 0.715）/ 圆角 18px / 1px 白边 / 内部粉色径向光
     网格    : 桌面 4 列 / gap 8px
     h2      : 34.875px / 行高 1 / 字距 -1.918px
     CTA h2  : 63px / 行高 0.96 / 字距 -4.41px
     eyebrow : 10px / 字距 1.7px / 字重 800
   ============================================================ */

:root {
    --bg: #070707;
    --text: #f8f4f5;
    --muted: rgba(248, 244, 245, 0.7);
    --muted-2: rgba(248, 244, 245, 0.46);
    --pink: #ff4fa8;
    --pink-92: rgba(255, 79, 168, 0.92);
    --line: rgba(255, 255, 255, 0.08);
    --line-pink: rgba(255, 124, 194, 0.3);
    --max: 1120px;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
    background: var(--bg);
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family:
        -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue',
        'PingFang SC', 'Microsoft YaHei', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    line-height: 1.5;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
    color: inherit;
    border: 0;
    background: none;
    cursor: pointer;
}

.wrap {
    width: 100%;
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 16px;
}

/* ============================ 顶栏 ============================ */
.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    padding-top: env(safe-area-inset-top);
    background: rgba(7, 7, 7, 0.9);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    height: 56px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.4px;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 10px;
    background: linear-gradient(135deg, #ff6aae, #ff2f8e);
}

.brand-mark svg {
    width: 16px;
    height: 16px;
}

.lang {
    position: relative;
    flex: 0 0 auto;
}

.lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.05);
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text);
}

.lang-btn:hover {
    border-color: var(--line-pink);
}

.lang-btn svg {
    width: 13px;
    height: 13px;
    opacity: 0.8;
}

.lang-menu {
    position: absolute;
    right: 0;
    top: 42px;
    min-width: 132px;
    padding: 6px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: #141414;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6);
    display: none;
}

.lang-menu[data-open='true'] {
    display: block;
}

.lang-menu button {
    display: block;
    width: 100%;
    padding: 9px 11px;
    border-radius: 9px;
    text-align: left;
    font-size: 13px;
    color: var(--muted);
}

.lang-menu button[data-active='true'],
.lang-menu button:hover {
    background: rgba(255, 79, 168, 0.16);
    color: var(--text);
}

/* ============================ Hero ============================ */
.hero {
    position: relative;
    z-index: 1;
    margin: 6px 0 30px;
    padding: 20px;
    border-radius: 28px;
    border: 2px solid var(--line-pink);
    background:
        radial-gradient(
            circle at 88% 18%,
            rgba(255, 79, 168, 0.27),
            rgba(0, 0, 0, 0) 38%
        ),
        radial-gradient(
            circle at 8% 92%,
            rgba(255, 79, 168, 0.1),
            rgba(0, 0, 0, 0) 45%
        ),
        #0b0709;
    display: grid;
    gap: 22px;
}

.hero h1 {
    margin: 0;
    font-size: clamp(31px, 8.6vw, 45px);
    line-height: 0.98;
    letter-spacing: -0.058em;
    font-weight: 800;
}

.hero h1 .l1,
.hero h1 .l2 {
    display: block;
}

.hero h1 .l2 {
    color: var(--text);
}

.hero .sub {
    margin: 16px 0 0;
    font-size: 13.5px;
    line-height: 1.65;
    font-weight: 600;
    color: var(--muted);
}

/* 下载按钮 */
.dl-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    max-width: 360px;
    min-height: 68px;
    margin-top: 20px;
    padding: 12px 18px 12px 20px;
    border-radius: 19px;
    background: var(--pink-92);
    transition:
        filter 0.18s,
        transform 0.14s ease;
}

.dl-btn:hover {
    filter: brightness(1.06);
}

.dl-btn:active {
    transform: scale(0.985);
}

.dl-txt {
    display: flex;
    flex-direction: column;
    line-height: 1.24;
    text-align: left;
}

.dl-txt em {
    font-style: normal;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.88);
}

.dl-txt strong {
    font-size: 16px;
    font-weight: 700;
}

.dl-arrow {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
}

.dl-arrow svg {
    width: 14px;
    height: 14px;
}

/* 卖点 */
.points {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 14px 0 0;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--muted-2);
}

.points span {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.points span + span::before {
    content: '';
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.28);
}

/* Before / After */
.ba-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ba {
    position: relative;
    flex: 1 1 0;
    margin: 0;
    border-radius: 24px;
    overflow: hidden;
    background: #1a1216;
    aspect-ratio: 4 / 7;
}

.ba img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ba::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 62%, rgba(0, 0, 0, 0.5));
    pointer-events: none;
}

.ba figcaption {
    position: absolute;
    left: 9px;
    bottom: 9px;
    z-index: 2;
    padding: 3px 8px;
    border-radius: 7px;
    background: rgba(0, 0, 0, 0.46);
    font-size: 10px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
}

.ba .ai-badge {
    position: absolute;
    right: 9px;
    top: 9px;
    z-index: 3;
    padding: 3px 7px;
    border-radius: 999px;
    background: var(--pink-92);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.6px;
    color: #fff;
}

.ba-arrow {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    margin: 0 -17px;
    border-radius: 50%;
    background: var(--pink-92);
    box-shadow: 0 6px 18px rgba(255, 79, 168, 0.45);
    z-index: 3;
}

.ba-arrow svg {
    width: 14px;
    height: 14px;
}

/* ============================ 作品区 ============================ */
.showcase {
    position: relative;
    z-index: 1;
    padding: 0 0 52px;
}

.sec-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.eyebrow {
    margin: 0 0 6px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.7px;
    text-transform: uppercase;
    color: var(--muted-2);
}

.sec-head h2 {
    margin: 0;
    font-size: clamp(26px, 6.8vw, 34.875px);
    line-height: 1;
    letter-spacing: -0.055em;
    font-weight: 800;
}

.badge {
    flex: 0 0 auto;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.6px;
    color: var(--muted);
    white-space: nowrap;
}

.grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.card {
    position: relative;
    aspect-ratio: 264 / 369;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid var(--line);
    background:
        radial-gradient(
            circle at 50% 40%,
            rgba(255, 79, 168, 0.17),
            rgba(0, 0, 0, 0) 54%
        ),
        #151315;
    isolation: isolate;
}

.card video,
.card img.cover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    display: block;
}

.card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 76%, rgba(0, 0, 0, 0.4));
    pointer-events: none;
    z-index: 1;
}

.card .idx {
    position: absolute;
    left: 9px;
    bottom: 8px;
    z-index: 2;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.55);
}

/* 内嵌 CTA 卡：整行 */
.gallery-cta {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 40px 20px;
    border-radius: 18px;
    border: 1px solid var(--line-pink);
    background:
        radial-gradient(
            circle at 88% 18%,
            rgba(255, 79, 168, 0.24),
            rgba(0, 0, 0, 0) 45%
        ),
        #0b0709;
    text-align: center;
}

.gallery-cta h2 {
    margin: 0;
    font-size: clamp(30px, 9vw, 56.25px);
    line-height: 0.98;
    letter-spacing: -0.065em;
    font-weight: 800;
}

.gallery-cta p {
    margin: 8px 0 0;
    max-width: 340px;
    font-size: 13px;
    line-height: 1.6;
    font-weight: 600;
    color: var(--muted);
}

.gallery-cta .dl-btn {
    max-width: 360px;
    margin-top: 18px;
}

/* ============================ 结尾 CTA ============================ */
.cta-final {
    position: relative;
    z-index: 1;
    padding: 40px 0 44px;
    text-align: center;
}

.cta-final h2 {
    margin: 0;
    font-size: clamp(32px, 10vw, 63px);
    line-height: 0.96;
    letter-spacing: -0.07em;
    font-weight: 800;
}

.cta-final .sub {
    max-width: 330px;
    margin: 12px auto 0;
    font-size: 13px;
    line-height: 1.6;
    font-weight: 600;
    color: var(--muted);
}

.cta-final .dl-btn {
    margin: 20px auto 0;
}

/* ============================ Footer ============================ */
footer {
    position: relative;
    z-index: 1;
    padding: 26px 0 calc(28px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.foot-top {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -0.4px;
}

.foot-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 14px;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
}

.foot-links a:hover {
    color: var(--text);
}

.foot-note {
    margin: 12px 0 0;
    font-size: 11px;
    line-height: 1.7;
    color: var(--muted-2);
}

/* ============================ 平板 ============================ */
@media (min-width: 620px) {
    .wrap {
        padding: 0 24px;
    }

    .grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ============================ PC ============================ */
@media (min-width: 900px) {
    .hero {
        grid-template-columns: 486fr 440fr;
        align-items: center;
        gap: 50.6px;
        padding: 40.5px;
        border-radius: 38px;
        margin: 12px 0 30px;
    }

    .hero .sub {
        margin-top: 24px;
        font-size: 14px;
    }

    .dl-btn {
        max-width: 360px;
        min-height: 72px;
        margin-top: 22px;
    }

    .points {
        margin-top: 16px;
    }

    .ba {
        border-radius: 30px;
    }

    .grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .showcase {
        padding-bottom: 58px;
    }

    .gallery-cta {
        border-radius: 22px;
        padding: 56px 24px;
    }

    .cta-final {
        padding: 56px 0 60px;
    }
}

/* ============================ 进场动画 ============================ */
.reveal {
    opacity: 0;
    transform: translateY(14px);
    transition:
        opacity 0.55s ease,
        transform 0.55s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.reveal.in {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    html {
        scroll-behavior: auto;
    }
}
