:root {
  --bg-start: #eef3ff;
  --bg-end: #ffffff;
  --primary: #2f6aff;
  --text: #0f172a;
  --muted: #6b7280;
  --border: #e5e7eb;
  --card-bg: #ffffff;
  --chip-bg: #f3f4f6;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, 'Noto Sans', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  color: var(--text);
  /* 背景：图片 + 渐变柔化层，图片请保存为 assets/bg.jpg */
  background-image: url('assets/bg.jpg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

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

.site-header {
  height: 64px;
  display: flex;
  align-items: center;
}
.brand {
  font-weight: 700;
  letter-spacing: .4px;
}

.hero { padding: 0; }
.hero .container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.hero-title {
  margin: 12px 0 8px;
  font-size: 40px;
  font-weight: 800;
}
.hero-subtitle {
  /* margin: 0 0 24px; */
  font-size: 18px;
  color: var(--muted);
}

.hidden-on-result { display: none !important; }

/* 结果页固定在顶部中间显示的副标题 */
.fixed-subtitle { position: static; top: auto; left: auto; transform: none; margin: 0; }

/* 结果态：为搜索框预留顶部空间 */
/* 结果页不固定副标题，因此不需要额外顶部留白 */

.search-group {
  display: flex;
  gap: 12px;
  align-items: center;
  width: min(100%, 720px);
  margin-bottom: 16px;
}
.search-input {
  flex: 1;
  height: 44px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 22px;
  outline: none;
  background: #fff;
}
.search-input::placeholder { color: #a1a1aa; }
.search-btn {
  height: 44px;
  padding: 0 18px;
  border-radius: 22px;
  border: none;
  color: #fff;
  background: var(--primary);
  cursor: pointer;
}
.search-btn:hover { filter: brightness(0.95); }

.quick-nav { color: #6b7280; margin-bottom: 8px; text-align: center; font-size: 12px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.quick-nav,
.hot-card,
.result-card { width: min(100%, 720px); margin: 0 auto 16px; }
.quick-nav .label { margin-right: 6px; }
.quick-link { color: #2563eb; text-decoration: none; margin-right: 10px; font-size: 12px; }
.quick-link:hover { text-decoration: underline; }
.hot-icon { height: 12px; width: auto; vertical-align: middle; }

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 0;
  box-shadow: 0 2px 6px rgba(0,0,0,.04);
}
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.title-wrap { display: flex; align-items: center; gap: 0; }
.rm-icon { height: 1.2em; width: auto; display: inline-block; margin-right: 4px; vertical-align: middle; }
.card-title { font-size: 16px; margin: 0; font-weight: 400; }
.hot-card .card-title { font-size: 12px; color: var(--muted); font-weight: 400; }
.card-desc { color: var(--muted); font-size: 12px; }

.keyword-list { list-style: none; margin: 0; padding: 0; }
.keyword-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-top: 1px solid var(--border);
}
.keyword-item:first-child { border-top: none; }
.name { font-size: 14px; }
.kw-highlight { color: #2563eb; font-weight: 600; }
.used-btn {
  height: 30px;
  padding: 0 12px;
  border-radius: 15px;
  background: transparent;
}
/* 未使用：绿色文字+绿色外框 */
.used-btn:not(:disabled) {
  color: #16a34a;
  border: 1px solid #16a34a;
}
/* 已使用：置灰，无外框 */
.used-btn:disabled {
  color: #9ca3af;
  border: none;
  background: transparent;
  opacity: 1;
  cursor: default;
}

.load-more { padding: 12px 0 16px; display: flex; justify-content: center; }
.load-more-btn {
  height: 36px;
  padding: 0 16px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
}
.load-more-btn:hover { background: #f8fafc; }

@media (max-width: 640px) {
  .hero-title { font-size: 28px; }
  .search-input { height: 40px; }
  .search-btn { height: 40px; }
}

/* 轻微抖动用于无输入提示 */
.shake { animation: kf-shake .4s ease; }
@keyframes kf-shake {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(2px); }
  30%, 50%, 70% { transform: translateX(-4px); }
  40%, 60% { transform: translateX(4px); }
}

#hotlist a {
  cursor: pointer;
}

/* Toast Notification */
.toast-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  opacity: 0;
  transform: translateY(-20px);
  transition: all 0.3s ease;
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.success {
  background: rgba(46, 125, 50, 0.9); /* Green */
}

.toast.error {
  background: rgba(211, 47, 47, 0.9); /* Red */
}


