/* 个人主页样式 */

/* 返回按钮 */
.back-button-container {
  margin-bottom: 20px;
}

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--background-card);
  color: var(--text-color);
  text-decoration: none;
  border-radius: var(--radius-md);
  font-weight: 500;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

.back-button:hover {
  background: var(--primary-light);
  color: var(--primary-color);
  transform: translateY(-2px);
}

.back-button i {
  font-size: 16px;
}

/* 个人主页头部 */
.profile-header {
  background: var(--background-card);
  border-radius: var(--radius-lg);
  padding: 30px;
  margin-bottom: 25px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 30px;
}

.profile-avatar {
  width: 120px;
  height: 120px;
  border-radius: var(--radius-full);
  background: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  font-weight: bold;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 8px 20px rgba(43, 108, 176, 0.3);
}

.profile-info {
  flex: 1;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
  margin-bottom: 15px;
}

.profile-info h1 {
  font-size: 28px;
  margin-bottom: 8px;
  color: var(--text-color);
}

.profile-class {
  font-size: 16px;
  color: var(--text-light);
  margin-bottom: 20px;
  padding: 8px 16px;
  background: var(--primary-light);
  border-radius: var(--radius-md);
  display: inline-block;
}

.profile-gender,
.profile-birthday {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 8px;
  padding: 6px 12px;
  background: var(--background-secondary);
  border-radius: var(--radius-lg);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 8px;
}

.profile-gender i,
.profile-birthday i {
  color: var(--primary-color);
}

.profile-level {
  margin-top: 10px;
}

.profile-level .level-badge {
  font-size: 14px;
  padding: 6px 12px;
}

.profile-stats {
  display: flex;
  gap: 30px;
  margin-bottom: 20px;
}

.profile-stats .stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.profile-stats .stat-label {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 5px;
}

.profile-stats .stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary-color);
}

/* 个性签名 */
.profile-signature {
  margin-top: 15px;
  padding: 12px 16px;
  background: var(--background-light);
  border-left: 3px solid var(--primary-color);
  border-radius: 0;
  font-size: 14px;
  color: var(--text-light);
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.profile-signature i {
  color: var(--primary-color);
  font-size: 12px;
  margin-top: 2px;
  opacity: 0.7;
}

.profile-signature span {
  line-height: 1.5;
  word-break: break-word;
}

.profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-light);
}

.meta-item i {
  color: var(--primary-color);
}

/* 帖子筛选 */
.posts-filter {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  padding: 15px;
  background: var(--background-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
}

.filter-btn {
  padding: 8px 20px;
  background: var(--background-light);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-light);
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover {
  background: var(--primary-light);
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.filter-btn.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

/* 个人主页帖子列表 */
.profile-posts-section {
  background: var(--background-card);
  border-radius: var(--radius-lg);
  padding: 25px;
  box-shadow: var(--shadow);
}

.profile-posts-section .section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.posts-count {
  font-size: 14px;
  color: var(--text-light);
  font-weight: normal;
}

.profile-posts-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* 个人主页帖子卡片 */
.profile-post {
  background: var(--background-light);
  border-radius: 0;
  padding: 20px;
  transition: var(--transition);
  border: 1px solid var(--border-color);
}

.profile-post:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--primary-light);
}

.profile-post-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border-color);
}

.profile-post-time {
  font-size: 13px;
  color: var(--text-light);
}

.profile-post-content {
  margin-bottom: 15px;
  line-height: 1.6;
}

.profile-post-content .tag {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary-color);
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  font-size: 13px;
  margin-right: 8px;
  margin-bottom: 10px;
}

.profile-post-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 15px;
  border-top: 1px solid var(--border-color);
}

.profile-post-stats {
  display: flex;
  gap: 20px;
}

.profile-post-stat {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text-light);
}

.profile-post-stat i {
  font-size: 16px;
}

.profile-post-stat.likes i {
  color: var(--error-color);
}

.profile-post-stat.comments i {
  color: var(--primary-color);
}

.profile-post-stat.views i {
  color: var(--text-light);
}

