/* ================================================================ V3 样式
   极简黑白灰风格，参考 justailab.com/marketing
   左侧固定侧边栏 + 主内容区
================================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --v3-bg: #fafafa;
  --v3-sidebar-bg: #ffffff;
  --v3-card-bg: #ffffff;
  --v3-border: #e5e5e5;
  --v3-border-light: #f0f0f0;
  --v3-text: #1a1a1a;
  --v3-text-secondary: #666666;
  --v3-text-tertiary: #999999;
  --v3-hover: #f5f5f5;
  --v3-active: #f0f0f0;
  --v3-accent: #1677ff;
  --v3-accent-dark: #0958d9;
  --v3-accent-light: #e6f4ff;
  --v3-accent-hover: #4096ff;
  --v3-radius: 12px;
  --v3-radius-sm: 8px;
  --v3-radius-lg: 16px;
  --v3-sidebar-width: 220px;
  --v3-shadow: 0 1px 3px rgba(0,0,0,0.06);
  --v3-shadow-lg: 0 4px 12px rgba(0,0,0,0.08);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--v3-bg);
  color: var(--v3-text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--v3-text); }

/* ================================================================ 侧边栏 */
.v3-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--v3-sidebar-width);
  height: 100vh;
  background: var(--v3-sidebar-bg);
  border-right: 1px solid var(--v3-border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
}

.v3-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 20px 18px;
  border-bottom: 1px solid var(--v3-border-light);
}

.v3-logo-mark {
  font-size: 20px;
  color: var(--v3-accent);
  font-weight: 800;
}

.v3-logo-text {
  font-size: 15px;
  font-weight: 700;
  color: var(--v3-text);
  letter-spacing: -0.3px;
}

.v3-nav {
  padding: 8px 0;
  flex: 1;
}

.v3-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  font-size: 14px;
  color: var(--v3-text);
  transition: background 0.15s;
  position: relative;
  cursor: pointer;
}

.v3-nav-item:hover {
  background: var(--v3-hover);
}

.v3-nav-item.active {
  background: var(--v3-active);
  font-weight: 600;
}

.v3-nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  background: var(--v3-accent);
  border-radius: 0 2px 2px 0;
}

.v3-nav-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.v3-nav-text {
  flex: 1;
}

.v3-nav-divider {
  height: 1px;
  background: var(--v3-border-light);
  margin: 4px 12px;
}

.v3-nav-personal {
  flex: none;
}

.v3-user-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-top: 1px solid var(--v3-border-light);
}

.v3-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--v3-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}

.v3-user-info { flex: 1; min-width: 0; }
.v3-user-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v3-logout { font-size: 12px; color: var(--v3-text-tertiary); }
.v3-logout:hover { color: var(--v3-text); }

/* ================================================================ 主内容区 */
.v3-main {
  margin-left: var(--v3-sidebar-width);
  min-height: 100vh;
  padding: 0;
}

/* ================================================================ Flash */
.v3-flash-wrap {
  padding: 16px 32px 0;
}

.v3-flash {
  padding: 12px 18px;
  border-radius: var(--v3-radius-sm);
  margin-bottom: 10px;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.v3-flash-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.v3-flash-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.v3-flash-warning { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.v3-flash-info { background: #f0f9ff; color: #075985; border: 1px solid #bae6fd; }
.v3-flash-close { cursor: pointer; font-size: 18px; opacity: 0.6; }
.v3-flash-close:hover { opacity: 1; }

/* ================================================================ 首页 AI 工作台 */
.v3-hero {
  text-align: center;
  padding: 80px 32px 30px;
}

.v3-hero-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--v3-text);
  margin-bottom: 10px;
  letter-spacing: -0.5px;
}

.v3-hero-subtitle {
  font-size: 15px;
  color: var(--v3-text-secondary);
  margin-bottom: 0;
}

/* 对话框 */
.v3-chat-box-wrap {
  max-width: 1100px;
  margin: 30px auto 0;
  padding: 0 32px;
}

.v3-chat-box {
  background: var(--v3-card-bg);
  border: 1px solid var(--v3-border);
  border-radius: var(--v3-radius-lg);
  padding: 20px;
  box-shadow: var(--v3-shadow);
  transition: box-shadow 0.2s, border-color 0.2s;
}

.v3-chat-box:focus-within {
  box-shadow: var(--v3-shadow-lg);
  border-color: #ccc;
}

.v3-chat-input {
  width: 100%;
  border: none;
  outline: none;
  font-size: 15px;
  color: var(--v3-text);
  resize: none;
  min-height: 60px;
  max-height: 200px;
  font-family: inherit;
  line-height: 1.6;
  background: transparent;
}

.v3-chat-input::placeholder {
  color: var(--v3-text-tertiary);
}

.v3-chat-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--v3-border-light);
}

.v3-chat-tools-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.v3-chat-tools-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.v3-chat-tool-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--v3-text-secondary);
  transition: background 0.15s;
}

.v3-chat-tool-btn:hover {
  background: var(--v3-hover);
}

.v3-chat-skill-select {
  padding: 6px 12px;
  border: 1px solid var(--v3-border);
  border-radius: var(--v3-radius-sm);
  font-size: 13px;
  color: var(--v3-text);
  background: var(--v3-card-bg);
  cursor: pointer;
  outline: none;
}

.v3-chat-send-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--v3-accent);
  color: #fff;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, transform 0.1s;
}

.v3-chat-send-btn:hover { background: #4096ff; }
.v3-chat-send-btn:active { transform: scale(0.95); }
.v3-chat-send-btn:disabled { background: #ccc; cursor: not-allowed; }

/* 快捷技能卡 */
.v3-skills-wrap {
  max-width: 1100px;
  margin: 24px auto 0;
  padding: 0 32px;
}

.v3-skills-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
}

.v3-skills-scroll::-webkit-scrollbar { height: 4px; }
.v3-skills-scroll::-webkit-scrollbar-thumb { background: #ddd; border-radius: 2px; }

.v3-skill-card {
  flex: 1;
  min-width: 0;
  background: var(--v3-card-bg);
  border: 1px solid var(--v3-border);
  border-radius: var(--v3-radius);
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}

.v3-skill-card:hover {
  border-color: #ccc;
  box-shadow: var(--v3-shadow);
  transform: translateY(-2px);
}

.v3-skill-icon {
  margin: 0 auto 12px;
  font-size: 28px;
  margin-bottom: 10px;
}

.v3-skill-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--v3-text);
  margin-bottom: 4px;
}

.v3-skill-desc {
  font-size: 12px;
  color: var(--v3-text-tertiary);
  line-height: 1.5;
}

/* 内容推荐流 */
.v3-feed-wrap {
  max-width: 1100px;
  margin: 40px auto 0;
  padding: 0 32px 60px;
}

.v3-feed-tabs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.v3-feed-tab-list {
  display: flex;
  gap: 24px;
}

.v3-feed-tab {
  font-size: 14px;
  color: var(--v3-text-secondary);
  cursor: pointer;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  transition: all 0.15s;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}

.v3-feed-tab:hover { color: var(--v3-text); }
.v3-feed-tab.active {
  color: var(--v3-text);
  font-weight: 600;
  border-bottom-color: var(--v3-accent);
}

.v3-feed-filter-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid var(--v3-border);
  border-radius: var(--v3-radius-sm);
  background: var(--v3-card-bg);
  font-size: 13px;
  color: var(--v3-text-secondary);
  cursor: pointer;
}

.v3-feed-filter-btn:hover { border-color: #ccc; color: var(--v3-text); }

.v3-feed-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.v3-feed-card {
  background: var(--v3-card-bg);
  border: 1px solid var(--v3-border);
  border-radius: var(--v3-radius);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s;
}

.v3-feed-card:hover {
  border-color: #ccc;
  box-shadow: var(--v3-shadow);
  transform: translateY(-2px);
}

.v3-feed-card-thumb {
  height: 120px;
  background: linear-gradient(135deg, #f5f5f5, #e8e8e8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
}

.v3-feed-card-body {
  padding: 12px 14px;
}

.v3-feed-card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--v3-text);
  margin-bottom: 6px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.v3-feed-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--v3-text-tertiary);
}

.v3-feed-card-tag {
  background: var(--v3-hover);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
}

/* ================================================================ 对话历史 */
.v3-chat-history {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 32px 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.v3-msg {
  display: flex;
  gap: 12px;
  max-width: 85%;
}

.v3-msg-user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.v3-msg-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
}

