/* ===== 个人中心样式（独立文件，不污染全局） ===== */
:root {
  --my-bg: #FAF9FF;
  --my-text: #17152B;
  --my-purple: #7457F6;
  --my-purple-light: #F3F0FF;
  --my-card-bg: #FFFFFF;
  --my-border: #E8E3F5;
  --my-text-muted: #777486;
  --my-success: #39A979;
  --my-badge-purple: #C4B8F7;
}

.my-section {
  min-height: 100vh;
  padding: 80px 0 120px;
  display: none;
}

.my-section:not([hidden]) {
  display: block;
}

.my-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* 个人资料卡 */
.my-profile-card {
  background: var(--my-card-bg);
  border: 1px solid var(--my-border);
  border-radius: 24px;
  padding: 32px;
  margin-bottom: 32px;
  box-shadow: 0 4px 20px rgba(116, 87, 246, 0.06);
  position: relative;
  overflow: hidden;
}

.my-profile-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: radial-gradient(circle at 30% 20%, rgba(116, 87, 246, 0.08), transparent 50%);
  pointer-events: none;
}

.my-profile-header {
  display: flex;
  gap: 28px;
  align-items: flex-start;
}

.my-avatar-wrapper {
  position: relative;
  flex-shrink: 0;
}

.my-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--my-purple);
  color: white;
  font-size: 28px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid white;
  box-shadow: 0 4px 12px rgba(116, 87, 246, 0.15);
}

.my-avatar-edit {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--my-purple);
  color: white;
  border: 2px solid white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}

.my-avatar-edit:hover {
  transform: scale(1.1);
}

.my-avatar-edit svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.my-profile-info {
  flex: 1;
  min-width: 0;
}

.my-profile-identity {
  margin-bottom: 12px;
}

.my-name {
  font-size: 28px;
  font-weight: 700;
  color: var(--my-text);
  margin: 0 0 4px 0;
}

.my-role-city {
  font-size: 14px;
  color: var(--my-text-muted);
  margin: 0;
}

.my-bio {
  font-size: 14px;
  color: var(--my-text-muted);
  line-height: 1.6;
  margin: 0 0 16px 0;
}

.my-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.my-skill {
  font-size: 12px;
  color: var(--my-purple);
  background: var(--my-purple-light);
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(116, 87, 246, 0.15);
}

.my-profile-actions {
  display: flex;
  gap: 12px;
}

.my-action-btn {
  padding: 8px 20px;
  border-radius: 999px;
  border: 1px solid var(--my-border);
  background: white;
  color: var(--my-text);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.my-action-btn:hover {
  background: var(--my-purple-light);
  border-color: var(--my-purple);
}

/* 数据统计 */
.my-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: 24px 0;
  border-top: 1px solid var(--my-border);
}

.my-stat-item {
  text-align: center;
}

.my-stat-item strong {
  display: block;
  font-size: 32px;
  font-weight: 700;
  color: var(--my-text);
  margin-bottom: 4px;
}

.my-stat-item span {
  font-size: 13px;
  color: var(--my-text-muted);
}

/* 快捷入口 */
.my-quick-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.my-quick-action {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--my-card-bg);
  border: 1px solid var(--my-border);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}

.my-quick-action:hover {
  background: var(--my-purple-light);
  border-color: var(--my-purple);
}

.my-quick-icon {
  font-size: 28px;
}

.my-quick-action strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--my-text);
  margin-bottom: 2px;
}

.my-quick-action small {
  font-size: 12px;
  color: var(--my-text-muted);
}

.my-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: var(--my-badge-purple);
  color: var(--my-purple);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 标签页 */
.my-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.my-tab {
  padding: 12px 24px;
  border-radius: 999px;
  border: 1px solid var(--my-border);
  background: white;
  color: var(--my-text-muted);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.my-tab:hover {
  background: var(--my-purple-light);
}

.my-tab.is-active {
  background: var(--my-purple);
  border-color: var(--my-purple);
  color: white;
  font-weight: 600;
}

/* 内容区域 */
.my-content {
  min-height: 400px;
}

.my-content-panel {
  display: none;
}

.my-content-panel.is-active {
  display: block;
}

.my-content-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.my-content-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--my-text);
  margin: 0;
}

.my-secondary-action {
  font-size: 14px;
  color: var(--my-purple);
  text-decoration: none;
  font-weight: 600;
}

.my-secondary-action:hover {
  text-decoration: underline;
}

/* 项目列表 */
.my-projects-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.my-project-card {
  background: var(--my-card-bg);
  border: 1px solid var(--my-border);
  border-radius: 20px;
  padding: 20px;
  transition: all 0.2s;
}

.my-project-card:hover {
  border-color: var(--my-purple);
  box-shadow: 0 4px 12px rgba(116, 87, 246, 0.08);
}

.my-project-logo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--my-purple-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: var(--my-purple);
  margin-bottom: 16px;
}

.my-project-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--my-text);
  margin: 0 0 8px 0;
}