.profile-post-actions {
  display: flex;
  gap: 10px;
}

.profile-post-action {
  padding: 6px 15px;
  background: var(--background-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-color);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

.profile-post-action:hover {
  background: var(--primary-light);
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.profile-post-action.view {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.profile-post-action.view:hover {
  background: var(--secondary-color);
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-light);
}

.empty-state i {
  font-size: 48px;
  margin-bottom: 20px;
  color: var(--border-color);
}

.empty-state p {
  font-size: 16px;
  margin-bottom: 10px;
}

/* 关注按钮 */
.profile-actions {
  margin-top: 15px;
  display: flex;
  gap: 10px;
}

.follow-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.follow-btn:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
}

.follow-btn.following {
  background: var(--background-light);
  color: var(--text-color);
  border: 1px solid var(--border-color);
}

.follow-btn.following:hover {
  background: var(--error-light);
  color: var(--error-color);
  border-color: var(--error-color);
}

.follow-btn.processing {
  opacity: 0.7;
  cursor: not-allowed;
}

.message-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.message-btn:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
}

/* 拉黑按钮 */
.block-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  background: transparent;
  color: var(--text-light);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.block-btn:hover {
  background: var(--error-light);
  color: var(--error-color);
  border-color: var(--error-color);
}

.block-btn.blocked {
  background: var(--error-light);
  color: var(--error-color);
  border-color: var(--error-color);
}

.block-btn.blocked:hover {
  background: transparent;
  color: var(--text-light);
  border-color: var(--border-color);
}

.block-btn.processing {
  opacity: 0.7;
  cursor: not-allowed;
}

/* 禁用状态的按钮 */
.follow-btn.disabled,
.message-btn.disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

.follow-btn:disabled,
.message-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* 可点击的统计项 */
.clickable-stat {
  cursor: pointer;
  transition: var(--transition);
}

.clickable-stat:hover .stat-value {
  text-decoration: underline;
}

/* 关注列表弹窗 */
.follow-list-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(5px);
}

.follow-list-modal-content {
  background: var(--background-card);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 450px;
  max-height: 70vh;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.follow-list-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
}

.follow-list-modal-header h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-color);
  display: flex;
  align-items: center;
  gap: 10px;
}

.follow-list-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-light);
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: var(--transition);
}

.follow-list-modal-close:hover {
  color: var(--text-color);
}

.follow-list-modal-body {
  padding: 10px 0;
  max-height: 400px;
  overflow-y: auto;
}

.follow-list-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px 24px;
  cursor: pointer;
  transition: var(--transition);
}

.follow-list-item:hover {
  background: var(--background-light);
}

.follow-item-avatar {
  width: 45px;
  height: 45px;
  border-radius: var(--radius-full);
  background: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  color: white;
  flex-shrink: 0;
}

.follow-item-info {
  flex: 1;
  min-width: 0;
}

.follow-item-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.follow-item-class {
  font-size: 13px;
  color: var(--text-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.follow-list-modal-body .loading {
  padding: 40px;
  text-align: center;
  color: var(--text-light);
}

.follow-list-modal-body .empty-state {
  padding: 40px 20px;
}

.follow-list-modal-body .empty-state i {
  font-size: 36px;
}

.follow-list-modal-body .empty-state p {
  font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .profile-header {
    flex-direction: column;
    text-align: center;
    padding: 20px;
  }
  
  .profile-avatar {
    width: 100px;
    height: 100px;
    font-size: 36px;
  }
  
  .profile-stats {
    justify-content: center;
    gap: 20px;
  }
  
  .profile-meta {
    justify-content: center;
  }
  
  .profile-post-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  
  .profile-post-footer {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
  }
  
  .profile-post-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

@media (max-width: 480px) {
  .profile-stats {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .profile-stats .stat-item {
    flex: 0 0 calc(50% - 15px);
  }
  
  .posts-filter {
    flex-wrap: wrap;
  }
  
  .filter-btn {
    flex: 1;
    min-width: 100px;
    text-align: center;
  }
}