/* invite.css - 邀请页面样式 */

/* 页面基础 */
.invite-page {
    background: linear-gradient(180deg, #fff8e1 0%, #ffffff 100%);
    min-height: 100vh;
    padding-bottom: 80px;
}

/* 头部样式优化 */
.header {
    background: linear-gradient(135deg, #ff8f00 0%, #ff6f00 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(255, 111, 0, 0.3);
}

.header .page-title {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 1px;
}

.coupon-link {
    color: white;
    font-size: 20px;
    padding: 8px;
    display: block;
    text-align: center;
}

/* 主内容区 */
.invite-content {
    padding: 20px 16px;
    max-width: 480px;
    margin: 0 auto;
}

/* 奖励徽章 */
.reward-badge {
    background: linear-gradient(135deg, #ffd54f 0%, #ffca28 100%);
    color: #e65100;
    padding: 12px 24px;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.4);
    border: 2px solid #fff;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

/* 商家信息 */
.merchant-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 16px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.merchant-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ff8f00;
}

.merchant-name {
    font-size: 16px;
    font-weight: 600;
    color: #5d4037;
}

/* 海报区域 */
.poster-section {
    margin: 20px 0;
}

.poster-preview {
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    position: relative;
    aspect-ratio: 3/4;
    max-width: 320px;
    margin: 0 auto;
    border: 4px solid #fff;
}

.poster-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #999;
    font-size: 14px;
}

.poster-loading i {
    font-size: 32px;
    color: #ff8f00;
    display: block;
    margin-bottom: 12px;
}

.poster-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.poster-fallback {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
}

.qr-placeholder {
    text-align: center;
    color: #999;
}

.qr-placeholder i {
    font-size: 80px;
    margin-bottom: 12px;
    color: #bdbdbd;
}

.poster-tip {
    text-align: center;
    font-size: 13px;
    color: #8d6e63;
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.poster-tip i {
    color: #ff8f00;
}

/* 按钮样式 */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 24px 0;
}

.btn-primary, .btn-secondary {
    width: 100%;
    padding: 14px 24px;
    border-radius: 50px;
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #ff8f00 0%, #ff6f00 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 111, 0, 0.4);
}

.btn-primary:active {
    transform: translateY(2px);
    box-shadow: 0 2px 6px rgba(255, 111, 0, 0.3);
}

.btn-secondary {
    background: #ffffff;
    color: #ff6f00;
    border: 2px solid #ff6f00;
}

.btn-secondary:active {
    background: #fff3e0;
}

/* 活动规则 */
.rules-section {
    background: #ffffff;
    border-radius: 16px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.rules-section h3 {
    font-size: 16px;
    color: #5d4037;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rules-section h3 i {
    color: #ff8f00;
}

.rules-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.rules-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.rules-list li:last-child {
    margin-bottom: 0;
}

.rule-num {
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #ff8f00 0%, #ff6f00 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    flex-shrink: 0;
}

.rule-text {
    flex: 1;
    padding-top: 2px;
}

/* 小贴士卡片 */
.tip-card {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
    border-radius: 16px;
    padding: 16px;
    margin-top: 20px;
    border: 1px solid #ffe082;
    position: relative;
    overflow: hidden;
}

.tip-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 193, 7, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.tip-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #e65100;
    margin-bottom: 8px;
    font-size: 15px;
}

.tip-header i {
    color: #ffb300;
    font-size: 18px;
}

.tip-content {
    font-size: 13px;
    color: #b97f10;
    line-height: 1.6;
    padding-left: 26px;
}

/* 统计区域 */
.stats-section {
    background: #ffffff;
    border-radius: 16px;
    padding: 20px;
    margin-top: 20px;
    display: flex;
    justify-content: space-around;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.stat-item {
    text-align: center;
    flex: 1;
    position: relative;
}

.stat-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 30px;
    width: 1px;
    background: #e0e0e0;
}

.stat-num {
    display: block;
    font-size: 28px;
    font-weight: bold;
    color: #ff6f00;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 13px;
    color: #999;
}

/* 分享引导 */
.share-guide {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
}

.guide-mask {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
}

.guide-content {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    text-align: right;
    z-index: 1001;
    animation: slideDown 0.5s ease;
}

.guide-content i {
    font-size: 48px;
    margin-bottom: 10px;
    display: block;
    transform: rotate(-45deg);
}

.guide-content p {
    font-size: 16px;
    background: rgba(255, 255, 255, 0.2);
    padding: 10px 16px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 优惠券信息卡片 */
.coupon-info-card {
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 响应式优化 */
@media (max-width: 375px) {
    .invite-content {
        padding: 16px 12px;
    }
    
    .reward-badge {
        font-size: 14px;
        padding: 10px 18px;
    }
    
    .poster-preview {
        max-width: 280px;
    }
}

/* 已领取状态样式 */
.tip-card.claimed {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-color: #a5d6a7;
}

.tip-card.claimed .tip-header {
    color: #2e7d32;
}

.tip-card.claimed .tip-header i {
    color: #4caf50;
}

.tip-card.claimed .tip-content {
    color: #558b2f;
}

/* 加载动画优化 */
.fa-spin {
    animation: fa-spin 1s linear infinite;
}

@keyframes fa-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 底部导航激活状态 */
.bottom-nav .nav-item.active {
    color: #ff6f00;
}

.bottom-nav .nav-item.active i {
    transform: translateY(-2px);
}