/* ==================== 基础样式 ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: #f5f5f5;
  color: #333;
  height: 100vh;
  overflow: hidden;
}

.container {
  display: flex;
  height: 100vh;
}

/* ==================== 侧边栏 ==================== */
.sidebar {
  width: 280px;
  background: #fff;
  display: flex;
  flex-direction: column;
  padding: 12px;
  border-right: 1px solid #e5e5e5;
  transition: width 0.3s ease, padding 0.3s ease;
}

.sidebar.collapsed {
  width: 0;
  padding: 0;
  overflow: hidden;
  border-right: none;
}

/* 新对话按钮 */
.new-chat-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  background: transparent;
  color: #333;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
  margin-bottom: 12px;
}

.new-chat-btn:hover {
  background: #f5f5f5;
}

/* 侧边栏操作按钮组 */
.sidebar-actions {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}

.sidebar-action-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 6px;
  background: #f5f5f5;
  color: #333;
  border: none;
  border-radius: 6px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s;
}

.sidebar-action-btn:hover {
  background: #e8f4ff;
  color: #1e88e5;
}

.sidebar-action-btn svg {
  width: 16px;
  height: 16px;
}

.history-section {
  flex: 1;
  margin-top: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.history-title {
  font-size: 12px;
  font-weight: 600;
  color: #999;
  padding: 0 8px 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.history-list {
  flex: 1;
  overflow-y: auto;
  padding-right: 4px;
}

.history-list::-webkit-scrollbar {
  width: 6px;
}

.history-list::-webkit-scrollbar-thumb {
  background: #ddd;
  border-radius: 3px;
}

.history-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
  margin-bottom: 4px;
  position: relative;
}

.history-item:hover {
  background: #f5f5f5;
}

.history-item.active {
  background: #e8f4ff;
}

.history-item-title {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  color: #333;
}

.history-delete-btn {
  opacity: 0;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: opacity 0.2s, background 0.2s, color 0.2s;
}

.history-item:hover .history-delete-btn {
  opacity: 1;
}

.history-delete-btn:hover {
  background: #ffebee;
  color: #e53935;
}

.settings-section {
  padding-top: 12px;
  border-top: 1px solid #e5e5e5;
}

.settings-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  background: none;
  color: #333;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
}

.settings-btn:hover {
  background: #f5f5f5;
}

/* ==================== 主内容区 ==================== */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #fafafa;
  min-width: 0;
}

.chat-header {
  padding: 16px 24px;
  border-bottom: 1px solid #e5e5e5;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-controls {
  display: flex;
  gap: 8px;
}

.header-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: none;
  border: none;
  color: #666;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.header-icon-btn:hover {
  background: #f5f5f5;
  color: #333;
}

.chat-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  flex: 1;
}

/* ==================== 聊天区域 ==================== */
.chat-container {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
}

.chat-container::-webkit-scrollbar {
  width: 8px;
}

.chat-container::-webkit-scrollbar-thumb {
  background: #ddd;
  border-radius: 4px;
}

.welcome-message {
  padding: 24px 0;
  width: 100%;
}

.welcome-message h3 {
  font-size: 24px;
  font-weight: 600;
  color: #333;
  margin-bottom: 12px;
}

.welcome-message p {
  font-size: 14px;
  color: #666;
  margin-bottom: 24px;
}

.welcome-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.example-tag {
  padding: 8px 16px;
  background: #e8f4ff;
  color: #1e88e5;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  border: none;
  transition: background 0.2s;
}

.example-tag:hover {
  background: #bbdefb;
}

