html {
  font-size: 14px;
  position: relative;
  min-height: 100%;
  line-height: 1.8; /* 增加全局行距 */
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  padding-bottom: 60px;
  line-height: 1.8; /* 增加body行距 */
}

/* 设置 navbar 高度为 70 像素 */
.navbar {
  min-height: 70px;
  padding-top: 0;
  padding-bottom: 0;
}

/* 设置 navbar-brand 的上下 padding 为 0 */
.navbar-brand {
  padding-top: 0;
  padding-bottom: 0;
}

/* 导航栏居中样式 */
.navbar .container-fluid {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  position: relative;
}

.navbar-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 130%;
  z-index: 1000;
}

.navbar-collapse {
  display: flex;
  justify-content: center;
  flex-grow: 1;
}

.navbar-nav {
  flex-direction: row;
  justify-content: center;
  position: relative;
  z-index: 900;
}

.navbar-nav .nav-item:not(:first-child)
{
  padding-top: 0.8rem;
  margin: 0 1rem;
}

/* 确保下拉菜单项不换行 */
.navbar-nav .nav-item.dropdown .dropdown-toggle {
  white-space: nowrap;
  display: flex;
  align-items: center;
}

.navbar-nav .nav-item.dropdown .dropdown-toggle::after {
  margin-left: 0.5em;
}

/* 隐藏下拉菜单的箭头 */
#personnavbarDropdown.dropdown-toggle::after,
#navbarDropdown.dropdown-toggle::after {
  display: none;
}

/* 移动端适配 */
@media (max-width: 767px) {
  .navbar .container-fluid {
    flex-direction: column;
  }
  
  .navbar-brand {
    margin-bottom: 0.5rem;
  }
  
  .navbar-collapse {
    margin-top: 0.5rem;
  }
  
  .navbar-nav {
    flex-direction: row;
    flex-wrap: wrap;
  }
  
  .navbar-nav .nav-item {
    margin: 0.25rem;
  }
}

/* 免责声明样式 */
.disclaimer {
  font-size: 0.875rem;
  padding-top: 1rem;
  margin-top: 1rem;
}

/* 轮播图样式 */
.carousel-item img {
  object-fit: cover;
  object-position: center;
}

/* 通用banner样式 */
.banner-container img {
  object-fit: cover;
  object-position: center;
}

/* 确保轮播图在移动端也能正确显示 */
@media (max-width: 767px) {
  .carousel-item img {
    height: 300px !important;
  }
  
  .banner-container img {
    height: 300px !important;
  }
}

/* 龙脉能量内容样式 */
.energy-content h2 {
  font-weight: bold;
  letter-spacing: 2px;
}

.energy-content p {
  line-height: 1.8; /* 增加行距 */
  color: #666;
}

/* Wiki内容样式 */
.wiki-content {
  line-height: 2.0; /* 增加行距 */
}

.wiki-content p {
  line-height: 2.0; /* 段落增加行距 */
  margin-bottom: 1.5rem; /* 增加段落间距 */
}

.wiki-content h1, .wiki-content h2, .wiki-content h3, 
.wiki-content h4, .wiki-content h5, .wiki-content h6 {
  margin-top: 1.8rem;
  margin-bottom: 1.3rem;
  line-height: 1.3;
}

/* 表格样式 */
table {
  border-collapse: collapse;
  width: 100%;
  margin: 1rem 0;
}

table, th, td {
  border: 1px solid #ddd;
}

th, td {
  padding: 0.75rem;
  text-align: left;
}

th {
  background-color: #f8f9fa;
  font-weight: bold;
}

tr:nth-child(even) {
  background-color: #f2f2f2;
}

tr:hover {
  background-color: #e9ecef;
}

/* 屠龙术页面样式 */
.tulong-section {
  scroll-margin-top: 70px; /* 考虑到固定导航栏的高度 */
}

.tulong-nav {
  position: sticky;
  top: 70px;
}

.tulong-content h3 {
  font-weight: bold;
  color: #2c3e50;
  border-left: 4px solid #3498db;
  padding-left: 15px;
  margin-top: 2rem;
}

.tulong-content p {
  line-height: 1.8;
  color: #555;
  text-align: justify;
}

.tulong-cover-img {
  box-shadow: 0 8px 16px rgba(0,0,0,0.1);
  border: 1px solid #eee;
  transition: transform 0.3s ease;
}

.tulong-cover-img:hover {
  transform: scale(1.02);
}

.tulong-navigation {
  background-color: #f8f9fa;
  border-radius: 8px;
  padding: 1rem;
}

.tulong-navigation a {
  margin: 0.1rem 0; /* 减小上下间距 */
  color: #212529; /* 设置为默认黑色 */
  display: block; /* 确保每个链接独占一行 */
}

/* 相关Wiki样式 */
.related-wiki-link {
  color: #3498db;
  text-decoration: none;
  padding: 0.25rem 0;
  display: block;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.related-wiki-link:hover {
  background-color: #f8f9fa;
  color: #2980b9;
  text-decoration: none;
}

/* 屠龙术列表页面样式 */
.tulong-books-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
}

.tulong-book-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 300px;
  margin-bottom: 2rem;
  transition: transform 0.3s ease;
}

.tulong-book-item:hover {
  transform: translateY(-10px);
}

.tulong-book-cover {
  width: 100%;
  height: 150px; /* 横向长图 */
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  transition: all 0.3s ease;
  border: 2px solid #f0f0f0;
}

