﻿html {
    width: 100%;
    min-width: 0;
    font-size: calc(min(100vw, 430px) / 39);
    background-color: #f4f4f4;
    overflow-x: hidden;
}
/* 全手机 H5 适配底座：页面铺满当前手机可视区，不再使用固定手机外框。 */
:root {
    --app-width: min(100vw, 430px);
    --app-height: 100vh;
    --app-safe-top: env(safe-area-inset-top, 0px);
    --app-safe-bottom: env(safe-area-inset-bottom, 0px);
}

@supports (height: 100dvh) {
    :root {
        --app-height: 100dvh;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    -webkit-text-size-adjust: none !important;
    text-size-adjust: none !important;
}
body {
    font-family: "PingFang SC", "Helvetica Neue", Helvetica, Arial, "Microsoft YaHei", sans-serif;
    background-color: #f4f4f4;
    color: #111;
    margin: 0;
    width: 100%;
    min-width: 0;
    min-height: var(--app-height);
    height: var(--app-height);
    overflow-x: hidden;
    overflow-y: hidden;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

/* 每一屏的容器 */
.screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: var(--app-height);
    height: var(--app-height);
    width: 100%;
    padding-bottom: 2.53rem;
    position: relative;
}

/* 头部 Logo 区域 */
.header {
    width: 100%;
    padding: 2.53rem 2.34rem 1.69rem;
    display: flex;
    justify-content: flex-end;
    flex-shrink: 0;
}
.logo-image {
    height: max(3.2rem, 3.38rem);
    object-fit: contain;
}

/* 标题区域 */
.title-section {
    width: 100%;
    padding: 0 2.34rem;
    text-align: right;
    margin-bottom: 1.69rem;
    flex-shrink: 0;
}
.title-section h1 {
    font-size: max(1.8000rem, 1.7600rem);
    font-weight: 500;
    margin-bottom: 0.84rem;
    letter-spacing: 0.1rem;
}
.title-section h2 {
    font-size: max(1.8000rem, 1.7600rem);
    font-weight: 500;
    letter-spacing: 0.1rem;
}

/* 产品主图与水波纹 */
.product-container {
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 0; /* 必须，确保弹性布局下能缩小 */
}
.product-wrapper {
    position: relative;
    max-height: 100%;
    z-index: 2;
    display: flex;
    justify-content: center;
}
.product-image {
    max-height: 100%;
    max-width: 33.15rem;
    width: auto;
    object-fit: contain;
}

/* 上下结构的多图排版（第二屏） */
.product-wrapper-multi {
    position: relative;
    max-height: 100%;
    width: 100%;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1.69rem;
}
.image-top-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}
/* 厚度标注 */
.thickness-marker {
    position: absolute;
    left: calc(12% - 3.2rem); /* 根据产品图左侧位置调整，向右移动0.5rem */
    top: calc(50% - 0.5rem);
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #4a4a4a;
    font-size: 1.1000rem;
    font-weight: 500;
    z-index: 5;
    white-space: nowrap;
}

.marker-line {
    width: min(1.37rem, 1.6rem);
    height: 0.1rem;
    background-color: #a0a0a0;
    position: relative;
}

.marker-line::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 0.1rem;
    background-color: #a0a0a0;
}

.marker-line-top::after {
    top: 0;
    height: 0.6rem;
}

.marker-line-bottom::after {
    bottom: 0;
    height: 0.6rem;
}

.marker-text {
    margin: 0.4rem 0;
    line-height: 1;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1.1000rem;
}

.product-image-top {
    max-width: 35.1rem;
    max-height: 21.1rem;
    object-fit: contain;
    margin-left: 8rem; /* 为左侧标注留出空间 */
}
.product-image-bottom {
    max-width: 33.15rem;
    max-height: 29.54rem;
    object-fit: contain;
}

/* 针对第二屏的手持水波纹位置微调 */
.image-top-container .ripple {
    top: 50%;
    left: 45%;
}

/* 底部阴影 */
.shadow {
    width: 60%;
    max-width: 30rem;
    height: 1.5rem;
    background: radial-gradient(ellipse at center, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0) 70%);
    border-radius: 50%;
    margin-top: -0.5rem;
    z-index: 1;
    flex-shrink: 0;
}

