/* 用户中心样式 */
.main-content {
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
    min-height: calc(100vh - 150px);
    padding: 30px 0;
}

.user-page {
    display: flex;
    margin-top: 0;
    gap: 25px;
    min-height: calc(100vh - 200px);
}

.user-sidebar {
    width: 240px;
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    padding: 30px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
    position: sticky;
    top: 20px;
    height: fit-content;
}

.user-info-box {
    text-align: center;
    padding-bottom: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 25px;
}

.user-avatar {
    width: 100px;
    height: 100px;
    margin: 0 auto 15px;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    border: 4px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.user-avatar:hover {
    border-color: rgba(255, 255, 255, 0.6);
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.avatar-upload-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
    border-radius: 50%;
}

.user-avatar:hover .avatar-upload-overlay {
    opacity: 1;
}

.upload-icon {
    font-size: 20px;
    margin-bottom: 5px;
}

.upload-text {
    color: #fff;
    font-size: 12px;
    text-align: center;
}

.user-name {
    font-size: 18px;
    color: #fff;
    font-weight: 500;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.user-menu {
    list-style: none;
    padding: 0;
}

.user-menu li {
    margin-bottom: 8px;
}

.user-menu a {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    transition: all 0.3s;
    font-size: 15px;
}

.user-menu a:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    transform: translateX(5px);
}

.user-menu a.active {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.user-content {
    flex: 1;
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.user-content h2 {
    font-size: 28px;
    margin-bottom: 35px;
    font-weight: 600;
    color: #333;
    position: relative;
    padding-bottom: 15px;
}

.user-content h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #ff5000, #ff6600);
    border-radius: 2px;
}

.order-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e8e8e8;
}

.tab-link {
    padding: 10px 20px;
    color: #666;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.tab-link:hover,
.tab-link.active {
    color: #ff5000;
    border-bottom-color: #ff5000;
}

.info-section {
    padding: 20px;
    background: #f5f5f5;
    border-radius: 4px;
}

.info-section h3 {
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: normal;
}

.info-section p {
    margin-bottom: 10px;
    color: #666;
}

/* 账户概览 */
.account-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.overview-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 25px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 18px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.25);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.overview-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    transition: all 0.5s;
}

.overview-card:hover::before {
    top: -30%;
    right: -30%;
}

.overview-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.35);
}

.overview-card.balance-card {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.25);
}

.overview-card.balance-card:hover {
    box-shadow: 0 8px 25px rgba(245, 87, 108, 0.35);
}

.card-icon {
    font-size: 36px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.25);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.card-content {
    flex: 1;
    position: relative;
    z-index: 1;
}

.card-label {
    font-size: 13px;
    opacity: 0.95;
    margin-bottom: 8px;
    font-weight: 400;
    letter-spacing: 0.5px;
}

