/* ===== Vibe Zone 全站样式 · 亮色清爽版 ===== */
:root {
  --bg: #faf9f6;
  --bg-soft: #f4f2ee;
  --card: #ffffff;
  --card-border: #e9e6e1;
  --text: #26221e;
  --text-dim: #83796e;
  --brand: #7c3aed;
  --brand-strong: #6d28d9;
  --brand-soft: #f4effc;
  --green: #0e9f6e;
  --green-soft: #e7f6f0;
  --shadow-sm: 0 1px 2px rgba(38, 34, 30, 0.05);
  --shadow-md: 0 4px 16px rgba(38, 34, 30, 0.08);
  --shadow-lg: 0 12px 32px rgba(38, 34, 30, 0.12);
  --radius: 14px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
}

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

pre, code, .code-card, .model-pill {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

::selection { background: rgba(124, 58, 237, 0.18); }

/* ===== 氛围背景：极淡的暖色光斑 ===== */
.bg-fx {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.blob {
  position: absolute;
  width: 50vw;
  height: 50vw;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.35;
}
.blob-1 {
  top: -22%;
  left: -10%;
  background: radial-gradient(circle, #ece4fb, transparent 65%);
  animation: drift-1 30s ease-in-out infinite alternate;
}
.blob-2 {
  top: 5%;
  right: -15%;
  background: radial-gradient(circle, #fde8f0, transparent 65%);
  animation: drift-2 36s ease-in-out infinite alternate;
}
.blob-3 {
  bottom: -28%;
  left: 28%;
  background: radial-gradient(circle, #e8f4ef, transparent 65%);
  animation: drift-3 42s ease-in-out infinite alternate;
}
@keyframes drift-1 {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(7vw, 6vh) scale(1.1); }
}
@keyframes drift-2 {
  from { transform: translate(0, 0) scale(1.05); }
  to { transform: translate(-6vw, 8vh) scale(0.95); }
}
@keyframes drift-3 {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(6vw, -6vh) scale(1.12); }
}
.grid-overlay { display: none; }

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 16px 64px;
}

/* ===== 导航 ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(250, 249, 246, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--card-border);
}
.nav-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.nav-logo {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.5px;
}
.nav-logo span { color: var(--brand); }
.nav-links { display: flex; gap: 16px; }
.nav-links a {
  color: var(--text-dim);
  font-size: 15px;
  transition: color 0.15s ease;
}
.nav-links a:hover { color: var(--brand); }
.nav-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.nav-user {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-dim);
  font-size: 14px;
}
.inline-form { display: inline; margin: 0; }

/* ===== 按钮 ===== */
.btn {
  display: inline-block;
  border: 1px solid var(--card-border);
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 14px;
  cursor: pointer;
  background: var(--card);
  color: var(--text);
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  font-weight: 700;
}
.btn-primary:hover {
  background: var(--brand-strong);
  border-color: var(--brand-strong);
  color: #fff;
  box-shadow: 0 6px 18px rgba(124, 58, 237, 0.28);
}
.btn-ghost { background: transparent; box-shadow: none; color: var(--text-dim); }
.btn-ghost:hover { color: var(--brand); border-color: var(--brand); }
.btn-sm { padding: 5px 12px; font-size: 13px; }
.btn-lg { padding: 12px 28px; font-size: 16px; }

/* ===== Hero ===== */
.hero { text-align: center; padding: 60px 0 36px; }
.hero-badge {
  display: inline-block;
  margin: 0 0 18px;
  padding: 5px 16px;
  border: 1px solid #e0d3f8;
  border-radius: 999px;
  color: var(--brand);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  letter-spacing: 2px;
  background: var(--brand-soft);
  animation: fade-up 0.6s ease both;
}
.hero-title {
  margin: 0;
  font-size: 60px;
  font-weight: 900;
  letter-spacing: 2px;
  color: var(--text);
  animation: fade-up 0.6s 0.08s ease both;
}
.hero-title::after {
  content: ".";
  color: var(--brand);
}
.hero-slogan {
  color: var(--text-dim);
  font-size: 18px;
  margin: 10px 0 30px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  min-height: 1.6em;
  animation: fade-up 0.6s 0.16s ease both;
}
.typing::after {
  content: "▋";
  margin-left: 2px;
  color: var(--brand);
  animation: blink 0.9s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.hero-cta {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 30px;
  animation: fade-up 0.6s 0.24s ease both;
}
.search-bar {
  display: flex;
  gap: 10px;
  max-width: 520px;
  margin: 0 auto 20px;
  animation: fade-up 0.6s 0.3s ease both;
}
.search-bar input {
  flex: 1;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 999px;
  padding: 10px 18px;
  color: var(--text);
  font-size: 14px;
  outline: none;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.search-bar input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}
.sort-tabs { display: flex; justify-content: center; gap: 8px; }
.sort-tabs a {
  padding: 5px 18px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: var(--card);
  color: var(--text-dim);
  font-size: 14px;
  transition: all 0.15s ease;
}
.sort-tabs a.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  font-weight: 700;
}

/* ===== 卡片 ===== */
.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  animation: fade-up 0.5s ease both;
}
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.work-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: #ddd0f5;
}
.work-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.work-title {
  margin: 0 0 4px;
  font-size: 19px;
  line-height: 1.4;
}

