/* ------------------------------------------------------------------
 * 首页专用样式（演示风格：说明文档/前台风格1.html）
 *
 * 首页与其它前台页面的设计语言不同：首页按演示用 Tailwind 工具类，
 * 其余页面用 public/static/css/app.css 的自定义组件类。
 * 因此首页不加载 app.css，只加载本文件 + 本地 Tailwind 运行时。
 * 这里只放三样东西：演示自带的自定义类、JS 切换状态用的 .active 样式、
 * 弹窗表单用的少量控件类（避免在每个控件上重复一长串工具类）。
 * ------------------------------------------------------------------ */

body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* JS 用 .hidden 属性/属性切换显隐，工具类的 display 优先级更高，这里兜底 */
[hidden] {
  display: none !important;
}

/* 演示自带的自定义滚动条 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #0b0f17; }
::-webkit-scrollbar-thumb { background: #1f2d4d; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #374151; }

.no-scrollbar::-webkit-scrollbar { display: none; }

/* 演示自带：半透明玻璃面板 */
.glass-panel {
  background: rgba(19, 27, 46, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* 排序 Tab：JS 只切 .active，配色在这里（演示由 JS 换工具类实现同样效果） */
.sort-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #94a3b8;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.sort-tab:hover {
  background: #1e293b;
  color: #e2e8f0;
}

.sort-tab.active {
  border-color: rgba(34, 197, 94, 0.4);
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
  font-weight: 600;
}

/* 标签胶囊：首页标签云与弹窗标签选择共用，选中态由 .active 或勾选框决定 */
.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border: 1px solid rgba(30, 41, 59, 1);
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.8);
  color: #94a3b8;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.tag-pill:hover {
  background: #1e293b;
  color: #e2e8f0;
}

.tag-pill.active,
.tag-pill:has(input:checked) {
  border-color: rgba(34, 197, 94, 0.5);
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
}

.tag-pill input {
  -webkit-appearance: none;
  appearance: none;
  width: 0;
  height: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

/* 弹窗表单控件（演示风格：深色底 + 绿色聚焦） */
.hx-label {
  display: block;
  margin-bottom: 6px;
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 600;
}

.hx-input {
  width: 100%;
  padding: 9px 14px;
  border: 1px solid rgba(51, 65, 85, 0.8);
  border-radius: 8px;
  background: #0f172a;
  color: #f1f5f9;
  font-size: 12px;
}

.hx-input::placeholder { color: #64748b; }

.hx-input:focus {
  outline: none;
  border-color: #22c55e;
  box-shadow: 0 0 0 1px #22c55e;
}

.hx-hint {
  display: block;
  margin-top: 6px;
  color: #64748b;
  font-size: 11px;
  line-height: 1.6;
}

.hx-section {
  padding-top: 18px;
  border-top: 1px solid rgba(31, 45, 77, 0.8);
}

.hx-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.hx-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.hx-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }

@media (max-width: 640px) {
  .hx-grid-2,
  .hx-grid-3 { grid-template-columns: minmax(0, 1fr); }
}

/* 翻译进度：一条一行的小日志 */
.hx-log {
  margin: 0;
  padding: 0;
  list-style: none;
  max-height: 132px;
  overflow-y: auto;
  color: #94a3b8;
  font-size: 11px;
  line-height: 1.8;
}
/* 弹窗公告正文：后台录入的换行原样显示（app.css 里同名规则，首页不加载 app.css） */
.announce-body {
  white-space: pre-line;
  color: #cbd5e1;
}