/* 信息站前台 — 对齐 zixuan369 浅紫白卡片风格 */
:root {
  --ins-bg: #f9f9ff;
  --ins-card: #ffffff;
  --ins-text: #334155;
  --ins-title: #1e293b;
  --ins-muted: #94a3b8;
  --ins-sub: #64748b;
  --ins-line: #e8e5ff;
  --ins-line-soft: #f0edff;
  --ins-line-faint: #f5f3ff;
  --ins-purple: #7b61ff;
  --ins-purple-2: #9d8fff;
  --ins-purple-dark: #6a51e6;
  --ins-pink: #e91e63;
  --ins-radius: 16px;
  --ins-max: 1280px;
  --ins-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  --ins-shadow-hover: 0 8px 20px rgba(0, 0, 0, 0.05);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  min-height: 100%;
  background: var(--ins-bg);
  color: var(--ins-text);
  font-family: "Microsoft YaHei", "PingFang SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ins-purple); text-decoration: none; }
button { font-family: inherit; }

.ins-page {
  min-height: 100vh;
  padding: 0 0 56px;
}

/* 顶部公告条 — 关闭有过渡 */
.ins-topbar {
  background: linear-gradient(90deg, var(--ins-purple) 0%, var(--ins-purple-2) 100%);
  color: #fff;
  padding: 20px 16px;
  text-align: center;
  margin-bottom: 28px;
  box-shadow: 0 4px 12px rgba(123, 97, 255, 0.15);
  border-radius: 0 0 16px 16px;
  position: relative;
  overflow: hidden;
  max-height: 200px;
  transition: max-height 0.4s ease, margin-bottom 0.4s ease, padding 0.4s ease, opacity 0.3s ease;
}
.ins-topbar.is-hidden {
  max-height: 0;
  padding: 0 16px;
  margin-bottom: 0;
  opacity: 0;
  overflow: hidden;
}
.ins-topbar-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}
.ins-topbar-content {
  font-size: 15px;
  opacity: 0.95;
  max-width: 800px;
  margin: 0 auto;
  font-weight: 500;
  line-height: 1.6;
}
.ins-topbar-close {
  position: absolute;
  right: 14px;
  top: 12px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.ins-topbar-close:hover { background: rgba(255, 255, 255, 0.3); }

/* 站点名 + 搜索 */
.ins-brand {
  text-align: center;
  margin: 0 auto 18px;
  padding: 0 16px;
}
.ins-brand h1 {
  font-size: 26px;
  font-weight: 800;
  color: var(--ins-title);
  letter-spacing: 0.5px;
}
.ins-brand p {
  margin-top: 6px;
  color: var(--ins-sub);
  font-size: 14px;
}

.ins-search-wrap {
  max-width: 600px;
  margin: 0 auto 28px;
  padding: 0 16px;
}
.ins-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}
.ins-search-input {
  flex: 1;
  width: 100%;
  height: 48px;
  padding: 0 18px 0 44px;
  border: 1px solid var(--ins-line);
  border-radius: 25px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ins-text);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'/%3E%3C/svg%3E") no-repeat 16px center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.ins-search-input::placeholder { color: #999; font-weight: 500; }
.ins-search-input:focus {
  border-color: var(--ins-purple);
  box-shadow: 0 0 0 3px rgba(123, 97, 255, 0.15);
}
.ins-search-btn {
  flex-shrink: 0;
  height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 25px;
  background: var(--ins-purple);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(123, 97, 255, 0.2);
  transition: background 0.2s;
}
.ins-search-btn:hover { background: var(--ins-purple-dark); }

/* 分类 / 性别 */
.ins-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  max-width: 1200px;
  margin: 0 auto 14px;
  padding: 0 16px;
}
.ins-nav + .ins-nav { margin-bottom: 26px; }

.ins-pill {
  padding: 9px 22px;
  background: #fff;
  border: 1px solid var(--ins-line);
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: #666;
  transition: all 0.2s ease;
}
.ins-pill:hover {
  background: #f8f5ff;
  border-color: #d8d0ff;
}
.ins-pill.is-active {
  background: var(--ins-purple);
  color: #fff;
  border-color: var(--ins-purple);
  box-shadow: 0 2px 8px rgba(123, 97, 255, 0.2);
}
.ins-pill-soft.is-active {
  background: #fff;
  color: var(--ins-purple);
  border-color: var(--ins-purple);
  box-shadow: 0 0 0 2px rgba(123, 97, 255, 0.12);
}

/* 列表网格 */
.ins-main {
  max-width: var(--ins-max);
  margin: 0 auto;
  padding: 0 16px 8px;
}
.ins-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

/* 卡片 */
.ins-card {
  background: var(--ins-card);
  border-radius: var(--ins-radius);
  overflow: hidden;
  box-shadow: var(--ins-shadow);
  border: 1px solid var(--ins-line-soft);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.ins-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.06);
  border-color: var(--ins-line);
}

