2025-06-25 19:21:02 +08:00

334 lines
5.4 KiB
CSS

/* 基础样式重置 */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
min-height: 100vh;
padding: 20px;
transition: all 0.3s ease;
}
.container {
max-width: 800px;
margin: 0 auto;
}
h1 {
text-align: center;
color: white;
margin-bottom: 30px;
font-size: 2.5rem;
text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}
/* 个人资料卡片样式 */
.profile-card {
background: white;
border-radius: 20px;
padding: 30px;
box-shadow: 0 15px 35px rgba(0,0,0,0.1);
margin-bottom: 30px;
transition: all 0.3s ease;
}
.profile-card:hover {
transform: translateY(-5px);
box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}
.profile-header {
text-align: center;
margin-bottom: 30px;
}
.avatar {
width: 120px;
height: 120px;
border-radius: 50%;
border: 5px solid #667eea;
margin-bottom: 15px;
transition: transform 0.3s ease;
}
.avatar:hover {
transform: scale(1.1);
}
.profile-header h2 {
color: #333;
font-size: 2rem;
margin-bottom: 5px;
}
.profile-header .title {
color: #667eea;
font-size: 1.2rem;
font-weight: 500;
}
/* 个人信息样式 */
.profile-info {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 15px;
margin-bottom: 30px;
}
.info-item {
padding: 15px;
background: #f8f9fa;
border-radius: 10px;
border-left: 4px solid #667eea;
}
.info-item strong {
color: #333;
display: block;
margin-bottom: 5px;
}
.skill-tag {
display: inline-block;
background: #667eea;
color: white;
padding: 4px 12px;
border-radius: 20px;
font-size: 0.9rem;
margin: 2px;
}
/* 个人简介样式 */
.profile-bio {
background: #f8f9fa;
padding: 20px;
border-radius: 10px;
margin-bottom: 30px;
}
.profile-bio h3 {
color: #333;
margin-bottom: 10px;
}
.profile-bio p {
color: #666;
line-height: 1.6;
}
/* 按钮样式 */
.profile-actions {
display: flex;
gap: 15px;
justify-content: center;
flex-wrap: wrap;
}
.btn {
padding: 12px 24px;
border: none;
border-radius: 25px;
font-size: 1rem;
cursor: pointer;
transition: all 0.3s ease;
font-weight: 500;
}
.btn-primary {
background: #667eea;
color: white;
}
.btn-primary:hover {
background: #5a6fd8;
transform: translateY(-2px);
}
.btn-secondary {
background: #6c757d;
color: white;
}
.btn-secondary:hover {
background: #5a6268;
transform: translateY(-2px);
}
/* 编辑表单样式 */
.edit-form {
background: white;
border-radius: 20px;
padding: 30px;
box-shadow: 0 15px 35px rgba(0,0,0,0.1);
margin-bottom: 30px;
}
.edit-form h3 {
color: #333;
margin-bottom: 20px;
text-align: center;
}
.form-group {
margin-bottom: 20px;
}
.form-group label {
display: block;
color: #333;
margin-bottom: 5px;
font-weight: 500;
}
.form-input, .form-textarea {
width: 100%;
padding: 12px;
border: 2px solid #e9ecef;
border-radius: 8px;
font-size: 1rem;
transition: border-color 0.3s ease;
}
.form-input:focus, .form-textarea:focus {
outline: none;
border-color: #667eea;
}
.form-textarea {
height: 100px;
resize: vertical;
}
/* 学习提示样式 */
.learning-tips {
background: white;
border-radius: 20px;
padding: 30px;
box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}
.learning-tips h3 {
color: #333;
margin-bottom: 20px;
text-align: center;
}
.learning-tips ul {
list-style: none;
}
.learning-tips li {
padding: 10px 0;
border-bottom: 1px solid #e9ecef;
color: #666;
}
.learning-tips li:last-child {
border-bottom: none;
}
.learning-tips strong {
color: #667eea;
}
/* 深色主题样式 */
.dark-theme {
background: #2c3e50 !important;
color: white !important;
}
.dark-theme h2,
.dark-theme h3,
.dark-theme strong,
.dark-theme label {
color: white !important;
}
.dark-theme .info-item,
.dark-theme .profile-bio {
background: #34495e !important;
color: white !important;
}
.dark-theme .form-input,
.dark-theme .form-textarea {
background: #34495e !important;
color: white !important;
border-color: #4a5f7a !important;
}
.dark-theme .learning-tips li {
color: #bdc3c7 !important;
border-color: #4a5f7a !important;
}
/* 消息提示样式 */
.message {
position: fixed;
top: 20px;
right: 20px;
padding: 15px 20px;
border-radius: 8px;
color: white;
font-weight: 500;
z-index: 1000;
animation: slideIn 0.3s ease;
}
.message-success {
background: #28a745;
}
.message-error {
background: #dc3545;
}
.message-info {
background: #17a2b8;
}
@keyframes slideIn {
from {
transform: translateX(100%);
opacity: 0;
}
to {
transform: translateX(0);
opacity: 1;
}
}
/* 响应式设计 */
@media (max-width: 768px) {
.container {
padding: 0 10px;
}
h1 {
font-size: 2rem;
}
.profile-card,
.edit-form,
.learning-tips {
padding: 20px;
}
.profile-info {
grid-template-columns: 1fr;
}
.profile-actions {
flex-direction: column;
align-items: center;
}
.btn {
width: 200px;
}
}