/* ==================== 消息气泡 ==================== */
.message {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.message.user {
  flex-direction: row-reverse;
  justify-content: flex-end;
}

.message-content {
  padding: 12px 16px;
  border-radius: 18px;
  line-height: 1.6;
  max-width: 90%;
  width: fit-content;
}

.message.user .message-content {
  background: #e3f2fd;
  color: #333;
  border-bottom-right-radius: 4px;
  text-align: left;
  margin-left: auto;
}

.message.assistant .message-content {
  max-width: 90%;
  width: 100%;
  background: transparent;
  color: #333;
  border-bottom-left-radius: 4px;
}

.message-content p {
  margin-bottom: 8px;
}

.message-content p:last-child {
  margin-bottom: 0;
}

/* Markdown 标题 */
.message-content h1,
.message-content h2,
.message-content h3,
.message-content h4 {
  margin: 12px 0 8px 0;
  font-weight: 600;
  line-height: 1.4;
}

.message-content h1 { font-size: 20px; color: #1e88e5; }
.message-content h2 { font-size: 18px; color: #333; }
.message-content h3 { font-size: 16px; color: #333; }
.message-content h4 { font-size: 14px; color: #666; }

.message.user .message-content h1,
.message.user .message-content h2,
.message.user .message-content h3,
.message.user .message-content h4 {
  color: #333;
}

/* ==================== GeoGebra 画板 ==================== */
.ggb-container-wrapper {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e5e5e5;
  background: #fff;
  margin: 12px auto 0 auto;
}

.ggb-header {
  padding: 6px 8px;
  background: #f5f7fa;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e0e0e0;
}

.ggb-controls {
  display: flex;
  gap: 2px;
  background: #fff;
  padding: 2px;
  border-radius: 4px;
}

.ggb-control-btn {
  padding: 4px 12px;
  font-size: 14px;
  border: none;
  background: transparent;
  color: #666;
  cursor: pointer;
  border-radius: 3px;
  transition: all 0.2s;
}

.ggb-control-btn:hover {
  background: #f0f0f0;
  color: #333;
}

.ggb-control-btn.active {
  background: #4a90d9;
  color: #fff;
}

.ggb-copy-btn {
  padding: 4px 14px;
  font-size: 13px;
  border: 1px solid #d0d0d0;
  background: #fff;
  color: #666;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 4px;
}

.ggb-copy-btn:hover {
  border-color: #4a90d9;
  color: #4a90d9;
}

.ggb-content {
  position: relative;
  width: 100%;
  height: 460px;
}

.ggb-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fff;
}

.ggb-container > div {
  width: 100% !important;
  height: 100% !important;
}

/* ==================== 图片预览 ==================== */
.image-preview-wrapper {
  display: none;
  padding: 12px 24px;
  background: #fff;
  border-top: 1px solid #e5e5e5;
}

.image-preview-wrapper.active {
  display: block;
}

.image-preview-container {
  position: relative;
  max-width: 400px;
  margin-left: auto;
}

.image-preview-container img {
  max-width: 100%;
  max-height: 200px;
  object-fit: contain;
  border-radius: 8px;
}

.close-preview-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.close-preview-btn:hover {
  background: rgba(0, 0, 0, 0.7);
}

/* ==================== 输入区域 ==================== */
.user-input-container {
  padding: 16px 24px;
  border-top: 1px solid #e5e5e5;
  background: #fff;
}

.input-wrapper {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  background: #f5f5f5;
  border-radius: 14px;
  padding: 8px;
  border: 1px solid #e5e5e5;
  transition: border-color 0.2s;
}

.input-wrapper:focus-within {
  border-color: #1e88e5;
  background: #fff;
}

#user-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: #333;
  font-size: 14px;
  resize: none;
  padding: 10px;
  max-height: 150px;
  overflow-y: auto;
}

#user-input::placeholder {
  color: #999;
}

.input-actions {
  display: flex;
  gap: 8px;
  padding-right: 4px;
}

.image-attachment-btn,
.send-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.image-attachment-btn {
  background: none;
  color: #999;
}

.image-attachment-btn:hover {
  background: #e5e5e5;
  color: #666;
}

.send-btn {
  background: #1e88e5;
  color: white;
}

.send-btn:hover {
  background: #1976d2;
}

.send-btn:disabled {
  background: #999;
  cursor: not-allowed;
}

/* ==================== 设置弹窗 ==================== */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #e5e5e5;
}

.modal-header h3 {
  font-size: 20px;
  font-weight: 600;
  color: #333;
}

.modal-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: none;
  border: none;
  font-size: 24px;
  color: #999;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.modal-close-btn:hover {
  background: #f5f5f5;
  color: #333;
}

.modal-body {
  padding: 24px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  margin-bottom: 8px;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  font-size: 14px;
  color: #333;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #1e88e5;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #e5e5e5;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.btn-secondary {
  padding: 10px 24px;
  background: #fff;
  color: #666;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: #f5f5f5;
  color: #333;
}

.btn-primary {
  padding: 10px 24px;
  background: #1e88e5;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-primary:hover {
  background: #1976d2;
}

/* ==================== GeoGebra 命令显示 ==================== */
.ggb-commands-display {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  display: none;
}

.ggb-commands-header {
  display: none;
}

.ggb-commands-title {
  display: none;
}

.copy-btn {
  padding: 4px 8px;
  background: transparent;
  border: 1px solid #d0d0d0;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #666;
}