.ins-card-cover {
  width: 100%;
  height: 260px;
  overflow: hidden;
  cursor: zoom-in;
  position: relative;
  background: #f8f5ff;
}
.ins-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.ins-card-cover:hover img { transform: scale(1.04); }

.ins-card-body {
  padding: 14px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* 编号 + 复制 — 干净紧凑 */
.ins-id-box {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.ins-id-text {
  flex: 1;
  min-width: 0;
  padding: 8px 12px;
  border: 1px solid var(--ins-line);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #555;
  background: #faf8ff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  user-select: all;
}
.ins-copy {
  flex-shrink: 0;
  padding: 8px 13px;
  background: var(--ins-purple);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background 0.2s, box-shadow 0.2s;
}
.ins-copy:hover {
  background: var(--ins-purple-dark);
  box-shadow: 0 2px 8px rgba(123, 97, 255, 0.2);
}
.ins-copy svg { width: 14px; height: 14px; fill: currentColor; }

.ins-model {
  margin-bottom: 10px;
}
.ins-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--ins-title);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.ins-gender-tag {
  padding: 2px 8px;
  background: #f5f3ff;
  color: var(--ins-purple);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
}

/* 外链 — 简洁无徽章 */
.ins-link {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  padding: 9px 12px;
  background: #f3f7fe;
  border: 1px solid #dce6f5;
  border-radius: 10px;
  color: #3b6fc1;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.2s, border-color 0.2s;
  word-break: break-all;
}
.ins-link:hover {
  background: #e8f0fe;
  border-color: #b8cef5;
  text-decoration: none;
}
.ins-link-icon {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  color: #5a82d4;
}
.ins-link-icon svg { width: 14px; height: 14px; fill: currentColor; }
.ins-link-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 地址 */
.ins-address {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #999;
  padding-top: 8px;
  border-top: 1px solid var(--ins-line-faint);
  line-height: 1.45;
  word-break: break-word;
}
.ins-address-icon {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  margin-top: 2px;
  color: var(--ins-purple);
}
.ins-address-icon svg { width: 14px; height: 14px; fill: currentColor; }

/* 空态 / 加载 */
.ins-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  color: #999;
  font-size: 16px;
  font-weight: 600;
  background: #fff;
  border-radius: 16px;
  border: 1px dashed var(--ins-line);
}
.ins-empty-icon {
  display: block;
  font-size: 40px;
  margin-bottom: 10px;
  opacity: 0.45;
}
.ins-empty.is-hidden,
.is-hidden { display: none !important; }

.ins-load {
  text-align: center;
  color: var(--ins-muted);
  padding: 28px 0 8px;
  font-size: 14px;
  font-weight: 600;
}
.ins-load-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin: 0 2px;
  border-radius: 50%;
  background: var(--ins-purple);
  opacity: 0.35;
  animation: insPulse 1s infinite ease-in-out;
}
.ins-load-dot:nth-child(2) { animation-delay: 0.15s; }
.ins-load-dot:nth-child(3) { animation-delay: 0.3s; }
@keyframes insPulse {
  0%, 100% { opacity: 0.25; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-3px); }
}

.ins-footer {
  text-align: center;
  padding: 20px 12px 0;
  color: var(--ins-muted);
  font-size: 12px;
}
.ins-footer a {
  color: var(--ins-muted);
  margin: 0 6px;
}
.ins-footer a:hover { color: var(--ins-purple); }

/* 灯箱 */
.ins-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
}
.ins-lightbox img {
  max-width: 95%;
  max-height: 90%;
  border-radius: 12px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
  object-fit: contain;
}
.ins-lightbox-close {
  position: absolute;
  top: 22px;
  right: 28px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 42px;
  cursor: pointer;
  opacity: 0.8;
  line-height: 1;
}
.ins-lightbox-close:hover { opacity: 1; }

/* Toast */
.ins-toast {
  position: fixed;
  left: 50%;
  bottom: 48px;
  transform: translateX(-50%) translateY(12px);
  background: rgba(30, 41, 59, 0.92);
  color: #fff;
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  z-index: 10000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}
.ins-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* 响应式 */
@media (max-width: 768px) {
  .ins-topbar { margin-bottom: 20px; padding: 16px 14px; }
  .ins-topbar-title { font-size: 18px; }
  .ins-topbar-content { font-size: 14px; }
  .ins-brand h1 { font-size: 22px; }
  .ins-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
  }
  .ins-card-cover { height: 200px; }
  .ins-id-box {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }
  .ins-copy { justify-content: center; }
  .ins-search { flex-direction: column; }
  .ins-search-btn { width: 100%; }
}
@media (max-width: 480px) {
  .ins-grid { grid-template-columns: 1fr; }
  .ins-card-cover { height: 260px; }
  .ins-pill { padding: 8px 16px; font-size: 13px; }
}