.my-project-tagline {
  font-size: 13px;
  color: var(--my-text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
}

.my-project-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--my-text-muted);
}

.my-project-status {
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--my-purple-light);
  color: var(--my-purple);
}

.my-project-visibility {
  padding: 4px 12px;
  border-radius: 999px;
  background: #F0F0F0;
  color: #666;
}

.my-project-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.my-project-btn {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--my-border);
  background: white;
  color: var(--my-text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.my-project-btn:hover {
  background: var(--my-purple-light);
  border-color: var(--my-purple);
}

/* 推荐列表 */
.my-recommendations-list {
  display: grid;
  gap: 16px;
}

.my-recommendation-card {
  background: var(--my-card-bg);
  border: 1px solid var(--my-border);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  gap: 20px;
  transition: all 0.2s;
}

.my-recommendation-card:hover {
  border-color: var(--my-purple);
  box-shadow: 0 4px 12px rgba(116, 87, 246, 0.08);
}

.my-rec-product-info {
  flex-shrink: 0;
  width: 100px;
}

.my-rec-product-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--my-text);
  margin: 0 0 4px 0;
}

.my-rec-product-category {
  font-size: 12px;
  color: var(--my-text-muted);
}

.my-rec-content {
  flex: 1;
  min-width: 0;
}

.my-rec-reason {
  font-size: 14px;
  color: var(--my-text-muted);
  line-height: 1.6;
  margin: 0 0 12px 0;
}

.my-rec-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: var(--my-text-muted);
}

.my-rec-actions {
  display: flex;
  gap: 8px;
}

/* 账号设置 */
.my-settings-section {
  margin-bottom: 32px;
}

.my-settings-section h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--my-text);
  margin: 0 0 16px 0;
}

.my-setting-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid var(--my-border);
}

.my-setting-item:last-child {
  border-bottom: none;
}

.my-setting-label {
  font-size: 14px;
  color: var(--my-text);
}

.my-setting-select {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--my-border);
  background: white;
  color: var(--my-text);
  font-size: 14px;
  cursor: pointer;
}

.my-setting-select:focus {
  outline: 2px solid var(--my-purple);
  outline-offset: -2px;
}

.my-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.my-toggle input[type="checkbox"] {
  width: 44px;
  height: 24px;
  appearance: none;
  background: #E0E0E0;
  border-radius: 12px;
  cursor: pointer;
  position: relative;
  transition: background 0.2s;
}

.my-toggle input[type="checkbox"]::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s;
}

.my-toggle input[type="checkbox"]:checked {
  background: var(--my-purple);
}

.my-toggle input[type="checkbox"]:checked::before {
  transform: translateX(20px);
}

.my-toggle span {
  font-size: 14px;
  color: var(--my-text);
}

.my-secondary-btn {
  padding: 10px 20px;
  border-radius: 8px;
  border: 1px solid var(--my-border);
  background: white;
  color: var(--my-text);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.my-secondary-btn:hover {
  background: var(--my-purple-light);
  border-color: var(--my-purple);
}

.my-notice {
  font-size: 12px;
  color: var(--my-text-muted);
  text-align: center;
  margin-top: 8px;
}

/* 演示说明 */
.my-demo-notice {
  background: #FFF8E1;
  border: 1px solid #FFE082;
  border-radius: 12px;
  padding: 12px 16px;
  margin-top: 24px;
}

.my-demo-notice p {
  font-size: 13px;
  color: #666;
  margin: 0;
}

/* 空状态 */
.my-empty-state {
  text-align: center;
  padding: 60px 20px;
}

.my-empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.my-empty-state h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--my-text);
  margin: 0 0 8px 0;
}

.my-empty-state p {
  font-size: 14px;
  color: var(--my-text-muted);
  margin: 0 0 24px 0;
  line-height: 1.6;
}

.my-primary-btn {
  padding: 12px 28px;
  border-radius: 999px;
  border: none;
  background: var(--my-purple);
  color: white;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.my-primary-btn:hover {
  background: #6A4CE0;
}

/* 消息中心 */
.my-messages-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}

.my-back-btn {
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--my-border);
  background: white;
  color: var(--my-text);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.my-back-btn:hover {
  background: var(--my-purple-light);
}

.my-messages-header h1 {
  font-size: 24px;
  font-weight: 700;
  color: var(--my-text);
  margin: 0;
}

.my-messages-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  height: calc(100vh - 200px);
}

.my-messages-sidebar {
  background: var(--my-card-bg);
  border: 1px solid var(--my-border);
  border-radius: 16px;
  padding: 16px;
}

.my-message-categories {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}

.my-category-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 12px;
  background: transparent;
  color: var(--my-text-muted);
  border: none;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}

.my-category-tab:hover {
  background: var(--my-purple-light);
}

.my-category-tab.is-active {
  background: var(--my-purple);
  color: white;
}

.my-category-icon {
  font-size: 18px;
}

.my-conversations-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  max-height: 400px;
}

.my-conversation-item {
  padding: 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s;
}

