/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 移动端基础设置 */
html {
    font-size: 50px; /* 设置基础字体大小，1rem = 50px，适配移动设备 */
}

body {
    font-family: 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    background: url('background.png') center center / cover no-repeat fixed;
    min-height: 100vh;
    font-size: .28rem;
    color: #3f4156;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 防止页面缩放 */
body {
    touch-action: pan-y;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* 左侧固定悬浮 */
.left-float {
    position: fixed;
    left: -0.5rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    width: 0.93rem;
    height: 1.33rem;
}

.left-float img {
    width: 100%;
    height: auto;
    display: block;
}

/* 右侧固定悬浮 */
.right-float {
    position: fixed;
    right: -.1rem;
    top: 80%;
    transform: translateY(-50%);
    z-index: 100;
    width: .59rem;
    height: .8rem;
}

.right-float img {
    width: 100%;
    height: auto;
    display: block;
}

/* 主容器 */
.container {
    width: 100%;
    min-height: 100vh;
    padding: 0 0.2rem;
    padding-top: 0.3rem;
}

/* 顶部banner区域 */
.banner-section {
    width: 100%;
    margin-bottom: 0.3rem;
}

.banner-img {
    width: 100%;
    height: auto;
    display: block;
}

/* 主要内容卡片 */
.main-card {   
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 0.2rem;
    padding: 0.3rem;
    margin: -0.8rem 0.1rem 0.2rem;
    position: relative;
    z-index: 10;
    backdrop-filter: blur(5px);
    transform: translateY(-0.1rem);
    border: 1px solid #000;
}

/* 活动介绍区域 */
.intro-section {
    margin-bottom: 0.3rem;
}

.intro-text {
    font-size: 0.28rem;
    line-height: 1.6;
    color: #000;
    text-align: justify;
}

/* 标题区域 */
.title-section {
    margin-bottom: 0.25rem;
}

.main-title {
    font-size: 0.3rem;
    font-weight: bold;
    color: #ff4e00;
    text-shadow: 0 0.02rem 0.04rem rgba(255, 107, 53, 0.3);
}

/* 时间区域 */
.time-section {
    margin-bottom: 0.3rem;
}

.time-text {
    font-size: 0.28rem;
    line-height: 1.6;
    color: #000;
}

/* 消费券类型区域 */
.coupon-types {
    margin-bottom: 0.3rem;
}

.coupon-type {
    display: flex;
    margin-bottom: 0.25rem;
    align-items: flex-start;
}

.type-content {
    flex: 1;
}

.type-title {
    font-size: 0.3rem;
    font-weight: bold;
    color: #ff4e00;
    margin-bottom: 0.1rem;
}

.type-desc {
    font-size: 0.28rem;
    line-height: 1.5;
    color: #000;
}

.highlight {
    background: url('文字背景.png');
    padding: 0.02rem 0.05rem;
    border-radius: 0.03rem;
    color: #000;
    display: inline;
    background-size: .14rem;
}

/* 使用门店区域 */
.store-section {
    margin-bottom: 0.2rem;
}
.tips {
    font-size: .24rem;
    font-weight: bold;
    text-align: center;
    color: #000000;
}
.store-title {
    text-align: center;
    font-size: .26rem;
    padding-bottom: .2rem;
    line-height: 1.5;
    color: #000;
}

.store-icons {
    display: flex;
    align-items: center;
    width: 100%;
    justify-content: space-between;
    font-size: .26rem;
}

.store-item {
    width: 24%;
    height: .56rem;
    background: #e0f4ff;
    border: 1px solid #1e1e1e;
    border-radius: .56rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
} 

.store-icon {
    width: 0.27rem;
    height: 0.27rem;
    margin-right: 0.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.store-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.store-item span {
    font-size: 0.26rem;
    color: #000;
    position: relative;
    top: -0.02rem;
}

/* 按钮区域 */
.button-section {
    margin-bottom: 0.2rem;
    text-align: center;
}

.grab-button {
    background: url('消费券抢券入口背景.png') center center / contain no-repeat;
    border: none;
    padding: 0.26rem 0.9rem;
    font-size: 0.32rem;
    text-align: center;
    line-height: .6rem;
    font-size: .32rem;
    color: #ea252e;
    background-repeat: no-repeat;
}


/* 警告文字 */
.warning-section {
    text-align: center;
}

.warning-text {
    font-size: .26rem;
    line-height: 1.5;
    color: rgb(253, 18, 18);
}

/* 加载动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(0.3rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.main-card {
    animation: fadeInUp 0.8s ease forwards;
}


/* 弹窗样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 0.2rem;
    padding: 0.4rem;
    margin: 0.3rem;
    max-width: 90%;
    max-height: 80%;
    overflow-y: auto;
    position: relative;
    transform: translateY(0.5rem);
    transition: transform 0.3s ease;
}

.modal.show .modal-content {
    transform: translateY(0);
}

.modal-header {
    text-align: center;
    margin-bottom: 0.3rem;
    padding-bottom: 0.2rem;
    border-bottom: 1px solid #eee;
}

.modal-title {
    font-size: 0.4rem;
    font-weight: bold;
    color: #000;
}

.modal-body {
    font-size: 0.32rem;
    line-height: 1.6;
    color: #666;
    text-align: center;
}

.close-btn {
    position: absolute;
    top: 0.15rem;
    right: 0.2rem;
    font-size: 0.5rem;
    color: #999;
    cursor: pointer;
    width: 0.6rem;
    height: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.close-btn:active {
    background: #f5f5f5;
    color: #000;
}

/* 响应式适配 */
@media screen and (max-width: 375px) {
    html {
        font-size: 45px; /* 小屏幕提升字体大小 */
    }
}

@media screen and (min-width: 414px) {
    html {
        font-size: 55px; /* 中等屏幕适中字体 */
    }
}

@media screen and (min-width: 480px) {
    html {
        font-size: 60px; /* 大屏幕保持清晰 */
    }
    
    .container {
        max-width: 10rem;
        margin: 0 auto;
    }
}

/* 横屏适配 */
@media screen and (orientation: landscape) and (max-height: 500px) {
    .container {
        padding-top: 0.2rem;
    }
    
    .banner-section {
        margin-bottom: 0.2rem;
    }
    
    .main-card {
        padding: 0.25rem;
    }
}

/* 安全区域适配（适配刘海屏） */
@supports (padding-top: env(safe-area-inset-top)) {
    .container {
        padding-top: calc(0.3rem + env(safe-area-inset-top));
    }
}

/* iOS Safari 样式优化 */
@supports (-webkit-touch-callout: none) {
    body {
        -webkit-touch-callout: none;
        -webkit-tap-highlight-color: transparent;
    }
    
    .grab-button {
        -webkit-appearance: none;
    }
}

/* 防止文本选择 */
.main-card * {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* 优化触摸反馈 */
.store-item,
.grab-button {
    -webkit-tap-highlight-color: transparent;
}

/* 微信引导蒙层样式 */
.wechat-guide-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.wechat-guide-overlay.show {
    opacity: 1;
    visibility: visible;
}

.wechat-guide-content {
    background: white;
    border-radius: 0.2rem;
    padding: 0.4rem 0.3rem;
    margin: 0.3rem;
    max-width: 85%;
    text-align: center;
    position: relative;
    transform: translateY(0.5rem);
    transition: transform 0.3s ease;
    box-shadow: 0 0.2rem 1rem rgba(0, 0, 0, 0.3);
}

.wechat-guide-overlay.show .wechat-guide-content {
    transform: translateY(0);
}

.guide-header h3 {
    font-size: 0.4rem;
    color: #333;
    margin-bottom: 0.3rem;
    font-weight: bold;
}

.arrow-container {
    position: relative;
    margin-bottom: 0.3rem;
    height: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 0.3rem;
}

.arrow-text {
    font-size: 0.32rem;
    color: #ff6b35;
    font-weight: bold;
    margin-right: 0.2rem;
}

.arrow-icon {
    font-size: 0.6rem;
    color: #ff6b35;
    font-weight: bold;
    animation: pulse 1.5s infinite;
}

.arrow-line {
    position: absolute;
    top: 50%;
    right: 0.1rem;
    width: 0;
    height: 0;
    border-left: 0.15rem solid #ff6b35;
    border-top: 0.08rem solid transparent;
    border-bottom: 0.08rem solid transparent;
    transform: translateY(-50%);
    animation: bounce 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}

@keyframes bounce {
    0%, 100% { transform: translateY(-50%) translateX(0); }
    50% { transform: translateY(-50%) translateX(0.1rem); }
}

.guide-steps {
    text-align: left;
    margin-bottom: 0.3rem;
}

.step-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.2rem;
    padding: 0.15rem;
    background: #f8f9fa;
    border-radius: 0.1rem;
    border-left: 0.04rem solid #ff6b35;
}

.step-item:last-child {
    margin-bottom: 0;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 0.4rem;
    height: 0.4rem;
    background: #ff6b35;
    color: white;
    border-radius: 50%;
    font-size: 0.24rem;
    font-weight: bold;
    margin-right: 0.2rem;
    flex-shrink: 0;
}

.step-text {
    font-size: 0.28rem;
    color: #333;
    line-height: 1.4;
}

.guide-footer {
    border-top: 1px solid #eee;
    padding-top: 0.2rem;
}

.guide-tip {
    font-size: 0.26rem;
    color: #999;
    margin: 0;
}


/* 微信引导页面动画优化 */
@media (prefers-reduced-motion: reduce) {
    .arrow-icon,
    .arrow-line {
        animation: none;
    }
}

/* 全域联动送福利模块 */
.alliance-card {
    margin-top: 0.1rem;
    box-shadow: 0 0.2rem 0.8rem rgba(0, 0, 0, 0.25), 0 0.1rem 0.3rem rgba(0, 0, 0, 0.15);
    transform: translateY(-0.1rem);
    z-index: 10;
}

.alliance-header {
    text-align: center;
    margin-bottom: 0.3rem;
    padding-bottom: 0.2rem;
}

.alliance-title {
    font-size: .6rem;
    color: #151715;
    text-align: center;
    margin-bottom: 0.1rem;
    font-weight: normal;
}

.alliance-subtitle {
    font-size: .3rem;
    color: #f56019;
    text-align: center;
}

/* 商家区域 */
.merchant-section {
    padding: 0 0.25rem 0;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 0.15rem;    
}

.merchant-section:last-child {
    margin-bottom: 0;
}

.merchant-header {
    margin-bottom: 0.2rem;
}

.merchant-icon {
    display: inline-block;
    margin-bottom: 0.15rem;
    text-align: left;
    position: relative;
}

.merchant-icon img {
    width: auto;
    height: 0.29rem;
    display: initial;
    position: relative;
    z-index: 3;
}

.merchant-icon::after {
    content: "";
    position: absolute;
    display: block;
    width: 1.76rem;
    height: .21rem;
    background: #fff4c6;
    margin-left: -.88rem;
    left: 50%;
    border-radius: 100%;
    bottom: 0;
}

.merchant-address {
    font-size: .24rem;
    color: #676767;
    margin: -.1rem 0 .2rem 0;
}

/* 活动项目 */
.merchant-section .activity-item {
    display: block;
    padding: 0.15rem 0.2rem;
    border: 1px solid #b7eca8;
    background-color: #f7fdf3;
    border-radius: 0;
    margin-bottom: 0;
    border-bottom: none;
}

.merchant-section .activity-item:first-child {
    border-top-left-radius: 0.1rem;
    border-top-right-radius: 0.1rem;
}

.merchant-section .activity-item:last-child {
    border-bottom: 1px solid #b7eca8;
}



.merchant-section .activity-title {
    font-size: 0.26rem;
    color: #000;
    font-weight: 500;
    line-height: 1.5;
    text-align: left;
    margin-bottom: 0.05rem;
}

.merchant-section .activity-date {
    font-size: 0.26rem;
    color: rgb(145, 145, 145);
    font-weight: 400;
    text-align: left;
    line-height: 1.5;
}

/* 紧凑型活动列表 */
.activity-list-compact {
    margin-bottom: 0.15rem;
}

.activity-list-compact .activity-item {
    padding: 0.12rem 0.15rem;
    margin-bottom: 0;
    background: #f7fdf3;
    border: 1px solid #b7eca8;
    border-radius: 0;
    border-bottom: none;
}

.activity-list-compact .activity-item:first-child {
    border-top-left-radius: 0.1rem;
    border-top-right-radius: 0.1rem;
}

.activity-list-compact .activity-item:last-child,
.activity-list-compact > .activity-item:last-of-type {
    border-bottom: 1px solid #b7eca8 !important;
    border-bottom-left-radius: 0.1rem;
    border-bottom-right-radius: 0.1rem;
}

.activity-list-compact .activity-item:only-child,
.activity-list-compact > .activity-item:only-of-type {
    border-radius: 0.1rem;
    border-bottom: 1px solid #b7eca8 !important;
}

/* 强制确保所有最后的活动项目都有下边框 */
.merchant-section .activity-item:nth-last-child(1),
.activity-list-compact .activity-item:nth-last-child(1) {
    border-bottom: 1px solid #b7eca8 !important;
}

.activity-list-compact .activity-title {
    font-size: 0.26rem;
    font-weight: 500;
}

.activity-list-compact .activity-date {
    font-size: 0.26rem;
    color: #666;
    font-weight: 500;
}

/* 查看详情 */
.view-details {
    font-size: .22rem;
    color: #676767;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: .2rem 0 .4rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-details:active {
    opacity: 0.7;
}

.view-details span {
    margin-right: 0.08rem;
    font-weight: 500;
}

.arrow-right {
    font-size: 0.3rem;
    color: #0984e3;
    font-style: normal;
    transition: transform 0.2s ease;
}

.view-details:active .arrow-right {
    transform: translateX(0.05rem);
}