/* 水波纹动画 */
.ripple {
    display: block;
    position: absolute;
    top: 37%;  /* 与水波纹图片中心对齐 */
    left: 78%; /* 与水波纹图片对齐 */
    width: 0;
    height: 0;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: ripple-anim 5s linear infinite; /* 使用匀速扩散，避免尾声出现停顿感 */
    pointer-events: auto;
    cursor: pointer;
    z-index: 10;
}

/* 水波纹区域图片 */
.ripple-img {
    position: absolute;
    top: 35%;
    left: 78%;
    transform: translate(-50%, -50%);
    max-width: 20rem;
    cursor: pointer;
}

/* 第二屏水波纹图片位置 */
.image-top-container .ripple-img {
    top: 40%;
    left: 45%;
}

/* 第二屏水波纹特效位置 */
.image-top-container .ripple {
    top: 45%;
    left: 45%;
}

/* 第三屏相机头水波纹位置 */
.product-wrapper-camera .ripple-img {
    top: 15%;
    left: 20%;
}
.product-wrapper-camera .ripple {
    top: 17%;
    left: 20%;
}
/* 圈数和间隔：将5秒平均分给8个圈，确保波纹连续不断地产生 */
.ripple:nth-child(1) { animation-delay: 0s; }
.ripple:nth-child(2) { animation-delay: 0.625s; }
.ripple:nth-child(3) { animation-delay: 1.25s; }
.ripple:nth-child(4) { animation-delay: 1.875s; }
.ripple:nth-child(5) { animation-delay: 2.5s; }
.ripple:nth-child(6) { animation-delay: 3.125s; }
.ripple:nth-child(7) { animation-delay: 3.75s; }
.ripple:nth-child(8) { animation-delay: 4.375s; }

@keyframes ripple-anim {
    0% {
        width: 0rem;
        height: 0rem;
        opacity: 1;
        border: 0.3rem solid rgba(255, 255, 255, 0.5);
        box-shadow: 0 0 1rem rgba(255, 255, 255, 0.5);
    }
    50% { /* 将中间状态拉长到 50% 阶段，让高光和粗线条保持更长时间 */
        opacity: 0.9;
        border: 0.3rem solid rgba(255, 255, 255, 0.3);
        box-shadow: 0 0 1.5rem rgba(255, 255, 255, 0.4);
    }
    100% {
        width: max(18rem, 27.01rem); /* 最终范围稍微再大一点 */
        height: max(18rem, 27.01rem);
        opacity: 0;
        border: 0.2rem solid rgba(255, 255, 255, 0);
        box-shadow: none;
    }
}

/* 底部卡片 */
.card-container {
    width: 86%;
    max-width: 50rem;
    background: #ffffff;
    border-radius: 2rem;
    padding: 2.53rem 2rem;
    margin-top: 1.69rem;
    box-shadow: 0 1rem 3rem rgba(0,0,0,0.06);
    text-align: center;
    flex-shrink: 0;
}
.card-container p {
    font-size: max(1.8000rem, 1.7600rem);
    line-height: 1.6;
    font-weight: 500;
    color: #111;
}
.card-container .highlight {
    color: #e67522; /* 橘黄色 */
    font-size: max(2.0000rem, 1.9500rem);
    margin-bottom: 0.4rem;
}

/* 第二屏产品特点页 */
.info-screen {
    align-items: stretch;
    background: #f4f4f4;
    padding: 0 2.34rem;
}
.info-header {
    width: 100%;
    padding-top: 7.6rem;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex-shrink: 0;
}
.info-logo {
    width: min(16rem, 13.26rem);
    height: auto;
    margin-right: 1.56rem;
    object-fit: contain;
}
.info-title {
    margin-top: 2.53rem;
    padding-right: 1.56rem;
    text-align: right;
}
.info-title h1,
.info-title h2 {
    font-size: max(2.0000rem, 1.8700rem);
    line-height: 1.25;
    font-weight: 400;
    letter-spacing: 0;
}
.info-content {
    margin-top: 15vh;
    padding-left: 3.12rem;
    color: #111;
    text-align: left;
}
.info-content p {
    font-size: max(2.4000rem, 2.3000rem);
    line-height: 1.65;
    font-weight: 400;
    white-space: nowrap;
}
.info-content .info-main {
    margin-bottom: 4.64rem;
}
.next-image {
    position: absolute;
    right: 2.34rem;
    bottom: 2.11rem;
    width: min(7rem, 5.46rem);
    height: auto;
    cursor: pointer;
}

