 :root {
        --primary-color: #2A5C82;
      --secondary-color: #4F8BB7;
      --text-primary: #2d3748;
      --text-secondary: #4a5568;
      --border-color: #e2e8f0;
      --pro-color: #ff9a00;
    }
    .main-header {
    grid-column: 1 / -1;  /* 在网格布局中占满全部列 */
    width: 100%;          /* 占满父容器宽度 */
    position: sticky;
    top: 0;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    z-index: 1000;
    height: 72px;
    /* 新增： */
    display: flex;
    justify-content: center; /* 内容居中 */
}
      .header-nav-container {
    width: 100%;
    max-width: 1920px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

        .nav-container {
            max-width: 1440px;
            margin: 0 auto;
            padding: 1rem 2rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .brand {
            font-size: 1.8rem;
            font-weight: 700;
            color: var(--primary-color);
            text-decoration: none;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .nav-menu {
            display: flex;
            gap: 2rem;
            align-items: center;
        }

        .nav-link {
            color: var(--text-primary);
            text-decoration: none;
            font-weight: 500;
            transition: color 0.2s var(--transition);
        }

        .nav-link:hover {
            color: var(--secondary-color);
        }
    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
      font-family: 'Inter', system-ui, sans-serif;
    }
    
    body {
      background-color: #f8f8f8;
      color: var(--text-primary);
    }
    
    .profile-container {
      max-width: 1200px;
      margin: 2rem auto;
      padding: 2rem;
      background: white;
      border-radius: 12px;
      box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    }
    
    /* 顶部导航栏 */
    .profile-nav {
      margin-bottom: 2rem;
    }
    
    .profile-nav ul {
      display: flex;
      list-style: none;
      padding: 0;
      border-bottom: 1px solid var(--border-color);
    }
    
    .profile-nav li a {
      padding: 15px 20px;
      display: block;
      color: var(--text-primary);
      text-decoration: none;
      font-weight: 500;
      transition: color 0.2s;
    }
    
    .profile-nav li a:hover {
      color: var(--primary-color);
    }
    
    /* 个人资料头部 */
    .profile-header {
      display: flex;
      align-items: center;
      margin-bottom: 2rem;
      padding-bottom: 1.5rem;
      border-bottom: 1px solid var(--border-color);
    }
    
    .user-avatar {
      width: 80px;
      height: 80px;
      border-radius: 50%;
      object-fit: cover;
      border: 3px solid var(--primary-color);
      margin-right: 1.5rem;
    }
    
    .user-info h2 {
      font-size: 1.8rem;
      color: var(--primary-color);
      margin-bottom: 0.5rem;
    }
    
    .user-info p {
      color: var(--text-secondary);
    }
    
    /* 个人资料编辑区域 */
    .profile-edit-section {
      background: white;
      border-radius: 8px;
      padding: 20px;
      margin-bottom: 20px;
      box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    
    .profile-edit-section h2 {
      font-size: 1.4rem;
      margin-bottom: 15px;
    }
    
    .btn-customize {
      background-color: var(--primary-color);
      color: white;
      border: none;
      padding: 10px 15px;
      border-radius: 4px;
      font-weight: bold;
      cursor: pointer;
      margin: 5px 0;
      transition: background-color 0.3s;
    }
    
    .btn-customize:hover {
      background-color: var(--secondary-color);
      transform: translateY(-2px);
    }
    
    .pro-badge {
      display: inline-block;
      background-color: var(--pro-color);
      color: white;
      padding: 3px 8px;
      border-radius: 3px;
      font-size: 12px;
      font-weight: bold;
      margin-left: 10px;
      vertical-align: middle;
    }
    
    .pro-description {
      margin: 15px 0;
      padding: 15px;
      background: #f9f9f9;
      border-radius: 6px;
    }
    
    .pro-description h3 {
      font-size: 1.1rem;
      margin-bottom: 8px;
    }
    
    .btn-trial {
      background-color: var(--primary-color);
      color: white;
      border: none;
      padding: 12px 20px;
      border-radius: 4px;
      font-weight: bold;
      cursor: pointer;
      width: 100%;
      transition: background-color 0.3s;
    }
    
    .btn-trial:hover {
      background-color: var(--secondary-color);
    }
    
    /* 统计卡片 */
    .stats-section {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 20px;
      margin-bottom: 20px;
    }
    
    .stats-card {
      background: white;
      border-radius: 8px;
      padding: 20px;
      box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    
    .stats-card h4 {
      font-size: 1.1rem;
      margin-bottom: 15px;
      color: var(--text-primary);
    }
    
    .location-stat {
      margin-top: 10px;
    }
    
    .user-info {
      display: flex;
      justify-content: space-between;
      padding: 8px 0;
      border-bottom: 1px solid #eee;
    }
    
    .user-name {
      font-weight: 500;
    }
    
    .user-location {
      color: var(--text-secondary);
    }
    
    .follower-count {
      font-size: 24px;
      font-weight: bold;
      margin: 10px 0;
    }
    
    .follower-stats {
      color: var(--text-secondary);
    }
    
    /* 发布区域 */
    .publish-section {
      background: white;
      border-radius: 8px;
      padding: 20px;
      margin-bottom: 20px;
      box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    
    .publish-section h3 {
      font-size: 1.1rem;
      margin-bottom: 15px;
    }
    
    .publish-options {
      display: flex;
      align-items: center;
    }
    
    .btn-publish {
      background-color: var(--primary-color);
      color: white;
      border: none;
      padding: 10px 15px;
      border-radius: 4px;
      font-weight: bold;
      cursor: pointer;
      margin-right: 10px;
      transition: background-color 0.3s;
    }
    
    .btn-publish:hover {
      background-color: var(--secondary-color);
      transform: translateY(-2px);
    }
    
    /* 项目部分 */
    .projects-section {
      margin-bottom: 3rem;
    }
    
    .projects-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 1.5rem;
    }
    
    .section-title {
      font-size: 1.4rem;
      color: var(--primary-color);
      margin-bottom: 1.5rem;
      padding-bottom: 0.5rem;
      border-bottom: 2px solid var(--secondary-color);
      display: inline-block;
    }
    
    .create-project-btn {
      display: inline-flex;
      align-items: center;
      padding: 8px 16px;
      background-color: var(--primary-color);
      color: white;
      border: none;
      border-radius: 20px;
      font-size: 0.9rem;
      cursor: pointer;
      transition: all 0.3s;
    }
    
    .create-project-btn:hover {
      background-color: var(--secondary-color);
      transform: translateY(-2px);
    }
    
    .create-project-btn i {
      margin-right: 6px;
    }
    
    .projects-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
      gap: 1.5rem;
    }
    
    .project-card {
      background: white;
      border-radius: 8px;
      overflow: hidden;
      box-shadow: 0 2px 8px rgba(0,0,0,0.1);
      transition: all 0.3s ease;
    }
    
    .project-card:hover {
      transform: translateY(-5px);
      box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    }
    
    .project-image {
      width: 100%;
      height: 180px;
      object-fit: cover;
    }
    
    .project-info {
      padding: 1rem;
    }
    
    .project-title {
      font-size: 1rem;
      font-weight: 600;
      margin-bottom: 0.5rem;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    
    .project-stats {
      display: flex;
      justify-content: space-between;
      color: var(--text-secondary);
      font-size: 0.8rem;
    }
    
    /* 个人信息部分 */
    .profile-section {
      margin-bottom: 2.5rem;
    }
    
    .info-grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 1.5rem;
    }
    
    .info-item {
      margin-bottom: 1.2rem;
    }
    
    .info-label {
      font-weight: 600;
      color: var(--text-secondary);
      margin-bottom: 0.3rem;
      display: block;
    }
    
    .info-value {
      padding: 0.5rem 0;
      border-bottom: 1px dashed var(--border-color);
    }
    
    /* 账号安全部分 */
    .security-section {
      margin-bottom: 2rem;
    }
    
    /* 退出按钮 */
    .logout-button {
      display: inline-flex;
      align-items: center;
      padding: 10px 20px;
      background-color: var(--primary-color);
      color: white;
      border: none;
      border-radius: 20px;
      font-size: 1rem;
      cursor: pointer;
      transition: all 0.3s;
      margin-top: 2rem;
    }
    
    .logout-button:hover {
      background-color: var(--secondary-color);
      transform: translateY(-2px);
    }
    
    .logout-button i {
      margin-right: 8px;
    }
    
    /* 头像上传 */
    .avatar-upload {
      position: relative;
      display: inline-block;
      cursor: pointer;
    }
    
    .avatar-upload:hover::after {
      content: '更换头像';
      position: absolute;
      bottom: 0;
      left: 0;
      right: 0;
      background: rgba(0,0,0,0.6);
      color: white;
      text-align: center;
      padding: 5px;
      border-radius: 0 0 50% 50%;
    }
    
    #avatarInput {
      display: none;
    }
    
    .upload-progress {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      background: rgba(255,255,255,0.8);
      padding: 5px 10px;
      border-radius: 20px;
      display: none;
    }
    
    /* 发布作品模态框 */
    .modal {
      display: none;
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0,0,0,0.5);
      z-index: 1000;
      justify-content: center;
      align-items: center;
    }
    
    .modal-content {
      background: white;
      border-radius: 12px;
      width: 90%;
      max-width: 600px;
      max-height: 90vh;
      overflow-y: auto;
      padding: 2rem;
      position: relative;
    }
    
    .close-modal {
      position: absolute;
      top: 1rem;
      right: 1rem;
      font-size: 1.5rem;
      cursor: pointer;
      color: var(--text-secondary);
    }
    
    .modal-title {
      font-size: 1.5rem;
      color: var(--primary-color);
      margin-bottom: 1.5rem;
    }
    
    .form-group {
      margin-bottom: 1.5rem;
    }
    
    .form-label {
      display: block;
      margin-bottom: 0.5rem;
      font-weight: 500;
    }
    
    .form-control {
      width: 100%;
      padding: 0.8rem 1rem;
      border: 1px solid var(--border-color);
      border-radius: 8px;
      font-size: 1rem;
    }
    
    textarea.form-control {
      min-height: 120px;
    }
    
    .form-actions {
      display: flex;
      justify-content: flex-end;
      gap: 1rem;
      margin-top: 2rem;
    }
    
    .btn {
      padding: 0.6rem 1.2rem;
      border-radius: 8px;
      border: none;
      font-weight: 500;
      cursor: pointer;
      transition: all 0.3s ease;
    }
    
    .btn-primary {
      background: var(--primary-color);
      color: white;
    }
    
    .btn-primary:hover {
      background: var(--secondary-color);
    }
    
    .btn-outline {
      background: white;
      color: var(--primary-color);
      border: 1px solid var(--primary-color);
    }
    
    .btn-outline:hover {
      background: rgba(79, 139, 183, 0.1);
    }
    
    /* 上传区域 */
    .upload-area {
      border: 2px dashed var(--border-color);
      border-radius: 8px;
      padding: 2rem;
      text-align: center;
      cursor: pointer;
      transition: all 0.3s ease;
    }
    
    .upload-area:hover {
      border-color: var(--secondary-color);
      background: rgba(79, 139, 183, 0.05);
    }
    
    .upload-icon {
      font-size: 2rem;
      color: var(--secondary-color);
      margin-bottom: 1rem;
    }
    
    #imagePreview {
      max-width: 100%;
      max-height: 300px;
      display: none;
      margin: 1rem auto;
      border-radius: 8px;
    }
    .alert {
  padding: 12px;
  margin: 10px 0;
  border-radius: 4px;
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  min-width: 300px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}
.alert-error {
  background-color: #ffebee;
  color: #c62828;
  border: 1px solid #ef9a9a;
}
.alert-success {
  background-color: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #a5d6a7;
}
    @media (max-width: 768px) {
      .profile-nav ul {
        flex-wrap: wrap;
      }
      
      .profile-nav li {
        flex: 1 0 50%;
        text-align: center;
      }
      
      .stats-section {
        grid-template-columns: 1fr;
      }
      
      .info-grid {
        grid-template-columns: 1fr;
      }
      
      .profile-header {
        flex-direction: column;
        text-align: center;
      }
      
      .user-avatar {
        margin-right: 0;
        margin-bottom: 1rem;
      }
      .nickname-display {
  background: #f8f9fa;
  padding: 12px;
  border-radius: 8px;
  margin-top: 15px;
}

.nickname-display .info-label {
  font-weight: 600;
  margin-right: 8px;
}

/* 模态框覆盖样式 */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  position: relative;
}

.close-modal {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-secondary);
}

.close-modal:hover {
  color: var(--primary-color);
}
      
      .projects-grid {
        grid-template-columns: 1fr;
      }
    }