/* 模型徽章 */
.model-pill {
  flex-shrink: 0;
  background: var(--green-soft);
  border: 1px solid #bfe8d8;
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 8px;
  white-space: nowrap;
}
.model-pill::before {
  content: "▮ ";
  color: #7cc7ab;
}
.work-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
  color: var(--text-dim);
  font-size: 13px;
}
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  flex-shrink: 0;
}
.avatar-sm { width: 22px; height: 22px; font-size: 12px; }
.work-desc {
  color: var(--text-dim);
  font-size: 14px;
  margin: 6px 0 10px;
}
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.tag {
  border: 1px solid var(--card-border);
  background: var(--bg-soft);
  color: var(--text-dim);
  font-size: 12px;
  padding: 2px 10px;
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.tag::before { content: "#"; color: var(--brand); }
.work-card-foot {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 12px;
}
.stat { color: var(--text-dim); font-size: 14px; }
.open-link { margin-left: auto; }

/* ===== 详情页 ===== */
.detail { padding-top: 16px; }
.detail-title { margin: 0; font-size: 30px; line-height: 1.3; }
.detail-head {
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 20px;
  margin-bottom: 20px;
}
.detail-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.detail-section { margin-bottom: 28px; }
.detail-section h2 {
  font-size: 15px;
  margin: 0 0 10px;
  color: var(--text-dim);
  letter-spacing: 1px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.detail-section h2::before { content: "// "; color: var(--brand); }
.detail-text { white-space: pre-wrap; margin: 0; }

.like-btn { font-size: 15px; }
.like-btn-lg { padding: 12px 24px; font-size: 17px; border-radius: 999px; }
.like-btn.liked {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.28);
}
.like-btn.pop { animation: heart-pop 0.4s ease; }
@keyframes heart-pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.18); }
  100% { transform: scale(1); }
}