/* 新增详情屏 */
.feature-screen {
    background: #f4f4f4;
    align-items: stretch;
    justify-content: flex-start;
    padding: 0;
    overflow: hidden;
}
.feature-top {
    width: 100%;
    padding-top: 7.6rem;
    padding-right: 4.29rem;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}
.feature-logo {
    width: min(14.82rem, 15rem);
    height: auto;
    object-fit: contain;
    margin-bottom: 3.54rem;
}
.feature-title {
    text-align: right;
    font-size: min(1.7900rem, 2.3000rem);
    line-height: 1.2;
    font-weight: 400;
    color: #111;
}
.feature-content {
    padding-left: 5.65rem;
    margin-top: 15vh;
    color: #050505;
}
.feature-main {
    font-size: min(2.3800rem, 3.1000rem);
    line-height: 1.25;
    font-weight: 400;
    margin-bottom: 5.06rem;
    white-space: nowrap;
}
.feature-desc {
    font-size: min(2.2200rem, 2.9000rem);
    line-height: 1.75;
    font-weight: 400;
    white-space: nowrap;
}
.next-btn {
    position: absolute;
    right: 2rem;
    bottom: 2rem;
    width: 9.5rem;
    height: auto;
    cursor: pointer;
}
.btn-fade-in {
    opacity: 0;
    animation: fadeInBtn 0.8s ease forwards;
    animation-delay: 2.5s;
}
.btn-fade-in--fast {
    opacity: 0;
    animation: fadeInBtn 0.8s ease forwards;
    animation-delay: 1s;
}
@keyframes fadeInBtn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
.feature-content-list {
    padding-left: 6.71rem;
    margin-top: 13vh;
    color: #050505;
    font-size: min(2.2600rem, 3.0000rem);
    line-height: 1.65;
    font-weight: 400;
    white-space: nowrap;
}
.feature-content-list .text-group {
    margin-bottom: 4.47rem;
}
.project-content {
    padding-left: 4.49rem;
    margin-top: 10vh;
    font-size: min(2.2600rem, 3.0000rem);
    line-height: 1.6;
    white-space: nowrap;
}
.project-content .text-group {
    margin-bottom: 3.88rem;
}
/* 文字逐行淡入动画 */
.fade-in {
    opacity: 0;
    transform: translateY(2rem);
    animation: fadeInUp 1s ease forwards;
}

/* 特点页默认隐藏 */
.feature-screen {
    display: none;
}

/* 特点页显示时 */
.feature-screen.active {
    display: flex;
}

/* 错开每行的动画时间 - 拉大间隔 */
.fade-in:nth-child(1) { animation-delay: 0.2s; }
.fade-in:nth-child(2) { animation-delay: 0.8s; }
.fade-in:nth-child(3) { animation-delay: 1.4s; }
.fade-in:nth-child(4) { animation-delay: 2s; }
.fade-in:nth-child(5) { animation-delay: 2.6s; }
.fade-in:nth-child(6) { animation-delay: 3.2s; }

.feature-content .fade-in:nth-child(1) { animation-delay: 0.2s; }
.feature-content .fade-in:nth-child(2) { animation-delay: 0.8s; }
.feature-content .fade-in:nth-child(3) { animation-delay: 1.4s; }

.feature-desc .fade-in:nth-child(1) { animation-delay: 0.4s; }
.feature-desc .fade-in:nth-child(2) { animation-delay: 1s; }

.defense-content .fade-in:nth-child(1) { animation-delay: 0.2s; }
.defense-content .fade-in:nth-child(2) { animation-delay: 1s; }
.defense-content .fade-in:nth-child(3) { animation-delay: 1.8s; }