.v3-msg-user .v3-msg-avatar { background: var(--v3-accent); color: #fff; }
.v3-msg-ai .v3-msg-avatar { background: #f0f0f0; color: var(--v3-text); }

.v3-msg-bubble {
  padding: 12px 16px;
  border-radius: var(--v3-radius);
  font-size: 14px;
  line-height: 1.7;
  word-break: break-word;
}

.v3-msg-user .v3-msg-bubble {
  background: var(--v3-accent);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.v3-msg-ai .v3-msg-bubble {
  background: var(--v3-card-bg);
  border: 1px solid var(--v3-border);
  border-bottom-left-radius: 4px;
}

.v3-msg-ai .v3-msg-bubble p { margin-bottom: 8px; }
.v3-msg-ai .v3-msg-bubble p:last-child { margin-bottom: 0; }
.v3-msg-ai .v3-msg-bubble code {
  background: #f5f5f5;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
  font-family: "SF Mono", Monaco, monospace;
}
.v3-msg-ai .v3-msg-bubble pre {
  background: #1a1a1a;
  color: #e5e5e5;
  padding: 14px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 10px 0;
  font-size: 13px;
  line-height: 1.6;
}
.v3-msg-ai .v3-msg-bubble pre code {
  background: none;
  padding: 0;
  color: inherit;
}
.v3-msg-ai .v3-msg-bubble ul, .v3-msg-ai .v3-msg-bubble ol {
  padding-left: 20px;
  margin-bottom: 8px;
}
.v3-msg-ai .v3-msg-bubble table {
  border-collapse: collapse;
  width: 100%;
  margin: 10px 0;
  font-size: 13px;
}
.v3-msg-ai .v3-msg-bubble th, .v3-msg-ai .v3-msg-bubble td {
  border: 1px solid #e5e5e5;
  padding: 8px 12px;
  text-align: left;
}
.v3-msg-ai .v3-msg-bubble th { background: #fafafa; font-weight: 600; }

.v3-msg-cursor {
  display: inline-block;
  width: 8px;
  height: 16px;
  background: var(--v3-text);
  animation: blink 1s infinite;
  vertical-align: middle;
  margin-left: 2px;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* ================================================================ 子页面通用 */
.v3-page {
  padding: 32px 40px 60px;
}

.v3-page-head {
  margin-bottom: 24px;
}

.v3-page-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--v3-text);
  margin-bottom: 6px;
}

.v3-page-desc {
  font-size: 14px;
  color: var(--v3-text-secondary);
}

.v3-page-head-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

/* 筛选面板 */
.v3-filter-panel {
  background: var(--v3-card-bg);
  border: 1px solid var(--v3-border);
  border-radius: var(--v3-radius);
  padding: 18px 22px;
  margin-bottom: 20px;
}

.v3-filter-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 12px;
}
.v3-filter-row:last-child { margin-bottom: 0; }

.v3-filter-label {
  font-size: 13px;
  color: var(--v3-text-secondary);
  font-weight: 600;
  min-width: 60px;
  padding-top: 5px;
  flex-shrink: 0;
}

.v3-filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
}

.v3-filter-tag {
  padding: 5px 14px;
  border-radius: 6px;
  font-size: 13px;
  background: transparent;
  color: var(--v3-text-secondary);
  cursor: pointer;
  transition: all 0.15s;
  border: 1px solid transparent;
}

.v3-filter-tag:hover { background: var(--v3-hover); color: var(--v3-text); }
.v3-filter-tag.active {
  background: var(--v3-accent);
  color: #fff;
  font-weight: 500;
}

/* 列表工具栏 */
.v3-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  gap: 16px;
  flex-wrap: wrap;
}

.v3-sort-tabs {
  display: flex;
  gap: 4px;
  background: var(--v3-card-bg);
  padding: 4px;
  border-radius: 8px;
  border: 1px solid var(--v3-border);
}

.v3-sort-tabs a {
  padding: 6px 16px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--v3-text-secondary);
  transition: all 0.15s;
}

.v3-sort-tabs a.active {
  background: var(--v3-accent);
  color: #fff;
  font-weight: 500;
}

.v3-search-box {
  display: flex;
  gap: 0;
}

.v3-search-box input {
  padding: 8px 14px;
  border: 1px solid var(--v3-border);
  border-radius: 8px 0 0 8px;
  font-size: 13px;
  width: 220px;
  outline: none;
  background: var(--v3-card-bg);
}

.v3-search-box input:focus { border-color: #999; }

.v3-search-box button {
  padding: 8px 18px;
  background: var(--v3-accent);
  color: #fff;
  border: none;
  border-radius: 0 8px 8px 0;
  font-size: 13px;
  cursor: pointer;
}

/* 卡片网格 */
.v3-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.v3-card {
  background: var(--v3-card-bg);
  border: 1px solid var(--v3-border);
  border-radius: var(--v3-radius);
  padding: 20px;
  transition: all 0.2s;
}

.v3-card:hover {
  border-color: #ccc;
  box-shadow: var(--v3-shadow);
}

.v3-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
  gap: 8px;
}

.v3-card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--v3-text);
}

.v3-card-title a { color: inherit; }
.v3-card-title a:hover { color: var(--v3-text-secondary); }

.v3-badges { display: flex; gap: 6px; flex-wrap: wrap; flex-shrink: 0; }