.card-value {
    font-size: 28px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.card-action {
    color: #fff;
    text-decoration: none;
    padding: 8px 16px;
    background: rgba(255,255,255,0.25);
    border-radius: 20px;
    font-size: 13px;
    transition: all 0.3s;
    border: 1px solid rgba(255,255,255,0.3);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.card-action:hover {
    background: rgba(255,255,255,0.4);
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* 订单统计 */
.order-stats {
    background: linear-gradient(135deg, #f5f7fa 0%, #ffffff 100%);
    padding: 30px;
    border-radius: 16px;
    margin-bottom: 35px;
    border: 1px solid #e8e8e8;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.section-title {
    font-size: 20px;
    color: #333;
    margin-bottom: 25px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title::before {
    content: '';
    width: 4px;
    height: 20px;
    background: linear-gradient(180deg, #ff5000, #ff6600);
    border-radius: 2px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 25px 20px;
    background: #fff;
    border-radius: 12px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ff5000, #ff6600);
    transform: scaleX(0);
    transition: transform 0.3s;
}

.stat-item:hover::before {
    transform: scaleX(1);
}

.stat-item:hover {
    background: linear-gradient(135deg, #fff2e8 0%, #fff 100%);
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(255,80,0,0.15);
    border-color: #ff5000;
}

.stat-icon {
    font-size: 32px;
    margin-bottom: 12px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
    transition: transform 0.3s;
}

.stat-item:hover .stat-icon {
    transform: scale(1.1) rotate(5deg);
}

.stat-number {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #ff5000, #ff6600);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

/* 最近订单 */
.recent-orders {
    background: linear-gradient(135deg, #f5f7fa 0%, #ffffff 100%);
    padding: 30px;
    border-radius: 16px;
    margin-bottom: 35px;
    border: 1px solid #e8e8e8;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.more-link {
    color: #999;
    text-decoration: none;
    font-size: 14px;
}

.more-link:hover {
    color: #ff5000;
}

.orders-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.order-item {
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s;
    background: #fff;
}

.order-item:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transform: translateY(-2px);
    border-color: #ff5000;
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 15px;
}

.order-no {
    color: #666;
    font-size: 14px;
}

.order-status {
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-paid {
    background: #d1ecf1;
    color: #0c5460;
}

.status-shipped {
    background: #d4edda;
    color: #155724;
}

.status-completed {
    background: #d1ecf1;
    color: #0c5460;
}

.status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

.order-body {
    margin-bottom: 15px;
}

.order-product {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
}

.order-product:last-child {
    border-bottom: none;
}

.order-product img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.product-info {
    flex: 1;
}

.product-name {
    font-size: 14px;
    color: #333;
    margin-bottom: 5px;
}

.product-spec {
    font-size: 12px;
    color: #999;
}

.product-price {
    color: #ff5000;
    font-weight: bold;
    min-width: 80px;
    text-align: right;
}

.product-quantity {
    color: #666;
    min-width: 40px;
    text-align: right;
}

.more-products {
    text-align: center;
    color: #999;
    font-size: 12px;
    padding: 10px 0;
}

.order-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.order-total {
    color: #666;
    font-size: 14px;
}

.total-price {
    color: #ff5000;
    font-size: 18px;
    font-weight: bold;
}

.order-actions {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: #ff5000;
    color: #fff;
}

.btn-primary:hover {
    background: #ff6600;
}

.btn-default {
    background: #f5f5f5;
    color: #666;
    border: 1px solid #e8e8e8;
}

.btn-default:hover {
    background: #e8e8e8;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* 账户信息 */
.account-info {
    background: linear-gradient(135deg, #f5f7fa 0%, #ffffff 100%);
    padding: 30px;
    border-radius: 16px;
    border: 1px solid #e8e8e8;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
}

.info-item {
    display: flex;
    padding: 18px 20px;
    background: #fff;
    border-radius: 10px;
    border-left: 4px solid #ff5000;
    transition: all 0.3s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.info-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(255,80,0,0.1);
    border-left-width: 6px;
}

.info-label {
    color: #666;
    margin-right: 12px;
    min-width: 90px;
    font-weight: 500;
}

.info-value {
    color: #333;
    font-weight: 600;
    font-size: 15px;
}

/* 充值弹窗 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #fff;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    animation: modalSlideIn 0.3s;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e8e8e8;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: normal;
    color: #333;
}

.modal-close {
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 20px;
    border-top: 1px solid #e8e8e8;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-size: 14px;
}

.form-group input[type="number"],
.form-group input[type="text"],
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.form-group input[type="number"]:focus,
.form-group input[type="text"]:focus,
.form-group select:focus {
    outline: none;
    border-color: #ff5000;
}

.quick-amounts {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.quick-btn {
    padding: 8px 16px;
    border: 1px solid #e8e8e8;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    transition: all 0.2s;
}

.quick-btn:hover {
    border-color: #ff5000;
    color: #ff5000;
    background: #fff2e8;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(255,80,0,0.15);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .user-page {
        flex-direction: column;
    }
    
    .user-sidebar {
        width: 100%;
        position: relative;
        top: 0;
    }
    
    .account-overview {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
}

