/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: #ffffff;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
}

/* 主容器 */
.container {
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin-top: 40px;
}

/* 产品展示区域 */
.product-showcase {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 100%;
}

/* 手臂部分 - 占据整个横向屏幕 */
.arm-section {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 70vh;
    margin: 30px 0 0 0; /* 向下移动40px */
}

.arm-image {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.arm-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 0;
    box-shadow: none;
}

/* 移除原有护腕和屏幕样式 */
.wristband, .wristband-body, .screen { display: none !important; }

/* 新的屏幕时间显示，绝对定位到产品图屏幕正中 */
.screen-on-photo {
    position: absolute;
    left: 41.05%;
    top: 38.1%;
    width: 17.76%;
    height: 17.76%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.0);
    pointer-events: none;
    overflow: hidden;
    border-radius: 50%;
}

.screen-bg-gif {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 1;
    z-index: 1;
    pointer-events: none;
    border-radius: 50%;
    background: #fff;
}

.screen-foreground {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #00ff88;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    text-shadow: 0 0 10px #00ff88, 0 0 2px #000;
    font-size: 1.1rem;
    pointer-events: auto;
    background: none;
}

.time-display {
    font-family: 'luckiest guy',  'Courier New', monospace;
    font-size: 50px;
    letter-spacing: 2px;
    margin-bottom: 3px;
}

.date-display {
    font-size: 21px;
    opacity: 0.9;
}

/* 产品信息 */
.product-info {
    text-align: center;
    color: #333;
    margin-top: var(--product-info-mt, 10px);
    padding: 20px;
}

/* 新增按钮样式 */
/* 移除原有的.button-group样式，因为按钮已移动位置 */
/* .button-group {
    display: flex;
    justify-content: center; 
    gap: 20px; 
    margin-top: 30px; 
    flex-wrap: wrap; 
}
*/

/* 新增贴纸按钮样式 */
/* 移除旧的.side-buttons样式，现在分为左右两个 */
/*
.side-buttons {
    position: absolute;
    right: 130px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 5;
    align-items: center;
    padding: 10px;
}
*/

.side-buttons-right {
    position: absolute; /* 绝对定位 */
    left: 50%; /* 相对于父容器中心定位 */
    top: 50%; /* 调整垂直位置 */
    transform: translateY(-50%) translateX(350px) rotate(31deg); /* 精确垂直居中并从中心向右偏移 */
    z-index: 5; /* 确保在手臂图片之上 */
}

.side-buttons-left {
    position: absolute; /* 绝对定位 */
    left: 35%; /* 相对于父容器中心定位 */
    top: 50%; /* 调整垂直位置 */
    transform: translateY(-50%) translateX(-350px) rotate(-21deg); /* 精确垂直居中并从中心向左偏移 */
    z-index: 5; /* 确保在手臂图片之上 */
}

.sticker-link {
    display: block; /* 确保链接独占一行 */
    cursor: pointer;
    transition: transform 0.2s ease; /* 添加悬停动画 */
    /* 移除 box-shadow */
    border-radius: 10px; /* 让链接也有轻微圆角 */
    overflow: hidden; /* 确保内容不溢出 */
}

.sticker-link:hover {
    transform: scale(1.08); /* 悬停时放大 */
    /* 移除 box-shadow */
}

.sticker-button {
    width: 180px; /* 放大贴纸图片的宽度 */
    height: auto; /* 高度自动，保持比例 */
    display: block; /* 移除图片默认下边距 */
    user-select: none; /* 禁止用户选择图片 */
    pointer-events: none; /* 让点击事件穿透到链接 */
}

/* 媒体查询，适配小屏幕 */
@media (max-width: 768px) {
    .side-buttons-right {
        left: 50%; /* 相对于父容器中心定位 */
        top: 40%; /* 适应移动端垂直位置 */
        transform: translateY(-40%) translateX(80px) rotate(5deg); /* 从中心向右偏移 */
    }
    .side-buttons-left {
        left: 50%; /* 相对于父容器中心定位 */
        top: 40%; /* 适应移动端垂直位置 */
        transform: translateY(-30%) translateX(-170px) rotate(-5deg); /* 从中心向左偏移 */
    }
    .sticker-button {
        width: 100px; /* 移动端贴纸尺寸缩小 */
    }
}

/* 移除原有的.action-button, .buy-button, .video-button 样式 */
.action-button {
    display: none; /* 隐藏旧的 action-button 样式 */
}

.buy-button {
    display: none; /* 隐藏旧的 buy-button 样式 */
}

.video-button {
    display: none; /* 隐藏旧的 video-button 样式 */
}

/* @media (max-width: 768px) {
    .action-button {
        font-size: 0.8em; 
        padding: 8px 12px; 
        min-width: 100px; 
    }
}
*/