.v3-badge {
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.v3-badge-free { background: #f0fdf4; color: #166534; }
.v3-badge-paid { background: #fffbeb; color: #92400e; }
.v3-badge-industry { background: #f0f9ff; color: #075985; }
.v3-badge-license { background: #f5f5f5; color: var(--v3-text-secondary); }
.v3-badge-private { background: #fdf2f8; color: #9d174d; }

.v3-card-desc {
  font-size: 13px;
  color: var(--v3-text-secondary);
  line-height: 1.6;
  margin-bottom: 14px;
  min-height: 40px;
}

.v3-card-ratings {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--v3-border-light);
  border-bottom: 1px solid var(--v3-border-light);
}

.v3-rating-item { display: flex; flex-direction: column; gap: 2px; }
.v3-rating-label { font-size: 11px; color: var(--v3-text-tertiary); }
.v3-rating-stars { font-size: 13px; color: #f59e0b; letter-spacing: 1px; }

.v3-card-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--v3-text-tertiary);
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.v3-card-foot { display: flex; gap: 8px; }

/* 按钮 */
.v3-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  border-radius: var(--v3-radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s;
  text-decoration: none;
  background: transparent;
  font-family: inherit;
}

.v3-btn-primary { background: var(--v3-accent); color: #fff; }
.v3-btn-primary:hover { background: #4096ff; }

.v3-btn-outline { border-color: var(--v3-border); color: var(--v3-text); background: var(--v3-card-bg); }
.v3-btn-outline:hover { border-color: #999; }

.v3-btn-ghost { color: var(--v3-text-secondary); }
.v3-btn-ghost:hover { background: var(--v3-hover); color: var(--v3-text); }

.v3-btn-sm { padding: 5px 12px; font-size: 12px; }
.v3-btn-lg { padding: 10px 24px; font-size: 15px; }
.v3-btn-success { background: #16a34a; color: #fff; }
.v3-btn-warning { background: #d97706; color: #fff; }
.v3-btn-danger { background: #dc2626; color: #fff; }
.v3-btn-disabled { background: #e5e5e5; color: var(--v3-text-tertiary); cursor: not-allowed; pointer-events: none; }

/* 需求列表项 */
.v3-demand-item {
  background: var(--v3-card-bg);
  border: 1px solid var(--v3-border);
  border-radius: var(--v3-radius);
  padding: 22px;
  margin-bottom: 14px;
  transition: all 0.2s;
}

.v3-demand-item:hover { border-color: #ccc; box-shadow: var(--v3-shadow); }

.v3-demand-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.v3-demand-tags { display: flex; gap: 8px; align-items: center; }
.v3-demand-industry { font-size: 12px; color: #075985; background: #f0f9ff; padding: 3px 8px; border-radius: 4px; }
.v3-demand-budget { font-weight: 700; color: #d97706; font-size: 15px; }

.v3-demand-title { font-size: 17px; font-weight: 600; margin-bottom: 8px; }
.v3-demand-title a { color: var(--v3-text); }
.v3-demand-title a:hover { color: var(--v3-text-secondary); }

.v3-demand-desc {
  font-size: 14px;
  color: var(--v3-text-secondary);
  line-height: 1.6;
  margin-bottom: 14px;
}

.v3-demand-foot {
  display: flex;
  gap: 16px;
  align-items: center;
  font-size: 13px;
  color: var(--v3-text-tertiary);
  flex-wrap: wrap;
}

.v3-status {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}
.v3-status-pending { background: #fffbeb; color: #92400e; }
.v3-status-approved { background: #f0fdf4; color: #166534; }
.v3-status-rejected { background: #fef2f2; color: #991b1b; }
.v3-status-in_progress { background: #f0f9ff; color: #1e40af; }
.v3-status-completed { background: #f5f3ff; color: #5b21b6; }

/* 详情页 */
.v3-detail-hero {
  background: var(--v3-card-bg);
  border-bottom: 1px solid var(--v3-border);
  padding: 32px 40px;
  margin-bottom: 28px;
}

.v3-detail-badges { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.v3-detail-title { font-size: 28px; font-weight: 700; margin-bottom: 12px; line-height: 1.3; }
.v3-detail-intro { font-size: 15px; color: var(--v3-text-secondary); line-height: 1.7; margin-bottom: 20px; }
.v3-detail-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.v3-detail-meta-row {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-bottom: 18px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--v3-text-secondary);
}

.v3-detail-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 28px;
  padding: 0 40px 60px;
  align-items: start;
}

.v3-detail-section {
  background: var(--v3-card-bg);
  border: 1px solid var(--v3-border);
  border-radius: var(--v3-radius);
  padding: 24px;
  margin-bottom: 20px;
}

.v3-detail-section h2 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--v3-border-light);
}

.v3-feature-list { padding-left: 20px; margin: 0; }
.v3-feature-list li { padding: 6px 0; font-size: 14px; line-height: 1.6; }

.v3-code-block {
  background: #1a1a1a;
  color: #e5e5e5;
  padding: 18px;
  border-radius: 8px;
  font-family: "SF Mono", Monaco, monospace;
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-x: auto;
}

.v3-error-block {
  background: #fef2f2;
  border-left: 4px solid #dc2626;
  padding: 16px 18px;
  border-radius: 0 8px 8px 0;
  font-size: 13px;
  line-height: 1.8;
  white-space: pre-wrap;
}

.v3-sidebar-card {
  background: var(--v3-card-bg);
  border: 1px solid var(--v3-border);
  border-radius: var(--v3-radius);
  padding: 20px;
  margin-bottom: 18px;
}

.v3-sidebar-card h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--v3-border-light);
}

.v3-eval-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  font-size: 13px;
}
.v3-eval-row span:first-child { color: var(--v3-text-secondary); }
.v3-eval-stars { color: #f59e0b; font-size: 13px; letter-spacing: 1px; }

.v3-sidebar-list { display: flex; flex-direction: column; gap: 6px; }
.v3-sidebar-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
  transition: background 0.15s;
}
.v3-sidebar-item:hover { background: var(--v3-hover); }

/* 表单 */
.v3-form-wrap { max-width: 760px; margin: 0 auto; padding: 0 40px 60px; }
.v3-form-card {
  background: var(--v3-card-bg);
  border: 1px solid var(--v3-border);
  border-radius: var(--v3-radius);
  padding: 30px;
}
.v3-form-group { margin-bottom: 18px; }
.v3-form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--v3-text);
}
.v3-form-group input, .v3-form-group select, .v3-form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--v3-border);
  border-radius: var(--v3-radius-sm);
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s;
  background: var(--v3-card-bg);
  color: var(--v3-text);
  font-family: inherit;
}
.v3-form-group input:focus, .v3-form-group select:focus, .v3-form-group textarea:focus {
  border-color: #999;
  box-shadow: 0 0 0 3px rgba(0,0,0,0.05);
}
.v3-form-group textarea { resize: vertical; min-height: 120px; }
.v3-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.v3-form-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--v3-border-light);
}

/* 空状态 */
.v3-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--v3-text-tertiary);
}
.v3-empty p { margin-bottom: 16px; font-size: 14px; }

/* 分页 */
.v3-pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 30px;
}
.v3-pagination a, .v3-pagination span {
  padding: 8px 14px;
  border: 1px solid var(--v3-border);
  border-radius: 6px;
  font-size: 13px;
  color: var(--v3-text-secondary);
  background: var(--v3-card-bg);
}
.v3-pagination a:hover { border-color: #999; color: var(--v3-text); }
.v3-pagination .active { background: var(--v3-accent); color: #fff; border-color: var(--v3-accent); }

/* 开发者主页 */
.v3-dev-hero {
  background: linear-gradient(135deg, #1677ff, #0958d9);
  color: #fff;
  padding: 40px;
  display: flex;
  gap: 30px;
  align-items: center;
}
.v3-dev-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  font-weight: 800;
  flex-shrink: 0;
  border: 3px solid rgba(255,255,255,0.2);
}
.v3-dev-info { flex: 1; }
.v3-dev-name-row { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.v3-dev-name-row h1 { margin: 0; font-size: 28px; }
.v3-dev-verified { background: #16a34a; color: #fff; font-size: 12px; padding: 3px 10px; border-radius: 6px; font-weight: 600; }
.v3-dev-title { font-size: 16px; opacity: 0.9; margin-bottom: 8px; }
.v3-dev-bio { font-size: 14px; opacity: 0.7; line-height: 1.6; margin-bottom: 18px; max-width: 600px; }
.v3-dev-stats { display: flex; gap: 30px; margin-bottom: 18px; }
.v3-dev-stat { text-align: center; }
.v3-dev-stat strong { display: block; font-size: 24px; font-weight: 800; }
.v3-dev-stat span { font-size: 12px; opacity: 0.7; }

/* Tab 导航 */
.v3-tab-nav {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--v3-border);
  margin-bottom: 24px;
}
.v3-tab-nav a {
  padding: 10px 22px;
  font-size: 14px;
  color: var(--v3-text-secondary);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.15s;
}
.v3-tab-nav a.active { color: var(--v3-text); border-bottom-color: var(--v3-accent); font-weight: 600; }

/* 响应式 */
@media (max-width: 1024px) {
  .v3-feed-grid { grid-template-columns: repeat(3, 1fr); }
  .v3-card-grid { grid-template-columns: repeat(2, 1fr); }
  .v3-detail-layout { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .v3-sidebar { transform: translateX(-100%); transition: transform 0.3s; }
  .v3-sidebar.open { transform: translateX(0); }
  .v3-main { margin-left: 0; }
  .v3-feed-grid { grid-template-columns: repeat(2, 1fr); }
  .v3-card-grid { grid-template-columns: 1fr; }
  .v3-form-row { grid-template-columns: 1fr; }
  .v3-hero-title { font-size: 24px; }
  .v3-dev-hero { flex-direction: column; text-align: center; }
  .v3-dev-stats { justify-content: center; }
}

/* ========== V3.1 顶部栏 ========== */
.v3-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 8px;
}
.v3-topbar-right { display: flex; align-items: center; gap: 12px; }
.v3-topbar-btn {
  padding: 6px 16px;
  border-radius: 6px;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.2s;
}
.v3-topbar-login { color: #333; border: 1px solid #ddd; }
.v3-topbar-login:hover { border-color: #999; }
.v3-topbar-register { background: #1677ff; color: #fff; }
.v3-topbar-register:hover { background: #4096ff; }
.v3-topbar-user { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.v3-topbar-username { color: #333; font-weight: 500; }
.v3-topbar-logout { color: #999; text-decoration: none; font-size: 13px; }
.v3-topbar-logout:hover { color: #666; }
.v3-topbar-vip-btn {
  background: linear-gradient(135deg, #f5d98a, #d4a853);
  color: #5a3e1b;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}
.v3-vip-tag {
  background: linear-gradient(135deg, #f5d98a, #d4a853);
  color: #5a3e1b;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
  margin-left: 6px;
}
.v3-vip-badge {
  display: inline-block;
  background: linear-gradient(135deg, #f5d98a, #d4a853);
  color: #5a3e1b;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
  margin-left: 4px;
}

/* ========== V3.1 弹框 ========== */
.v3-modal {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 9999;
  align-items: center;
  justify-content: center;
}
.v3-modal-mask {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
}
.v3-modal-box {
  position: relative;
  background: #fff;
  border-radius: 12px;
  padding: 32px;
  max-width: 440px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  animation: v3ModalIn 0.3s ease;
}
@keyframes v3ModalIn {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.v3-modal-close {
  position: absolute;
  top: 12px; right: 16px;
  font-size: 24px;
  color: #ccc;
  cursor: pointer;
  line-height: 1;
}
.v3-modal-close:hover { color: #666; }
.v3-modal-icon { font-size: 48px; margin-bottom: 12px; }
.v3-modal-title { font-size: 20px; font-weight: 600; color: #1a1a1a; margin: 0 0 8px; }
.v3-modal-desc { font-size: 14px; color: #666; line-height: 1.6; margin: 0 0 20px; }
.v3-modal-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 24px;
  text-align: left;
}
.v3-modal-feature {
  font-size: 13px;
  color: #444;
  display: flex;
  align-items: center;
  gap: 6px;
}
.v3-modal-check { color: #4caf50; font-weight: bold; }
.v3-modal-btns { display: flex; gap: 12px; }
.v3-modal-btn {
  flex: 1;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}
.v3-modal-btn-primary { background: #1677ff; color: #fff; }
.v3-modal-btn-primary:hover { background: #4096ff; }
.v3-modal-btn-outline { background: #fff; color: #1677ff; border: 1px solid #1677ff; }
.v3-modal-btn-outline:hover { border-color: #999; }

/* ========== V3.1 VIP 会员弹框 ========== */
.v3-modal-vip { max-width: 680px; }
.v3-vip-plans {
  display: flex;
  gap: 16px;
  margin: 24px 0;
}
.v3-vip-plan {
  flex: 1;
  border: 2px solid #eee;
  border-radius: 12px;
  padding: 24px 20px;
  text-align: center;
  position: relative;
  transition: all 0.2s;
}
.v3-vip-plan:hover { border-color: #d4a853; }
.v3-vip-plan-recommend {
  border-color: #d4a853;
  background: linear-gradient(180deg, #fffbf0 0%, #fff 100%);
}
.v3-vip-plan-badge {
  position: absolute;
  top: -10px; left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #f5d98a, #d4a853);
  color: #5a3e1b;
  padding: 2px 12px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}
.v3-vip-plan-name { font-size: 16px; font-weight: 600; color: #333; margin-bottom: 8px; }
.v3-vip-plan-price { font-size: 32px; font-weight: 700; color: #1a1a1a; margin-bottom: 4px; }
.v3-vip-currency { font-size: 16px; vertical-align: top; }
.v3-vip-unit { font-size: 14px; color: #999; font-weight: normal; }
.v3-vip-plan-save { font-size: 12px; color: #d4a853; margin-bottom: 12px; }
.v3-vip-plan-features {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  text-align: left;
}
.v3-vip-plan-features li {
  font-size: 13px;
  color: #555;
  padding: 4px 0;
}
.v3-vip-plan-btn {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: none;
  background: #1677ff;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.v3-vip-plan-btn:hover { background: #4096ff; }
.v3-vip-plan-recommend .v3-vip-plan-btn {
  background: linear-gradient(135deg, #f5d98a, #d4a853);
  color: #5a3e1b;
}
.v3-vip-note { font-size: 12px; color: #999; margin-top: 8px; }

/* ========== V3.1 Logo 优化 ========== */
.v3-logo { display: flex; align-items: center; gap: 8px; padding: 16px 20px; text-decoration: none; border-bottom: 1px solid #f5f5f5; }
.v3-logo-mark { font-size: 20px; color: #1a1a1a; }
.v3-logo-text { font-size: 18px; font-weight: 700; color: #1a1a1a; letter-spacing: -0.5px; }
.v3-logo-sub { font-size: 11px; color: #999; margin-left: 2px; }

/* ========== V3.1 Logo 图片样式 ========== */
.v3-logo { display: flex; align-items: center; gap: 10px; padding: 16px 16px; text-decoration: none; border-bottom: 1px solid #f0f0f0; }
.v3-logo-img { width: 36px; height: 36px; flex-shrink: 0; }
.v3-logo-text-wrap { display: flex; flex-direction: column; line-height: 1.2; }
.v3-logo-text { font-size: 17px; font-weight: 700; color: #1677ff; letter-spacing: -0.3px; }
.v3-logo-sub { font-size: 10px; color: #999; margin-top: 1px; }

/* ========== V3.1.2 图片 Logo 样式 ========== */
.v3-logo { display: flex; align-items: center; justify-content: center; padding: 14px 12px; text-decoration: none; border-bottom: 1px solid #f0f0f0; }
.v3-logo-img { width: 100%; max-width: 180px; height: auto; display: block; }

/* 登录按钮蓝色 outline 风格 */
.v3-topbar-login { color: #1677ff; border: 1px solid #1677ff; }
.v3-topbar-login:hover { border-color: #4096ff; color: #4096ff; background: #e6f4ff; }

/* ========== V3.1.3 简约技能图标 ========== */
.v3-skill-icon {
  margin: 0 auto 12px;
  font-size: 28px;
  margin-bottom: 12px;
  color: #555;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
}
.v3-skill-icon svg {
  width: 28px;
  height: 28px;
}
.v3-skill-card:hover .v3-skill-icon {
  margin: 0 auto 12px;
  color: #1677ff;
}

/* ========== V3.1.4 活动公告条 ========== */
.v3-announcement-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 32px;
  background: linear-gradient(90deg, #1677ff 0%, #0958d9 50%, #1677ff 100%);
  background-size: 200% 100%;
  animation: v3AnnouncementSlide 8s ease-in-out infinite;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s;
  user-select: none;
}
@keyframes v3AnnouncementSlide {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.v3-announcement-bar:hover {
  filter: brightness(1.1);
}
.v3-announcement-icon {
  font-size: 16px;
  animation: v3AnnouncementPulse 1.5s ease-in-out infinite;
}
@keyframes v3AnnouncementPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}
.v3-announcement-text {
  font-weight: 500;
  letter-spacing: 0.3px;
}
.v3-announcement-action {
  font-size: 13px;
  background: rgba(255,255,255,0.2);
  padding: 3px 12px;
  border-radius: 12px;
  font-weight: 500;
  transition: all 0.2s;
}
.v3-announcement-bar:hover .v3-announcement-action {
  background: rgba(255,255,255,0.3);
}

/* ========== V3.1.5 列表页/详情页内容容器 ========== */
.v3-page-content {
  padding: 24px 32px 60px;
  max-width: 1200px;
}

/* ========== V3.1.6 上传文件按钮 ========== */
.v3-chat-upload-btn {
  width: auto !important;
  padding: 0 12px !important;
  font-size: 13px !important;
  color: #666 !important;
  gap: 4px;
  white-space: nowrap;
}
.v3-chat-upload-btn:hover {
  background: #f0f7ff !important;
  color: #1677ff !important;
}

/* ========== V3.1.7 文件上传预览 ========== */
.v3-chat-files {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  padding: 8px;
  background: #f8f9fa;
  border-radius: 8px;
}
.v3-chat-file-item {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 12px;
  max-width: 200px;
  position: relative;
}
.v3-chat-file-thumb {
  width: 32px;
  height: 32px;
  object-fit: cover;
  border-radius: 4px;
}
.v3-chat-file-icon {
  font-size: 18px;
}
.v3-chat-file-name {
  color: #333;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100px;
}
.v3-chat-file-size {
  color: #999;
  font-size: 11px;
  white-space: nowrap;
}
.v3-chat-file-remove {
  background: none;
  border: none;
  color: #999;
  font-size: 16px;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
}
.v3-chat-file-remove:hover { color: #ff4d4f; }
.v3-chat-file-uploading {
  color: #1677ff;
  font-size: 11px;
  white-space: nowrap;
}

/* ========== 消息中的附件 ========== */
.v3-msg-files {
  margin-bottom: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.v3-msg-file-img {
  max-width: 200px;
  max-height: 200px;
  border-radius: 8px;
  object-fit: cover;
  cursor: pointer;
}
.v3-msg-file-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.1);
  padding: 6px 12px;
  border-radius: 6px;
  color: #fff;
  text-decoration: none;
  font-size: 13px;
}
.v3-msg-file-link:hover { background: rgba(255,255,255,0.2); }

/* ========== V3.1.8 自定义技能下拉框 ========== */
.v3-skill-select-wrap {
  position: relative;
  display: inline-block;
}
.v3-skill-select {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
  color: #333;
  min-width: 140px;
  transition: all 0.2s;
}
.v3-skill-select:hover {
  border-color: #1677ff;
}
.v3-skill-select-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: #555;
}
.v3-skill-select-icon svg {
  width: 18px;
  height: 18px;
}
.v3-skill-select-text {
  flex: 1;
  white-space: nowrap;
}
.v3-skill-select-arrow {
  color: #999;
  font-size: 10px;
}
.v3-skill-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  z-index: 1000;
  min-width: 200px;
  overflow: hidden;
}
.v3-skill-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 13px;
  color: #333;
  transition: background 0.15s;
}
.v3-skill-option:hover {
  background: #f0f7ff;
  color: #1677ff;
}
.v3-skill-option-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  color: #555;
  flex-shrink: 0;
}
.v3-skill-option-icon svg {
  width: 20px;
  height: 20px;
}
.v3-skill-option:hover .v3-skill-option-icon {
  color: #1677ff;
}
.v3-skill-option-text {
  white-space: nowrap;
}

/* ========== 技能卡片标题居中 ========== */
.v3-skill-title {
  text-align: center;
  font-weight: 600;
}
.v3-skill-desc {
  text-align: center;
}

/* ========== V3.2.1 内容推荐区图片样式 ========== */
.v3-feed-card-thumb {
  overflow: hidden;
  border-radius: 10px;
  background: #f5f7fa;
  display: flex;
  align-items: center;
  justify-content: center;
}
.v3-feed-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}
.v3-feed-card:hover .v3-feed-card-img {
  transform: scale(1.05);
}
/* 统一大小 - 整洁美观 */
.v3-feed-card-thumb {
  height: 100px !important;
  width: 100%;
}
.v3-feed-card-img {
  height: 100px !important;
  width: 100%;
  object-fit: cover;
}

/* 文章内部图片 */
.news-article-image {
  margin: 16px 0 !important;
  text-align: center;
}
.news-article-image img {
  max-width: 500px;
  max-height: 280px;
  width: auto;
  height: auto;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  display: inline-block;
}

/* ========== V3.2.2 资讯列表页左侧图片 ========== */
.news-item-card {
  display: flex !important;
  flex-direction: row !important;
  align-items: stretch !important;
  gap: 14px;
  padding: 14px !important;
  text-decoration: none;
  transition: all 0.2s ease;
}
.news-item-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}
.news-item-img {
  flex-shrink: 0;
  width: 120px;
  height: 90px;
  border-radius: 8px;
  overflow: hidden;
  background: #f5f7fa;
}
.news-list-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}
.news-item-card:hover .news-list-img {
  transform: scale(1.05);
}
.news-item-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
}
.news-item-body .item-title {
  font-size: 15px;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.4;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-item-body .item-desc {
  font-size: 13px;
  color: #666;
  line-height: 1.5;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-item-body .item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

/* 响应式：小屏幕图片更小 */
@media (max-width: 768px) {
  .news-item-img {
    width: 90px;
    height: 70px;
  }
  .news-item-body .item-title {
    font-size: 14px;
  }
}

/* ========== V3.2.3 手机版顶部Logo + 菜单按钮 ========== */
/* 菜单按钮（汉堡图标）- 仅手机版显示 */
.v3-mobile-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  transition: background 0.2s;
}
.v3-mobile-menu-btn:hover {
  background: #f5f5f5;
}
.v3-mobile-menu-btn span {
  display: block;
  width: 20px;
  height: 2px;
  background: #333;
  border-radius: 1px;
  transition: all 0.3s;
}

/* 手机版顶部Logo - 仅手机版显示 */
.v3-mobile-logo {
  display: none;
  align-items: center;
  text-decoration: none;
  margin-left: 8px;
}
.v3-mobile-logo img {
  height: 28px;
  width: auto;
  display: block;
}

/* 遮罩层 */
.v3-sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s;
}
.v3-sidebar-overlay.show {
  display: block;
  opacity: 1;
}

/* 手机版响应式 */
@media (max-width: 768px) {
  .v3-mobile-menu-btn {
    display: flex;
  }
  .v3-mobile-logo {
    display: flex;
  }
  .v3-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1000;
    box-shadow: 2px 0 12px rgba(0,0,0,0.15);
  }
  .v3-topbar {
    padding: 10px 14px;
  }
  .v3-topbar-left {
    display: flex;
    align-items: center;
    gap: 4px;
  }
  /* 手机版顶部登录注册按钮调整 */
  .v3-topbar-btn {
    padding: 6px 12px;
    font-size: 13px;
  }
  .v3-topbar-username {
    display: none;
  }
}

/* 超小屏幕 */
@media (max-width: 480px) {
  .v3-mobile-logo img {
    height: 24px;
  }
  .v3-topbar {
    padding: 8px 10px;
  }
  .v3-announcement-bar {
    padding: 6px 10px;
    font-size: 12px;
  }
  .v3-announcement-text {
    font-size: 12px;
  }
}

/* ========== V3.2.4 手机版Logo尺寸优化 ========== */
/* 覆盖之前的设置，更小巧精致 */

/* 菜单按钮 - 缩小 */
@media (max-width: 768px) {
  .v3-mobile-menu-btn {
    width: 32px;
    height: 32px;
    padding: 5px;
    gap: 3px;
    flex-shrink: 0;
  }
  .v3-mobile-menu-btn span {
    width: 18px;
    height: 1.5px;
  }
  
  /* Logo - 更小巧 */
  .v3-mobile-logo {
    margin-left: 6px;
    flex-shrink: 0;
  }
  .v3-mobile-logo img {
    height: 20px !important;
    width: auto;
    max-width: 52px;
  }
  
  /* 顶部栏 - 更紧凑 */
  .v3-topbar {
    padding: 8px 12px !important;
    min-height: 44px;
  }
  .v3-topbar-left {
    gap: 2px;
    flex: 1;
    min-width: 0;
  }
  
  /* 右侧按钮 - 紧凑 */
  .v3-topbar-right {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .v3-topbar-btn {
    padding: 5px 10px !important;
    font-size: 12px !important;
  }
  .v3-topbar-vip-btn {
    font-size: 12px !important;
    padding: 4px 8px !important;
  }
}

/* 小屏幕手机 (≤480px) - 进一步缩小 */
@media (max-width: 480px) {
  .v3-mobile-menu-btn {
    width: 30px;
    height: 30px;
    padding: 4px;
  }
  .v3-mobile-menu-btn span {
    width: 16px;
  }
  .v3-mobile-logo img {
    height: 18px !important;
    max-width: 46px;
  }
  .v3-mobile-logo {
    margin-left: 4px;
  }
  .v3-topbar {
    padding: 6px 10px !important;
    min-height: 40px;
  }
  .v3-topbar-btn {
    padding: 4px 8px !important;
    font-size: 11px !important;
  }
  /* 超小屏隐藏用户名，只显示VIP和退出 */
  .v3-topbar-username {
    display: none !important;
  }
}

/* 超小屏幕 (≤360px) - 极致紧凑 */
@media (max-width: 360px) {
  .v3-mobile-logo img {
    height: 16px !important;
    max-width: 40px;
  }
  .v3-mobile-menu-btn {
    width: 28px;
    height: 28px;
  }
  .v3-topbar-btn {
    padding: 3px 6px !important;
    font-size: 10px !important;
  }
  .v3-announcement-bar {
    padding: 4px 8px !important;
  }
  .v3-announcement-text {
    font-size: 11px !important;
  }
}

/* ========== V3.2.5 手机版对话框底部工具栏适配 ========== */
@media (max-width: 768px) {
  /* 对话框容器 - 减小padding */
  .v3-chat-box-wrap {
    padding: 0 12px;
    margin-top: 16px;
  }
  .v3-chat-box {
    padding: 14px;
    border-radius: 16px;
  }
  
  /* 输入框 - 减小字号 */
  .v3-chat-input {
    font-size: 14px;
    min-height: 40px;
  }
  
  /* 工具栏 - 紧凑布局 */
  .v3-chat-toolbar {
    margin-top: 8px;
    padding-top: 8px;
    gap: 4px;
  }
  .v3-chat-tools-left {
    gap: 4px;
    flex: 1;
    min-width: 0;
  }
  .v3-chat-tools-right {
    gap: 4px;
    flex-shrink: 0;
  }
  
  /* 上传按钮 - 隐藏文字，只显示图标 */
  .v3-chat-upload-btn {
    width: 32px !important;
    height: 32px !important;
    padding: 0 !important;
    font-size: 16px !important;
    overflow: hidden;
    white-space: nowrap;
  }
  /* 隐藏原文字，只显示图标 */
  .v3-chat-upload-btn {
    font-size: 0 !important;
    line-height: 1;
  }
  .v3-chat-upload-btn::before {
    content: "📎";
    font-size: 16px;
  }
  
  /* 技能下拉框 - 缩小 */
  .v3-skill-select-wrap {
    flex-shrink: 1;
    min-width: 0;
  }
  .v3-skill-select {
    padding: 6px 8px !important;
    font-size: 12px !important;
    gap: 4px !important;
  }
  .v3-skill-select-text {
    font-size: 12px !important;
    max-width: 40px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .v3-skill-select-icon svg {
    width: 14px !important;
    height: 14px !important;
  }
  .v3-skill-select-arrow {
    font-size: 10px !important;
  }
  
  /* 麦克风按钮 - 缩小 */
  .v3-chat-tools-right .v3-chat-tool-btn {
    width: 30px !important;
    height: 30px !important;
    font-size: 14px !important;
  }
  
  /* 发送按钮 - 缩小 */
  .v3-chat-send-btn {
    width: 32px !important;
    height: 32px !important;
    font-size: 14px !important;
  }
}

/* 小屏幕手机 (≤480px) - 更紧凑 */
@media (max-width: 480px) {
  .v3-chat-box {
    padding: 12px;
  }
  .v3-chat-box-wrap {
    padding: 0 8px;
  }
  .v3-chat-toolbar {
    margin-top: 6px;
    padding-top: 6px;
  }
  /* 技能下拉框只显示图标+文字 */
  .v3-skill-select-text {
    display: none;
  }
  .v3-skill-select {
    padding: 6px !important;
  }
  /* 发送按钮 */
  .v3-chat-send-btn {
    width: 30px !important;
    height: 30px !important;
  }
}

/* ========== V3.2.6 语音输入按钮样式 ========== */
#voiceBtn {
  transition: all 0.2s ease;
  position: relative;
}
#voiceBtn:hover {
  background: #f0f7ff !important;
  color: #1677ff !important;
}

/* 录音中状态 - 红色背景 + 脉冲动画 */
#voiceBtn.recording {
  background: #ff4d4f !important;
  color: #fff !important;
  animation: voicePulse 1.2s ease-in-out infinite;
}
#voiceBtn.recording:hover {
  background: #ff7875 !important;
}

/* 脉冲动画 */
@keyframes voicePulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 77, 79, 0.5);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(255, 77, 79, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 77, 79, 0);
  }
}

/* 录音中麦克风图标抖动 */
#voiceBtn.recording::before {
  animation: micShake 0.5s ease-in-out infinite;
  display: inline-block;
}
@keyframes micShake {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-8deg); }
  75% { transform: rotate(8deg); }
}

/* 不支持语音识别时的样式 */
#voiceBtn[style*="opacity: 0.5"] {
  cursor: not-allowed;
}

/* ========== V3.2.7 手机版技能卡片横向滑动 ========== */
@media (max-width: 768px) {
  /* 外层容器 - 添加右侧渐变遮罩提示可滑动 */
  .v3-skills-wrap {
    padding: 0 12px;
    margin-top: 16px;
    position: relative;
  }
  .v3-skills-wrap::after {
    content: '';
    position: absolute;
    top: 0;
    right: 12px;
    bottom: 8px;
    width: 30px;
    background: linear-gradient(to right, transparent, var(--v3-bg, #f5f7fa));
    pointer-events: none;
    z-index: 1;
    border-radius: 0 8px 8px 0;
  }
  
  /* 滚动容器 - 隐藏滚动条但保留滚动功能 */
  .v3-skills-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    gap: 10px;
    padding-bottom: 4px;
    padding-right: 20px;
  }
  .v3-skills-scroll::-webkit-scrollbar {
    display: none;
  }
  
  /* 技能卡片 - 固定宽度，不被挤压 */
  .v3-skill-card {
    flex: 0 0 160px !important;
    min-width: 160px !important;
    width: 160px !important;
    padding: 14px 12px !important;
    text-align: center !important;
  }
  
  /* 卡片内图标居中 */
  .v3-skill-icon {
    margin: 0 auto 10px !important;
    font-size: 26px !important;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .v3-skill-icon svg {
    width: 26px;
    height: 26px;
  }
  
  /* 标题居中 */
  .v3-skill-title {
    font-size: 13px !important;
    text-align: center !important;
    margin-bottom: 6px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  /* 描述居中，允许换行 */
  .v3-skill-desc {
    font-size: 11px !important;
    text-align: center !important;
    line-height: 1.5 !important;
    color: #999 !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  
  /* 点击反馈 */
  .v3-skill-card:active {
    transform: scale(0.97);
    background: #f9f9f9;
  }
}

/* 小屏幕手机 (≤480px) - 卡片稍小 */
@media (max-width: 480px) {
  .v3-skill-card {
    flex: 0 0 145px !important;
    min-width: 145px !important;
    width: 145px !important;
    padding: 12px 10px !important;
  }
  .v3-skill-icon {
    font-size: 24px !important;
  }
  .v3-skill-icon svg {
    width: 24px;
    height: 24px;
  }
  .v3-skill-title {
    font-size: 12px !important;
  }
  .v3-skill-desc {
    font-size: 10px !important;
  }
}

/* ========== V3.2.8 手机版顶部Logo居中 + 登录注册移到侧边栏 ========== */
@media (max-width: 768px) {
  /* 顶部栏 - 相对定位，菜单按钮绝对定位左侧 */
  .v3-topbar {
    position: relative;
    justify-content: center;
    padding: 10px 12px !important;
    min-height: 52px;
  }
  
  /* 左侧容器 - 居中 */
  .v3-topbar-left {
    position: static;
    justify-content: center;
    flex: 1;
  }
  
  /* 菜单按钮 - 绝对定位左侧 */
  .v3-mobile-menu-btn {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
  }
  
  /* 手机版Logo - 居中放大 */
  .v3-mobile-logo {
    margin-left: 0 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
  }
  .v3-mobile-logo img {
    height: 36px !important;
    max-width: 140px !important;
    width: auto;
  }
  
  /* 右侧容器 - 未登录时隐藏登录注册 */
  .v3-topbar-right {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
  }
  /* 未登录时隐藏顶部登录注册按钮（已移到侧边栏） */
  .v3-topbar-right .v3-topbar-login,
  .v3-topbar-right .v3-topbar-register {
    display: none !important;
  }
  /* 已登录时保留VIP按钮 */
  .v3-topbar-vip-btn {
    display: inline-block !important;
    padding: 4px 10px !important;
    font-size: 11px !important;
  }
  /* 已登录时隐藏用户名（侧边栏有用户信息） */
  .v3-topbar-username {
    display: none !important;
  }
  .v3-topbar-logout {
    display: none !important;
  }
}

/* 小屏幕手机 (≤480px) */
@media (max-width: 480px) {
  .v3-mobile-logo img {
    height: 32px !important;
    max-width: 120px !important;
  }
  .v3-topbar {
    min-height: 48px;
    padding: 8px 10px !important;
  }
  .v3-mobile-menu-btn {
    left: 10px;
  }
  .v3-topbar-right {
    right: 10px;
  }
}

/* ========== 侧边栏底部登录注册按钮样式 ========== */
.v3-sidebar-auth-footer {
  margin-top: auto;
  padding: 16px 20px;
  border-top: 1px solid #f0f0f0;
  display: flex;
  gap: 10px;
}

.v3-sidebar-login-btn,
.v3-sidebar-register-btn {
  flex: 1;
  text-align: center;
  padding: 10px 0;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
}

.v3-sidebar-login-btn {
  background: #fff;
  border: 1px solid #1677ff;
  color: #1677ff;
}
.v3-sidebar-login-btn:hover {
  background: #e6f4ff;
}

.v3-sidebar-register-btn {
  background: #1677ff;
  border: 1px solid #1677ff;
  color: #fff;
}
.v3-sidebar-register-btn:hover {
  background: #4096ff;
}

/* 确保侧边栏是flex布局，底部按钮能贴底 */
.v3-sidebar {
  display: flex;
  flex-direction: column;
}
.v3-nav {
  flex-shrink: 0;
}
.v3-nav-divider {
  flex-shrink: 0;
}
.v3-nav-personal {
  flex-shrink: 0;
}
.v3-user-footer {
  margin-top: auto;
  flex-shrink: 0;
}

/* ========== V3.2.9 手机版内容推荐区只显示4个 + 更多按钮在下方 ========== */
@media (max-width: 768px) {
  /* 只显示前4个卡片 */
  .v3-feed-grid .v3-feed-card:nth-child(n+5) {
    display: none !important;
  }
  
  /* 内容推荐区padding调整 */
  .v3-feed-wrap {
    padding: 0 12px 40px !important;
    margin-top: 24px !important;
  }
  
  /* 标签栏调整 */
  .v3-feed-tabs {
    margin-bottom: 14px !important;
  }
  .v3-feed-tab-list {
    gap: 16px !important;
  }
  .v3-feed-tab {
    font-size: 14px !important;
  }
  
  /* 卡片网格 - 2列 */
  .v3-feed-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
  
  /* 卡片内边距调整 */
  .v3-feed-card {
    padding: 0 !important;
  }
  .v3-feed-card-body {
    padding: 8px 10px 10px !important;
  }
  .v3-feed-card-title {
    font-size: 13px !important;
    line-height: 1.4 !important;
    margin-bottom: 4px !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .v3-feed-card-meta {
    font-size: 11px !important;
    gap: 6px !important;
  }
  
  /* 更多按钮 - 在卡片下方居中 */
  .v3-feed-more-wrap {
    display: flex;
    justify-content: center;
    margin-top: 16px;
  }
  .v3-feed-more-btn {
    display: inline-block;
    padding: 10px 32px;
    background: #fff;
    border: 1px solid #1677ff;
    color: #1677ff;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
  }
  .v3-feed-more-btn:hover {
    background: #1677ff;
    color: #fff;
  }
  .v3-feed-more-btn:active {
    transform: scale(0.97);
  }
}

/* PC版隐藏更多按钮（PC版显示全部卡片，不需要更多按钮） */
@media (min-width: 769px) {
  .v3-feed-more-wrap {
    display: none;
  }
}

/* 小屏幕手机 (≤480px) */
@media (max-width: 480px) {
  .v3-feed-grid {
    gap: 8px !important;
  }
  .v3-feed-card-title {
    font-size: 12px !important;
  }
  .v3-feed-card-meta {
    font-size: 10px !important;
  }
  .v3-feed-more-btn {
    padding: 8px 28px;
    font-size: 13px;
  }
}

/* ========== V3.3 Agent详情页评论区 ========== */
.agent-comment-section {
  margin-top: 24px;
}

/* 评论输入框 */
.comment-input-wrap {
  margin-bottom: 20px;
}
.comment-input-box {
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  padding: 12px;
  background: #fafafa;
  transition: all 0.2s;
  cursor: text;
}
.comment-input-box:hover,
.comment-input-box:focus-within {
  border-color: #1677ff;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.1);
}
.comment-input-box textarea {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  font-size: 14px;
  line-height: 1.6;
  color: #333;
  resize: vertical;
  min-height: 60px;
  font-family: inherit;
}
.comment-input-box textarea::placeholder {
  color: #bbb;
}
.comment-input-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #f0f0f0;
}
.comment-hint {
  font-size: 12px;
  color: #999;
}
.btn-sm {
  padding: 6px 16px !important;
  font-size: 13px !important;
  border-radius: 6px !important;
}
.btn-sm:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 评论列表 */
.comment-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.comment-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: #fafafa;
  border-radius: 10px;
  transition: background 0.2s;
}
.comment-item:hover {
  background: #f5f7fa;
}
.comment-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1677ff, #4096ff);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
}
.comment-body {
  flex: 1;
  min-width: 0;
}
.comment-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.comment-username {
  font-size: 13px;
  font-weight: 600;
  color: #333;
}
.comment-time {
  font-size: 12px;
  color: #999;
}
.comment-content {
  font-size: 14px;
  line-height: 1.7;
  color: #555;
  word-break: break-word;
}

/* 空评论状态 */
.comment-empty {
  text-align: center;
  padding: 40px 20px;
  color: #999;
}
.comment-empty p {
  margin-top: 10px;
  font-size: 14px;
}

/* 手机版评论区适配 */
@media (max-width: 768px) {
  .agent-comment-section {
    margin-top: 16px;
  }
  .comment-input-box {
    padding: 10px;
  }
  .comment-input-box textarea {
    font-size: 13px;
    min-height: 50px;
  }
  .comment-item {
    padding: 10px;
    gap: 10px;
  }
  .comment-avatar {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }
  .comment-content {
    font-size: 13px;
  }
  .comment-empty {
    padding: 30px 15px;
  }
}

/* ========== V3.4 文章详情页右边栏 ========== */
.news-detail-layout {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  max-width: 1200px;
  margin: 0 auto;
}

.news-detail-main {
  flex: 1;
  min-width: 0;
}

.news-detail-sidebar {
  width: 300px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 20px;
}

/* 侧边栏卡片 */
.news-detail-sidebar .sidebar-card {
  background: #fff;
  border: 1px solid #f0f0f0;
  border-radius: 12px;
  padding: 16px;
  transition: box-shadow 0.2s;
}
.news-detail-sidebar .sidebar-card:hover {
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.sidebar-card-title {
  font-size: 15px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 12px 0;
  padding-bottom: 10px;
  border-bottom: 1px solid #f5f5f5;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sidebar-icon {
  font-size: 16px;
}

/* 侧边栏列表 */
.news-detail-sidebar .sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.news-detail-sidebar .sidebar-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.15s;
}
.news-detail-sidebar .sidebar-item:hover {
  background: #f9f9f9;
}
.sidebar-item-title {
  font-size: 13px;
  color: #333;
  line-height: 1.5;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.news-detail-sidebar .sidebar-item:hover .sidebar-item-title {
  color: #1677ff;
}
.sidebar-item-meta {
  font-size: 11px;
  color: #999;
  flex-shrink: 0;
  white-space: nowrap;
}

/* 响应式：平板和手机隐藏右边栏 */
@media (max-width: 1024px) {
  .news-detail-sidebar {
    display: none;
  }
  .news-detail-layout {
    gap: 0;
  }
}

@media (max-width: 768px) {
  .news-detail-layout {
    flex-direction: column;
    max-width: 100%;
    padding: 0 12px;
  }
  .news-detail-main {
    width: 100%;
    min-width: 0;
    overflow: hidden;
  }
  /* 详情卡片手机端适配 */
  .detail-card {
    padding: 16px !important;
    margin: 0 0 16px 0 !important;
    border-radius: 10px !important;
    overflow: hidden;
    word-break: break-word;
    overflow-wrap: break-word;
  }
  /* 长标题自动换行 */
  .detail-title {
    font-size: 18px !important;
    line-height: 1.4 !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
  }
  /* 面包屑导航自动换行 */
  .breadcrumb {
    font-size: 12px !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    line-height: 1.5 !important;
  }
  .breadcrumb span {
    word-break: break-word !important;
    overflow-wrap: break-word !important;
  }
  /* 元信息自动换行 */
  .detail-meta {
    font-size: 12px !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
  }
  /* 正文内容自动换行 */
  .detail-field .f-value {
    font-size: 14px !important;
    line-height: 1.7 !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    white-space: pre-wrap !important;
  }
  /* 正文内的标题也换行 */
  .detail-field .f-value h1,
  .detail-field .f-value h2,
  .detail-field .f-value h3,
  .detail-field .f-value h4,
  .detail-field .f-value p {
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
  }
  /* 正文内图片自适应 */
  .detail-field .f-value img,
  .news-article-image img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 8px !important;
  }
  /* 相关资讯列表 */
  .rank-list li {
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    padding: 10px 0 !important;
  }
  .rank-list li a {
    font-size: 14px !important;
    line-height: 1.5 !important;
  }
}

/* ================================================================
   V4: 浏览器兼容性补丁 - Browser Compatibility Patch
   兼容：Chrome / Firefox / Safari / Edge / 豆包浏览器 / 360 / QQ浏览器
   ================================================================ */

/* --- 1. CSS变量降级（旧浏览器不支持var()时使用默认值）--- */
.v3-sidebar { background-color: #ffffff; }
.v3-topbar { background-color: #ffffff; }
.v3-page-content { background-color: #f5f7fa; }

/* --- 2. Flexbox gap 降级（Safari < 14.1 不支持flex gap）--- */
/* 使用负margin + 子元素margin模拟gap */
@supports not (gap: 10px) {
  .v3-badges, .v3-detail-actions, .v3-detail-badges,
  .v3-card-foot, .v3-demand-tags, .v3-rating-item,
  .skill-cards, .v3-actions, .chat-toolbar,
  .detail-actions, .comment-input-actions, .kpi-grid,
  .chart-row, .sidebar-list, .user-nav {
    gap: 0 !important;
  }
  .v3-badges > * + * { margin-left: 6px; }
  .v3-detail-actions > * + * { margin-left: 10px; }
  .v3-detail-badges > * + * { margin-left: 8px; }
  .v3-card-foot > * + * { margin-left: 8px; }
  .v3-demand-tags > * + * { margin-left: 8px; }
  .skill-cards > * + * { margin-left: 16px; }
  .chat-toolbar > * + * { margin-left: 8px; }
  .detail-actions > * + * { margin-left: 10px; }
  .kpi-grid > * + * { margin-left: 16px; }
  .sidebar-list > * + * { margin-top: 10px; }
  .user-nav > * + * { margin-top: 2px; }
}

/* --- 3. Grid 降级（旧浏览器不支持grid时使用flex）--- */
@supports not (display: grid) {
  .kpi-grid, .chart-row, .news-detail-layout, .user-center-layout,
  .detail-layout, .stats-page {
    display: flex !important;
    flex-wrap: wrap;
  }
  .kpi-grid > * { flex: 1 1 200px; margin: 8px; }
  .chart-row > * { flex: 1 1 300px; margin: 8px; }
}

/* --- 4. 滚动条样式兼容 --- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #c1c1c1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #a8a8a8; }
/* Firefox */
* { scrollbar-width: thin; scrollbar-color: #c1c1c1 #f1f1f1; }

/* --- 5. 文本渲染优化 --- */
.v3-logo-img, .detail-title, h1, h2, h3 {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* --- 6. 图片加载优化 --- */
img {
  -webkit-user-drag: none;
  user-select: none;
  max-width: 100%;
  height: auto;
}

/* --- 7. 按钮点击效果兼容 --- */
.btn, .v3-topbar-vip-btn, .agent-github-btn {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  touch-action: manipulation;
  cursor: pointer;
}
.btn:active, .agent-github-btn:active {
  -webkit-transform: scale(0.98);
  transform: scale(0.98);
}

/* --- 8. 输入框样式兼容 --- */
input, textarea, select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  font-family: inherit;
}
input[type="checkbox"], input[type="radio"] {
  -webkit-appearance: checkbox;
  -moz-appearance: checkbox;
  appearance: checkbox;
}

/* --- 9. 动画兼容前缀 --- */
@keyframes v3-fade-in {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
@-webkit-keyframes v3-fade-in {
  from { opacity: 0; -webkit-transform: translateY(-10px); }
  to { opacity: 1; -webkit-transform: translateY(0); }
}
.v3-modal-box {
  -webkit-animation: v3-fade-in 0.2s ease-out;
  animation: v3-fade-in 0.2s ease-out;
}

/* --- 10. 豆包浏览器/内置WebKit特殊适配 --- */
/* 豆包浏览器通常基于较新的Chromium，但内置WebView可能有特殊限制 */
@media all and (-webkit-min-device-pixel-ratio: 0) {
  /* 确保所有使用backdrop-filter的地方有降级 */
  .v3-topbar {
    background-color: rgba(255, 255, 255, 0.95);
  }
}

/* --- 11. 高DPI屏幕适配 --- */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .v3-logo-img { image-rendering: -webkit-optimize-contrast; }
}

/* --- 12. 安全区域适配（刘海屏）--- */
@supports (padding: max(0px)) {
  .v3-topbar {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }
}

/* --- 13. 减少动画（用户偏好）--- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    -webkit-animation-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    -webkit-transition-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* --- 14. 打印样式 --- */
@media print {
  .v3-sidebar, .v3-topbar, .v3-modal, .chat-container { display: none !important; }
  .v3-page-content { margin-left: 0 !important; padding: 20px !important; }
}

/* ================================================================
   V4: WebView / 豆包浏览器 / 内置浏览器特殊适配
   ================================================================ */

/* 豆包浏览器/WebView特殊样式 */
.browser-doubao .v3-topbar,
.browser-webview .v3-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
}

/* WebView中固定定位可能有问题，使用sticky降级 */
.browser-webview .v3-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* 豆包浏览器中确保内容区域不被遮挡 */
.browser-doubao .v3-page-content {
  min-height: 100vh;
  padding-bottom: 40px;
}

/* WebView中input获得焦点时防止缩放 */
.browser-webview input,
.browser-webview textarea {
  font-size: 16px !important;
}

/* 豆包浏览器中对话框高度适配 */
.browser-doubao .chat-container,
.browser-webview .chat-container {
  height: calc(100vh - 200px);
  min-height: 400px;
}

/* 确保所有transition有-webkit前缀 */
.btn, .v3-sidebar, .v3-topbar, .agent-github-btn,
.v3-modal-box, .v3-card, .skill-card {
  -webkit-transition: all 0.2s ease;
  transition: all 0.2s ease;
}

/* 确保transform有前缀 */
.v3-modal-box, .btn:active {
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

/* 确保box-shadow有前缀 */
.v3-card:hover, .kpi-card:hover, .chart-card:hover {
  -webkit-box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* 确保border-radius在旧浏览器正常 */
.v3-card, .btn, .kpi-card, .chart-card, .v3-modal-box {
  -webkit-border-radius: 12px;
  -moz-border-radius: 12px;
  border-radius: 12px;
}

/* 确保linear-gradient有前缀 */
.v3-vip-badge, .user-avatar-lg, .comment-avatar {
  background: -webkit-linear-gradient(135deg, #1677ff, #4096ff);
  background: linear-gradient(135deg, #1677ff, #4096ff);
}

/* 确保flexbox在旧浏览器正常 */
.v3-topbar, .v3-badges, .detail-actions, .chat-toolbar,
.kpi-grid, .chart-row, .user-center-layout {
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
}

/* 确保flex-wrap有前缀 */
.v3-badges, .detail-actions, .skill-cards {
  -webkit-flex-wrap: wrap;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
}

/* 确保align-items有前缀 */
.v3-topbar, .v3-badges, .detail-actions {
  -webkit-box-align: center;
  -webkit-align-items: center;
  -ms-flex-align: center;
  align-items: center;
}

/* 确保justify-content有前缀 */
.v3-topbar, .comment-input-actions {
  -webkit-box-pack: justify;
  -webkit-justify-content: space-between;
  -ms-flex-pack: justify;
  justify-content: space-between;
}

/* 确保flex:1有前缀 */
.v3-page-content, .user-main, .news-detail-main, .detail-main {
  -webkit-box-flex: 1;
  -webkit-flex: 1;
  -ms-flex: 1;
  flex: 1;
}

/* 确保overflow-scrolling在iOS正常 */
.v3-sidebar, .chat-messages, .user-main {
  -webkit-overflow-scrolling: touch;
  overflow-scrolling: touch;
}

/* 确保user-select有前缀 */
.v3-logo-img, .btn, .agent-github-btn {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* 确保placeholder颜色 */
input::-webkit-input-placeholder, textarea::-webkit-input-placeholder { color: #bbb; }
input::-moz-placeholder, textarea::-moz-placeholder { color: #bbb; opacity: 1; }
input:-ms-input-placeholder, textarea:-ms-input-placeholder { color: #bbb; }
input::placeholder, textarea::placeholder { color: #bbb; }

/* 确保outline在聚焦时可见 */
a:focus, button:focus, input:focus, textarea:focus, select:focus {
  outline: 2px solid #1677ff;
  outline-offset: 2px;
}

/* 高对比度模式 */
@media (prefers-contrast: high) {
  .v3-sidebar, .v3-topbar { border: 1px solid #333; }
  .btn { border: 2px solid currentColor; }
}

/* ================================================================
   V3 全站底部样式
   ================================================================ */
.v3-site-footer {
  margin-top: 40px;
  background: #0f172a;
  color: #94a3b8;
  width: 100%;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.v3-site-footer .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.v3-site-footer .footer-grid-2col {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
  padding: 40px 20px;
}

.v3-site-footer .footer-brand-title {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
}

.v3-site-footer .footer-brand-slogan {
  color: #cbd5e1;
  font-size: 14px;
  margin-bottom: 10px;
  line-height: 1.6;
}

.v3-site-footer .footer-brand-desc {
  color: #64748b;
  font-size: 13px;
  line-height: 1.7;
}

.v3-site-footer .footer-col h4 {
  color: #e2e8f0;
  font-size: 15px;
  margin-bottom: 12px;
}

.v3-site-footer .footer-nav-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
}

.v3-site-footer .footer-nav-links a {
  color: #94a3b8;
  font-size: 13px;
  padding: 4px 0;
  text-decoration: none;
  transition: color 0.2s;
}

.v3-site-footer .footer-nav-links a:hover {
  color: #fff;
}

.v3-site-footer .footer-bottom {
  border-top: 1px solid #1e293b;
  padding: 16px 0;
  font-size: 12px;
  text-align: center;
}

/* V3底部响应式 */
@media (max-width: 992px) {
  .v3-site-footer .footer-grid-2col {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 640px) {
  .v3-site-footer .footer-grid-2col {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 28px 16px;
  }
  .v3-site-footer .footer-brand-title {
    font-size: 18px;
  }
  .v3-site-footer .footer-nav-links {
    grid-template-columns: 1fr 1fr;
    gap: 6px 12px;
  }
  .v3-site-footer .footer-bottom {
    padding: 14px 16px;
    font-size: 11px;
  }
}