/* ===== Prompt / 工作流：终端窗口（保留深色，代码更易读） ===== */
.code-card {
  position: relative;
  background: #16130f;
  border: 1px solid #2c2721;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.code-card-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid #2c2721;
}
.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot-r { background: #f87171; }
.dot-y { background: #fbbf24; }
.dot-g { background: #34d399; }
.code-card-title {
  margin-left: 6px;
  color: #8a8178;
  font-size: 12px;
  letter-spacing: 0.5px;
}
.code-card pre {
  margin: 0;
  padding: 18px;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 14px;
  line-height: 1.7;
  color: #d9cef5;
}
.copy-btn {
  margin-left: auto;
  background: transparent;
  border: 1px solid #3d362d;
  color: #8a8178;
  border-radius: 6px;
  padding: 3px 12px;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s ease;
}
.copy-btn:hover {
  color: #d9cef5;
  border-color: var(--brand);
}

/* ===== 评论区 ===== */
.comments { margin-top: 36px; }
.comments h2 { font-size: 20px; }
.comment-form textarea,
.reply-form textarea {
  width: 100%;
  background: var(--bg-soft);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  color: var(--text);
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  outline: none;
  margin-bottom: 10px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.comment-form textarea:focus,
.reply-form textarea:focus {
  border-color: var(--brand);
  background: var(--card);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}
.comment-list { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.comment { padding: 14px 16px; }
.comment-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-dim);
  font-size: 13px;
}
.comment-content { margin: 8px 0 4px; font-size: 15px; white-space: pre-wrap; }
.comment-reply {
  margin: 10px 0 0 28px;
  border-left: 2px solid var(--brand);
  background: var(--brand-soft);
  border-radius: 0 10px 10px 0;
  padding: 12px 14px;
}
.reply-toggle {
  background: none;
  border: none;
  color: var(--brand);
  font-size: 13px;
  cursor: pointer;
  padding: 2px 0;
}
.reply-toggle:hover { text-decoration: underline; }
.reply-form { margin-top: 8px; }
.hidden { display: none; }
.login-tip { color: var(--text-dim); }
.login-tip a { color: var(--brand); text-decoration: underline; }

/* ===== 话题 ===== */
.page-head-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.topic-list { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; }
.topic-card { display: block; }
.topic-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #ddd0f5;
}
.topic-title { margin: 0 0 6px; font-size: 18px; }

/* ===== 表单页 ===== */
.form-page { max-width: 640px; margin: 0 auto; padding-top: 16px; }
.page-title {
  font-size: 30px;
  margin: 0;
  color: var(--text);
  display: inline-block;
}
.page-title::after {
  content: ".";
  color: var(--brand);
}
.page-sub { color: var(--text-dim); margin: 6px 0 20px; }
.form-card { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field span { font-size: 14px; color: var(--text-dim); }
.field em { color: var(--brand); font-style: normal; }
.field input,
.field textarea {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  color: var(--text);
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  resize: vertical;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input:focus,
.field textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}
.alert {
  background: var(--brand-soft);
  border: 1px solid #e0d3f8;
  color: var(--brand-strong);
  border-radius: 10px;
  padding: 10px 16px;
  margin-bottom: 16px;
  font-size: 14px;
}
.auth-switch { margin-top: 16px; color: var(--text-dim); font-size: 14px; }
.auth-switch a { color: var(--brand); text-decoration: underline; }

/* ===== 其他 ===== */
.empty-state {
  text-align: center;
  color: var(--text-dim);
  padding: 48px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.error-page { text-align: center; padding: 64px 0; }
.footer {
  border-top: 1px solid var(--card-border);
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
  padding: 20px 0;
}

/* ===== 入场动画 ===== */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== 响应式 ===== */
@media (max-width: 720px) {
  .work-grid { grid-template-columns: 1fr; }
  .hero { padding: 44px 0 28px; }
  .hero-title { font-size: 40px; }
  .nav-inner { gap: 10px; }
  .detail-title { font-size: 24px; }
}

/* ===== 减少动态效果偏好 ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== 发布页：AI 辅助面板 ===== */
.ai-assist {
  margin-bottom: 16px;
  border-color: #ddd0f5;
  background: linear-gradient(135deg, #f8f5fe, #f4effc);
}
.ai-assist-head { margin-bottom: 10px; }
.ai-assist-title {
  display: block;
  font-weight: 800;
  font-size: 16px;
  color: var(--brand);
}
.ai-assist-sub {
  display: block;
  color: var(--text-dim);
  font-size: 13px;
  margin-top: 2px;
}
.ai-assist textarea {
  width: 100%;
  background: var(--card);
  border: 1px solid #e0d3f8;
  border-radius: 10px;
  color: var(--text);
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.ai-assist textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}
.ai-assist-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.ai-assist-status { font-size: 13px; color: var(--text-dim); }
.ai-assist-status.loading { color: var(--brand); }
.ai-assist-status.ok { color: var(--green); }
.ai-assist-status.error { color: #dc2626; }
