:root {
  --red: #e53935;
  --blue: #4f7cff;
  --grad: linear-gradient(135deg, #e53935 0%, #4f7cff 100%);
  --bg: #f5f6fa;
  --card: #ffffff;
  --text: #1f2329;
  --text-sub: #8a9099;
  --border: #e5e7eb;
  --danger: #f56c6c;
  --radius: 12px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.hidden { display: none !important; }

/* 导航栏（红蓝渐变） */
.navbar {
  background: var(--grad);
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
}
.nav-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.logo { font-size: 18px; font-weight: 700; color: #fff; }
.nav-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.nav-link {
  background: transparent;
  border: none;
  color: rgba(255,255,255,.85);
  font-size: 14px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 6px;
  transition: background .2s, color .2s;
}
.nav-link:hover { background: rgba(255,255,255,.15); color: #fff; }
.nav-link.active { background: rgba(255,255,255,.25); color: #fff; font-weight: 600; }
.user-box { display: flex; align-items: center; gap: 8px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: #fff; }
.nickname { font-size: 13px; color: #fff; }
.navbar .btn-text { color: rgba(255,255,255,.8); }
.navbar .btn-text:hover { color: #fff; }

/* 按钮 */
.btn-primary {
  background: var(--grad);
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 15px;
  cursor: pointer;
  transition: opacity .2s, transform .1s;
  box-shadow: 0 4px 12px rgba(229,57,53,.25);
}
.btn-primary:hover { opacity: .92; }
.btn-primary:active { transform: scale(.98); }

.btn-secondary {
  background: #f2f4ff;
  color: var(--blue);
  border: none;
  padding: 9px 16px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
}
.btn-secondary:hover { background: #e6ebff; }

.btn-ghost {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,.6);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
}
.btn-ghost:hover { background: rgba(255,255,255,.15); }
.btn-text {
  background: none;
  border: none;
  color: var(--text-sub);
  font-size: 13px;
  cursor: pointer;
  padding: 4px 8px;
}
.btn-text:hover { color: var(--text); }

/* 容器 */
.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px;
}
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.card-title { font-size: 17px; font-weight: 600; margin-bottom: 8px; }
.card-desc { font-size: 13px; color: var(--text-sub); margin-bottom: 16px; }

/* 首页横幅 */
.hero-banner {
  background: var(--grad);
  color: #fff;
  border-radius: var(--radius);
  padding: 32px 24px;
  margin-bottom: 20px;
}
.hero-title { font-size: 26px; font-weight: 700; }
.hero-sub { font-size: 14px; opacity: .9; margin-top: 6px; }

.section-title { font-size: 16px; font-weight: 600; margin-bottom: 14px; }

/* 工具列表 */
.tool-list { display: flex; flex-direction: column; gap: 14px; }
.tool-item {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  cursor: pointer;
  transition: transform .1s;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.tool-item:hover { transform: translateY(-2px); }
.tool-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #fff;
  flex-shrink: 0;
}
.qr-icon { background: var(--grad); }
.tool-info { flex: 1; min-width: 0; }
.tool-name { font-size: 16px; font-weight: 600; }
.tool-desc { font-size: 13px; color: var(--text-sub); margin-top: 4px; }
.tool-arrow { font-size: 22px; color: #c5c9d2; flex-shrink: 0; }

.coming-soon { display: flex; align-items: center; gap: 14px; margin: 28px 0; }
.coming-line { flex: 1; height: 1px; background: var(--border); }
.coming-text { font-size: 13px; color: #b0b5bf; }

.history-entry {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px 20px;
  cursor: pointer;
}
.he-icon { font-size: 22px; }
.he-text { flex: 1; font-size: 15px; }

/* 输入 */
.input-group textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  font-size: 15px;
  resize: vertical;
  font-family: inherit;
  outline: none;
}
.input-group textarea:focus { border-color: var(--blue); }
.btn-row { margin-top: 12px; display: flex; gap: 12px; }

/* 结果 */
.result-box {
  margin-top: 20px;
  text-align: center;
  padding-top: 20px;
  border-top: 1px dashed var(--border);
}
.qr-img {
  width: 220px;
  height: 220px;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 12px;
}
.result-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.result-hint { margin-top: 12px; font-size: 13px; color: var(--text-sub); }

/* 生成页历史链接 */
.history-link { display: flex; align-items: center; gap: 14px; cursor: pointer; }
.hl-icon { font-size: 22px; }
.hl-text { flex: 1; font-size: 15px; }

/* 我的页菜单 */
.menu-card { padding: 0; overflow: hidden; }
.menu-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 24px;
  cursor: pointer;
  font-size: 15px;
}
.menu-item:hover { background: #fafbfc; }
.mi-icon { font-size: 22px; }
.mi-text { flex: 1; }
.menu-divider { height: 1px; background: #f0f1f5; margin-left: 62px; }

/* 反馈 */
.feedback-input {
  width: 100%;
  min-height: 120px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  resize: vertical;
  margin-bottom: 12px;
}
.feedback-input:focus { border-color: var(--blue); }
.feedback-contact {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  font-size: 14px;
  outline: none;
  margin-bottom: 16px;
}
.feedback-contact:focus { border-color: var(--blue); }
.feedback-btn { width: 100%; }

/* 历史 */
.history-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.history-tip { font-size: 12px; color: var(--text-sub); }
.history-list { display: flex; flex-direction: column; gap: 10px; }
.history-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.history-item .h-top { display: flex; align-items: flex-start; gap: 10px; }
.history-item .h-icon { font-size: 20px; flex-shrink: 0; }
.history-item .h-content { flex: 1; min-width: 0; }
.history-item .h-text {
  font-size: 14px;
  word-break: break-all;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.history-item .h-time { font-size: 12px; color: var(--text-sub); margin-top: 4px; }
.history-item .h-actions { display: flex; gap: 8px; justify-content: flex-end; }
.h-btn {
  border: none;
  background: #f2f3f5;
  color: var(--text);
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
}
.h-btn:hover { background: #e5e7eb; }
.h-btn.del { color: var(--danger); }
.empty { text-align: center; color: var(--text-sub); font-size: 14px; padding: 30px 0; }

/* 还原卡片 */
.resolve-content {
  background: #f8f9fb;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
  word-break: break-all;
  font-size: 15px;
  line-height: 1.6;
  max-height: 300px;
  overflow-y: auto;
}
.resolve-content a { color: var(--blue); }

/* 弹窗 */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; }
.modal-mask { position: absolute; inset: 0; background: rgba(0,0,0,.5); }
.modal-box {
  position: relative;
  background: #fff;
  border-radius: 16px;
  padding: 28px;
  width: 90%;
  max-width: 340px;
  text-align: center;
}
.modal-box h3 { font-size: 18px; margin-bottom: 8px; }
.modal-desc { font-size: 13px; color: var(--text-sub); margin-bottom: 20px; }
.login-qr { width: 200px; height: 200px; margin: 0 auto 12px; display: block; }
.modal-tip { font-size: 12px; color: var(--text-sub); margin-bottom: 12px; }

/* Toast */
.toast {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,.8);
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 200;
  max-width: 80%;
}

@media (max-width: 480px) {
  .card { padding: 18px; }
  .logo { font-size: 16px; }
  .nav-link { font-size: 13px; padding: 5px 8px; }
}
