/* 博客页面通用样式 */
/* CSS变量将在HTML中通过内联样式设置 */
body{
    background: none !important;
}
.blog-hero {
  padding: 40px 0;
  margin-bottom: 40px;
  color: white;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.blog-hero::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    var(--primary-color-start) 0%,
    var(--primary-color-end) 100%
  );
  opacity: var(--hero-opacity);
  z-index: -2;
}

.blog-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 200%;
  height: 100%;
  background: linear-gradient(
    45deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  animation: shine 3s infinite;
  z-index: -1;
}

@keyframes shine {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

.blog-hero h1 {
  font-size: 2em;
  margin-bottom: 15px;
  font-weight: 400;
  letter-spacing: 1px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
  color: white;
  position: relative;
  z-index: 1;
}

.blog-hero h1 i {
  margin-right: 10px;
  font-size: 0.9em;
  color: white;
}

.blog-hero p {
  font-size: 1.1em;
  opacity: 1;
  position: relative;
  z-index: 1;
  font-weight: 300;
  color: white;
}

.blog-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.blog-main {
  display: flex;
  margin-bottom: 40px;
}

.blog-posts {
  flex: 1;
  min-width: 0;
}

.blog-sidebar {
  width: 320px;
  flex-shrink: 0;
}

/* 控制栏样式 */
.blog-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  background: white;
  padding: 20px 25px;
  border-radius: 12px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
  flex-wrap: wrap;
  gap: 15px;
}

/* 面包屑样式 */
.blog-breadcrumb {
  display: flex;
  align-items: center;
  font-size: 14px;
  color: #8e8e93;
  flex-wrap: wrap;
}

.breadcrumb-item {
  color: #8e8e93;
  text-decoration: none;
  transition: color 0.3s;
  display: flex;
  align-items: center;
}

.breadcrumb-item:hover {
  color: var(--primary-color-start);
}

.breadcrumb-item.active {
  color: #333;
  font-weight: 500;
}

.breadcrumb-separator {
  margin: 0 8px;
  color: #d1d5db;
}

/* 语言切换器样式 */
.language-switcher-desktop {
  position: relative;
  margin-right: 10px;
}

.language-switcher-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  cursor: pointer;
  font-size: 14px;
  color: #1a1a1a;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 500;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  min-width: 140px;
  justify-content: space-between;
}

.language-switcher-btn:hover {
  background: linear-gradient(
    135deg,
    var(--primary-color-start) 0%,
    var(--primary-color-end) 100%
  );
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25);
  transform: translateY(-1px);
}

.language-switcher-btn .current-lang-icon {
  font-size: 18px;
  display: flex;
  align-items: center;
}

.language-switcher-btn .current-lang-name {
  flex: 1;
  text-align: left;
  margin: 0 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}

.language-switcher-btn .switcher-arrow {
  font-size: 10px;
  opacity: 0.6;
  transition: transform 0.3s;
}

.language-switcher-btn:hover .switcher-arrow {
  opacity: 1;
}

.language-switcher-btn:hover .current-lang-icon,
.language-switcher-btn:hover .current-lang-name,
.language-switcher-btn:hover .switcher-arrow {
  color: white;
}

.language-switcher-btn.active .switcher-arrow {
  transform: rotate(180deg);
}

.language-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: white;
  border: 1px solid #e0e0e4;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
  min-width: 220px;
  display: none;
  z-index: 1000;
  overflow: hidden;
  animation: dropdownSlide 0.3s ease;
}

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

.language-dropdown.active {
  display: block;
}

.language-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: #333;
  text-decoration: none;
  transition: all 0.2s;
  position: relative;
}

.language-option:hover {
  background: #f8f9fa;
  padding-left: 20px;
}

.language-option.active {
  background: linear-gradient(
    135deg,
    var(--primary-color-start) 0%,
    var(--primary-color-end) 100%
  );
  color: white;
  font-weight: 500;
}

.language-option.active::before {
  content: "";
  position: absolute;
  left: 6px;
  width: 3px;
  height: 60%;
  background: white;
  border-radius: 2px;
}

.language-option .fa-check {
  margin-left: auto;
  font-size: 12px;
}

.language-icon {
  font-size: 20px;
  width: 24px;
  text-align: center;
}

.language-name {
  flex: 1;
  font-size: 14px;
}

/* 移动端语言切换器 */
.mobile-language-switcher {
  display: none;
  padding: 10px 20px;
  background: white;
  border-bottom: 1px solid #e0e0e4;
}

/* 移动端语言列表 */
.mobile-language-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.mobile-language-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #f8f9fa;
  border-radius: 10px;
  text-decoration: none;
  color: #333;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.mobile-language-item:hover {
  background: #e9ecef;
  transform: translateY(-2px);
}

.mobile-language-item.active {
  background: linear-gradient(
    135deg,
    var(--primary-color-start) 0%,
    var(--primary-color-end) 100%
  );
  color: white;
  font-weight: 500;
}

.mobile-language-item.active .mobile-lang-icon,
.mobile-language-item.active .mobile-lang-name {
  color: white;
}

