/* Header样式 */
.site-header {
  background: white;
  border-bottom: 1px solid #e0e0e0;
  padding: 15px 20px;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.header-wrapper {
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
}

.site-title img {
  display: block;
  transition: transform 0.2s, opacity 0.2s;
}

.site-title:hover img {
  transform: scale(1.02);
  opacity: 0.9;
}

/* 科技蓝主题色变量 */
:root {
  --primary-color: #1890ff;
  --primary-hover: #096dd9;
  --primary-light: #e6f7ff;
}

/* 语言切换器 */
.language-switcher {
  position: absolute;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
}

.language-switcher select {
  padding: 6px 12px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  background: white;
  color: #333;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.language-switcher select:hover {
  border-color: #1890ff;
}

.language-switcher select:focus {
  outline: none;
  border-color: #1890ff;
  box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.1);
}

/* 首页样式 */
.home-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 20px;
}

.home-content .hero {
  text-align: center;
  margin-bottom: 60px;
  padding: 60px 20px;
  background: linear-gradient(135deg, #1890ff 0%, #096dd9 100%);
  border-radius: 16px;
  color: white;
}

.home-content .hero h1 {
  font-size: 42px;
  font-weight: 700;
  margin: 0 0 20px 0;
  color: white;
}

.home-content .hero p {
  font-size: 18px;
  margin: 0;
  opacity: 0.95;
}

.home-content h2 {
  font-size: 28px;
  font-weight: 600;
  margin: 40px 0 25px 0;
  color: #222;
  border-bottom: 2px solid #1890ff;
  padding-bottom: 10px;
}

.home-content .posts {
  display: grid;
  gap: 25px;
  margin-bottom: 50px;
}

.home-content .post {
  background: white;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: transform 0.2s, box-shadow 0.2s;
}

.home-content .post:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.home-content .post h2 {
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 15px 0;
  border-bottom: none;
  padding-bottom: 0;
}

.home-content .post h2 a {
  color: #222;
  text-decoration: none;
}

.home-content .post h2 a:hover {
  color: #1890ff;
}

.home-content .post .meta {
  font-size: 14px;
  color: #666;
  margin: 0 0 10px 0;
}

.home-content .post .categories {
  margin: 0;
}

.home-content .post .category {
  display: inline-block;
  background: #f5f5f5;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  color: #555;
  margin-right: 8px;
}

.home-content ul.categories {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.home-content ul.categories li {
  display: inline-block;
}

.home-content ul.categories a {
  display: inline-block;
  background: #f5f5f5;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  color: #555;
  text-decoration: none;
  transition: all 0.2s;
}

.home-content ul.categories a:hover {
  background: #1890ff;
  color: white;
}

/* 文章页三栏布局 */
.page-wrapper {
  display: grid;
  grid-template-columns: 250px 1fr 280px;
  gap: 30px;
  max-width: 1400px;
  margin: 20px auto;
  padding: 0 20px;
  width: 100%;
}

/* 响应式布局 */
@media (max-width: 1200px) {
  .page-wrapper {
    grid-template-columns: 200px 1fr 240px;
    gap: 20px;
  }
}

@media (max-width: 900px) {
  .page-wrapper {
    grid-template-columns: 1fr;
  }

  .sidebar-left,
  .sidebar-right {
    display: none;
  }
}

/* 左侧边栏：系列导航 */
.sidebar-left {
  position: sticky;
  top: 20px;
  height: fit-content;
}

.series-navigation h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 15px;
  color: #333;
  border-bottom: 2px solid #1890ff;
  padding-bottom: 8px;
}

.series-navigation ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.series-navigation li {
  margin-bottom: 12px;
}

.series-navigation a {
  color: #555;
  text-decoration: none;
  display: block;
  padding: 8px 12px;
  border-radius: 6px;
  transition: all 0.2s ease;
  font-size: 14px;
  font-weight: 500;
}

.series-navigation a:hover {
  background-color: #f5f5f5;
  color: #1890ff;
  padding-left: 16px;
}

.series-navigation li.active a {
  background-color: #1890ff;
  color: white;
}

.series-navigation .desc {
  display: block;
  font-size: 11px;
  color: #888;
  margin-top: 4px;
  padding-left: 8px;
  font-weight: 400;
}

/* 主内容区 */
.content-wrapper {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  padding: 40px;
}

/* 文章标题 */
.post-header {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
}

.post-title {
  font-size: 32px;
  font-weight: 700;
  margin: 0 0 15px 0;
  color: #222;
  line-height: 1.3;
}

.post-meta {
  font-size: 14px;
  color: #666;
  margin: 10px 0;
}

.post-description {
  font-size: 16px;
  color: #555;
  margin: 15px 0 0 0;
  line-height: 1.6;
}

/* 文章内容 */
.post-content {
  font-size: 16px;
  line-height: 1.8;
  color: #333;
}

.post-content h2 {
  font-size: 24px;
  margin: 40px 0 20px 0;
  color: #222;
  font-weight: 600;
  padding-bottom: 10px;
  border-bottom: 1px solid #1890ff;
}

.post-content h3 {
  font-size: 20px;
  margin: 30px 0 15px 0;
  color: #333;
  font-weight: 600;
}

.post-content h4 {
  font-size: 18px;
  margin: 25px 0 12px 0;
  color: #444;
  font-weight: 600;
}

.post-content p {
  margin: 0 0 20px 0;
}

.post-content ul,
.post-content ol {
  margin: 0 0 20px 0;
  padding-left: 30px;
}

.post-content li {
  margin-bottom: 8px;
}

.post-content blockquote {
  margin: 20px 0;
  padding: 15px 20px;
  background: #f9f9f9;
  border-left: 4px solid #1890ff;
  font-style: italic;
  color: #555;
}

.post-content pre {
  margin: 20px 0;
  padding: 15px;
  background: #f5f5f5;
  border-radius: 8px;
  overflow-x: auto;
}

.post-content code {
  background: #f5f5f5;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 14px;
}

.post-content pre code {
  background: none;
  padding: 0;
}

.post-content table {
  width: 100%;
  margin: 20px 0;
  border-collapse: collapse;
}

.post-content th,
.post-content td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #eee;
}

