/* ===== 个人中心导航 ===== */
.nav-user-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  border-radius: 10px;
  padding: 4px 8px;
  margin: -4px -8px;
  transition: var(--transition);
}

.nav-user-link:hover {
  background: rgba(59, 130, 246, 0.08);
}

/* ===== 个人中心页面 ===== */
.profile-page {
  background: var(--bg-primary);
}

.profile-main {
  padding: 110px 0 80px;
  min-height: calc(100vh - 200px);
}

.profile-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
  padding: 28px 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.profile-hero-user {
  display: flex;
  align-items: center;
  gap: 18px;
}

.profile-hero-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.6rem;
  font-weight: 700;
  flex-shrink: 0;
}

.profile-hero-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-hero-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.profile-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.profile-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 500;
}

.profile-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.profile-toolbar-left {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

.profile-subtabs {
  display: flex;
  align-items: center;
  gap: 24px;
}

.profile-subtab {
  position: relative;
  padding: 4px 0;
  border: none;
  background: transparent;
  color: #e25555;
  font-size: 0.95rem;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.25s ease, opacity 0.25s ease;
}

.profile-subtab:hover {
  color: #c73737;
}

.profile-subtab.active {
  color: #d63f3f;
  font-weight: 700;
}

.profile-subtab.active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  border-radius: 999px;
  background: #d63f3f;
}

.profile-subtabs.profile-hidden {
  display: none;
}

.profile-subpanel {
  display: none;
  flex-direction: column;
  gap: 16px;
}

.profile-subpanel.active {
  display: flex;
}

.profile-history-card {
  margin-bottom: 0;
}

.profile-member-switch {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.profile-member-switch label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

.profile-member-select {
  min-width: 160px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.9rem;
  font-family: inherit;
  background: var(--bg-card);
  color: var(--text-primary);
  cursor: pointer;
}

.profile-member-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.profile-form-card.profile-readonly {
  opacity: 0.72;
  pointer-events: none;
}

.profile-form-tip {
  margin: -8px 0 16px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(234, 88, 12, 0.08);
  border: 1px solid rgba(234, 88, 12, 0.18);
  color: #c2410c;
  font-size: 0.88rem;
  line-height: 1.5;
}

.profile-form .btn[type="submit"]:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.profile-viewing-tip {
  margin-bottom: 16px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(59, 130, 246, 0.08);
  color: var(--accent);
  font-size: 0.875rem;
}

.profile-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 0;
  padding: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  width: fit-content;
}

.profile-tab {
  padding: 10px 22px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.profile-tab:hover:not(.active) {
  color: var(--text-primary);
  background: rgba(59, 130, 246, 0.06);
}

.profile-tab.active {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 4px 14px var(--accent-glow);
}

.profile-panel {
  display: none;
}

.profile-panel.active {
  display: block;
}

.profile-grid {
  display: grid;
  grid-template-columns: minmax(380px, 520px) 1fr;
  gap: 24px;
  align-items: start;
}

.profile-left-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.profile-side-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.profile-ranking-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.profile-ranking-desc {
  margin: 0 0 14px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.profile-ranking-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.profile-ranking-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-primary);
  cursor: pointer;
  transition: var(--transition);
}

.profile-ranking-item:hover {
  border-color: rgba(59, 130, 246, 0.35);
  box-shadow: var(--shadow-sm);
}

.profile-ranking-item.is-active {
  border-color: var(--accent);
  background: rgba(59, 130, 246, 0.06);
}

.profile-ranking-item.is-self .profile-ranking-name::after {
  content: '（我）';
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 500;
}

.profile-ranking-rank {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
  background: rgba(59, 130, 246, 0.08);
  flex-shrink: 0;
}

.profile-ranking-item:nth-child(1) .profile-ranking-rank {
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #f97316);
}