.copy-btn:hover {
  background: #f0f0f0;
  border-color: #1976d2;
  color: #1976d2;
}

.copy-btn svg {
  width: 14px;
  height: 14px;
}

.ggb-commands-list {
  padding: 10px 14px;
  height: 100%;
  overflow-y: auto;
}

.ggb-command-item {
  display: block;
  padding: 0;
  font-size: 12px;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-all;
}

.ggb-command-item code {
  display: block;
  background: transparent;
  color: #333;
  word-break: break-all;
  white-space: pre-wrap;
  font-weight: 400;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ==================== 响应式 ==================== */
@media (max-width: 768px) {
  body {
    -webkit-tap-highlight-color: transparent;
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 100;
    box-shadow: 4px 0 16px rgba(0, 0, 0, 0.15);
    width: 260px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(0);
  }
  
  .sidebar.collapsed {
    transform: translateX(-100%);
  }

  .sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 99;
    transition: opacity 0.3s;
  }

  .sidebar-overlay.active {
    display: block;
  }
  
  .new-chat-btn {
    padding: 14px 16px;
    font-size: 15px;
  }

  .sidebar-action-btn {
    padding: 12px 8px;
    font-size: 12px;
  }

  .sidebar-action-btn svg {
    width: 18px;
    height: 18px;
  }
  
  .main-content {
    min-width: 0;
    width: 100%;
  }
  
  .chat-header {
    padding: 12px 16px;
    height: 56px;
  }
  
  .chat-header h1 {
    font-size: 16px;
  }
  
  .header-icon-btn {
    width: 40px;
    height: 40px;
  }
  
  .chat-container {
    padding: 16px;
    padding-bottom: 80px;
  }
  
  .welcome-message h3 {
    font-size: 20px;
  }
  
  .welcome-message p {
    font-size: 14px;
  }
  
  .example-tag {
    padding: 10px 14px;
    font-size: 14px;
  }
  
  .message-content {
    max-width: 95%;
    font-size: 15px;
    line-height: 1.6;
  }
  
  .message.user .message-content {
    padding: 14px 18px;
  }
  
  .message.assistant .message-content {
    padding: 14px 18px;
  }

  .ggb-container-wrapper {
    margin: 16px -16px;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
  
  .ggb-content {
    height: 300px;
  }
  
  .ggb-header {
    padding: 8px 12px;
  }
  
  .ggb-control-btn {
    padding: 6px 14px;
    font-size: 14px;
  }
  
  .ggb-copy-btn {
    padding: 6px 16px;
    font-size: 14px;
  }
  
  .user-input-container {
    padding: 12px 16px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
  }
  
  .input-wrapper {
    padding: 10px;
    border-radius: 16px;
  }
  
  #user-input {
    padding: 12px;
    font-size: 15px;
    line-height: 1.5;
  }
  
  .image-attachment-btn,
  .send-btn {
    width: 42px;
    height: 42px;
    border-radius: 10px;
  }
  
  .image-attachment-btn svg,
  .send-btn svg {
    width: 20px;
    height: 20px;
  }
  
  .modal-content {
    width: 95%;
    max-width: 95%;
    border-radius: 16px;
  }
  
  .modal-header {
    padding: 16px 20px;
  }
  
  .modal-body {
    padding: 20px;
  }
  
  .form-group input,
  .form-group select {
    padding: 12px 14px;
    font-size: 15px;
  }
  
  .btn-secondary,
  .btn-primary {
    padding: 12px 28px;
    font-size: 15px;
  }

  .history-item {
    padding: 12px 14px;
  }
  
  .history-item-title {
    font-size: 14px;
  }
  
  .history-delete-btn {
    opacity: 1;
    width: 28px;
    height: 28px;
  }
  
  .settings-btn {
    padding: 12px 14px;
    font-size: 15px;
  }
}

@media (max-width: 768px) and (orientation: landscape) {
  .ggb-content {
    height: 220px;
  }
  
  .chat-container {
    padding-bottom: 70px;
  }
}

@media (max-width: 480px) {
  .sidebar {
    width: 240px;
  }
  
  .chat-header {
    padding: 10px 12px;
  }
  
  .chat-container {
    padding: 12px;
    padding-bottom: 75px;
  }
  
  .message-content {
    font-size: 14px;
    padding: 12px 14px;
  }
  
  .ggb-content {
    height: 260px;
  }
  
  .input-wrapper {
    padding: 8px;
  }
  
  #user-input {
    font-size: 14px;
    padding: 10px;
  }
}

