/* ===== 黄瓜开会助手 样式 ===== */
:root {
  --green-900: #14532d;
  --green-800: #166534;
  --green-700: #15803d;
  --green-600: #16a34a;
  --green-500: #22c55e;
  --green-200: #bbf7d0;
  --green-100: #dcfce7;
  --green-50: #f0fdf4;
  --lime: #84cc16;
  --amber: #f59e0b;
  --red: #dc2626;
  --text: #1c2b21;
  --text-2: #5b6b60;
  --bg: #f6faf3;
  --card: #ffffff;
  --line: #e3ece1;
  --radius: 20px;
  --shadow: 0 10px 30px rgba(22, 101, 52, 0.08);
  --font: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html, body {
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(900px 400px at 85% -60px, rgba(132, 204, 22, 0.14), transparent 60%),
    radial-gradient(700px 380px at -10% 12%, rgba(34, 197, 94, 0.10), transparent 55%),
    var(--bg);
  min-height: 100vh;
  line-height: 1.6;
  font-size: 15px;
}

/* ---------- 顶部 ---------- */
.app-header {
  position: sticky; top: 0; z-index: 20;
  background: linear-gradient(120deg, var(--green-700), var(--green-600) 55%, var(--lime));
  color: #fff;
  box-shadow: 0 6px 24px rgba(21, 128, 61, 0.35);
}
.header-inner {
  max-width: 620px; margin: 0 auto; padding: 14px 18px;
  display: flex; align-items: center; gap: 14px;
}
.logo {
  width: 46px; height: 46px; flex: none;
  background: rgba(255, 255, 255, 0.18);
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  border-radius: 14px;
  display: grid; place-items: center;
  font-size: 24px;
  backdrop-filter: blur(4px);
}
.header-text h1 { font-size: 19px; font-weight: 800; letter-spacing: 0.5px; }
.header-text p { font-size: 11.5px; opacity: 0.92; margin-top: 1px; }

/* ---------- 步骤流 ---------- */
.flow {
  max-width: 620px; margin: 0 auto; padding: 18px 14px 40px;
  display: flex; flex-direction: column; gap: 14px;
}
.step { display: flex; gap: 12px; }
.step-rail { display: flex; flex-direction: column; align-items: center; width: 30px; flex: none; }
.step-dot {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg, var(--green-600), var(--lime));
  color: #fff; font-weight: 800; font-size: 14px;
  display: grid; place-items: center;
  box-shadow: 0 4px 10px rgba(34, 197, 94, 0.35);
}
.step-dot.history { background: linear-gradient(135deg, #64748b, #94a3b8); box-shadow: none; }
.step-rail::after {
  content: ""; flex: 1; width: 2px; margin: 6px 0;
  background: linear-gradient(var(--green-200), var(--green-100));
  min-height: 12px;
}
.step:last-child .step-rail::after { display: none; }

.step-panel {
  flex: 1; min-width: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}
.step-title {
  font-size: 16px; font-weight: 800; margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.tag {
  font-size: 10.5px; font-weight: 600; color: var(--green-700);
  background: var(--green-100); border: 1px solid var(--green-200);
  padding: 2px 8px; border-radius: 999px; letter-spacing: 0.3px;
}

/* ---------- 录音 ---------- */
.recorder { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.mic-btn {
  width: 96px; height: 96px; border: none; border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, var(--green-500), var(--green-700) 70%);
  color: #fff; cursor: pointer;
  display: grid; place-items: center;
  box-shadow: 0 12px 28px rgba(21, 128, 61, 0.4);
  transition: transform 0.15s ease;
  position: relative;
}
.mic-btn:active { transform: scale(0.94); }
.mic-btn.recording {
  background: radial-gradient(circle at 30% 25%, #ef4444, #b91c1c 70%);
  box-shadow: 0 12px 28px rgba(220, 38, 38, 0.4);
}
.mic-btn.recording::after {
  content: ""; position: absolute; inset: -12px; border-radius: 50%;
  border: 3px solid rgba(239, 68, 68, 0.55);
  animation: pulse-ring 1.6s ease-out infinite;
}
.mic-btn.paused { background: radial-gradient(circle at 30% 25%, var(--amber), #d97706 70%); }
@keyframes pulse-ring {
  0% { transform: scale(0.85); opacity: 1; }
  100% { transform: scale(1.35); opacity: 0; }
}
.rec-status {
  font-size: 13px; color: var(--text-2); font-weight: 600;
  background: var(--green-50); border: 1px solid var(--green-200);
  padding: 4px 14px; border-radius: 999px;
}
.rec-status.recording { color: var(--red); background: #fef2f2; border-color: #fecaca; }
.rec-status.paused { color: #b45309; background: #fffbeb; border-color: #fde68a; }
.rec-timer {
  font-size: 34px; font-weight: 800; letter-spacing: 2px;
  font-variant-numeric: tabular-nums;
  color: var(--green-800);
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: none; cursor: pointer; border-radius: 12px;
  font-family: var(--font); font-size: 14px; font-weight: 700;
  padding: 11px 18px; line-height: 1.2;
  transition: transform 0.12s ease, opacity 0.12s ease, box-shadow 0.12s ease;
  user-select: none;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn-primary {
  background: linear-gradient(120deg, var(--green-600), var(--green-500));
  color: #fff; box-shadow: 0 8px 18px rgba(34, 197, 94, 0.35);
}
.btn-outline {
  background: #fff; color: var(--green-700);
  border: 1.5px solid var(--green-500);
}
.btn-ghost {
  background: var(--green-50); color: var(--green-800);
  border: 1px solid var(--green-200);
}
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-row.right { justify-content: flex-end; }

/* ---------- 文件行 / 提示 ---------- */
.file-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; width: 100%; }
.file-name { font-size: 12px; color: var(--text-2); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hint { font-size: 11.5px; color: var(--text-2); margin-top: 10px; line-height: 1.5; }
.hint.warn { color: #b45309; font-weight: 600; }

/* ---------- 进度 ---------- */
.progress { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.progress.hidden { display: none; }
.progress-bar {
  flex: 1; height: 8px; border-radius: 999px; background: var(--green-100);
  overflow: hidden; position: relative;
}
.progress-bar::after {
  content: ""; display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--green-500), var(--lime));
  border-radius: 999px; transition: width 0.3s ease;
}
.progress-bar.active::after {
  width: 100%;
  background: linear-gradient(90deg, var(--green-500), var(--lime), var(--green-500));
  background-size: 200% 100%;
  animation: slide 1.2s linear infinite;
}
@keyframes slide { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.progress-text { font-size: 12px; font-weight: 700; color: var(--green-700); min-width: 34px; text-align: right; }

/* ---------- 文本框 ---------- */
.textarea {
  width: 100%; margin-top: 12px; resize: vertical;
  border: 1.5px solid var(--line); border-radius: 14px;
  padding: 12px 14px; font-family: var(--font); font-size: 14px; line-height: 1.7;
  color: var(--text); background: #fbfefb;
  transition: border-color 0.15s;
}
.textarea:focus { outline: none; border-color: var(--green-500); background: #fff; }
.textarea::placeholder { color: #9db5a4; }

/* ---------- 图片预览 ---------- */
.photo-preview { margin-top: 12px; }
.photo-preview.hidden { display: none; }
.photo-preview img {
  width: 100%; max-height: 220px; object-fit: cover;
  border-radius: 14px; border: 1.5px solid var(--line);
}

/* ---------- 文档类型下拉控件(小方框内下拉) ---------- */
.gen-row { display: flex; align-items: center; gap: 10px; }
.gen-go { flex: 1; }
.type-select {
  appearance: none; -webkit-appearance: none;
  font-family: var(--font); font-size: 14px; font-weight: 700;
  color: var(--green-700); background-color: var(--green-50);
  border: 1.5px solid var(--green-200); border-radius: 12px;
  padding: 11px 34px 11px 14px; cursor: pointer;
  /* 纯 CSS 下拉箭头,无需额外图标资源 */
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2315803d' d='M6 8 0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  transition: border-color 0.15s, background-color 0.15s;
}
.type-select:hover:not(:disabled),
.type-select:focus { outline: none; border-color: var(--green-500); background-color: #fff; }
.type-select:disabled { opacity: 0.55; cursor: not-allowed; }
.type-select.wide { width: 100%; margin-bottom: 12px; }

/* ---------- 文档展示 ---------- */
.docs.hidden { display: none; }
.docs { margin-top: 16px; }
.doc-body {
  margin-top: 12px; padding: 16px; min-height: 220px; max-height: 560px; overflow-y: auto;
  background: #fbfefb; border: 1px solid var(--line); border-radius: 14px;
  font-size: 14px; line-height: 1.85;
}
.doc-body h2 { font-size: 16px; color: var(--green-800); margin: 14px 0 6px; }
.doc-body h3 { font-size: 14.5px; color: var(--green-700); margin: 12px 0 5px; }
.doc-body h4, .doc-body h5 { font-size: 13.5px; color: var(--text); margin: 10px 0 4px; }
.doc-body p { margin: 6px 0; }
.doc-body ul, .doc-body ol { margin: 6px 0 6px 22px; }
.doc-body li { margin: 3px 0; }
.doc-body strong { color: var(--green-900); }
.doc-body .empty { color: var(--text-2); text-align: center; padding: 40px 0; }

/* ---------- 历史 ---------- */
.history-list { list-style: none; display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.history-item {
  display: flex; align-items: center; gap: 10px;
  background: var(--green-50); border: 1px solid var(--green-100);
  border-radius: 12px; padding: 10px 12px; cursor: pointer;
  transition: background 0.15s;
}
.history-item:hover { background: var(--green-100); }
.history-item .hi-title { flex: 1; font-size: 13.5px; font-weight: 700; color: var(--green-900); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-item .hi-time { font-size: 11px; color: var(--text-2); flex: none; }
.history-item .hi-del {
  flex: none; border: none; background: none; cursor: pointer;
  font-size: 14px; color: var(--text-2); padding: 4px;
}
.history-item .hi-del:hover { color: var(--red); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 36px; transform: translateX(-50%) translateY(20px);
  background: rgba(28, 43, 33, 0.92); color: #fff;
  padding: 11px 20px; border-radius: 12px; font-size: 13.5px; font-weight: 600;
  opacity: 0; pointer-events: none; transition: all 0.25s ease;
  max-width: 86vw; text-align: center; z-index: 99;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { background: rgba(185, 28, 28, 0.94); }

/* ---------- 底部 ---------- */
.app-footer { text-align: center; padding: 10px 0 6px; color: var(--text-2); font-size: 12.5px; }
.app-footer .hint { margin-top: 4px; }

.hidden { display: none !important; }