.product-title {
    font-size: 3.0rem;
    color: #FFD700;
    text-shadow: 0 0 8px #fffbe6, 0 0 16px #fff;
    font-weight: bold;
    text-align: center;
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
    animation: none;
    margin-bottom: 15px;
}

.product-description {
    font-size: 1.5rem;
    color: #666;
    text-shadow: none;
}

.demo-tip {
    text-align: center;
    color: #b22222;
    font-size: 1.1rem;
    margin-top: 10px;
    font-weight: bold;
    letter-spacing: 1px;
}

/* 移动端优化 - 横竖屏适配 */
@media (max-width: 768px) {
    /* 移动端整体缩放适配 */
    body {
        min-height: 100vh;
        min-height: 100dvh; /* 支持动态视口高度 */
        min-height: calc(var(--vh, 1vh) * 100); /* 自定义视口高度 */
        overflow: hidden; /* 防止滚动 */
    }
    
    .container {
        width: 100vw;
        height: 100vh;
        height: 100dvh;
        height: calc(var(--vh, 1vh) * 100);
        display: flex;
        align-items: center;
        justify-content: center;
        transform-origin: center center;
        margin-top: 36px;
    }
    
    .product-showcase {
        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 10px;
    }
    
    .arm-section {
        height: 60vh;
        height: calc(var(--vh, 1vh) * 60);
        margin: 0;
        flex-shrink: 0;
    }
    
    .product-info {
        margin-top: 0;
        padding: 10px 20px;
        flex-shrink: 0;
    }
    
    .product-title {
        font-size: 2.5rem;
        margin-bottom: 10px;
    }
    
    .product-description {
        font-size: 1rem;
        line-height: 1.4;
    }
    
    .demo-tip {
        font-size: 0.9rem;
        margin-top: 8px;
    }
}

/* 移动端横屏优化 */
@media (max-width: 768px) and (orientation: landscape) {
    .container {
        transform: scale(0.85);
    }
    
    .product-showcase {
        gap: 5px;
    }
    
    .arm-section {
        height: 50vh;
        height: calc(var(--vh, 1vh) * 50);
    }
    
    .product-info {
        padding: 5px 20px;
    }
    
    .product-title {
        font-size: 2rem;
        margin-bottom: 5px;
    }
    
    .product-description {
        font-size: 0.9rem;
    }
    
    .demo-tip {
        font-size: 0.8rem;
        margin-top: 5px;
    }
    /* 为横屏模式下的贴纸按钮重新定位 */
    .side-buttons-right {
        left: 50%; /* 相对于父容器中心定位 */
        top: 45%; /* 保持垂直位置 */
        transform: translateY(-50%) translateX(180px) rotate(5deg); /* 从中心向右偏移 */
    }
    .side-buttons-left {
        display: none; /* 在移动端横屏时隐藏 */
        /* left: 50%; */ /* 相对于父容器中心定位 */
        /* top: 45%; */ /* 保持垂直位置 */
        /* transform: translateY(-50%) translateX(-80px) rotate(-5deg); */ /* 从中心向左偏移 */
    }
}

/* 移动端竖屏优化 */
@media (max-width: 768px) and (orientation: portrait) {
    .container {
        transform: scale(0.9);
    }
    
    .arm-section {
        height: 55vh;
        height: calc(var(--vh, 1vh) * 55);
    }
    
    .product-title {
        font-size: 2.2rem;
    }
    
    .product-description {
        font-size: 0.95rem;
    }
}

/* 超小屏幕优化 */
@media (max-width: 480px) {
    .container {
        transform: scale(0.8);
    }
    
    .product-title {
        font-size: 2rem;
    }
    
    .product-description {
        font-size: 0.9rem;
    }
}

/* 超小屏幕横屏 */
@media (max-width: 480px) and (orientation: landscape) {
    .container {
        transform: scale(0.75);
    }
    
    .arm-section {
        height: 45vh;
        height: calc(var(--vh, 1vh) * 45);
    }
    
    .product-title {
        font-size: 1.8rem;
    }
    
    .product-description {
        font-size: 0.8rem;
    }
}

/* 触摸优化 */
@media (hover: none) and (pointer: coarse) {
    .screen-foreground {
        /* 增加触摸区域 */
        min-width: 44px;
        min-height: 44px;
    }
    
    .screen-content {
        /* 确保文字在触摸设备上清晰 */
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }
    
    /* 优化按钮触摸区域 */
    .order-type-btn, .pay-btn {
        min-height: 44px;
        min-width: 44px;
    }
}

