:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --border: #d7dcea;
  --text: #1b2330;
  --muted: #5e6b82;
  --primary: #2d6cf6;
  --primary-hover: #1f57d0;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
}

.header {
  padding: 28px 20px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.header h1 {
  margin: 0;
  font-size: 28px;
}

.header p {
  margin: 10px 0 0;
  color: var(--muted);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.filter-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 18px 16px;
  margin-bottom: 16px;
}

.search-box {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  max-width: 720px;
  margin: 0 auto 18px;
}

.search-box input {
  flex: 1;
  height: 42px;
  border: 1px solid var(--border);
  border-right: none;
  border-radius: 4px 0 0 4px;
  padding: 0 14px;
  font-size: 14px;
  outline: none;
}

.search-box input:focus {
  border-color: #9eb4e2;
}

.search-btn {
  height: 42px;
  min-width: 88px;
  border: 1px solid var(--border);
  border-radius: 0 4px 4px 0;
  background: #f3f5f8;
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
}

.search-btn:hover {
  background: #e9edf3;
}

.filter-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.9;
}

.filter-label {
  flex-shrink: 0;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 4px;
}

.filter-tag {
  border: none;
  background: transparent;
  color: #4a5568;
  font-size: 14px;
  padding: 0 6px;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.9;
}

.filter-tag:hover {
  color: var(--primary);
}

.filter-tag.active {
  color: var(--primary);
  font-weight: 600;
}

.meta {
  margin: 14px 0 16px;
  font-size: 14px;
  color: var(--muted);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  min-height: 300px;
  overflow: hidden;
}

.card-preview-link {
  display: block;
  background: #eef2f9;
  line-height: 0;
  overflow: hidden;
  height: 200px;
}

.card-preview {
  width: 100%;
  height: auto;
  display: block;
  object-position: top center;
}

.card-content {
  padding: 14px;
  flex: 1;
}

.card-title {
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.5;
}

.card-industry,
.card-layout {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 13px;
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 12px 14px 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  border-radius: 8px;
  text-decoration: none;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 14px;
  transition: all 0.2s;
}

.btn:hover {
  background: #eef3ff;
}

.btn.primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.btn.primary:hover {
  background: var(--primary-hover);
}

.consult-btn {
  cursor: pointer;
  font-family: inherit;
}

.consult-btn:hover {
  background: #eef3ff;
  border-color: var(--primary);
  color: var(--primary);
}

.modal.hidden {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}

.modal-panel {
  position: relative;
  width: min(360px, 100%);
  background: var(--surface);
  border-radius: 14px;
  padding: 24px 20px 20px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.2);
}

.modal-panel h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.modal-tip {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
}

.modal-qrcode {
  width: 240px;
  height: 240px;
  object-fit: contain;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
}

.modal-close:hover {
  color: var(--text);
}

.pagination {
  margin: 18px 0 4px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px 14px;
}

.pagination button {
  min-width: 88px;
  height: 38px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
}

.pagination button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.page-size {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
}

.page-size select {
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 10px;
  background: var(--surface);
  font-size: 14px;
}

@media (max-width: 860px) {
  .filter-row {
    flex-direction: column;
  }

  .search-box {
    width: 100%;
  }
}
