/* ===== Cognifram 核心 UI 保护罩 ===== */
/* 这个文件里的样式优先级最高，永远不会被其他样式覆盖。 */
/* 如需更新，请修改下方版本号。 */

/* 所有主要输入框 */
.hero-search input,
.quick-view input,
.generator-view .input-box,
.note-form textarea,
.chat-input,
.search-bar input,
.question-area input,
.input-box {
  width: 100% !important;
  max-width: 100% !important;
  flex: 1 1 auto !important;
  padding: 14px 18px !important;
  font-size: 1.05rem !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: 14px !important;
  background: rgba(128, 128, 128, 0.12) !important;
  backdrop-filter: blur(10px) !important;
  color: var(--text-primary) !important;
  outline: none !important;
  box-sizing: border-box !important;
  resize: vertical !important;
}

/* 思维对谈输入框再加宽一点 */
.chat-input {
  min-width: 300px !important;
}

/* 圆形按钮 */
.hero-search-icon-btn,
.chat-send-btn {
  width: 44px !important;
  height: 44px !important;
  border-radius: 50% !important;
  background: rgba(128, 128, 128, 0.15) !important;
  backdrop-filter: blur(10px) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: var(--text-primary) !important;
  font-size: 1.2rem !important;
  cursor: pointer;
  display: flex !important;
  align-items: center;
  justify-content: center;
}

/* 占位符文字永远在框内 */
.placeholder-text {
  position: absolute !important;
  top: 50% !important;
  left: 16px !important;
  transform: translateY(-50%) !important;
  pointer-events: none !important;
  color: var(--text-secondary) !important;
  font-size: 0.95rem !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  max-width: calc(100% - 80px) !important;
  z-index: 2 !important;
}

/* 浅色模式适配 */
[data-theme="light"] .hero-search input,
[data-theme="light"] .quick-view input,
[data-theme="light"] .generator-view .input-box,
[data-theme="light"] .note-form textarea,
[data-theme="light"] .chat-input,
[data-theme="light"] .search-bar input,
[data-theme="light"] .question-area input,
[data-theme="light"] .input-box {
  background: rgba(0, 0, 0, 0.04) !important;
  border-color: rgba(0, 0, 0, 0.15) !important;
  color: #1a1a1a !important;
}

/* 无框拆解结果：纯文字，自适应主题，永远清晰 */
.quick-result-plain {
  margin-top: 28px;
  padding: 0;
  background: transparent;
  border: none;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-primary);
  text-shadow: 0 0 1px rgba(128, 128, 128, 0.2);
  white-space: pre-wrap;
  word-break: break-word;
}

/* 品牌名字母间距 */
.hero-title {
  letter-spacing: 4px;
  transition: transform 0.3s ease, text-shadow 0.3s ease;
}

/* 悬浮呼吸感：微微放大 + 发光 */
.hero-title:hover {
  transform: scale(1.03);
  text-shadow: 0 0 20px rgba(128, 128, 128, 0.4);
}

/* 卡片悬浮重力光晕 */
.history-card,
.note-card {
  position: relative;
  overflow: hidden;
}

.history-card::after,
.note-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(
    circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(255, 255, 255, 0.15) 0%,
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.history-card:hover::after,
.note-card:hover::after {
  opacity: 1;
}

/* 历史标签删除按钮 */
.quick-history-tag .tag-delete {
  background: none;
  border: none;
  font-size: 0.7rem;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0 0 0 4px;
  line-height: 1;
}

.quick-history-tag .tag-delete:hover {
  color: var(--text-primary);
}

/* ===== PC端思维对谈输入框宽度修复 ===== */
@media (min-width: 769px) {
  .chat-view {
    max-width: 700px !important;
    margin: 0 auto !important;
  }

  .chat-input {
    min-width: 300px !important;
    width: 100% !important;
    flex: 1 1 auto !important;
  }

  .chat-input-area {
    max-width: 700px !important;
    width: 100% !important;
  }
}
