Files
frontend/src/pages/user/index.css

251 lines
4.7 KiB
CSS
Raw Normal View History

/* ============================================
用户中心页面样式 - 爱印通
============================================ */
@import '../../styles/variables.css';
page {
background: linear-gradient(180deg, #e8f0fe 0%, #f0f5ff 30%, #fafbfc 100%);
min-height: 100vh;
}
.user-page {
min-height: 100vh;
padding-bottom: 140px;
}
/* 用户头部 */
.user-header {
background: var(--primary-gradient);
padding: 80px 32px 60px;
position: relative;
overflow: hidden;
border-radius: 0 0 40px 40px;
}
.user-header::before {
content: '';
position: absolute;
top: -30%;
right: -15%;
width: 350px;
height: 350px;
background: rgba(255, 255, 255, 0.1);
border-radius: 50%;
animation: float 6s ease-in-out infinite;
}
.user-header::after {
content: '';
position: absolute;
bottom: -20%;
left: -10%;
width: 250px;
height: 250px;
background: rgba(255, 255, 255, 0.08);
border-radius: 50%;
animation: float 8s ease-in-out infinite reverse;
}
@keyframes float {
0%, 100% {
transform: translateY(0) scale(1);
}
50% {
transform: translateY(-15px) scale(1.05);
}
}
.user-info,
.login-tip {
display: flex;
flex-direction: column;
align-items: center;
position: relative;
z-index: 1;
}
/* 头像 */
.avatar {
width: 100px;
height: 100px;
background: rgba(255, 255, 255, 0.2);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 16px;
border: 3px solid rgba(255, 255, 255, 0.4);
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}
.avatar-default {
width: 100px;
height: 100px;
background: rgba(255, 255, 255, 0.25);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 16px;
border: 3px solid rgba(255, 255, 255, 0.4);
}
.avatar-text {
font-size: 48px;
color: #fff;
font-weight: var(--font-weight-bold);
}
.avatar-icon {
font-size: 48px;
opacity: 0.8;
}
/* 用户信息 */
.nickname {
font-size: var(--font-size-2xl);
color: #fff;
font-weight: var(--font-weight-semibold);
margin-bottom: 8px;
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.balance {
font-size: var(--font-size-base);
color: rgba(255, 255, 255, 0.85);
}
/* 登录提示 */
.login-text {
font-size: var(--font-size-lg);
color: #fff;
font-weight: var(--font-weight-medium);
opacity: 0.9;
}
.login-tip:active {
opacity: 0.7;
}
/* 菜单区域 */
.menu-section {
margin: 24px;
background: var(--bg-card);
border-radius: var(--radius-xl);
overflow: hidden;
box-shadow: var(--shadow-md);
border: 1px solid var(--border-light);
}
.menu-item {
display: flex;
align-items: center;
padding: 24px 22px;
border-bottom: 1px solid var(--border-light);
transition: background var(--transition-fast);
}
.menu-item:last-child {
border-bottom: none;
}
.menu-item:active {
background: var(--bg-hover);
}
.menu-icon {
font-size: 32px;
margin-right: 16px;
width: 40px;
height: 40px;
display: flex;
align-items: center;
justify-content: center;
}
.menu-title {
flex: 1;
font-size: var(--font-size-base);
color: var(--text-primary);
font-weight: var(--font-weight-medium);
}
.menu-value {
font-size: var(--font-size-base);
color: var(--error-color);
font-weight: var(--font-weight-semibold);
margin-right: 8px;
}
.menu-arrow {
font-size: 24px;
color: var(--text-placeholder);
}
/* 退出登录 */
.logout-section {
padding: 0 24px;
margin-top: 32px;
}
.logout-btn {
width: 100%;
height: 88px;
background: var(--bg-card);
color: var(--error-color);
font-size: var(--font-size-lg);
font-weight: var(--font-weight-medium);
border-radius: 44px;
display: flex;
align-items: center;
justify-content: center;
border: 1px solid rgba(255, 77, 79, 0.15);
box-shadow: var(--shadow-sm);
transition: all var(--transition-base);
}
.logout-btn::after {
border: none;
}
.logout-btn:active {
transform: scale(0.97);
background: #fff5f5;
}
/* 菜单项图标容器 */
.menu-icon-wrapper {
width: 40px;
height: 40px;
border-radius: var(--radius-sm);
display: flex;
align-items: center;
justify-content: center;
margin-right: 16px;
}
.menu-icon-wrapper.primary {
background: linear-gradient(135deg, #e8f0fe 0%, #d0dcfa 100%);
}
.menu-icon-wrapper.success {
background: linear-gradient(135deg, #f6ffed 0%, #d9f7be 100%);
}
.menu-icon-wrapper.warning {
background: linear-gradient(135deg, #fffbe6 0%, #ffe58f 100%);
}
.menu-icon-wrapper.error {
background: linear-gradient(135deg, #fff1f0 0%, #ffccc7 100%);
}
/* 余额高亮 */
.balance-highlight {
background: linear-gradient(135deg, #ff4d4f 0%, #ff7875 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}