/* 基础样式 */
body {
  background-color: #f8f9fa;
  font-family: 'Microsoft YaHei', sans-serif;
  padding-top: 70px; /* 为固定导航栏预留空间 */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* 导航栏美化 */
.navbar {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 0.5rem 1rem;
  background: linear-gradient(90deg, #4a6cf7, #3f51b5);
}

.navbar-brand {
  font-size: 1.4rem;
  font-weight: bold;
  color: white !important;
}

.nav-link {
  color: rgba(255, 255, 255, 0.9) !important;
  margin: 0 0.5rem;
  transition: all 0.3s ease;
}

.nav-link:hover {
  color: white !important;
  transform: translateY(-2px);
}

.nav-link.active {
  font-weight: bold;
  border-bottom: 2px solid white;
}

/* 侧边栏样式 */
.sidebar {
  background-color: #ffffff;
  color: #333333;
  border-right: 1px solid #dee2e6;
  position: fixed;
  top: 75px;
  left: 0;
  bottom: 0;
  width: 25%;
  overflow-y: auto;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.05);
  z-index: 100;
  padding-top: 10px;
}

.sidebar .list-group-item {
  background-color: transparent;
  border: none;
  color: #333333;
  transition: all 0.3s ease;
  cursor: pointer;
}

.sidebar .list-group-item.active {
  background-color: #f0f5ff;
  color: #4a6cf7;
  font-weight: bold;
  border-left: 3px solid #4a6cf7;
}

.sidebar .list-group-item:hover:not(.active) {
  background-color: #f5f7ff;
  transform: translateX(3px);
}

/* 主内容区域样式 */
.main-content {
  margin-left: 25%;
  padding: 5px 20px 20px 20px;
  background-color: #f5f7ff;
  flex: 1;
}

/* 内容容器样式 */
.container {
  flex: 1;
}

/* 筛选面板样式 */
.filter-panel {
  background-color: #ffffff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  border: 1px solid #e1e4ff;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.filter-title {
  color: #4a6cf7;
  margin-bottom: 0;
}

/* 试卷卡片样式 */
.card {
  /* border: none !important; */
  border-radius: 0;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: none !important;
  margin-bottom: 0 !important;
  border-width: 0px;
  border-bottom-width: 1px;
  /* border-bottom: 1px solid #e9ecef; */
}
/* .card:last-child { border-bottom: none; } */

.card:hover {
  border-width: 1px;
  border-color: #4a6cf7;
  /* transform: translateY(-3px); */
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.card-img-top {
  height: 160px;
  object-fit: cover;
  border-bottom: 1px solid #000000;
}

.card-body {
  padding: 15px 15px 10px 15px;
  margin-bottom: 0;
}

.card-title {
  color: #2c3e50;
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.card-text {
  color: #6c757d;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

/* 筛选按钮样式 */
.filter-panel .btn-primary {
  background-color: #4a6cf7;
  border-color: #4a6cf7;
}

.filter-panel .btn-outline-secondary {
  color: #3f51b5;
  border-color: #3f51b5;
}

.filter-panel .btn-outline-secondary:hover {
  background-color: #3f51b5;
  color: white;
}

/* 卡片布局样式 */
.card-deck {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

.card {
  flex: 0 0 30%;
  margin-bottom: 20px;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .card {
    flex: 0 0 100%;
  }
}

/* 页脚链接样式 */
.footer-links a {
  color: #aaa; /* 浅灰色文字，确保在黑色背景上的可读性 */
  text-decoration: none;
  transition: color 0.3s ease, transform 0.3s ease;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.95rem;
  position: relative;
}

.footer-links a:hover {
  color: #4a6cf7; /* 与网站主色调一致 */
  transform: translateY(-2px);
  background-color: rgba(255, 255, 255, 0.05);
}

/* 页脚美化 */
footer {
  background: #000; /* 黑色背景 */
  border-top: 1px solid #333;
  padding: 2rem 0;
  margin-top: auto;
}

footer .container {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1rem 0;
  border-bottom: 1px solid #333;
}

/* 为链接添加分隔符 */
.footer-links a:not(:last-child)::after {
  content: "|";
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  color: #444;
  font-size: 0.8rem;
  pointer-events: none;
}

/* 移除最后一个链接的分隔符 */
.footer-links a:last-child::after {
  display: none;
}

/* 页脚版权信息 */
footer .text-center p {
  color: #aaa;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

/* 备案信息 */
footer .text-center a {
  color: #aaa;
  text-decoration: none;
  transition: color 0.3s ease;
  font-size: 0.85rem;
}

footer .text-center a:hover {
  color: #4a6cf7;
  text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .footer-links {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .footer-links a {
    padding: 8px 16px;
    width: 100%;
    text-align: center;
  }
  
  .footer-links a:not(:last-child)::after {
    display: none;
  }
}

.wechat-service {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

.wechat-icon {
    width: 60px;
    height: 60px;
    background-color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: all 0.3s ease;
}

.wechat-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.wechat-qrcode {
    position: absolute;
    bottom: 70px;
    left: -100px;
    transform: translateX(-50%);
    background-color: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: none;
    text-align: center;
}

.wechat-qrcode::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 80%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid white;
}