:root {
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --bg-dark: #0f172a;
  --card-dark: #1e293b;
  --text-dark: #f8fafc;
  --border-dark: #334155;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  background-color: #0b0f19;
  color: #e2e8f0;
}

/* 隐藏滚动条但保留滚动 */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* 磨砂玻璃效果 */
.glass-nav {
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.glass-card {
  background: rgba(30, 41, 59, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* 可视化图表容器卡片 */
.chart-container-card {
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 14px;
  overflow: hidden;
  margin: 14px 0;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
  transition: border-color 0.2s ease;
}

.chart-container-card:hover {
  border-color: #3b82f6;
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background: #182234;
  border-bottom: 1px solid #283548;
}

.chart-body {
  width: 100%;
  height: 380px;
  padding: 8px;
}

@media (max-width: 640px) {
  .chart-body {
    height: 300px;
  }
}

/* Mermaid 容器样式 */
.mermaid-card {
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 14px;
  padding: 16px;
  margin: 14px 0;
  overflow-x: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Markdown 渲染美化 */
.prose-content {
  line-height: 1.75;
  font-size: 0.95rem;
  color: #cbd5e1;
}

.prose-content h1, .prose-content h2, .prose-content h3 {
  color: #f8fafc;
  font-weight: 600;
  margin-top: 1.2em;
  margin-bottom: 0.6em;
}

.prose-content p {
  margin-bottom: 0.9em;
}

.prose-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  background: #111827;
  border-radius: 8px;
  overflow: hidden;
}

.prose-content th, .prose-content td {
  padding: 10px 14px;
  border: 1px solid #243042;
  text-align: left;
}

.prose-content th {
  background: #1e293b;
  color: #60a5fa;
  font-weight: 600;
}

.prose-content code:not(pre code) {
  background: #1e293b;
  color: #93c5fd;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.85em;
}

.prose-content pre {
  background: #0d1117;
  border: 1px solid #21262d;
  border-radius: 10px;
  padding: 12px;
  margin: 12px 0;
  overflow-x: auto;
}

/* 打字机光标动画 */
.cursor-blink {
  display: inline-block;
  width: 7px;
  height: 15px;
  background-color: #3b82f6;
  margin-left: 3px;
  vertical-align: middle;
  animation: blink 0.8s infinite;
}

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

/* 按钮点击态 */
.btn-press:active {
  transform: scale(0.96);
}