@media (max-width: 480px) and (orientation: landscape) {
  .ggb-content {
    height: 180px;
  }
}

/* ==================== 消息内容中的 code 标签样式 ==================== */
.message-content code {
  font-family: Courier, 'Courier New', monospace;
  font-size: 13px;
}

/* ==================== 动态状态及提示样式 ==================== */
.copy-success-text {
  color: #52c41a;
}

.ggb-error-text {
  color: #ff4d4f;
}

.ggb-error-box {
  color: #ff4d4f;
  padding: 8px;
  margin-top: 8px;
  background: #fff3f3;
  border-radius: 4px;
  font-size: 12px;
}

/* 流式渲染：打字光标 */
.ggb-cursor-blink {
  animation: ggb-blink 0.8s infinite;
  color: #1e88e5;
  font-weight: 400;
}

@keyframes ggb-blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* 流式渲染：生成中提示 */
.ggb-stream-loading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 8px 16px;
  background: #f5f7fa;
  border-radius: 8px;
  color: #666;
  font-size: 13px;
}

.ggb-stream-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid #e5e5e5;
  border-top-color: #1e88e5;
  border-radius: 50%;
  animation: ggb-spin 0.8s linear infinite;
}

@keyframes ggb-spin {
  to { transform: rotate(360deg); }
}

/* ==================== Markdown 表格样式（默认） ==================== */
.ggb-markdown-table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  margin: 10px 0;
  font-size: 13px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 6px;
}

.message-content .ggb-markdown-table th,
.message-content .ggb-markdown-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #f0f0f0;
  text-align: left;
  vertical-align: middle;
}

.message-content .ggb-markdown-table thead th {
  background: #fafafa;
  font-weight: 600;
  color: #333;
  border-bottom: 1px solid #e6e6e6;
}

.message-content .ggb-markdown-table tbody tr:nth-child(even) td {
  background: #fbfbfb;
}

.message-content .ggb-markdown-table td code {
  white-space: pre-wrap;
  word-break: break-word;
  background: transparent;
  font-family: inherit;
}

/* 小屏幕时允许横向滚动以避免挤压 */
.message-content .ggb-markdown-table {
  display: table;
}

.message-content .ggb-markdown-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ==================== 加载动画样式 ==================== */
.message.loading {
  justify-content: flex-start;
}

.message.loading .message-content {
  background: #f5f7fa;
  border-radius: 18px;
  border-bottom-left-radius: 4px;
  padding: 12px 20px;
  min-width: 200px;
}

.thinking-text {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 15px;
  color: #666;
  font-weight: 500;
}

.thinking-message {
  transition: opacity 0.3s ease;
}

.thinking-cursor {
  color: #1e88e5;
  font-weight: bold;
  font-size: 18px;
  animation: cursorBlink 1s infinite;
}

.thinking-timer {
  margin-left: 12px;
  padding: 2px 8px;
  background: #e8f4ff;
  color: #1e88e5;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  min-width: 40px;
  text-align: center;
}

@keyframes cursorBlink {
  0%, 50% {
    opacity: 1;
  }
  51%, 100% {
    opacity: 0;
  }
}

/* ==================== 搜索结果弹窗 ==================== */
.search-modal-content {
  max-width: 600px;
}

.search-modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid #e5e5e5;
}

.search-modal-input-container {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: #f5f5f5;
  border-radius: 8px;
  border: 1px solid #e5e5e5;
  transition: all 0.2s;
}

.search-modal-input-container:focus-within {
  background: #fff;
  border-color: #1e88e5;
}

.search-modal-input-container svg {
  color: #999;
  flex-shrink: 0;
}

.search-modal-input-container input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-size: 14px;
  color: #333;
}

.search-modal-input-container input::placeholder {
  color: #999;
}

.search-clear-btn {
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s;
}

.search-clear-btn:hover {
  background: #e5e5e5;
  color: #666;
}

.search-results-body {
  max-height: 400px;
  overflow-y: auto;
}

.search-results {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.search-result-item {
  padding: 12px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
  border: 1px solid #e5e5e5;
}

.search-result-item:hover {
  background: #e8f4ff;
  border-color: #1e88e5;
}

.search-result-title {
  font-size: 14px;
  font-weight: 500;
  color: #333;
  margin-bottom: 4px;
}

.search-result-preview {
  font-size: 12px;
  color: #666;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-result-highlight {
  background: #ffeb3b;
  font-weight: 500;
}

.search-no-results {
  text-align: center;
  padding: 40px;
  color: #999;
  font-size: 14px;
}