Files
ai_dianshang/web/assets/css/user-center.css

845 lines
14 KiB
CSS
Raw Permalink Normal View History

2025-11-28 15:18:10 +08:00
/* User Center Page */
.user-center-page {
min-height: calc(100vh - 300px);
padding: 40px 0;
background-color: #fff;
}
.user-center-wrapper {
display: block;
}
/* Sidebar (Hidden but keep structure) */
.user-sidebar {
display: none;
}
/* Account Header */
.account-header {
display: flex;
justify-content: space-between;
align-items: center;
padding-bottom: 30px;
margin-bottom: 40px;
border-bottom: 1px solid var(--border-color);
}
.account-header h1 {
font-size: 32px;
font-weight: 700;
color: var(--text-color);
margin: 0;
}
.account-header a {
color: var(--text-color);
text-decoration: underline;
font-size: 14px;
transition: color 0.3s ease;
}
.account-header a:hover {
color: var(--primary-color);
}
/* Account Sections */
.account-sections {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 60px;
}
.account-section {
min-height: 200px;
}
.account-section h2 {
font-size: 20px;
font-weight: 700;
color: var(--text-color);
margin-bottom: 20px;
}
.empty-message {
padding: 30px 0;
}
.empty-message p {
font-size: 14px;
color: var(--text-light);
line-height: 1.6;
}
/* Account Info */
.account-info {
padding: 20px 0;
}
.account-info .user-name {
font-size: 16px;
font-weight: 600;
color: var(--text-color);
margin-bottom: 8px;
}
.account-info .user-location {
font-size: 14px;
color: var(--text-light);
margin-bottom: 12px;
}
.view-addresses-link {
display: inline-block;
font-size: 14px;
color: var(--text-color);
text-decoration: underline;
transition: color 0.3s ease;
}
.view-addresses-link:hover {
color: var(--primary-color);
}
/* Account Details Grid */
.account-details-grid {
display: flex;
flex-direction: column;
gap: 0;
}
.detail-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 18px 0;
border-bottom: 1px solid var(--border-color);
transition: background-color 0.2s;
}
.detail-item:hover {
background-color: rgba(0, 0, 0, 0.01);
}
.detail-item:last-child {
border-bottom: none;
}
.detail-label {
font-size: 14px;
font-weight: 500;
color: var(--text-light);
}
.detail-value {
display: flex;
align-items: center;
gap: 16px;
}
.value-text {
font-size: 15px;
color: var(--text-color);
font-weight: 400;
}
.value-text.not-set {
color: var(--text-light);
font-style: italic;
}
.edit-link {
font-size: 14px;
color: #007AFF;
text-decoration: none;
transition: opacity 0.2s;
font-weight: 500;
}
.edit-link:hover {
opacity: 0.7;
text-decoration: underline;
}
/* Orders List */
.orders-list {
margin-top: 20px;
}
.order-card {
background: #fff;
border: 1px solid var(--border-color);
border-radius: 8px;
margin-bottom: 20px;
overflow: hidden;
transition: all 0.3s ease;
}
.order-card:hover {
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.order-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 15px 20px;
background: var(--bg-gray);
border-bottom: 1px solid var(--border-color);
}
.order-id {
font-size: 14px;
color: var(--text-color);
}
.order-label {
font-weight: 600;
margin-right: 8px;
}
.order-date {
font-size: 14px;
color: var(--text-light);
}
.order-status {
padding: 4px 12px;
border-radius: 12px;
font-size: 12px;
font-weight: 600;
}
.status-processing {
background: #fff3cd;
color: #856404;
}
.status-shipped {
background: #d1ecf1;
color: #0c5460;
}
.status-delivered {
background: #d4edda;
color: #155724;
}
.status-cancelled {
background: #f8d7da;
color: #721c24;
}
.order-items {
padding: 20px;
}
.order-item {
display: flex;
align-items: center;
gap: 15px;
padding: 10px 0;
}
.order-item:not(:last-child) {
border-bottom: 1px solid var(--border-color);
margin-bottom: 10px;
}
.order-item-image {
width: 60px;
height: 60px;
object-fit: cover;
border-radius: 6px;
flex-shrink: 0;
}
.order-item-info {
flex: 1;
}
.order-item-name {
font-size: 14px;
font-weight: 600;
color: var(--text-color);
margin-bottom: 4px;
}
.order-item-quantity {
font-size: 13px;
color: var(--text-light);
}
.order-item-price {
font-size: 16px;
font-weight: 700;
color: var(--text-color);
}
.order-footer {
display: flex;
justify-content: space-between;
align-items: center;
padding: 15px 20px;
background: var(--bg-gray);
border-top: 1px solid var(--border-color);
}
.order-total {
font-size: 14px;
color: var(--text-color);
}
.order-total-amount {
font-size: 18px;
font-weight: 700;
color: var(--primary-color);
margin-left: 8px;
}
.order-actions .btn {
padding: 8px 16px;
font-size: 13px;
border-radius: 6px;
cursor: pointer;
transition: all 0.3s ease;
}
.btn-secondary {
background: #fff;
border: 1px solid var(--border-color);
color: var(--text-color);
}
.btn-secondary:hover {
background: var(--bg-gray);
border-color: var(--primary-color);
color: var(--primary-color);
}
.btn-sm {
padding: 6px 12px;
font-size: 12px;
}
/* Responsive Design */
@media (max-width: 992px) {
.account-sections {
grid-template-columns: 1fr;
gap: 40px;
}
}
@media (max-width: 768px) {
.user-center-page {
padding: 20px 0;
}
.account-header h1 {
font-size: 24px;
}
.account-section h2 {
font-size: 18px;
}
}
/* ==================== 订单详情弹窗 ==================== */
.order-detail-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
display: flex;
align-items: center;
justify-content: center;
z-index: 9999;
opacity: 0;
transition: opacity 0.3s ease;
padding: 20px;
}
.order-detail-overlay.active {
opacity: 1;
}
.order-detail-modal {
background: #fff;
border-radius: 12px;
max-width: 800px;
width: 100%;
max-height: 90vh;
display: flex;
flex-direction: column;
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
transform: scale(0.9);
transition: transform 0.3s ease;
}
.order-detail-overlay.active .order-detail-modal {
transform: scale(1);
}
.order-detail-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 24px 30px;
border-bottom: 1px solid var(--border-color);
flex-shrink: 0;
}
.order-detail-header h2 {
font-size: 20px;
font-weight: 600;
color: var(--text-color);
margin: 0;
}
.close-detail-btn {
background: none;
border: none;
font-size: 32px;
line-height: 1;
color: var(--text-light);
cursor: pointer;
padding: 0;
width: 32px;
height: 32px;
display: flex;
align-items: center;
justify-content: center;
transition: color 0.2s;
}
.close-detail-btn:hover {
color: var(--text-color);
}
.order-detail-content {
overflow-y: auto;
padding: 30px;
flex: 1;
}
.detail-section {
margin-bottom: 30px;
}
.detail-section:last-child {
margin-bottom: 0;
}
.detail-section h3 {
font-size: 16px;
font-weight: 600;
color: var(--text-color);
margin-bottom: 16px;
}
.detail-status {
margin-bottom: 20px;
}
.status-badge {
display: inline-block;
padding: 8px 16px;
border-radius: 20px;
font-size: 14px;
font-weight: 500;
}
.detail-info-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 16px;
}
.info-item {
display: flex;
flex-direction: column;
gap: 4px;
}
.info-label {
font-size: 13px;
color: var(--text-light);
}
.info-value {
font-size: 14px;
color: var(--text-color);
font-weight: 500;
}
.detail-items-list {
display: flex;
flex-direction: column;
gap: 16px;
}
.detail-order-item {
display: flex;
gap: 16px;
padding: 16px;
background: var(--bg-gray);
border-radius: 8px;
}
.detail-item-image {
width: 80px;
height: 80px;
object-fit: cover;
border-radius: 6px;
flex-shrink: 0;
}
.detail-item-info {
flex: 1;
display: flex;
flex-direction: column;
gap: 6px;
}
.detail-item-name {
font-size: 15px;
font-weight: 500;
color: var(--text-color);
line-height: 1.4;
}
.item-spec {
font-size: 13px;
color: var(--text-light);
}
.detail-item-quantity {
font-size: 13px;
color: var(--text-light);
}
.detail-item-price {
font-size: 16px;
font-weight: 600;
color: var(--primary-color);
flex-shrink: 0;
align-self: center;
}
.detail-address {
padding: 16px;
background: var(--bg-gray);
border-radius: 8px;
}
.address-info {
display: flex;
flex-direction: column;
gap: 8px;
}
.address-info div {
font-size: 14px;
color: var(--text-color);
line-height: 1.6;
}
.detail-summary {
display: flex;
flex-direction: column;
gap: 12px;
}
.summary-row {
display: flex;
justify-content: space-between;
align-items: center;
font-size: 14px;
color: var(--text-color);
}
.summary-row.summary-total {
padding-top: 12px;
border-top: 1px solid var(--border-color);
font-size: 16px;
font-weight: 600;
}
.total-amount {
font-size: 18px;
color: var(--primary-color);
}
.detail-actions {
display: flex;
gap: 12px;
justify-content: flex-end;
flex-wrap: wrap;
}
.btn-action {
padding: 10px 24px;
font-size: 14px;
border-radius: 6px;
border: none;
cursor: pointer;
transition: all 0.3s ease;
font-weight: 500;
}
.btn-primary {
background: var(--primary-color);
color: #fff;
}
.btn-primary:hover {
background: #d32f2f;
transform: translateY(-1px);
box-shadow: 0 4px 12px rgba(244, 67, 54, 0.3);
}
.btn-secondary {
background: #fff;
color: var(--text-color);
border: 1px solid var(--border-color);
}
.btn-secondary:hover {
background: var(--bg-gray);
border-color: var(--primary-color);
color: var(--primary-color);
}
/* 响应式设计 */
@media (max-width: 768px) {
.order-detail-modal {
max-width: 100%;
max-height: 100vh;
border-radius: 0;
}
.order-detail-header {
padding: 20px;
}
.order-detail-content {
padding: 20px;
}
.detail-info-grid {
grid-template-columns: 1fr;
}
.detail-order-item {
flex-direction: column;
}
.detail-item-image {
width: 100%;
height: auto;
aspect-ratio: 1;
}
}
/* ===================== 支付弹窗 ===================== */
/* 支付弹窗外层容器 */
#paymentModal.modal {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 10000;
background: rgba(0, 0, 0, 0.6);
-webkit-backdrop-filter: blur(4px);
backdrop-filter: blur(4px);
align-items: center;
justify-content: center;
}
#paymentModal.modal.show {
display: flex;
}
.payment-modal-content {
max-width: 500px;
width: 90%;
text-align: center;
position: relative;
background: white;
border-radius: 16px;
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
max-height: 90vh;
overflow-y: auto;
animation: slideUp 0.3s ease-out;
}
.payment-modal-content .modal-header {
padding: 30px 30px 10px;
}
.payment-modal-content .modal-header h2 {
margin: 0;
font-size: 20px;
font-weight: 600;
color: #333;
}
/* 关闭按钮 */
.payment-modal-content .modal-close,
.payment-modal-content .close {
position: absolute;
top: 16px;
right: 16px;
width: 32px;
height: 32px;
border-radius: 50%;
background: #f5f5f5;
border: none;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
font-size: 20px;
color: #666;
transition: all 0.2s;
z-index: 1;
padding: 0;
}
.payment-modal-content .modal-close:hover,
.payment-modal-content .close:hover {
background: #e0e0e0;
color: #333;
transform: rotate(90deg);
}
@keyframes slideUp {
from {
opacity: 0;
transform: translateY(30px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.payment-modal-body {
padding: 20px 30px 40px;
}
.payment-amount {
margin-bottom: 30px;
}
.amount-label {
font-size: 14px;
color: #999;
margin-bottom: 8px;
}
.amount-value {
font-size: 36px;
font-weight: 700;
color: #09BB07;
}
.qrcode-container {
width: 280px;
height: 280px;
margin: 0 auto 30px;
border: 2px solid #e5e5e5;
border-radius: 12px;
display: flex;
align-items: center;
justify-content: center;
background: white;
position: relative;
overflow: visible;
padding: 0;
}
.qrcode-loading {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 16px;
width: 100%;
height: 100%;
}
.spinner {
width: 48px;
height: 48px;
border: 4px solid #f3f3f3;
border-top: 4px solid #09BB07;
border-radius: 50%;
animation: spin 1s linear infinite;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
.qrcode-loading p {
color: #999;
font-size: 14px;
}
.qrcode-container > * {
display: block;
width: 256px;
height: 256px;
margin: 0 auto;
}
.qrcode-container img {
display: block !important;
}
.qrcode-container canvas {
display: none !important;
}
.payment-tips {
margin-bottom: 24px;
}
.payment-tips p {
font-size: 14px;
color: #666;
margin-bottom: 8px;
}
.tips-secondary {
font-size: 13px !important;
color: #999 !important;
}
.payment-countdown {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 6px;
font-size: 13px;
color: #666;
padding: 8px 16px;
background: linear-gradient(135deg, #fff5f5 0%, #ffe8e8 100%);
border: 1px solid #ffdbdb;
border-radius: 20px;
margin: 0 auto;
}
.countdown-time {
font-weight: 700;
color: #ff4757;
font-size: 15px;
font-family: 'Courier New', monospace;
}