/*
  结构规范智能查询 - 建筑设计风格主题
  主色：深蓝 #1a3a5c，辅色：白，点缀：金 #c8a45c
  响应式适配手机、平板、桌面
*/
* {
  box-sizing: border-box;
}
html {
  font-size: 16px;
}
body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial,
    sans-serif;
  color: #333;
  background-color: #f5f7fa;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.container {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px;
}
.site-header {
  background: linear-gradient(135deg, #1a3a5c 0%, #254b73 100%);
  color: #fff;
  padding: 40px 0 32px;
  text-align: center;
  border-bottom: 4px solid #c8a45c;
}
.site-title {
  margin: 0 0 8px;
  font-size: 1.875rem;
  font-weight: 700;
  letter-spacing: 1px;
}
.site-subtitle {
  margin: 0;
  font-size: 1rem;
  color: #c8a45c;
  font-weight: 400;
}
.search-section {
  margin-top: 28px;
}
.search-box {
  display: flex;
  gap: 10px;
  background: #fff;
  padding: 10px;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(26, 58, 92, 0.12);
  border: 1px solid #e0e5eb;
}
.search-input {
  flex: 1;
  border: 1px solid #d0d7df;
  border-radius: 6px;
  padding: 12px 14px;
  font-size: 1rem;
  color: #1a3a5c;
  background: #fafbfc;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-input:focus {
  border-color: #c8a45c;
  box-shadow: 0 0 0 3px rgba(200, 164, 92, 0.18);
}
.search-btn {
  background: #1a3a5c;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  white-space: nowrap;
}
.search-btn:hover {
  background: #244a70;
}
.search-btn:active {
  transform: translateY(1px);
}
.filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}
.filter-label {
  font-size: 0.9375rem;
  color: #1a3a5c;
  font-weight: 500;
  white-space: nowrap;
}
.spec-filter {
  flex: 1;
  max-width: 320px;
  border: 1px solid #d0d7df;
  border-radius: 6px;
  padding: 9px 12px;
  font-size: 0.9375rem;
  color: #1a3a5c;
  background: #fff;
  outline: none;
  cursor: pointer;
}
.spec-filter:focus {
  border-color: #c8a45c;
}
.loading-tip {
  margin-top: 24px;
  padding: 16px;
  text-align: center;
  color: #607080;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(26, 58, 92, 0.08);
  display: none;
}
.loading-tip.show {
  display: block;
}
.result-meta {
  margin-top: 18px;
  font-size: 0.9375rem;
  color: #556575;
  min-height: 1.5em;
}
.results-section {
  margin-top: 14px;
}
.results-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.result-card {
  background: #fff;
  border-radius: 10px;
  padding: 18px 20px;
  margin-bottom: 14px;
  box-shadow: 0 2px 10px rgba(26, 58, 92, 0.08);
  border-left: 4px solid #c8a45c;
  transition: box-shadow 0.2s, transform 0.15s;
}
.result-card:hover {
  box-shadow: 0 6px 20px rgba(26, 58, 92, 0.14);
  transform: translateY(-2px);
}
.result-text {
  margin: 0 0 10px;
  font-size: 1rem;
  color: #333;
  line-height: 1.7;
}
.result-text mark {
  background: rgba(200, 164, 92, 0.35);
  color: #1a3a5c;
  padding: 0 2px;
  border-radius: 2px;
  font-weight: 600;
}
.result-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.875rem;
  color: #5e7282;
}
.result-spec {
  font-weight: 600;
  color: #1a3a5c;
}
.result-page::before {
  content: "·";
  margin-right: 6px;
  color: #c8a45c;
}
.empty-tip {
  text-align: center;
  padding: 36px 16px;
  color: #6e7f90;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(26, 58, 92, 0.06);
}
.ai-section {
  margin-top: 28px;
  margin-bottom: 40px;
}
.ai-toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  border: 1px solid #e0e5eb;
  border-radius: 10px;
  padding: 14px 18px;
  font-size: 1rem;
  font-weight: 600;
  color: #1a3a5c;
  cursor: pointer;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.ai-toggle:hover {
  border-color: #c8a45c;
  box-shadow: 0 2px 10px rgba(26, 58, 92, 0.08);
}
.ai-toggle[aria-expanded="true"] .ai-toggle-icon {
  transform: rotate(90deg);
}
.ai-toggle-icon {
  display: inline-block;
  transition: transform 0.2s;
  color: #c8a45c;
}
.ai-panel {
  margin-top: 12px;
  background: #fff;
  border-radius: 10px;
  padding: 18px;
  box-shadow: 0 2px 10px rgba(26, 58, 92, 0.08);
  border: 1px solid #e8edf2;
}
.ai-config-row {
  display: flex;
  gap: 10px;
}
.ai-provider,
.ai-key-input {
  padding: 10px 12px;
  border: 1px solid #d0d7df;
  border-radius: 6px;
  font-size: 0.875rem;
  font-family: inherit;
  background: #fafbfc;
  color: #1a3a5c;
  outline: none;
}
.ai-provider {
  flex: 0 0 auto;
  min-width: 135px;
  cursor: pointer;
}
.ai-key-input {
  flex: 1;
}
.ai-key-input:focus,
.ai-provider:focus {
  border-color: #c8a45c;
}
.ai-input-row {
  display: flex;
  gap: 10px;
}
.ai-input {
  flex: 1;
  border: 1px solid #d0d7df;
  border-radius: 6px;
  padding: 11px 14px;
  font-size: 0.9375rem;
  color: #1a3a5c;
  background: #fafbfc;
  outline: none;
}
.ai-input:focus {
  border-color: #c8a45c;
}
.ai-ask-btn {
  background: #c8a45c;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 11px 22px;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  white-space: nowrap;
}
.ai-ask-btn:hover {
  background: #b99650;
}
.ai-ask-btn:active {
  transform: translateY(1px);
}
.ai-answer {
  margin-top: 14px;
  padding: 14px;
  background: #f8f9fb;
  border-radius: 8px;
  font-size: 0.9375rem;
  color: #3d4f5f;
  line-height: 1.7;
  min-height: 3em;
  white-space: pre-wrap;
}
.ai-answer.error {
  color: #a94442;
  background: #fdf3f3;
  border-left: 3px solid #c8a45c;
}
.site-footer {
  margin-top: auto;
  background: #1a3a5c;
  color: #fff;
  text-align: center;
  padding: 18px 0;
  font-size: 0.9375rem;
}
.site-footer strong {
  color: #c8a45c;
}
@media (max-width: 640px) {
  .site-header {
    padding: 28px 0 24px;
  }
  .site-title {
    font-size: 1.5rem;
  }
  .search-box {
    flex-direction: column;
  }
  .search-btn {
    width: 100%;
  }
  .filter-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .spec-filter {
    max-width: 100%;
    width: 100%;
  }
  .result-card {
    padding: 14px 16px;
  }
  .ai-input-row {
    flex-direction: column;
  }
  .ai-ask-btn {
    width: 100%;
  }
}
@media (min-width: 641px) and (max-width: 1024px) {
  .container {
    padding: 0 20px;
  }
}
