/* 个人资料页面样式 Profile Page Styles */
.profile-container {
    min-height: calc(100vh - 200px);
    padding: 40px 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

/* 个人资料头部 Profile Header */
.profile-header {
    background: white;
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 30px;
    align-items: center;
}

.profile-avatar {
    text-align: center;
}

.avatar-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto;
}

.avatar-wrapper img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-color);
    box-shadow: 0 5px 15px rgba(78, 84, 200, 0.3);
}

.avatar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.avatar-wrapper:hover .avatar-overlay {
    opacity: 1;
}

.avatar-upload-btn {
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transition: background 0.3s ease;
}

.avatar-upload-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.profile-info h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.profile-info p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 8px;
}

.profile-stats {
    display: flex;
    gap: 30px;
    margin-top: 20px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
}

.profile-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.profile-actions .btn {
    min-width: 150px;
}

/* 个人资料内容 Profile Content */
.profile-content {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* 标签页样式 Tab Styles */
.profile-tabs {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #e1e5e9;
}

.tab-btn {
    flex: 1;
    padding: 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: #666;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tab-btn:hover {
    background: rgba(78, 84, 200, 0.1);
    color: var(--primary-color);
}

.tab-btn.active {
    background: white;
    color: var(--primary-color);
    border-bottom: 3px solid var(--primary-color);
}

.tab-btn i {
    font-size: 1.1rem;
}

/* 标签页内容 Tab Content */
.tab-content {
    display: none;
    padding: 40px;
}

.tab-content.active {
    display: block;
}

/* 个人资料区块 Profile Sections */
.profile-sections {
    display: grid;
    gap: 25px;
}

.profile-section {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
    border-left: 4px solid var(--primary-color);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h3 {
    margin: 0;
    color: var(--primary-color);
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.edit-section-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.edit-section-btn:hover {
    background: rgba(78, 84, 200, 0.1);
    transform: scale(1.1);
}

.section-content {
    line-height: 1.6;
}

/* 信息展示样式 Information Display */
.info-row {
    display: flex;
    margin-bottom: 15px;
    padding: 10px 0;
    border-bottom: 1px solid #e1e5e9;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    color: #666;
    min-width: 120px;
    flex-shrink: 0;
}

.info-value {
    color: var(--text-color);
    flex: 1;
}

.info-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.info-tag {
    background: var(--primary-color);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* 空状态样式 Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.empty-state i {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 20px;
}

.empty-state h3 {
    margin-bottom: 15px;
    color: #999;
}

.empty-state p {
    margin-bottom: 25px;
    font-size: 1.1rem;
}

/* 编辑模态框样式 Edit Modal Styles */
.edit-modal .modal {
    max-width: 700px;
}

.edit-form {
    display: grid;
    gap: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 0;
}

/* 响应式设计 Responsive Design */
@media (max-width: 768px) {
    .profile-header {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 20px;
    }
    
    .profile-stats {
        justify-content: center;
        gap: 20px;
    }
    
    .profile-actions {
        flex-direction: row;
        justify-content: center;
    }
    
    .profile-tabs {
        flex-direction: column;
    }
    
    .tab-btn {
        padding: 15px;
    }
    
    .tab-content {
        padding: 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .info-row {
        flex-direction: column;
        gap: 5px;
    }
    
    .info-label {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .profile-container {
        padding: 20px 0;
    }
    
    .profile-header {
        padding: 25px;
        margin-bottom: 20px;
    }
    
    .avatar-wrapper {
        width: 100px;
        height: 100px;
    }
    
    .profile-info h1 {
        font-size: 2rem;
    }
    
    .profile-stats {
        flex-direction: column;
        gap: 15px;
    }
    
    .tab-content {
        padding: 15px;
    }
    
    .profile-section {
        padding: 20px;
    }
}

/* 加载状态 Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 成功状态 Success States */
.success-message {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #c3e6cb;
}

/* 错误状态 Error States */
.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #f5c6cb;
}

/* 动画效果 Animations */
.profile-section {
    animation: slideInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.profile-section:nth-child(1) { animation-delay: 0.1s; }
.profile-section:nth-child(2) { animation-delay: 0.2s; }
.profile-section:nth-child(3) { animation-delay: 0.3s; }
.profile-section:nth-child(4) { animation-delay: 0.4s; }

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 头像上传进度 Avatar Upload Progress */
.upload-progress {
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 4px;
    background: #e1e5e9;
    border-radius: 2px;
    overflow: hidden;
}

.upload-progress-bar {
    height: 100%;
    background: var(--primary-color);
    width: 0%;
    transition: width 0.3s ease;
}

/* 设置按钮样式 Settings Button */
#settingsBtn {
    background: #6c757d;
    border: none;
}

#settingsBtn:hover {
    background: #5a6268;
}

/* 标签页切换动画 Tab Switch Animation */
.tab-content {
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
