* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.coupon-container {
    max-width: 640px;
    margin: 0 auto;
    background-color: white;
    min-height: 100vh;
    position: relative;
}

/* 页面头部 */
.page-header {
    position: sticky;
    top: 0;
    background-color: white;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    height: 56px;
}

.back-button {
    width: 40px;
    height: 40px;
    border: none;
    background-color: transparent;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.back-button:hover {
    background-color: #f0f0f0;
}

.header-content h1 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.header-right {
    width: 40px;
}

/* 卡券数量统计 */
.coupon-stats {
    display: flex;
    padding: 20px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.stat-item {
    flex: 1;
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: #2575fc;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 14px;
    color: #666;
}

/* 卡券分类筛选 */
.coupon-filter {
    display: flex;
    border-bottom: 1px solid #e9ecef;
    background-color: white;
    position: sticky;
    top: 56px;
    z-index: 90;
}

.filter-btn {
    flex: 1;
    padding: 16px;
    border: none;
    background-color: transparent;
    color: #666;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.filter-btn.active {
    color: #2575fc;
    font-weight: 600;
}

.filter-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background-color: #2575fc;
    border-radius: 3px;
}

.filter-btn:hover:not(.active) {
    color: #2575fc;
}

/* 卡券列表 */
.coupon-list {
    padding: 16px;
}

.coupon-item {
    background-color: white;
    border-radius: 12px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
}

.coupon-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.coupon-item.unused {
    /*border-left: 4px solid #4caf50;*/
}

.coupon-item.used {
    /*border-left: 4px solid #ff9800;*/
    opacity: 0.8;
}

.coupon-item.expired {
    border-left: 4px solid #f44336;
    opacity: 0.6;
}

.coupon-item.expired::after {
    content: '已过期';
    position: absolute;
    top: 50%;
    right: -40px;
    transform: translateY(-50%) rotate(45deg);
    background-color: #f44336;
    color: white;
    padding: 5px 40px;
    font-size: 12px;
    font-weight: bold;
    z-index: 1;
}
.coupon-item ._item{
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
    /* 背景色：半透明白色（透明度 50%） */
    background: linear-gradient(to right, rgba(3, 99, 99, 0.6) 0%, rgba(0, 0, 0, 0.1) 100%);
    /*background-color: rgba(255, 255, 255, 0.6);*/
}
.coupon-left {
    flex-shrink: 0;
    width: 80px;
    /*text-align: center;*/
    margin-right: 16px;
}

/* 不同类型卡券的左侧样式 */
.coupon-discount {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
}

.discount-number {
    font-size: 32px;
    font-weight: 700;
    color: #4caf50;
    line-height: 1;
}

.discount-unit {
    font-size: 16px;
    color: #4caf50;
    margin-top: -4px;
}

.coupon-amount {
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
}

.amount-yuan {
    font-size: 20px;
    font-weight: 700;
    color: #FFFFFF;
}

.amount-number {
    font-size: 25px;
    font-weight: 700;
    color: #FFFFFF;
}

.coupon-gift, .coupon-shipping {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    /*margin: 0 auto;*/
}

.coupon-gift svg {
    color: #9c27b0;
}

.coupon-shipping svg {
    color: #2196f3;
}

.coupon-condition {
    font-size: 12px;
    color: #999;
    margin-top: 8px;
}

/* 卡券中间内容 */
.coupon-middle {
    flex: 1;
    min-width: 0;
}
.coupon-reservation{
    width: 100%;
    border-radius: 4px;
    margin-top: 10px;
    height: 30px;
    line-height: 30px;
    font-size:13px;
    font-weight: bold;
    background-color: #00b42a; /* 明亮绿色 */
    color:#FFFFFF;
    text-align: center;
}
.coupon-reservation-date{
    font-size: 14px;
    /* margin-top: 5px; */
    color: #FFFFFF;
    height: 23px;
    line-height: 23px;
}
.collapsible-header{
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}
.collapsible-content{
    display: none;
}
.active .collapsible-content{
    display: block;
}
.collapse-icon {
    font-size: 12px;
    color: #999;
    transition: transform 0.3s ease;
}
.collapsible-container.active .collapse-icon {
    transform: rotate(180deg);
}
.coupon-title {
    font-size: 16px;
    font-weight: 600;
    color: #FFFFFF;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.coupon-description {
    font-size: 13px;
    color: #666;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.coupon-validity {
    font-size: 12px;
    color: #999;
}

/* 卡券右侧按钮 */
.coupon-right {
    flex-shrink: 0;
    margin-left: 16px;
}

.use-button {
    padding: 8px 16px;
    background-color: #2575fc;
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.use-button:hover:not(.disabled) {
    background-color: #1976d2;
    transform: translateY(-1px);
}

.use-button.disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* 卡券状态标签 */
.coupon-status {
    position: absolute;
    top: 12px;
    right: 12px;
}

.status-tag {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.unused-tag {
    background-color: rgba(76, 175, 80, 0.1);
    color: #4caf50;
}

.used-tag {
    background-color: rgba(255, 152, 0, 0.1);
    color: #ff9800;
}

.expired-tag {
    background-color: rgba(244, 67, 54, 0.1);
    color: #f44336;
}

/* 空状态提示 */
.empty-state {
    padding: 60px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.empty-text {
    font-size: 16px;
    color: #999;
    margin-top: 16px;
    margin-bottom: 24px;
}

.empty-button {
    padding: 10px 24px;
    background-color: #2575fc;
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.empty-button:hover {
    background-color: #1976d2;
    transform: translateY(-1px);
}

/* 页脚 */
.page-footer {
    padding: 20px 16px;
    /*margin-top: 20px;*/
}

.footer-text {
    font-size: 12px;
    color: #999;
    text-align: center;
    line-height: 1.5;
}

/* 卡券详情弹窗 */
.coupon-detail-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    transition: background-color 0.3s ease;
}

.modal-content {
    position: relative;
    background-color: white;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    animation: modalSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 自定义滚动条 */
.modal-content::-webkit-scrollbar {
    width: 6px;
}

.modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 16px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: #999;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close-button {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border: none;
    background-color: rgba(240, 240, 240, 0.8);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s ease;
    backdrop-filter: blur(2px);
}

.close-button:hover {
    background-color: #e0e0e0;
    transform: scale(1.1);
}

#modal-content {
    padding: 32px;
}

/* 弹窗头部样式 */
.modal-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eee;
}

.modal-title-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0;
    line-height: 1.4;
}

.modal-status-tag {
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}

.modal-status-tag.unused {
    background-color: rgba(76, 175, 80, 0.1);
    color: #4caf50;
}

.modal-status-tag.used {
    background-color: rgba(255, 152, 0, 0.1);
    color: #ff9800;
}

.modal-status-tag.expired {
    background-color: rgba(244, 67, 54, 0.1);
    color: #f44336;
}

/* 弹窗内容样式 */
.modal-body {
    margin-bottom: 24px;
}

.modal-info {
    margin-bottom: 28px;
}

.modal-description {
    font-size: 16px;
    color: #555;
    line-height: 1.6;
    margin-bottom: 16px;
}

.modal-condition,
.modal-validity {
    font-size: 14px;
    color: #777;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
}

.modal-condition::before,
.modal-validity::before {
    content: "•";
    margin-right: 8px;
    color: #ccc;
}

/* 弹窗规则样式 */
.modal-rules {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
}

.modal-rules h3 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.modal-rules ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.modal-rules li {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
}

.modal-rules li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #2575fc;
    font-size: 12px;
}