.tulong-book-cover:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.tulong-book-title {
  margin-top: 1rem;
  text-align: center;
  font-weight: bold;
  width: 100%;
  font-size: 1.1rem;
  color: #333;
}

/* 设计感布局 - 多行排列 */
.tulong-books-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem;
  padding: 1rem;
}

.tulong-books-grid .tulong-book-card:last-child:nth-child(odd) {
  justify-self: center;
  grid-column: span 2;
}

.tulong-book-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.tulong-book-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.tulong-book-card .cover-container {
  height: 160px;
  overflow: hidden;
  position: relative;
}

.tulong-book-card .tulong-book-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.tulong-book-card:hover .tulong-book-cover {
  transform: scale(1.1);
}

.tulong-book-card .title-container {
  padding: 1.2rem;
  text-align: center;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.tulong-book-card .tulong-book-title {
  margin: 0;
  font-size: 1.2rem;
  color: #2c3e50;
  font-weight: 600;
  letter-spacing: 1px;
}

/* Footer样式 */
.footer {
  text-align: center;
  padding: 20px 0;
  flex-shrink: 0;
}

.footer-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 15px;
}

.footer-copyright {
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-link {
  text-decoration: none;
  color: #6c757d;
  transition: color 0.3s ease;
  padding: 5px 10px;
  border-radius: 4px;
}

.footer-link:hover {
  color: #3498db;
  background-color: rgba(52, 152, 219, 0.1);
}

/* AI图标样式 */
.ai-icon {
  width: 20px;
  height: 20px;
  margin-right: 8px;
  vertical-align: middle;
}

/* 卡片样式 */
.card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: none;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.card-title {
  font-weight: bold;
  color: #333;
  text-align: center;
}

.card-text {
  color: #666;
  font-size: 0.9rem;
  line-height: 1.8; /* 增加行距 */
}


.card-img-top {
  border-top-left-radius: calc(0.375rem - 1px);
  border-top-right-radius: calc(0.375rem - 1px);
}

/* 项目卡片样式 */
.project-card {
  transition: all 0.3s ease;
  border: none;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  border-radius: 10px;
  overflow: hidden;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 20px rgba(0,0,0,0.15);
}

.project-card .card-title {
  font-weight: bold;
  color: #2c3e50;
  margin-bottom: 1rem;
  text-align: center;
}

/* 人员介绍页面样式 */
#carouselPersonIndicators .carousel-item img,
#carouselPersonDetailsIndicators .carousel-item img {
  height: 400px !important;
}

.person-card {
  transition: all 0.3s ease;
  border: none;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  border-radius: 10px;
  overflow: hidden;
}

.person-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 12px 20px rgba(0,0,0,0.15);
}

.person-card .card-img-top {
  height: 300px;
  object-fit: cover;
}

.person-card .card-title {
  font-weight: bold;
  color: #2c3e50;
  margin-bottom: 0.5rem;
}

.person-card .card-subtitle {
  color: #3498db;
  margin-bottom: 1rem;
}

.person-card .card-text {
  color: #7f8c8d;
  font-size: 0.9rem;
  line-height: 1.8; /* 增加行距 */
}

.btn-primary {
  background-color: #3498db;
  border-color: #3498db;
  border-radius: 20px;
  padding: 8px 20px;
}

.btn-primary:hover {
  background-color: #2980b9;
  border-color: #2980b9;
}

.energy-content h2 {
  font-weight: bold;
  letter-spacing: 2px;
  color: #2c3e50;
  position: relative;
  display: inline-block;
}

.energy-content h2::after {
  content: '';
  display: block;
  width: 50%;
  height: 3px;
  background: #3498db;
  margin: 10px auto 0;
}

.energy-content p {
  line-height: 1.6;
  color: #666;
}

/* 回到顶部按钮样式 */
#backToTop {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 99;
  border: none;
  outline: none;
  background-color: #3498db;
  color: white;
  cursor: pointer;
  padding: 15px;
  border-radius: 50%;
  font-size: 18px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
  transition: all 0.3s ease;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#backToTop:hover {
  background-color: #2980b9;
  transform: translateY(-3px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

#backToTop:active {
  transform: translateY(-1px);
}

#backToTop i {
  font-size: 20px;
}

/* 用户下拉菜单样式 */
#userDropdown .dropdown-menu {
  min-width: 120px;
}

#userDropdown .dropdown-item {
  padding: 0.5rem 1rem;
}

#userDropdown .dropdown-item:hover {
  background-color: #f8f9fa;
}

#userDropdown form {
  width: 100%;
}

#userDropdown button.dropdown-item {
  border: none;
  background: none;
  text-align: left;
  width: 100%;
  cursor: pointer;
}

#userDropdown button.dropdown-item:hover {
  background-color: #f8f9fa;
}

/* Wiki评论样式 */
.wiki-comments {
  margin-top: 2rem;
}

.comment-item {
  margin-bottom: 1rem;
}

.comment-item .card {
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
}

.comment-item .card-header {
  background-color: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
}

.comment-item .card-body {
  padding: 1rem;
}

.comment-item .card-footer {
  background-color: #fff;
  border-top: 1px solid #dee2e6;
}

.reply-btn {
  font-size: 0.875rem;
  padding: 0.25rem 0.5rem;
}

.captcha-image {
  height: 38px;
  cursor: pointer;
  border: 1px solid #ced4da;
  border-radius: 0.375rem;
}