/* 原有的响应式设计保持不变（为了兼容性） */
@media (max-width: 768px) {
    .wristband-body {
        width: 200px;
        height: 80px;
    }
    
    .screen {
        width: 60px;
        height: 60px;
    }
    
    .time-display {
        font-size: 14px;
    }
    
    .date-display {
        font-size: 8px;
    }
}

/* 动画效果 */
@keyframes glow {
    0%, 100% {
        box-shadow: 
            0 6px 12px rgba(0, 0, 0, 0.4),
            inset 0 3px 6px rgba(255, 255, 255, 0.1),
            0 0 15px rgba(0, 255, 136, 0.4);
    }
    50% {
        box-shadow: 
            0 6px 12px rgba(0, 0, 0, 0.4),
            inset 0 3px 6px rgba(255, 255, 255, 0.1),
            0 0 25px rgba(0, 255, 136, 0.7);
    }
}

.screen {
    animation: glow 3s ease-in-out infinite;
}

/* 手臂图片自适应优化 */
.arm-image-wrapper {
    position: relative;
    width: 1280px;
    height: 768px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.arm-img-px {
    position: absolute;
    left: 0;
    top: 0;
    width: 1280px;
    height: 768px;
    z-index: 2;
    pointer-events: none;
}

.screen-bg-gif-px {
    position: absolute;
    left: 521.5px;
    top: 264.9px;
    width: 236px;
    height: 236px;
    z-index: 1;
    object-fit: cover;
    border-radius: 50%;
    clip-path: circle(50% at 50% 50%);
    pointer-events: none;
    opacity: 1;
    background: #fff;
}

.screen-foreground {
    position: absolute;
    left: 521.5px;
    top: 264.9px;
    width: 236px;
    height: 236px;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
}

.screen-content {
    color: #fff;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 1.1rem;
    text-align: center;
    text-shadow: none;
    max-width: 92%;
    max-height: 92%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    word-break: break-all;
}

.listening-bg {
    background: #111;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.screen-content .listening-tip, .screen-content .generating-tip {
    color: #fff;
    font-size: 1.1rem;
    text-align: center;
    font-weight: bold;
    text-shadow: 0 0 8px #000;
}

/* 引导提示样式 */
.guide-tip {
    position: fixed;
    left: 0; top: 0; width: 100vw; height: 100vh;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    background: none;
    transition: opacity 0.6s;
}
.guide-tip.hide {
    opacity: 0;
}
.guide-img {
    position: absolute;
    left: 860px;
    top: 350px;
    width: 340px;
    height: auto;
    opacity: 0.92;
    pointer-events: none;
    user-select: none;
}
.guide-tip-text {
    color: #4fc3f7;
    font-size: 1.3rem;
    font-weight: bold;
    margin-top: 12px;
    text-align: center;
    text-shadow: none;
    letter-spacing: 1px;
}
.guide-tip-svg {
    width: 180px;
    height: 120px;
    display: block;
}

/* 订单页面按钮美化 */
.order-type-btns {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    width: 85%;
    max-width: 320px;
    margin: 0 auto 12px auto;
}
.order-type-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--order-font-size, 1.08rem);
    flex: 1 1 auto;
    min-width: 0;
    border: none;
    outline: none;
    border-radius: 18px;
    height: 36px;
    padding: 0 14px;
    font-weight: bold;
    color: #222;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    cursor: pointer;
    transition: all 0.2s;
    opacity: 0.92;
    border: 2px solid transparent;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background-clip: padding-box;
}
.order-type-btn[data-type="balance"] {
    color: #fff;
}
.order-type-btn.selected, .order-type-btn:active {
    border: 2px solid #222;
    transform: scale(1.06);
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
}
.order-info {
    color: #fff;
    font-size: 1.05rem;
    margin-bottom: 14px;
    text-align: left;
    padding-left: 6px;
    text-shadow: none;
    width: 100%;
    box-sizing: border-box;
}
.pay-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(90deg,#4fc3f7,#1976d2);
    color: #fff;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 22px;
    height: 38px;
    padding: 0 18px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.18);
    cursor: pointer;
    margin: 0 auto;
    transition: background 0.2s, transform 0.2s;
    gap: 8px;
    width: 90%;
    max-width: 160px;
}
.pay-btn:hover {
    background: linear-gradient(90deg,#1976d2,#4fc3f7);
    transform: scale(1.04);
}
#address-select {
    border-radius: 8px;
    padding: 2px 8px;
    font-size: 1rem;
    margin-left: 6px;
    max-width: 80px;
}

:root {
    --order-scale: 1;
    --order-inner-scale: 0.82;
    --product-info-mt: -30px;
    /* 流程阶段字体大小变量 */
    --main-font-size: 1.15rem;
    --listening-font-size: 1.18rem;
    --generating-font-size: 1.12rem;
    --order-font-size: 1.08rem;
    --paying-font-size: 1.05rem;
    --delivering-font-size: 1.02rem;
    --result-font-size: 1.10rem;
    --other1-font-size: 1rem;
    --other2-font-size: 1rem;
}