.project-content .fade-in:nth-child(1) { animation-delay: 0.2s; }
.project-content .fade-in:nth-child(2) { animation-delay: 1s; }
.project-content .fade-in:nth-child(3) { animation-delay: 1.8s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(2rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* ================= 抽奖页样式 ================= */
.view {
    min-height: var(--app-height);
    height: var(--app-height);
    width: 100%;
    background: #f4f4f4;
}

.view.is-hidden {
    display: none !important;
}

.lottery {
    margin-top: 0;
    position: relative;
    z-index: 10;
    min-height: var(--app-height);
    height: var(--app-height);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 2.53rem;
}

/* 红包卡片 */
.hongbao {
    margin-top: 0;
    position: relative;
    z-index: 10;
}

.hongbao__card {
    position: relative;
    width: min(39.2rem, calc(39rem - 3.6rem));
    min-height: 52rem;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 1.8rem;
    box-shadow: 0 1.2rem 2.8rem rgba(0, 0, 0, 0.12);
    padding: 3.4rem 2.4rem 2.6rem;
    overflow: hidden;
}

.hongbao__text {
    text-align: center;
    margin-bottom: 1.2rem;
}

.hongbao__title {
    font-size: 2.8000rem;
    font-weight: 800;
    letter-spacing: 0.1rem;
    margin: 0.6rem 0 1.2rem;
    color: #1b1b1b;
}

.hongbao__line {
    margin: 0.6rem 0;
    font-size: 1.4000rem;
    color: rgba(0, 0, 0, 0.7);
}

/* 红包雨区域 */
.hongbao__rain {
    position: relative;
    width: 100%;
    height: 30rem;
    margin: -2rem auto -10%;
    position: relative;
    z-index: 10;
}

/* 红包项 */
.hongbao-item {
    position: absolute;
    width: 6rem;
    height: 8rem;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    transform-origin: center center;
    animation: hongbaoLoop var(--dur) linear var(--delay) both;
}

.hongbao-item__img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
}

@keyframes hongbaoLoop {
    0% {
        transform: translate(var(--from-x), var(--from-y)) rotate(var(--from-r)) scale(var(--s));
        opacity: 0;
    }
    3% {
        opacity: 1;
    }
    97% {
        opacity: 1;
    }
    100% {
        transform: translate(var(--out-x), var(--out-y)) rotate(var(--out-r)) scale(0.6);
        opacity: 0;
    }
}

/* 结果页 */
.hongbao--result {
    position: relative;
    inset: auto;
    margin: 0;
    z-index: 20;
    padding-top: 0;
    padding-bottom: 0;
    width: 100%;
    max-width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hongbao--result .hongbao__text {
    margin-bottom: 0;
    padding-top: 0.5rem;
}

.hongbao--result .hongbao__title {
    font-size: clamp(2.4000rem, 2.3400rem, 3.6000rem);
    font-weight: 900;
    margin: 0.5rem 0 1rem;
}

.hongbao--result .hongbao__line {
    font-size: clamp(1.2000rem, 1.3700rem, 1.6000rem);
    margin: 0.4rem 0;
    color: #333;
}

.hongbao--result .hongbao__card {
    padding: 1rem 2rem 2rem;
    position: relative;
    z-index: 15;
    height: 100%;
    max-height: 50.64rem;
    min-height: 38rem;
    overflow: visible;
    background: #ffffff;
    border-radius: 1.8rem;
    box-shadow: 0 1.2rem 2.8rem rgba(0, 0, 0, 0.12);
}

.hongbao.is-hidden {
    display: none !important;
}

.page-footer {
    width: 100%;
    background-color: #888888;
    color: #ffffff;
    text-align: center;
    padding: 1.5rem 0;
    font-size: clamp(1.2000rem, 1.3700rem, 1.4000rem);
    position: absolute;
    bottom: 0;
    left: 0;
    z-index: 10;
}

/* 结果页修正，留出底部空间 */
.view--result {
    position: relative;
    height: var(--app-height);
    overflow: hidden;
    padding-bottom: 0;
}

.view--result .lottery {
    height: calc(var(--app-height) - 4.6rem);
    min-height: 0;
    padding-bottom: 1.69rem;
}

/* 结果页背景图 */
.ui9__bg {
    position: absolute;
    left: 47%;
    top: 62%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 32rem;
    height: auto;
    z-index: 10;
    pointer-events: none;
}

.ui9__from {
    position: absolute;
    left: 53%;
    top: 43%;
    transform: translate(-50%, -50%);
    margin: 0;
    font-size: clamp(1.4000rem, 1.3700rem, 1.8000rem);
    color: rgba(183, 155, 99, 0.88);
    white-space: nowrap;
    font-weight: 600;
    z-index: 11;
}

.ui9__amount {
    position: absolute;
    left: 51%;
    top: 56%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: baseline;
    justify-content: center;
    color: #b79b63;
    font-family: "DIN Alternate", "DIN", "Arial", sans-serif;
    z-index: 11;
}

.ui9__currency {
    font-size: clamp(2.0000rem, 1.7600rem, 2.6000rem);
    margin-right: 0.4rem;
    font-weight: 700;
}

.ui9__number {
    font-size: clamp(5.4000rem, 5.0700rem, 7.2000rem);
    line-height: 1;
    font-weight: 800;
}

.ui9__unit {
    font-size: clamp(1.8000rem, 1.5600rem, 2.2000rem);
    margin-left: 0.3rem;
    font-weight: 700;
}

.ui9__shot {
    position: absolute;
    left: 51%;
    top: 85%;
    transform: translate(-50%, -50%);
    width: 60%;
    padding: 1.2rem 0;
    border: 0;
    border-radius: 99.9rem;
    background: transparent;
    color: #d43232;
    font-size: clamp(1.6000rem, 1.5600rem, 2.2000rem);
    font-weight: 800;
    cursor: pointer;
    z-index: 11;
}

.ui9__note {
    position: absolute;
    left: 53%;
    top: 90%;
    transform: translateX(-50%);
    margin: 0;
    font-size: clamp(1.3000rem, 1.3700rem, 1.6000rem);
    color: #fff;
    font-weight: 700;
    white-space: nowrap;
    text-shadow: 0 0.2rem 0.6rem rgba(0, 0, 0, 0.18);
    z-index: 11;
}

/* 截图弹窗样式 */
.screenshot-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    max-width: none;
    height: var(--app-height);
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.screenshot-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 85%;
    max-width: 40rem;
}

.screenshot-tip {
    color: #fff;
    font-size: 1.6000rem;
    margin-bottom: 1.5rem;
    font-weight: bold;
    text-align: center;
    background: rgba(255, 60, 60, 0.9);
    padding: 0.8rem 1.6rem;
    border-radius: 2rem;
}

#screenshot-img {
    width: 100%;
    height: auto;
    border-radius: 1.2rem;
    margin-bottom: 2rem;
    box-shadow: 0 0.4rem 2rem rgba(0, 0, 0, 0.3);
}

.close-screenshot {
    padding: 1rem 4rem;
    font-size: 1.6000rem;
    color: #333;
    background: #fff;
    border: none;
    border-radius: 2.5rem;
    cursor: pointer;
    font-weight: bold;
}

.ui9__footer {
    position: relative;
    display: block;
    margin-top: 3rem;
    text-align: center;
    font-size: clamp(1.0000rem, 0.9800rem, 1.2000rem);
    color: #999;
    font-weight: 500;
    white-space: nowrap;
    z-index: 11;
}

/* NEXT 按钮 */
.hongbao__next {
    display: block;
    margin: 2rem auto 0;
    padding: 1.2rem 4rem;
    font-size: 1.8000rem;
    font-weight: 600;
    color: #333;
    background: #fff;
    border: 0.2rem solid #ddd;
    border-radius: 3rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hongbao__next:hover {
    background: #f0f0f0;
    border-color: #ccc;
}

.hongbao__next.is-hidden {
    display: none !important;
}

#app-container {
    width: var(--app-width, 100%);
    max-width: none;
    min-height: var(--app-height, 100dvh);
    height: var(--app-height, 100dvh);
    background-color: #f4f4f4;
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

#app-container::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}