.modal-rules li:last-child {
    margin-bottom: 0;
}

/* 弹窗底部样式 */
.modal-footer {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid #eee;
}

.modal-use-button,
.modal-close-button {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-use-button {
    background-color: #2575fc;
    color: white;
}

.modal-use-button:hover {
    background-color: #1976d2;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 117, 252, 0.3);
}

.modal-close-button {
    background-color: #f5f5f5;
    color: #666;
}

.modal-close-button:hover {
    background-color: #e0e0e0;
    color: #333;
}

/* 二维码弹窗样式 */
.qr-code-container {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 12px;
}

.qr-code {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    background-color: white;
    padding: 10px;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.qr-code:hover {
    transform: scale(1.02);
}

.qr-info {
    text-align: center;
    margin-bottom: 24px;
}

.qr-description {
    font-size: 16px;
    color: #333;
    margin-bottom: 12px;
    font-weight: 500;
    line-height: 1.5;
}

.qr-validity {
    font-size: 14px;
    color: #666;
    margin-bottom: 16px;
}

.qr-scan-tip {
    font-size: 14px;
    color: #2575fc;
    font-weight: 500;
    padding: 8px 0;
    position: relative;
}

.qr-scan-tip::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 30%;
    right: 30%;
    height: 2px;
    background-color: #2575fc;
    border-radius: 1px;
}

.modal-confirm-button {
    width: 100%;
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #2575fc;
    color: white;
    margin-top: 12px;
}

.modal-confirm-button:hover {
    background-color: #1976d2;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 117, 252, 0.3);
}

@media (max-width: 480px) {
    .qr-code {
        width: 180px;
        height: 180px;
    }
}

/* 响应式设计 */
@media (max-width: 480px) {
    .coupon-item {
        flex-direction: column;
        /*text-align: center;*/
        /*padding: 20px 16px;*/
    }
    
    .coupon-left {
        margin-right: 0;
        /*margin-bottom: 16px;*/
    }
    
    .coupon-right {
        margin-left: 0;
        margin-top: 16px;
    }
    
    .use-button {
        width: 100%;
        padding: 10px;
    }
    
    .coupon-status {
        top: 8px;
        right: 8px;
    }
    
    .stat-number {
        font-size: 20px;
    }
    
    .stat-label {
        font-size: 12px;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.coupon-item {
    animation: fadeIn 0.3s ease;
}

.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;
}