.order-scale-wrap {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(var(--order-scale, 0.90));
    transform-origin: center center;
    transition: transform 0.2s;
}

.order-inner {
    transform: scale(var(--order-inner-scale, 1));
    transform-origin: center center;
    transition: transform 0.2s;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.face-scan-wrap {
    position: relative;
    width: 88px;
    height: 88px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}
.face-img {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}
.scan-bar {
    position: absolute;
    left: 0; top: 0;
    width: 100%;
    height: 18px;
    background: linear-gradient(180deg,rgba(79,195,247,0.45),rgba(79,195,247,0.12));
    border-radius: 8px;
    opacity: 0.85;
    pointer-events: none;
    z-index: 2;
    transform: translateY(-100%);
}
.scan-animate {
    animation: scan-move 1s linear forwards;
}
@keyframes scan-move {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100%); }
}

/* 移动端手臂整体缩放适配 */
@media (max-width: 768px) {
    .arm-image-wrapper {
        width: 100vw;
        max-width: 100vw;
        height: auto;
        aspect-ratio: 1280/768;
        max-height: 60vh;
        position: relative;
        transform: scale(1);
        transition: transform 0.2s;
    }
    .arm-img-px {
        width: 100vw;
        max-width: 100vw;
        height: auto;
        aspect-ratio: 1280/768;
        left: 0;
        top: 0;
        position: absolute;
    }
    .screen-bg-gif-px,
    .screen-foreground {
        width: 18.4vw;
        height: 18.4vw;
        left: 40.75vw;
        top: 20.7vw;
        min-width: 60px;
        min-height: 60px;
        max-width: 180px;
        max-height: 180px;
    }
}
@media (max-width: 768px) and (orientation: landscape) {
    .arm-image-wrapper {
        max-height: 50vh;
        height: 50vh;
        width: auto;
        max-width: 100vw;
    }
    .arm-img-px {
        height: 50vh;
        width: auto;
        max-width: 100vw;
    }
    .screen-bg-gif-px,
    .screen-foreground {
        width: 18.4vh;
        height: 18.4vh;
        left: 40.75vh;
        top: 20.7vh;
        min-width: 40px;
        min-height: 40px;
        max-width: 120px;
        max-height: 120px;
    }
}

/* 页面顶部提示文字样式（固定顶部） */
.top-banner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    text-align: center;
    font-size: 1.15rem;
    color: #5bb4ff;
    font-weight: bold;
    background: #fff;
    padding: 12px 0 6px 0;
    letter-spacing: 1px;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
@media (max-width: 768px) {
    .top-banner {
        font-size: 1rem;
        padding: 10px 0 4px 0;
    }
}

/* 主界面时间显示 */
.screen-content {
    font-size: var(--main-font-size, 1.1rem);
}

/* 聆听中 */
.screen-content .listening-tip {
    font-size: var(--listening-font-size, 1.18rem);
}

/* 生成订单中 */
.screen-content .generating-tip {
    font-size: var(--generating-font-size, 1.12rem);
}

/* 订单界面 */
.order-info {
    font-size: var(--order-font-size, 1.08rem);
}
.order-type-btn {
    font-size: var(--order-font-size, 1.08rem);
}
.pay-btn {
    font-size: var(--order-font-size, 1.08rem);
}

/* 支付（人脸识别） */
.face-scan-wrap + div,
.screen-content .face-scan-tip {
    font-size: var(--paying-font-size, 1.05rem);
}

/* 配送中 */
.screen-content .delivering-tip {
    font-size: var(--delivering-font-size, 1.02rem);
}

/* 结果弹窗 */
.screen-content .result-tip {
    font-size: var(--result-font-size, 1.10rem);
}

.music-control {
    position: fixed;
    top: 2px;      /* 与置顶栏齐平 */
    right: 32px;
    z-index: 2000;
    cursor: pointer;
    user-select: none;
}
.music-icon {
    width: 40px;    /* 缩小图标 */
    height: 40px;
    transition: filter 0.2s;
    animation: rotate-music 4s linear infinite;
}
.music-icon.paused {
    animation-play-state: paused !important;
    filter: grayscale(60%) brightness(0.8);
}
@keyframes rotate-music {
    0% { transform: rotate(0deg);}
    100% { transform: rotate(360deg);}
}

.music-tip {
    position: fixed;
    top: 60px;
    right: 90px;
    color: #ff9800;
    font-size: 1.1rem;
    background: #fffbe6;
    border-radius: 8px;
    padding: 6px 14px;
    z-index: 2100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
} 