.my-conversation-item:hover {
  background: var(--my-purple-light);
}

.my-conversation-item.is-active {
  background: var(--my-purple-light);
  border: 1px solid var(--my-purple);
}

.my-conversation-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--my-text);
  margin: 0 0 4px 0;
}

.my-conversation-last-msg {
  font-size: 12px;
  color: var(--my-text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.my-conversation-time {
  font-size: 11px;
  color: #AAA;
}

.my-conversation-panel {
  background: var(--my-card-bg);
  border: 1px solid var(--my-border);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.my-conversation-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--my-border);
  margin-bottom: 16px;
}

.my-conversation-user {
  display: flex;
  gap: 12px;
  align-items: center;
}

.my-conversation-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--my-purple);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
}

.my-conversation-info h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--my-text);
  margin: 0 0 2px 0;
}

.my-conversation-info p {
  font-size: 12px;
  color: var(--my-text-muted);
  margin: 0;
}

.my-action-link {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--my-border);
  background: white;
  color: var(--my-text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.my-action-link:hover {
  background: var(--my-purple-light);
}

.my-messages-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  max-height: 400px;
  padding: 8px;
  background: #FAFBFC;
  border-radius: 12px;
}

.my-message {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.my-message.sent {
  flex-direction: row-reverse;
}

.my-message-bubble {
  max-width: 70%;
  padding: 12px 16px;
  border-radius: 16px;
  background: white;
  border: 1px solid var(--my-border);
}

.my-message.sent .my-message-bubble {
  background: var(--my-purple);
  color: white;
  border-color: var(--my-purple);
}

.my-message-text {
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 4px 0;
}

.my-message-time {
  font-size: 11px;
  color: #AAA;
}

.my-message-input {
  display: flex;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--my-border);
}

.my-input-field {
  flex: 1;
  min-height: 80px;
  max-height: 150px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--my-border);
  background: white;
  color: var(--my-text);
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
}

.my-input-field:focus {
  outline: 2px solid var(--my-purple);
  outline-offset: -2px;
}

.my-send-btn {
  padding: 12px 20px;
  border-radius: 12px;
  border: none;
  background: var(--my-purple);
  color: white;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.my-send-btn:hover {
  background: #6A4CE0;
}

.my-send-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.my-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 弹窗 */
.my-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.my-modal.open {
  display: flex;
}

.my-modal-content {
  background: white;
  border-radius: 20px;
  padding: 32px;
  max-width: 500px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.my-modal-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--my-text);
  margin: 0 0 24px 0;
}

.my-modal-close {
  float: right;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--my-text-muted);
  cursor: pointer;
  line-height: 1;
}

.my-form-group {
  margin-bottom: 20px;
}

.my-form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--my-text);
  margin-bottom: 8px;
}

.my-form-input {
  width: 100%;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid var(--my-border);
  background: white;
  color: var(--my-text);
  font-size: 14px;
  font-family: inherit;
}

.my-form-input:focus {
  outline: 2px solid var(--my-purple);
  outline-offset: -2px;
}

.my-form-textarea {
  width: 100%;
  min-height: 80px;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid var(--my-border);
  background: white;
  color: var(--my-text);
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
}

.my-form-textarea:focus {
  outline: 2px solid var(--my-purple);
  outline-offset: -2px;
}

.my-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.my-modal-btn {
  padding: 12px 24px;
  border-radius: 999px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.my-modal-btn.secondary {
  background: transparent;
  color: var(--my-text-muted);
}

.my-modal-btn.primary {
  background: var(--my-purple);
  color: white;
}

.my-modal-btn:hover {
  transform: translateY(-1px);
}

/* Toast */
.my-toast {
  display: none;
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--my-text);
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  z-index: 1001;
  animation: my-toast-in 0.3s ease;
}

.my-toast.show {
  display: block;
}

@keyframes my-toast-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 响应式 */
@media (max-width: 1024px) {
  .my-projects-list {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .my-quick-actions {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .my-messages-layout {
    grid-template-columns: 1fr;
  }
  
  .my-messages-sidebar {
    display: none;
  }
  
  .my-conversation-panel {
    display: flex !important;
  }
}

@media (max-width: 680px) {
  .my-container {
    padding: 0 16px;
  }
  
  .my-section {
    padding: 40px 0 80px;
  }
  
  .my-profile-header {
    flex-direction: column;
    gap: 16px;
  }
  
  .my-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding: 16px 0;
  }
  
  .my-quick-actions {
    grid-template-columns: 1fr;
  }
  
  .my-profile-actions {
    flex-direction: column;
  }
  
  .my-tabs {
    flex-wrap: wrap;
  }
  
  .my-projects-list {
    grid-template-columns: 1fr;
  }
  
  .my-recommendation-card {
    flex-direction: column;
  }
  
  .my-rec-product-info {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
  }
  
  .my-rec-content {
    margin-top: 12px;
  }
  
  .my-rec-actions {
    width: 100%;
    justify-content: flex-start;
  }
}