/* 我的页面样式 */
.profile-container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    padding: 2rem;
    min-height: 100vh; /* 最小高度为视口高度，但允许内容超出 */
    display: flex;
    flex-direction: column;
}

.profile-header h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #333;
    font-size: 2rem;
    flex-shrink: 0; /* 防止标题被压缩 */
}

.profile-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    flex: 1;
}

.user-info {
    margin-bottom: 2rem;
}

.info-card {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 10px;
}

.info-card h3 {
    margin-bottom: 1.5rem;
    color: #333;
    font-size: 1.5rem;
}

.user-details {
    display: grid;
    gap: 1rem;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem;
    background: white;
    border-radius: 5px;
    border-left: 4px solid #667eea;
}

.detail-item label {
    font-weight: 500;
    color: #333;
}

.detail-item span {
    color: #666;
}

.purchase-history {
    display: flex;
    flex-direction: column;
}

.purchase-history h3 {
    margin-bottom: 1.5rem;
    color: #333;
    font-size: 1.5rem;
    flex-shrink: 0; /* 标题不压缩 */
}

/* 移除所有高度限制，让表格自然显示 */

.table-container {
    overflow-x: auto;
    border: 1px solid #e9ecef;
    border-radius: 10px;
}

.history-table table {
    width: 100%;
    min-width: 1600px; /* 增大表格最小宽度，从1200px增加到1600px */
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.history-table th,
.history-table td {
    padding: 1rem 1.5rem; /* 增加左右内边距，从1rem增加到1.5rem */
    text-align: left;
    border-bottom: 1px solid #e9ecef;
    white-space: nowrap; /* 防止文字换行 */
}

/* 设置各列宽度 - 增大所有列宽度 */
.history-table th:nth-child(1), .history-table td:nth-child(1) { width: 160px; } /* 时间 - 从120px增加到160px */
.history-table th:nth-child(2), .history-table td:nth-child(2) { width: 140px; } /* 用户 - 从100px增加到140px */
.history-table th:nth-child(3), .history-table td:nth-child(3) { width: 250px; } /* 订单内容 - 从200px增加到250px */
.history-table th:nth-child(4), .history-table td:nth-child(4) { width: 140px; } /* 开始日期 - 从100px增加到140px */
.history-table th:nth-child(5), .history-table td:nth-child(5) { width: 140px; } /* 结束日期 - 从100px增加到140px */
.history-table th:nth-child(6), .history-table td:nth-child(6) { width: 120px; } /* 积分消耗 - 从80px增加到120px */
.history-table th:nth-child(7), .history-table td:nth-child(7) { width: 120px; } /* 是否发货 - 从80px增加到120px */
.history-table th:nth-child(8), .history-table td:nth-child(8) { width: 140px; } /* 发货方式 - 从100px增加到140px */
.history-table th:nth-child(9), .history-table td:nth-child(9) { width: 180px; } /* 备注 - 从120px增加到180px */
.history-table th:nth-child(10), .history-table td:nth-child(10) { width: 250px; } /* 发货内容 - 从200px增加到250px */
.history-table th:nth-child(11), .history-table td:nth-child(11) { width: 200px; } /* 订单号 - 从150px增加到200px */

.history-table th {
    background: #f8f9fa;
    font-weight: 500;
    color: #333;
}

.history-table td {
    color: #666;
}

.no-data {
    text-align: center;
    color: #999;
    font-style: italic;
}

.status-pending {
    color: #ff9800;
    font-weight: 500;
}

.status-shipped {
    color: #4caf50;
    font-weight: 500;
}

/* 下载提示样式 */
.download-tip {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    border-radius: 8px;
    color: #1976d2;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0; /* 防止提示区域被压缩 */
}

.download-tip i {
    color: #1976d2;
    font-size: 1rem;
}

.download-tip span {
    color: #1976d2;
    font-weight: 500;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .profile-container {
        padding: 1rem;
    }

    .history-table {
        font-size: 0.9rem;
    }

    .history-table th,
    .history-table td {
        padding: 0.8rem 1rem; /* 在小屏幕上保持合适的左右内边距 */
    }
}

@media (max-width: 480px) {
    .profile-container {
        padding: 0.5rem;
    }

    .profile-header h2 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
}