.profile-ranking-item:nth-child(2) .profile-ranking-rank {
  color: #fff;
  background: linear-gradient(135deg, #94a3b8, #64748b);
}

.profile-ranking-item:nth-child(3) .profile-ranking-rank {
  color: #fff;
  background: linear-gradient(135deg, #d97706, #b45309);
}

.profile-ranking-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
}

.profile-ranking-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-ranking-main {
  flex: 1;
  min-width: 0;
}

.profile-ranking-name {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-ranking-metrics {
  margin-top: 4px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.profile-ranking-total {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}

.profile-ranking-empty {
  padding: 20px;
  text-align: center;
  color: var(--text-muted);
  border: 1px dashed var(--border);
  border-radius: 12px;
  font-size: 0.9rem;
}

.profile-stats-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.profile-stats-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.profile-stats-head .profile-card-title {
  margin-bottom: 0;
}

.profile-stats-range-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.profile-range-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.profile-range-tab {
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-primary);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
}

.profile-range-tab:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.profile-range-tab.active {
  background: rgba(59, 130, 246, 0.1);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}

.profile-custom-range {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.profile-custom-range input[type="date"] {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.875rem;
  background: var(--bg-primary);
  color: var(--text-primary);
}

.profile-range-sep {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.profile-stat-item {
  padding: 16px 12px;
  text-align: center;
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.06) 0%, rgba(59, 130, 246, 0.02) 100%);
  border: 1px solid rgba(59, 130, 246, 0.12);
  border-radius: 12px;
}

.profile-stat-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 6px;
}

.profile-stat-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.profile-stats-meta {
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.profile-list-title {
  margin-bottom: 0;
}

.profile-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.profile-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.profile-form .form-group {
  margin-bottom: 18px;
}

.profile-form label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.profile-form input,
.profile-form select,
.profile-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: inherit;
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: var(--transition);
}

.profile-form input:focus,
.profile-form select:focus,
.profile-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.profile-form textarea {
  min-height: 96px;
  resize: vertical;
}

.profile-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.profile-radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.profile-radio {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: var(--transition);
}

.profile-radio input {
  width: auto;
  margin: 0;
}

.profile-radio:has(input:checked) {
  border-color: var(--accent);
  background: rgba(59, 130, 246, 0.08);
  color: var(--accent);
}

.profile-form-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

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

.profile-list-empty {
  padding: 48px 24px;
  text-align: center;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

.profile-record {
  padding: 18px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: var(--transition);
}

.profile-record:hover {
  border-color: rgba(59, 130, 246, 0.25);
  box-shadow: var(--shadow-sm);
}

.profile-record-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.profile-record-title {
  font-weight: 600;
  color: var(--text-primary);
}

.profile-record-date {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.profile-record-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.profile-record-stat strong {
  color: var(--text-primary);
  font-weight: 600;
}

.profile-record-body {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.profile-record-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 10px;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.profile-status {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
}

.profile-status-pending {
  background: #fef3c7;
  color: #92400e;
}

.profile-status-won {
  background: #d1fae5;
  color: #065f46;
}

.profile-status-other {
  background: #f3f4f6;
  color: #6b7280;
}

.profile-record-actions {
  display: flex;
  gap: 8px;
}

.profile-record-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

.profile-record-footer .profile-record-actions {
  margin-top: 0;
}

.profile-required {
  color: #dc2626;
}

.profile-screenshot-upload {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}

.profile-screenshot-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.profile-screenshot-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.profile-screenshot-item {
  position: relative;
  width: 88px;
  height: 88px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-primary);
}

.profile-screenshot-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-screenshot-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

.profile-screenshot-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding: 6px 12px;
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 10px;
  background: rgba(59, 130, 246, 0.06);
  color: var(--accent);
  font-size: 0.85rem;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
}

.profile-screenshot-btn:hover {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.4);
}

.profile-screenshot-btn-icon {
  width: 18px;
  height: 18px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2' ry='2'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.5'/%3E%3Cpolyline points='21 15 16 10 5 21'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2' ry='2'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.5'/%3E%3Cpolyline points='21 15 16 10 5 21'/%3E%3C/svg%3E") center / contain no-repeat;
}

.profile-screenshot-viewer {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-screenshot-viewer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.82);
}

.profile-screenshot-viewer-panel {
  position: relative;
  z-index: 1;
  width: min(92vw, 1080px);
  max-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 56px;
}

.profile-screenshot-viewer-stage {
  max-width: 100%;
  max-height: calc(92vh - 96px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-screenshot-viewer-stage img {
  max-width: 100%;
  max-height: calc(92vh - 96px);
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  background: #fff;
}

.profile-screenshot-viewer-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.profile-screenshot-viewer-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.profile-screenshot-viewer-nav.prev {
  left: 8px;
}

.profile-screenshot-viewer-nav.next {
  right: 8px;
}

.profile-screenshot-viewer-nav:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.profile-screenshot-viewer-counter {
  position: absolute;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 0.9rem;
}

.profile-ai-card {
  margin-top: 16px;
  padding: 0;
  border-radius: 16px;
  border: 1px solid rgba(99, 102, 241, 0.16);
  background: #fff;
  box-shadow: 0 8px 28px rgba(99, 102, 241, 0.08);
  overflow: hidden;
}

.profile-ai-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 0;
  padding: 20px 22px 16px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(59, 130, 246, 0.04) 100%);
  border-bottom: 1px solid rgba(99, 102, 241, 0.1);
}

.profile-ai-head-main {
  flex: 1;
  min-width: 0;
}

.profile-ai-head-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.profile-push-report-btn {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid rgba(99, 102, 241, 0.35);
  background: rgba(255, 255, 255, 0.92);
  color: #4f46e5;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.profile-push-report-btn:hover:not(:disabled) {
  background: #4f46e5;
  color: #fff;
  border-color: #4f46e5;
}

.profile-push-report-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.profile-ai-head-icon {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #fff;
  background: linear-gradient(135deg, #6366f1 0%, #3b82f6 100%);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.28);
}

.profile-ai-credibility {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  padding: 16px 22px;
  border-radius: 0;
  background: #f8faff;
  border-bottom: 1px solid rgba(99, 102, 241, 0.08);
}

.profile-ai-score-badge {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(99, 102, 241, 0.08));
  border: 2px solid rgba(59, 130, 246, 0.25);
}

