/* 优惠券列表 */
.coupon-list {
    padding: 16px;
    padding-bottom: 80px; /* 为底部导航留空间 */
}

/* 加载状态 */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #999;
}

.loading-state i {
    font-size: 32px;
    color: #5cb85c;
    margin-bottom: 12px;
}

/* 空状态 */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    color: #999;
    text-align: center;
}

.empty-state i {
    font-size: 64px;
    color: #ddd;
    margin-bottom: 16px;
}

.empty-state p {
    font-size: 16px;
    color: #666;
    margin-bottom: 8px;
}

.empty-state span {
    font-size: 13px;
    color: #999;
}

/* 错误状态 */
.error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.error-state i {
    font-size: 48px;
    color: #e74c3c;
    margin-bottom: 12px;
}

.error-state p {
    color: #666;
    margin-bottom: 16px;
}

.btn-retry {
    background: #5cb85c;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
}

/* 优惠券卡片 - 全新设计（票券样式） */
.coupon-item {
    background: #fff;
    border-radius: 12px;
    margin-bottom: 16px;
    display: flex;
    align-items: stretch;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    overflow: hidden;
    position: relative;
    min-height: 100px;
}

/* 左侧金额区 */
.coupon-left {
    width: 100px;
    background: linear-gradient(135deg, #5cb85c 0%, #4cae4c 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    padding: 16px;
    flex-shrink: 0;
}

.coupon-left .amount {
    display: flex;
    align-items: baseline;
    margin-bottom: 4px;
}

.coupon-left .symbol {
    font-size: 16px;
    font-weight: bold;
    margin-right: 2px;
}

.coupon-left .number {
    font-size: 36px;
    font-weight: bold;
    line-height: 1;
}

.coupon-left .type {
    font-size: 11px;
    opacity: 0.9;
    text-align: center;
}

/* 中间分隔线（虚线效果） */
.coupon-divider {
    width: 1px;
    background: repeating-linear-gradient(
        to bottom,
        transparent,
        transparent 5px,
        #e0e0e0 5px,
        #e0e0e0 10px
    );
    margin: 12px 0;
}

/* 右侧信息区 */
.coupon-right {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    position: relative;
}

.coupon-info {
    flex: 1;
}

.coupon-info .condition {
    font-size: 15px;
    color: #333;
    font-weight: 600;
    margin-bottom: 8px;
}

.coupon-info .expire {
    font-size: 12px;
    color: #999;
}

/* 状态样式 */
.coupon-status {
    margin-left: 12px;
}

.btn-qrcode {
    background: #5cb85c;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(92, 184, 92, 0.3);
}

.btn-qrcode:active {
    transform: scale(0.95);
    box-shadow: 0 1px 4px rgba(92, 184, 92, 0.3);
}

.status-text {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

.status-unused {
    color: #5cb85c;
}

.status-used {
    color: #999;
    text-decoration: line-through;
}

.status-expired {
    color: #e74c3c;
}

/* 已使用和已过期状态的淡化效果 */
.coupon-item.status-used .coupon-left,
.coupon-item.status-expired .coupon-left {
    background: linear-gradient(135deg, #bbb 0%, #999 100%);
}

.coupon-item.status-used,
.coupon-item.status-expired {
    opacity: 0.7;
}

/* 未使用状态的缺口装饰 */
.coupon-notch {
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background: #f5f5f5;
    border-radius: 50%;
    box-shadow: inset 2px 0 4px rgba(0,0,0,0.1);
}

/* 二维码弹窗 */
.qrcode-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
}

.modal-content {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 320px;
    position: relative;
    z-index: 1001;
    overflow: hidden;
    animation: modalSlideUp 0.3s ease;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.modal-header h3 {
    margin: 0;
    font-size: 17px;
    color: #333;
    font-weight: 600;
}

.modal-header i {
    font-size: 20px;
    color: #999;
    cursor: pointer;
    padding: 4px;
}

.modal-body {
    padding: 24px 20px;
    text-align: center;
}

#qrcodeContainer {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

#qrcodeContainer img {
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}

.qrcode-fallback {
    padding: 20px;
    background: #f5f5f5;
    border-radius: 8px;
    font-family: monospace;
    font-size: 18px;
    font-weight: bold;
    color: #333;
    letter-spacing: 2px;
}

.qrcode-code {
    font-size: 14px;
    color: #666;
    margin: 12px 0 8px;
    font-family: monospace;
    letter-spacing: 1px;
    background: #f5f5f5;
    padding: 8px 16px;
    border-radius: 20px;
    display: inline-block;
}

.qrcode-tip {
    font-size: 12px;
    color: #999;
    margin: 0;
}

/* 响应式优化 */
@media (max-width: 375px) {
    .coupon-left {
        width: 90px;
    }
    
    .coupon-left .number {
        font-size: 28px;
    }
    
    .btn-qrcode {
        padding: 6px 12px;
        font-size: 12px;
    }
}