/* —— Global search (Tencent-like) —— */
body.idca-ca-page .idca-topbar__inner {
  gap: 16px;
}
body.idca-ca-page .idca-topbar__search {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 420px;
  margin: 0 auto !important;
  height: 36px;
  display: flex !important;
  align-items: center !important;
  position: relative;
  z-index: 1100;
}
body.idca-ca-page .idca-gsearch {
  width: 100%;
  height: 36px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid var(--idca-separator, #e5e6eb);
  border-radius: 8px;
  background: #f7f8fa;
  color: #86909c;
  font-size: 13px;
  cursor: text;
  text-align: left;
  box-sizing: border-box;
}
body.idca-ca-page .idca-gsearch:hover {
  border-color: #c9cdd4;
  background: #fff;
}
body.idca-ca-page .idca-gsearch__ico {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  position: relative;
}
body.idca-ca-page .idca-gsearch__ico svg {
  display: block;
  width: 18px;
  height: 18px;
}
body.idca-ca-page .idca-gsearch__ico .spark {
  position: absolute;
  top: -2px;
  right: -3px;
  width: 8px;
  height: 8px;
  color: #7c5cff;
}
html[data-theme="dark"] body.idca-ca-page .idca-gsearch,
html[data-theme="glass"] body.idca-ca-page .idca-gsearch {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.55);
}
html[data-theme="dark"] body.idca-ca-page .idca-gsearch:hover,
html[data-theme="glass"] body.idca-ca-page .idca-gsearch:hover {
  background: rgba(255, 255, 255, 0.12);
}
@media (max-width: 991.98px) {
  body.idca-ca-page .idca-topbar__search { max-width: none; }
  body.idca-ca-page .idca-topnav { display: none !important; }
}