.profile-ai-score-badge.level-high {
  border-color: rgba(16, 185, 129, 0.45);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.16), rgba(16, 185, 129, 0.06));
}

.profile-ai-score-badge.level-good {
  border-color: rgba(59, 130, 246, 0.45);
}

.profile-ai-score-badge.level-mid {
  border-color: rgba(245, 158, 11, 0.45);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.16), rgba(245, 158, 11, 0.06));
}

.profile-ai-score-badge.level-low {
  border-color: rgba(239, 68, 68, 0.45);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.14), rgba(239, 68, 68, 0.06));
}

.profile-ai-score-value {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1;
  color: var(--text-primary);
}

.profile-ai-score-unit {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.profile-ai-credibility-meta {
  min-width: 0;
}

.profile-ai-credibility-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.profile-ai-score-level {
  display: inline-flex;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(59, 130, 246, 0.1);
  color: #2563eb;
}

.profile-ai-score-level.level-high {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
}

.profile-ai-score-level.level-mid {
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
}

.profile-ai-score-level.level-low {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
}

.profile-ai-credibility-summary {
  margin: 0;
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.profile-ai-title {
  margin: 0 0 6px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.profile-ai-desc {
  margin: 0;
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.profile-ai-body {
  padding: 18px 22px 22px;
  border-radius: 0;
  background: #fff;
  border: none;
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.75;
}

.profile-ai-body.profile-ai-empty,
.profile-ai-body.profile-ai-loading {
  color: var(--text-muted);
  text-align: center;
  padding: 32px 22px;
}

.profile-markdown {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.md-section {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: #fafbfd;
}

.md-section-comment {
  border-color: rgba(59, 130, 246, 0.18);
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.05) 0%, #fff 100%);
}

.md-section-metrics {
  border-color: rgba(99, 102, 241, 0.2);
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.06) 0%, #fff 100%);
}

.md-section-metrics .md-list li::before {
  background: #6366f1;
}

.md-section-suggest {
  border-color: rgba(16, 185, 129, 0.18);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.04) 0%, #fff 100%);
}

.md-heading {
  margin: 0;
  padding: 12px 16px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  background: rgba(255, 255, 255, 0.65);
}

.md-section-body {
  padding: 14px 16px 16px;
}

.md-quote {
  margin: 0;
  padding: 12px 14px;
  border-left: 4px solid #3b82f6;
  border-radius: 0 10px 10px 0;
  background: rgba(59, 130, 246, 0.07);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.7;
}

.md-section-suggest .md-quote {
  border-left-color: #10b981;
  background: rgba(16, 185, 129, 0.07);
}

.md-p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.75;
}

.md-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.md-list li {
  position: relative;
  margin: 0 0 10px;
  padding-left: 22px;
  color: var(--text-secondary);
  line-height: 1.65;
}

.md-list li:last-child {
  margin-bottom: 0;
}

.md-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3b82f6;
}

.md-section-suggest .md-list li::before {
  background: #10b981;
}

.md-list-ol {
  counter-reset: md-ol;
}

.md-list-ol li {
  counter-increment: md-ol;
  padding-left: 28px;
}

.md-list-ol li::before {
  content: counter(md-ol);
  top: 0.1em;
  width: auto;
  height: auto;
  border-radius: 0;
  background: transparent;
  color: #3b82f6;
  font-size: 0.82rem;
  font-weight: 700;
}

.md-hr {
  border: none;
  border-top: 1px dashed rgba(99, 102, 241, 0.2);
  margin: 4px 0;
}

.profile-markdown code {
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.06);
  font-size: 0.86em;
}

.profile-markdown strong {
  color: var(--text-primary);
  font-weight: 700;
}

.profile-btn-sm {
  padding: 6px 14px;
  font-size: 0.85rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition);
}

.profile-btn-sm:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.profile-btn-sm.danger:hover {
  border-color: #ef4444;
  color: #ef4444;
}

.profile-guest {
  max-width: 480px;
  margin: 80px auto;
  padding: 48px 32px;
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.profile-guest h2 {
  font-size: 1.4rem;
  margin-bottom: 12px;
}

.profile-guest p {
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.profile-hidden {
  display: none !important;
}

@media (max-width: 960px) {
  .profile-grid {
    grid-template-columns: 1fr;
  }

  .profile-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .profile-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .profile-toolbar-left {
    width: 100%;
    gap: 16px;
  }

  .profile-member-switch {
    margin-left: 0;
    width: 100%;
  }

  .profile-member-select {
    flex: 1;
    min-width: 0;
  }

  .profile-tabs {
    width: 100%;
    overflow-x: auto;
  }
}

@media (max-width: 640px) {
  .profile-main {
    padding-top: 96px;
  }

  .profile-form-row {
    grid-template-columns: 1fr;
  }

  .profile-hero {
    padding: 22px 20px;
  }

  .profile-stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
