/* ChatGPTCN 自定义样式 */
/* 基于hugo-theme-amaze主题的样式优化 */

/* 全局样式优化 */
body#blog {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif !important;
  line-height: 1.6;
  color: #333;
  background-color: #f8f9fa;
}

/* 修复导航栏品牌名称过长问题 */
.navbar-brand {
  font-size: 16px !important;
  font-weight: 600 !important;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 修复头部标题样式 */
.intro-header .post-heading h1 {
  font-size: 2em !important;
  line-height: 1.3 !important;
  margin-bottom: 0.5em !important;
  color: #fff !important;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

/* 标题样式优化 */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  color: #2c3e50;
}

h1 {
  font-size: 2.2em;
  border-bottom: 3px solid #3498db;
  padding-bottom: 0.3em;
}

h2 {
  font-size: 1.8em;
  border-bottom: 2px solid #e74c3c;
  padding-bottom: 0.2em;
}

h3 {
  font-size: 1.5em;
  color: #e67e22;
}

/* 链接样式优化 */
a {
  color: #3498db;
  text-decoration: none;
  transition: all 0.3s ease;
}

a:hover {
  color: #2980b9;
  text-decoration: underline;
}

/* 代码块样式优化 */
code {
  background-color: #f8f9fa;
  color: #e83e8c;
  padding: 0.2em 0.4em;
  border-radius: 3px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.875em;
}

pre {
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  padding: 1em;
  overflow-x: auto;
  margin: 1em 0;
}

pre code {
  background-color: transparent;
  color: #333;
  padding: 0;
}

/* 引用块样式 */
blockquote {
  border-left: 4px solid #3498db;
  background-color: #f8f9fa;
  margin: 1.5em 0;
  padding: 1em 1.5em;
  font-style: italic;
  color: #555;
}

blockquote p {
  margin: 0;
}

/* 列表样式优化 */
ul, ol {
  margin: 1em 0;
  padding-left: 2em;
}

li {
  margin: 0.5em 0;
}

/* 文章元信息样式 */
.post-meta {
  color: #999;
  font-size: 0.9em;
  margin-bottom: 1em;
}

.post-meta a {
  color: #666;
}

.post-meta a:hover {
  color: #333;
}

/* 标签和分类样式 */
.tag, .category {
  display: inline-block;
  background-color: #3498db;
  color: white;
  padding: 0.2em 0.6em;
  border-radius: 12px;
  font-size: 0.8em;
  margin: 0.2em;
  text-decoration: none;
}

.tag:hover, .category:hover {
  background-color: #2980b9;
  color: white;
  text-decoration: none;
}

/* 导航菜单样式优化 */
.nav-menu {
  background-color: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nav-menu a {
  color: #333;
  font-weight: 500;
  padding: 0.5em 1em;
  transition: all 0.3s ease;
}

.nav-menu a:hover {
  color: #3498db;
  background-color: #f8f9fa;
}

/* 文章内容区域优化 */
.am-article {
  background: white !important;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  margin-bottom: 2em;
  padding: 2em !important;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.am-article:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

/* 文章内容样式 */
.am-article-bd {
  font-size: 16px !important;
  line-height: 1.8 !important;
  color: #333 !important;
}

.am-article-bd h2 {
  color: #2c3e50 !important;
  border-bottom: 2px solid #3498db !important;
  padding-bottom: 0.3em !important;
  margin-top: 2em !important;
  margin-bottom: 1em !important;
}

.am-article-bd h3 {
  color: #e67e22 !important;
  margin-top: 1.5em !important;
  margin-bottom: 0.8em !important;
}

.am-article-bd h4 {
  color: #9b59b6 !important;
  margin-top: 1.2em !important;
  margin-bottom: 0.6em !important;
}

/* 按钮样式 */
.btn {
  display: inline-block;
  background-color: #3498db;
  color: white;
  padding: 0.6em 1.2em;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.btn:hover {
  background-color: #2980b9;
  color: white;
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: #95a5a6;
}

.btn-secondary:hover {
  background-color: #7f8c8d;
}

/* 表格样式 */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  background-color: white;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

th, td {
  border: 1px solid #ddd;
  padding: 0.75em;
  text-align: left;
}

th {
  background-color: #f8f9fa;
  font-weight: 600;
  color: #333;
}

tr:nth-child(even) {
  background-color: #f8f9fa;
}

/* 响应式设计 */
@media (max-width: 768px) {
  body {
    font-size: 14px;
  }
  
  h1 {
    font-size: 1.8em;
  }
  
  h2 {
    font-size: 1.5em;
  }
  
  .article-card {
    padding: 1em;
    margin-bottom: 1em;
  }
  
  .nav-menu a {
    padding: 0.4em 0.8em;
  }
}

/* 特殊内容样式 */
.highlight-box {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 1.5em;
  border-radius: 8px;
  margin: 1.5em 0;
}

.highlight-box h3 {
  color: white;
  margin-top: 0;
}

.tip {
  background-color: #d4edda;
  border: 1px solid #c3e6cb;
  border-left: 4px solid #28a745;
  color: #155724;
  padding: 1em;
  border-radius: 4px;
  margin: 1em 0;
}

.warning {
  background-color: #fff3cd;
  border: 1px solid #ffeaa7;
  border-left: 4px solid #ffc107;
  color: #856404;
  padding: 1em;
  border-radius: 4px;
  margin: 1em 0;
}

.error {
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  border-left: 4px solid #dc3545;
  color: #721c24;
  padding: 1em;
  border-radius: 4px;
  margin: 1em 0;
}

/* Logo和品牌样式 */
.site-logo {
  max-height: 40px;
  width: auto;
}

.site-title {
  font-weight: 700;
  color: #2c3e50;
  font-size: 1.5em;
}

.site-subtitle {
  color: #7f8c8d;
  font-style: italic;
  font-size: 0.9em;
}

/* 页脚样式 */
.site-footer {
  background-color: #2c3e50;
  color: #bdc3c7;
  padding: 2em 0;
  margin-top: 3em;
}

.site-footer a {
  color: #3498db;
}

.site-footer a:hover {
  color: #5dade2;
}

/* 搜索框样式 */
.search-box {
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 20px;
  padding: 0.5em 1em;
  transition: all 0.3s ease;
}

.search-box:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.25);
}

/* AI主题特色样式 */
.ai-badge {
  background: linear-gradient(45deg, #667eea, #764ba2);
  color: white;
  padding: 0.3em 0.8em;
  border-radius: 20px;
  font-size: 0.8em;
  font-weight: 600;
  display: inline-block;
  margin: 0.2em;
}

.protocol-link {
  display: inline-block !important;
  background-color: #e8f4fd !important;
  border: 1px solid #bee5eb !important;
  border-radius: 6px !important;
  padding: 0.6em 1.2em !important;
  margin: 0.4em !important;
  text-decoration: none !important;
  transition: all 0.3s ease !important;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
}

.protocol-link:hover {
  background-color: #d1ecf1 !important;
  transform: translateY(-2px) !important;
  text-decoration: none !important;
  box-shadow: 0 4px 8px rgba(0,0,0,0.15) !important;
}

.protocol-link a {
  color: #0c5460 !important;
  text-decoration: none !important;
  font-weight: 500 !important;
}

.protocol-link a:hover {
  color: #0c5460 !important;
  text-decoration: none !important;
}

/* 动画效果 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

/* 深色模式支持准备 */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-color: #1a1a1a;
    --text-color: #e0e0e0;
    --link-color: #4fb3e1;
  }
}