.post-content th {
  background: #f9f9f9;
  font-weight: 600;
}

.post-content a {
  color: #1890ff;
  text-decoration: none;
  transition: color 0.2s;
}

.post-content a:hover {
  color: #c43d1d;
  text-decoration: underline;
}

/* 标签 */
.post-tags {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

.post-tags span {
  color: #666;
  margin-right: 10px;
}

.tag {
  display: inline-block;
  background: #f5f5f5;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  color: #555;
  margin-right: 8px;
  text-decoration: none;
  transition: all 0.2s;
}

.tag:hover {
  background: #1890ff;
  color: white;
}

/* 右侧边栏 */
.sidebar-right {
  position: sticky;
  top: 20px;
  height: fit-content;
}

/* 目录 */
.table-of-contents {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  padding: 20px;
  margin-bottom: 20px;
}

.table-of-contents h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 15px 0;
  color: #333;
  border-bottom: 2px solid #1890ff;
  padding-bottom: 8px;
}

.table-of-contents ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.table-of-contents li {
  margin-bottom: 10px;
}

.table-of-contents a {
  color: #555;
  text-decoration: none;
  font-size: 14px;
  display: block;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s;
}

.table-of-contents a:hover {
  background: #f5f5f5;
  color: #1890ff;
}

/* CTA区域 */
.cta-section {
  background: linear-gradient(135deg, #1890ff 0%, #40a9ff 100%);
  border-radius: 12px;
  padding: 25px;
  text-align: center;
  color: white;
}

.cta-section h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 10px 0;
}

.cta-section p {
  font-size: 14px;
  margin: 0 0 15px 0;
  opacity: 0.9;
}

.cta-button {
  display: inline-block;
  background: white;
  color: #1890ff;
  padding: 12px 24px;
  border-radius: 25px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(228, 77, 38, 0.3);
}

/* 语言切换器 - 现代设计 */
.language-switcher {
  display: flex;
  align-items: center;
}

.language-switcher select {
  appearance: none;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 8px 36px 8px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
  position: relative;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
}

.language-switcher select:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
  transform: translateY(-1px);
}

.language-switcher select:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.3);
}

.language-switcher select option {
  background: white;
  color: #1f2937;
  padding: 10px;
}

/* 语言切换提示 */
.language-notice {
  background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
  border-left: 4px solid #2563eb;
  padding: 12px 20px;
  margin: 30px 0;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.language-notice p {
  margin: 0;
  font-size: 14px;
  color: #374151;
  font-weight: 500;
}

.language-notice a {
  color: #2563eb;
  text-decoration: none;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.language-notice a:hover {
  background: rgba(37, 99, 235, 0.1);
  text-decoration: underline;
}

/* 评论区样式 */
.comments-wrapper {
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid #e0e0e0;
}

.comments-wrapper h2 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 30px;
  color: #222;
}

.giscus-container {
  margin-top: 20px;
}