/* Popover */
.idca-spop {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: none;
}
.idca-spop.is-open { display: block; }
.idca-spop__mask {
  position: absolute;
  inset: 0;
  background: rgba(15, 18, 24, 0.35);
}
.idca-spop__panel {
  position: absolute;
  top: calc(var(--idca-top-h, 56px) + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: min(720px, calc(100vw - 24px));
  max-height: min(640px, calc(100vh - var(--idca-top-h, 56px) - 24px));
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.idca-spop__hd {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid #eef1f5;
}
.idca-spop__hd .idca-gsearch__ico { color: #86909c; }
.idca-spop__input {
  flex: 1;
  border: 0;
  outline: none;
  font-size: 16px;
  color: #1d2129;
  background: transparent;
}
.idca-spop__x {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #86909c;
  font-size: 20px;
  cursor: pointer;
}
.idca-spop__x:hover { background: #f2f3f5; }
.idca-spop__tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 12px;
  border-bottom: 1px solid #eef1f5;
  overflow-x: auto;
}
.idca-spop__tab {
  flex-shrink: 0;
  height: 40px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: #4e5969;
  font-size: 13px;
  cursor: pointer;
  position: relative;
}
.idca-spop__tab.is-on {
  color: var(--idca-primary, #165dff);
  font-weight: 600;
}
.idca-spop__tab.is-on::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 0;
  height: 2px;
  background: var(--idca-primary, #165dff);
  border-radius: 1px;
}
.idca-spop__body {
  flex: 1;
  overflow: auto;
  padding: 8px 0 12px;
}
.idca-spop__sec { padding: 10px 16px 4px; }
.idca-spop__sec-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.idca-spop__sec-hd strong {
  font-size: 13px;
  color: #1d2129;
}
.idca-spop__sec-hd a {
  font-size: 12px;
  color: #86909c !important;
  text-decoration: none !important;
}
.idca-spop__sec-hd a:hover { color: var(--idca-primary) !important; }
.idca-spop__ai-hd {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--idca-primary, #165dff);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
}
.idca-spop__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  color: #1d2129 !important;
  text-decoration: none !important;
  font-size: 13px;
}
.idca-spop__item:hover,
.idca-spop__item.is-on {
  background: #f2f3f5;
}
.idca-spop__item.is-best {
  background: #e8f3ff;
  color: var(--idca-primary) !important;
}
.idca-spop__item i {
  color: #86909c;
  font-size: 16px;
  min-width: 18px;
  text-align: center;
}
.idca-spop__item .tag {
  margin-left: auto;
  font-size: 11px;
  color: var(--idca-primary);
  background: rgba(22, 93, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}
.idca-spop__empty,
.idca-spop__hint {
  padding: 28px 16px;
  text-align: center;
  color: #86909c;
  font-size: 13px;
}
.idca-spop__ft {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 16px;
  border-top: 1px solid #eef1f5;
  color: #86909c;
  font-size: 12px;
}
.idca-spop__ft kbd {
  display: inline-block;
  padding: 1px 5px;
  border: 1px solid #e5e6eb;
  border-radius: 4px;
  background: #f7f8fa;
  font-size: 11px;
}
html[data-theme="dark"] .idca-spop__panel { background: #1c1c1e; box-shadow: 0 16px 48px rgba(0,0,0,0.45); }
html[data-theme="dark"] .idca-spop__hd,
html[data-theme="dark"] .idca-spop__tabs,
html[data-theme="dark"] .idca-spop__ft { border-color: rgba(255,255,255,0.08); }
html[data-theme="dark"] .idca-spop__input { color: #f5f5f7; }
html[data-theme="dark"] .idca-spop__tab { color: #aeaeb2; }
html[data-theme="dark"] .idca-spop__item { color: #f5f5f7 !important; }
html[data-theme="dark"] .idca-spop__item:hover { background: rgba(255,255,255,0.06); }
html[data-theme="dark"] .idca-spop__sec-hd strong { color: #f5f5f7; }

/* Full search page */
.idca-spage {
  max-width: 1360px;
  width: 100%;
  margin: 0 auto;
  padding: 20px 0 56px;
  box-sizing: border-box;
}
.idca-spage__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 6px 0 16px;
  border: 1px solid #e5e6eb;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}
.idca-spage__bar input {
  flex: 1;
  border: 0;
  outline: none;
  font-size: 16px;
  color: #1d2129;
  background: transparent;
}
.idca-spage__go {
  height: 36px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  background: var(--idca-primary, #165dff);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.idca-spage__tabs {
  display: flex;
  gap: 4px;
  margin-top: 16px;
  border-bottom: 1px solid #eef1f5;
  overflow-x: auto;
}
.idca-spage__tab {
  height: 42px;
  padding: 0 14px;
  border: 0;
  background: transparent;
  color: #4e5969;
  font-size: 14px;
  cursor: pointer;
  position: relative;
  white-space: nowrap;
}
.idca-spage__tab.is-on {
  color: var(--idca-primary);
  font-weight: 600;
}
.idca-spage__tab.is-on::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 0;
  height: 2px;
  background: var(--idca-primary);
}
.idca-spage__ai {
  margin-top: 20px;
  padding: 18px 20px;
  border: 1px solid #e8ecf2;
  border-radius: 12px;
  background: linear-gradient(180deg, #f7faff 0%, #fff 48%);
}
.idca-spage__ai-intro {
  margin: 0 0 14px;
  font-size: 13px;
  color: #4e5969;
  line-height: 1.6;
}
.idca-spage__cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
@media (max-width: 767.98px) {
  .idca-spage__cards { grid-template-columns: 1fr; }
}
.idca-spage__card {
  display: block;
  padding: 14px;
  border: 1px solid #eef1f5;
  border-radius: 10px;
  background: #fff;
  text-decoration: none !important;
  color: inherit !important;
}
.idca-spage__card:hover { border-color: #bedaff; box-shadow: 0 4px 12px rgba(22, 93, 255, 0.08); }
.idca-spage__card strong {
  display: block;
  font-size: 14px;
  color: #1d2129;
  margin-bottom: 6px;
}
.idca-spage__card p {
  margin: 0 0 10px;
  font-size: 12px;
  color: #86909c;
  line-height: 1.5;
  min-height: 36px;
}
.idca-spage__card .acts {
  display: flex;
  gap: 12px;
  font-size: 12px;
}
.idca-spage__card .acts span { color: var(--idca-primary); }
.idca-spage__ai-body {
  font-size: 14px;
  color: #1d2129;
  line-height: 1.75;
}
.idca-spage__ai-body mark {
  background: transparent;
  color: #f53f3f;
  font-weight: 600;
}
.idca-spage__ai-ft {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  font-size: 12px;
  color: #86909c;
}
.idca-spage__sec {
  margin-top: 28px;
}
.idca-spage__sec h2 {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 600;
  color: #1d2129;
}
.idca-spage__list {
  background: #fff;
  border: 1px solid #e8ecf2;
  border-radius: 12px;
  overflow: hidden;
}
.idca-spage__row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid #eef1f5;
  text-decoration: none !important;
  color: inherit !important;
  transition: background 0.15s ease;
}
.idca-spage__row:last-child { border-bottom: 0; }
.idca-spage__row:hover { background: #f7f8fa; }
.idca-spage__row-main { flex: 1; min-width: 0; }
.idca-spage__row h3 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
  color: #1d2129 !important;
  line-height: 1.4;
}
.idca-spage__row:hover h3 { color: var(--idca-primary, #165dff) !important; }
.idca-spage__row p {
  margin: 0 0 6px;
  font-size: 13px;
  color: #4e5969;
  line-height: 1.6;
}
.idca-spage__row .from {
  font-size: 12px;
  color: #86909c;
}
.idca-spage__row-go {
  flex-shrink: 0;
  font-size: 12px;
  color: #86909c;
  padding: 6px 10px;
  border: 1px solid #e5e6eb;
  border-radius: 6px;
  background: #fff;
}
.idca-spage__row:hover .idca-spage__row-go {
  color: var(--idca-primary, #165dff);
  border-color: #bedaff;
  background: #f7faff;
}
.idca-spage__row mark {
  background: #fff7e8;
  color: inherit;
  padding: 0 2px;
  border-radius: 2px;
}
.idca-spage__empty {
  padding: 48px 0;
  text-align: center;
  color: #86909c;
}
html[data-theme="dark"] .idca-spage__bar,
html[data-theme="dark"] .idca-spage__ai,
html[data-theme="dark"] .idca-spage__card {
  background: #1c1c1e;
  border-color: rgba(255,255,255,0.1);
}
html[data-theme="dark"] .idca-spage__bar input,
html[data-theme="dark"] .idca-spage__card strong,
html[data-theme="dark"] .idca-spage__sec h2,
html[data-theme="dark"] .idca-spage__ai-body { color: #f5f5f7; }
html[data-theme="dark"] .idca-spage__ai {
  background: linear-gradient(180deg, rgba(22,93,255,0.12) 0%, #1c1c1e 50%);
}

a.idca-gsearch { text-decoration: none !important; color: inherit !important; }

body.idca-ca-page .idca-gsearch--field { cursor: text; margin: 0; }
body.idca-ca-page .idca-gsearch--field input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--idca-text, #1d2129);
  font-size: 13px;
  line-height: 1.2;
  height: 100%;
  padding: 0;
  margin: 0;
}
body.idca-ca-page .idca-gsearch--field input::placeholder { color: #86909c; }
body.idca-ca-page .idca-gsearch.is-open,
body.idca-ca-page .idca-gsearch--field:focus-within {
  border-color: var(--idca-primary, #165dff);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(22, 93, 255, 0.12);
}
.idca-sdrop {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  width: 100%;
  transform: none;
  box-sizing: border-box;
  max-height: min(520px, calc(100vh - var(--idca-top-h, 52px) - 24px));
  overflow: auto;
  background: #fff;
  border: 1px solid #e5e6eb;
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(15, 18, 24, 0.14);
  padding: 14px 14px 12px;
  z-index: 1200;
}
.idca-sdrop[hidden] { display: none !important; }
.idca-sdrop__ai-hd {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #1d2129;
  margin-bottom: 10px;
}
.idca-yunyun-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  flex-shrink: 0;
  background: #f2f3f5;
}
.idca-yunyun-spark { color: #ff6a3d; flex-shrink: 0; }
.idca-sdrop__tips {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}
.idca-sdrop__tip {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  border: 1px solid #eef1f5;
  background: #f7f8fa;
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 13px;
  color: #1d2129;
  cursor: pointer;
  line-height: 1.35;
  box-sizing: border-box;
}
.idca-sdrop__tip-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.idca-sdrop__tip:hover { border-color: #bedaff; background: #f7faff; }
.idca-sdrop__block { margin-top: 4px; }
.idca-sdrop__hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 12px;
  color: #86909c;
}
.idca-sdrop__hd button {
  border: 0;
  background: transparent;
  color: #86909c;
  font-size: 12px;
  cursor: pointer;
}
.idca-sdrop__hd button:hover { color: var(--idca-primary); }
.idca-sdrop__tags { display: flex; flex-wrap: wrap; gap: 8px; min-height: 28px; }
.idca-sdrop__tag {
  border: 0;
  background: #f2f3f5;
  color: #4e5969;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
}
.idca-sdrop__tag:hover { background: #e8f3ff; color: var(--idca-primary); }
.idca-sdrop__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.idca-sdrop__card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f7f8fa;
  color: #1d2129 !important;
  text-decoration: none !important;
  font-size: 13px;
}
.idca-sdrop__card:hover { background: #eef5ff; color: var(--idca-primary) !important; }
.idca-sdrop__card i { color: #86909c; }
.idca-sdrop__live { margin-top: 10px; border-top: 1px solid #eef1f5; padding-top: 10px; }
.idca-sdrop__live a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 8px;
  color: #1d2129 !important;
  text-decoration: none !important;
  font-size: 13px;
}
.idca-sdrop__live a:hover { background: #f2f3f5; }
.idca-sdrop__more {
  display: block;
  text-align: center;
  margin-top: 8px;
  font-size: 12px;
  color: var(--idca-primary) !important;
  text-decoration: none !important;
}

/* Search page: same topbar as user center, no left sider (fullscreen content) */
body.idca-spage-body.idca-ca-page {
  --idca-sider-w: 0px;
  background: #f5f7fa;
}
body.idca-spage-body .vertical-menu,
body.idca-spage-body .idca-sider {
  display: none !important;
}
body.idca-spage-body .main-content,
body.idca-spage-body .footer {
  margin-left: 0 !important;
}
body.idca-spage-body .page-content {
  padding-top: 12px !important;
}
body.idca-spage-body .container-fluid {
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 28px !important;
  padding-right: 28px !important;
}
body.idca-spage-body #page-topbar,
body.idca-spage-body .idca-topbar {
  display: block !important;
}
.idca-spage-shell { min-height: 0; }
.idca-spage-top { display: none !important; }
.idca-spage-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #1d2129 !important;
  text-decoration: none !important;
  font-size: 15px;
}
.idca-spage-brand__mark {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--idca-primary, #165dff);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.idca-spage-back {
  font-size: 13px;
  color: #4e5969 !important;
  text-decoration: none !important;
}
.idca-spage-back:hover { color: var(--idca-primary) !important; }
body.idca-spage-body .idca-spage {
  max-width: none;
  width: 100%;
  padding-top: 8px;
  padding-left: 0;
  padding-right: 0;
}
.idca-spage__ai-stream {
  white-space: pre-wrap;
  word-break: break-word;
}
.idca-spage__ai-cursor::after {
  content: "";
  display: inline-block;
  width: 8px;
  height: 1em;
  margin-left: 2px;
  vertical-align: -2px;
  background: var(--idca-primary);
  animation: idca-blink 1s step-end infinite;
}
@keyframes idca-blink {
  50% { opacity: 0; }
}
.idca-spage__think {
  margin: 0 0 12px;
  border: 1px solid #eef1f5;
  border-radius: 10px;
  background: #fafbfc;
}
.idca-spage__think summary {
  list-style: none;
  cursor: pointer;
  padding: 10px 14px;
  font-size: 13px;
  color: #4e5969;
  display: flex;
  align-items: center;
  gap: 8px;
}
.idca-spage__think summary::-webkit-details-marker { display: none; }
.idca-spage__think summary::before {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.5px solid #86909c;
  border-bottom: 1.5px solid #86909c;
  transform: rotate(-45deg);
  transition: transform .15s;
}
.idca-spage__think[open] summary::before { transform: rotate(45deg); }
.idca-spage__think-body {
  padding: 0 14px 12px;
  font-size: 12px;
  color: #86909c;
  line-height: 1.6;
  white-space: pre-wrap;
  max-height: 220px;
  overflow: auto;
}
.idca-spage__ai-body {
  font-size: 14px;
  line-height: 1.7;
  color: #1d2129;
}
.idca-spage__ai-body h4 {
  margin: 16px 0 8px;
  font-size: 15px;
}
.idca-spage__ai-body p { margin: 0 0 10px; }
.idca-spage__ai-body ul,
.idca-spage__ai-body ol {
  margin: 0 0 12px;
  padding-left: 1.2em;
}
.idca-spage__ai-body li { margin: 4px 0; }
.idca-spage__ai-body a {
  color: var(--idca-primary) !important;
}
.idca-spage__ai-body a:hover {
  text-decoration: underline;
}
.idca-spage__ai-body ul {
  list-style: none;
  padding-left: 0;
}
.idca-spage__ai-body ul li {
  border-bottom: 1px solid #f2f3f5;
  padding: 8px 0;
}
.idca-spage__ai-body ul li:last-child { border-bottom: 0; }
.idca-spage__ai-body ol {
  padding-left: 1.4em;
}
.idca-spage__ai-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  background: #f2f3f5;
  padding: 1px 5px;
  border-radius: 4px;
}
.idca-spage__ai-body pre {
  background: #f7f8fa;
  border: 1px solid #eef1f5;
  border-radius: 8px;
  padding: 10px 12px;
  overflow: auto;
  font-size: 12px;
}
.idca-spage__ai-body blockquote {
  margin: 0 0 12px;
  padding: 6px 12px;
  border-left: 3px solid #bedaff;
  color: #4e5969;
  background: #f7faff;
}
.idca-spage__ai-hd {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
}
.idca-spage__ai-hd .idca-yunyun-avatar {
  width: 36px;
  height: 36px;
}
.idca-spage__ai-intro {
  margin: 0;
  font-size: 13px;
  color: #4e5969;
  line-height: 1.6;
}
.idca-spage__ai-intro strong { color: #1d2129; font-weight: 600; }

html[data-theme="dark"] .idca-sdrop,
html[data-theme="dark"] .idca-spage-top { background: #1c1c1e; border-color: rgba(255,255,255,0.08); }
html[data-theme="dark"] .idca-sdrop__tip,
html[data-theme="dark"] .idca-sdrop__card { background: #2c2c2e; color: #f5f5f7 !important; }
html[data-theme="dark"] body.idca-spage-body { background: #0f0f10; }
