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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    background-color: #f5f7fa;
}

/* 优惠券中心容器 */
.coupon-center {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* 头部区域 */
.coupon-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 0 20px;
}

.coupon-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.coupon-header p {
    color: #666;
    font-size: 16px;
    max-width: 600px;
    margin: 0 auto;
}

/* 优惠券列表 */
.coupon-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 24px;
}

/* 优惠券卡片 */
.coupon-item {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    position: relative;
}

.coupon-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

/* 优惠券左侧价格区域 */
.coupon-left {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8e53 100%);
    color: #fff;
    padding: 30px 24px;
    text-align: center;
    position: relative;
    flex-shrink: 0;
}

.coupon-left::after {
    content: '';
    position: absolute;
    right: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background: #f5f7fa;
    border-radius: 50%;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

/* 价格显示 */
.coupon-price {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 8px;
    line-height: 1;
}

.coupon-price span {
    font-size: 18px;
    font-weight: 600;
}

.coupon-label {
    font-size: 16px;
    opacity: 0.95;
    margin-right: 4px;
}

.coupon-unit {
    font-size: 16px;
    opacity: 0.95;
    margin-left: 4px;
}

.coupon-condition {
    font-size: 14px;
    opacity: 0.9;
    font-weight: 500;
}

/* 优惠券右侧信息区域 */
.coupon-right {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* 优惠券名称 */
.coupon-name {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 标签区域 */
.coupon-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.coupon-tag {
    display: inline-block;
    padding: 4px 12px;
    font-size: 12px;
    border-radius: 12px;
    background: #f0f2f5;
    color: #666;
    font-weight: 500;
    transition: all 0.2s ease;
}

.coupon-tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

.coupon-tag.points {
    background: #fff3e0;
    color: #ff9800;
}

.coupon-tag.level {
    background: #e3f2fd;
    color: #2196f3;
}

.coupon-tag.limit {
    background: #fce4ec;
    color: #e91e63;
}

/* 优惠券介绍 */
.coupon-intro {
    font-size: 13px;
    color: #666;
    margin-bottom: 12px;
    line-height: 1.5;
    max-height: 40px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* 优惠券信息 */
.coupon-info {
    font-size: 13px;
    color: #999;
    margin-bottom: 8px;
}

.coupon-info span {
    color: #ff6b6b;
    font-weight: 500;
}

/* 库存信息 */
.coupon-stock {
    font-size: 13px;
    color: #666;
    margin-bottom: 16px;
}

/* 状态信息 */
.coupon-status-info {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.coupon-status-tag {
    display: inline-block;
    padding: 4px 12px;
    font-size: 12px;
    border-radius: 12px;
    font-weight: 500;
    border: 1px solid transparent;
}

.coupon-status-tag.unused {
    background: #f6ffed;
    color: #52c41a;
    border-color: #b7eb8f;
}

.coupon-status-tag.used {
    background: #e6f7ff;
    color: #1890ff;
    border-color: #91d5ff;
}

.coupon-status-tag.expired {
    background: #f5f5f5;
    color: #999;
    border-color: #d9d9d9;
}

.coupon-status-tag.frozen {
    background: #fffbe6;
    color: #faad14;
    border-color: #ffe58f;
}

/* 按钮区域 */
.coupon-btn {
    display: block;
    width: 100%;
    padding: 12px;
    text-align: center;
    background: #ff6b6b;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: auto;
}

.coupon-btn:hover {
    background: #ff5252;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

.coupon-btn.disabled {
    background: #e0e0e0;
    color: #999;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.coupon-btn.disabled:hover {
    background: #e0e0e0;
}

/* 空状态 */
.coupon-empty {
    text-align: center;
    padding: 80px 20px;
    color: #999;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.coupon-empty img {
    width: 240px;
    margin-bottom: 24px;
    opacity: 0.6;
}

.coupon-empty p {
    font-size: 18px;
    margin-bottom: 24px;
    color: #666;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .coupon-list {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .coupon-center {
        padding: 30px 16px;
    }
    
    .coupon-header {
        margin-bottom: 30px;
    }
    
    .coupon-header h1 {
        font-size: 28px;
    }
    
    .coupon-list {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .coupon-item {
        flex-direction: row;
    }
    
    .coupon-left {
        width: 160px;
        padding: 24px 20px;
    }
    
    .coupon-price {
        font-size: 36px;
    }
    
    .coupon-right {
        padding: 20px;
    }
    
    .coupon-name {
        font-size: 16px;
    }
    
    .coupon-empty {
        padding: 60px 16px;
    }
}

@media (max-width: 480px) {
    .coupon-center {
        padding: 20px 12px;
    }
    
    .coupon-header h1 {
        font-size: 24px;
    }
    
    .coupon-list {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .coupon-item {
        flex-direction: column;
    }
    
    .coupon-left {
        width: 100%;
        text-align: center;
    }
    
    .coupon-left::after {
        display: none;
    }
    
    .coupon-empty img {
        width: 200px;
    }
}

/* 加载动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.coupon-item {
    animation: fadeInUp 0.5s ease-out;
}

.coupon-item:nth-child(2) {
    animation-delay: 0.1s;
}

.coupon-item:nth-child(3) {
    animation-delay: 0.2s;
}

.coupon-item:nth-child(4) {
    animation-delay: 0.3s;
}

.coupon-item:nth-child(5) {
    animation-delay: 0.4s;
}

.coupon-item:nth-child(6) {
    animation-delay: 0.5s;
}