* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
/* 让整个浏览器窗口仍是淡灰渐变 */
html{
    background: linear-gradient(135deg,#f5f7fa 0%,#c3cfe2 100%);
}

/* 把主体内容包在白底里 + 居中 + 投影 */
body{
    max-width:500px;
    margin:0 auto;
    background:#fff;                 /* 白色版心 */
    min-height:100vh;                /* 满高，sticky/fixed 才能正确定位 */
    box-shadow:0 0 20px rgba(0,0,0,.08);
    position:relative;               /* 保留你原来的 relative 语义 */
    padding-bottom:20px;             /* 其余样式保持 */
    font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,sans-serif;
}


/* 头部样式 */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    position: relative;
}

.header-left {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
}

.back-btn {
    background: rgba(255,255,255,0.2);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
}

/* 仅修改 hover 这段 */
.back-btn:hover {
    background: rgba(255,255,255,0.3);
    /* transform: translateY(-50%) translateX(-2px);  ❌ 这一行会导致上下抖动 */
    transform: translateX(-2px);                     /* ✅ 只做水平小位移 */
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}


.header-content h1 {
    font-size: 20px;
    color: white;
    margin-bottom: 8px;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    text-align: center;
}

.user-info {
    font-size: 14px;
    color: rgba(255,255,255,0.9);
    background: rgba(255,255,255,0.1);
    padding: 6px 12px;
    border-radius: 20px;
    display: inline-block;
    backdrop-filter: blur(10px);
    margin: 0 auto;
    display: block;
    text-align: center;
    width: fit-content;
}

/* 订单容器 */
.order-container {
    padding: 20px 15px;
}

/* 订单列表 */
.order-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* 订单项 */
.order-item {
    background: white;
    padding: 20px;
    border-radius: 16px;
    position: relative;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.8);
    backdrop-filter: blur(10px);
}

.order-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.order-id {
    font-size: 15px;
    color: #2c3e50;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 4px 8px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    position: relative;
}

.order-id:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    transform: translateY(-1px);
}

.order-id-text {
    font-family: 'Courier New', monospace;
    font-weight: 500;
}

.copy-icon {
    font-size: 12px;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.order-id:hover .copy-icon {
    opacity: 1;
    transform: scale(1.1);
}

.order-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.status-create {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.status-pay-wait {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.status-pay-success {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.status-deal-done {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: white;
}

.status-close {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: white;
}

.order-content {
    margin-bottom: 16px;
}

.product-name {
    font-size: 17px;
    color: #2c3e50;
    margin-bottom: 12px;
    line-height: 1.5;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.product-name::before {
    content: '📦';
    margin-right: 8px;
    font-size: 16px;
}

.order-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
    background: #f8f9fa;
    padding: 12px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.order-time {
    font-size: 13px;
    color: #7f8c8d;
    display: flex;
    align-items: center;
}

.order-time::before {
    content: '🕒';
    margin-right: 6px;
    font-size: 12px;
}

.pay-amount {
    font-size: 20px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    display: flex;
    align-items: center;
}

.pay-amount::before {
    content: '💰';
    margin-right: 6px;
    font-size: 16px;
    -webkit-text-fill-color: initial;
}

.order-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

.refund-btn {
    padding: 10px 20px;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.refund-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.refund-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.refund-btn:hover::before {
    left: 100%;
}

.refund-btn:disabled {
    background: linear-gradient(135deg, #bdc3c7 0%, #95a5a6 100%);
    color: white;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.refund-btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

.refund-btn:disabled::before {
    display: none;
}

/* 加载更多按钮 */
.load-more-container {
    text-align: center;
    margin-top: 24px;
}

.load-more-btn {
    padding: 14px 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.load-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.load-more-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.load-more-btn:hover::before {
    left: 100%;
}

.load-more-btn:disabled {
    background: linear-gradient(135deg, #bdc3c7 0%, #95a5a6 100%);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.load-more-btn:disabled::before {
    display: none;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid rgba(255,255,255,0.8);
    backdrop-filter: blur(10px);
}

.empty-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.empty-content::before {
    content: '📋';
    font-size: 48px;
    opacity: 0.6;
}

.empty-content p {
    color: #7f8c8d;
    font-size: 16px;
    margin: 0;
    font-weight: 500;
}

/* 弹窗样式 */
.modal-overlay {
    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;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 20px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    transform: scale(0.9);
    animation: modalShow 0.3s ease forwards;
}

@keyframes modalShow {
    to {
        transform: scale(1);
    }
}

.modal-content h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.modal-content h3::before {
    content: '⚠️';
    font-size: 18px;
}

.modal-content p {
    margin: 20px 0;
    color: #7f8c8d;
    line-height: 1.6;
    font-size: 15px;
}

.modal-buttons {
    margin-top: 30px;
    display: flex;
    gap: 12px;
}

.modal-buttons button {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.modal-buttons button:hover {
    transform: translateY(-1px);
}

.confirm-btn {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.confirm-btn:hover {
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.cancel-btn {
    background: #f8f9fa;
    color: #6c757d;
    border: 2px solid #e9ecef;
}

.cancel-btn:hover {
    background: #e9ecef;
    border-color: #dee2e6;
}

/* 加载提示 */
.loading-tip {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 20px 30px;
    border-radius: 15px;
    z-index: 1001;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    gap: 12px;
}

.loading-tip::before {
    content: '⏳';
    font-size: 18px;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.loading-tip p {
    margin: 0;
    font-size: 15px;
    font-weight: 500;
}

/* 响应式设计 */
@media (max-width: 480px) {
    .order-details {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .pay-amount {
        font-size: 16px;
    }
    
    .modal-content {
        width: 95%;
        padding: 15px;
    }
}