.mobile-lang-icon {
  font-size: 20px;
  width: 24px;
  text-align: center;
}

.mobile-lang-name {
  flex: 1;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-language-item .fa-check-circle {
  position: absolute;
  top: 4px;
  right: 4px;
  font-size: 12px;
  color: white;
}

/* 桌面端侧边栏切换 */
.sidebar-toggle-desktop {
  display: none;
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 14px;
  color: #1a1a1a;
  transition: all 0.3s;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.sidebar-toggle-desktop:hover {
  background: linear-gradient(
    135deg,
    var(--primary-color-start) 0%,
    var(--primary-color-end) 100%
  );
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25);
}

/* 侧边栏卡片 */
.sidebar-card {
  background: white;
  border-radius: 12px;
  margin-left: 30px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
  margin-bottom: 25px;
  overflow: hidden;
}

.sidebar-card-header {
  background: linear-gradient(
    135deg,
    var(--primary-color-start) 0%,
    var(--primary-color-end) 100%
  );
  color: white;
  padding: 15px 20px;
  font-weight: 600;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-card-body {
  padding: 20px;
}

/* 搜索框样式 */
.search-form {
  margin: 0;
}

.search-input-group {
  display: flex;
  gap: 8px;
}

.search-input {
  flex: 1;
  padding: 10px 15px;
  border: 1px solid #e8e8ec;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  transition: all 0.3s;
}

.search-input:focus {
  border-color: var(--primary-color-start);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-btn {
  padding: 0 15px;
  background: linear-gradient(
    135deg,
    var(--primary-color-start) 0%,
    var(--primary-color-end) 100%
  );
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
}

.search-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* 分类和标签样式 */
.category-list,
.tag-cloud {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.category-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  color: #333;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.3s;
  background: #f8f9fa;
}

.category-item:hover {
  background: var(--primary-color-start);
  color: white;
  transform: translateX(5px);
}

.category-count {
  background: rgba(102, 126, 234, 0.1);
  color: var(--primary-color-start);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.category-item:hover .category-count {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.tag-cloud {
  flex-direction: row;
  flex-wrap: wrap;
}

.tag-cloud-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f8f9fa;
  color: #666;
  padding: 6px 12px;
  border-radius: 20px;
  text-decoration: none;
  font-size: 13px;
  transition: all 0.3s;
}

.tag-cloud-link:hover {
  background: var(--primary-color-start);
  color: white;
  transform: translateY(-2px);
}

.tag-cloud-link.active {
  background: linear-gradient(
    135deg,
    var(--primary-color-start) 0%,
    var(--primary-color-end) 100%
  );
  color: white;
  transform: translateY(-2px);
}

/* 汉堡菜单样式 */
.mobile-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background: linear-gradient(
    135deg,
    var(--primary-color-start) 0%,
    var(--primary-color-end) 100%
  );
  border-radius: 50%;
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
  z-index: 9998;
  border: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
  }
  50% {
    box-shadow: 0 4px 30px rgba(102, 126, 234, 0.6);
  }
}

.mobile-menu-toggle:hover {
  transform: scale(1.1) rotate(90deg);
  box-shadow: 0 6px 30px rgba(102, 126, 234, 0.6);
  animation: none;
}

.mobile-menu-toggle:active {
  transform: scale(0.95);
}

.mobile-menu-toggle i {
  color: white;
  font-size: 20px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-toggle.active i {
  transform: rotate(180deg);
}

.mobile-sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s;
}

.mobile-sidebar-overlay.active {
  display: block;
  opacity: 1;
}

.mobile-sidebar {
  position: fixed;
  top: 0;
  right: -320px;
  width: 320px;
  height: 100%;
  background: white;
  box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
  z-index: 10000;
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  padding-top: 0;
}

.mobile-sidebar.active {
  right: 0;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.mobile-sidebar-header {
  background: linear-gradient(
    135deg,
    var(--primary-color-start) 0%,
    var(--primary-color-end) 100%
  );
  color: white;
  padding: 25px 20px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  overflow: hidden;
  z-index: 10;
}

.mobile-sidebar-header::after {
  content: "";
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.1) 0%,
    transparent 70%
  );
  animation: rotate 10s linear infinite;
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.mobile-sidebar-header h3 {
  color: white;
  margin: 0;
  font-size: 1.3em;
  font-weight: 500;
  position: relative;
  z-index: 1;
}

.mobile-sidebar-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
  padding: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  position: relative;
  z-index: 1;
}

.mobile-sidebar-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

.mobile-sidebar-content {
  padding: 20px;
}

/* 移动端搜索 */
.mobile-search-form {
  margin: 0;
}

.mobile-search-input-group {
  display: flex;
  gap: 8px;
}

.mobile-search-input {
  flex: 1;
  padding: 10px 15px;
  border: 1px solid #e8e8ec;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  background: white;
}

.mobile-search-input:focus {
  border-color: var(--primary-color-start);
}

.mobile-search-btn {
  padding: 0 15px;
  background: linear-gradient(
    135deg,
    var(--primary-color-start) 0%,
    var(--primary-color-end) 100%
  );
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

/* 返回顶部按钮 */
.back-to-top {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 40px;
  height: 40px;
  background: linear-gradient(
    135deg,
    var(--primary-color-start) 0%,
    var(--primary-color-end) 100%
  );
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  display: none;
  z-index: 9997;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.back-to-top:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.back-to-top.show {
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s;
}

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

/* 响应式设计 - 超大屏幕 */
@media (min-width: 1920px) {
  .blog-container {
    max-width: 1600px;
  }

  .blog-posts {
    max-width: 1000px;
  }

  .blog-sidebar {
    width: 360px;
  }
}

/* 响应式设计 - 大屏幕 */
@media (min-width: 1400px) {
  .blog-hero {
    padding: 40px 0;
  }

  .blog-hero h1 {
    font-size: 2.2em;
    margin-bottom: 20px;
    font-weight: bold;
  }

  .blog-hero p {
    font-size: 1.2em;
  }

  .sidebar-card {
    margin-bottom: 30px;
  }

  .sidebar-card-body {
    padding: 25px;
  }
}

/* 响应式设计 - 桌面 */
@media (max-width: 1200px) {
  .blog-hero h1 {
    font-size: 2em;
  }

  .blog-hero p {
    font-size: 1em;
  }

  .blog-sidebar {
    width: 300px;
  }

  .sidebar-card-body {
    padding: 18px;
  }
}

/* 响应式设计 - 平板 */
@media (max-width: 1024px) {
  .blog-hero {
    padding: 35px 0;
  }

  .blog-hero h1 {
    font-size: 2em;
    margin-bottom: 12px;
  }

  .blog-hero p {
    font-size: 1em;
  }
}
@media (max-width: 992px) {
    .blog-main {
        flex-direction: column;
    }
    .blog-sidebar ,.post-sidebar,.sidebar-card{
        display: none !important;
    }
    
    
    .blog-controls {
        flex-direction: row;
        gap: 15px;
        align-items: stretch;
    }
    
    .blog-breadcrumb {
        flex-wrap: wrap;
        font-size: 13px;
    }
    
    .breadcrumb-item {
        padding: 4px 8px;
    }
    
    .sidebar-toggle-desktop {
        display: none !important;
    }
    
    .mobile-menu-toggle {
        display: flex !important;
    }
}

/* 响应式设计 - 平板竖屏和大手机横屏 */
@media (max-width: 768px) and (min-width: 481px) {
  .blog-container {
    padding: 0 20px;
  }

  .blog-hero {
    padding: 25px 0;
  }

  .blog-hero h1 {
    font-size: 1.8em;
    margin-bottom: 12px;
  }

  .blog-hero p {
    font-size: 1em;
  }

  .category-item,
  .tag-cloud-link {
    padding: 10px 12px;
    font-size: 14px;
  }
}



/* 响应式设计 - 手机 */
@media (max-width: 768px) {
  .blog-hero {
    padding: 20px 0;
  }

  .blog-hero h1 {
    font-size: 1.75em;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
  }

  .blog-hero h1 i {
    font-size: 0.85em;
    margin-right: 8px;
  }

  .blog-hero p {
    font-size: 0.95em;
    line-height: 1.5;
    padding: 0 10px;
  }

  .blog-main {
    flex-direction: column;
  }

  .blog-sidebar {
    width: 100%;
    display: none;
  }
  .blog-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
  }

  .blog-breadcrumb {
    justify-content: center;
    flex-wrap: wrap;
    font-size: 13px;
  }

  .breadcrumb-item {
    /*max-width: 150px;*/
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* 语言切换器移动端适配 */
  .language-switcher-desktop {
    display: none;
  }
  .mobile-menu-toggle {
    display: flex;
  }
  .mobile-language-switcher {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: white;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 15px;
  }

  .mobile-language-switcher .language-switcher-btn {
    width: 100%;
    max-width: none;
    min-width: auto;
    border-radius: 10px;
    padding: 10px 12px;
  }

  .mobile-language-switcher .current-lang-name {
    max-width: none;
    font-size: 15px;
  }

  .mobile-language-switcher .current-lang-icon {
    font-size: 20px;
  }

  .back-to-top {
    bottom: 80px;
    right: 20px;
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
}

/* 响应式设计 - 小手机 */
@media (max-width: 480px) {
  .blog-hero {
    padding: 25px 0;
  }

  .blog-hero h1 {
    font-size: 1.5em;
    margin-bottom: 8px;
  }

  .blog-hero h1 i {
    font-size: 0.8em;
    margin-right: 6px;
  }

  .blog-hero p {
    font-size: 0.85em;
    line-height: 1.4;
  }

  /* 移动端语言列表单列显示 */
  .mobile-language-list {
    grid-template-columns: 1fr;
  }

  .mobile-language-item {
    padding: 12px 14px;
  }

  .mobile-lang-name {
    font-size: 14px;
  }
}

/* 响应式设计 - 超小屏幕 */
@media (max-width: 360px) {
  .blog-hero h1 {
    font-size: 1.3em;
  }

  .blog-hero p {
    font-size: 0.8em;
  }
}
