* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
/* 左侧导航样式 */
.side-nav {
  width: 320px;
  background: #2c3e50;
  color: white;
  padding: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.side-nav-header {
  padding: 25px 20px;
  text-align: center;
  background: rgba(0, 0, 0, 0.2);
  /* 下划线 */
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.side-nav-header h1 {
  font-size: 2.4rem;
  margin-bottom: 5px;
  color: white;
}

.accordion {
  list-style: none;
  flex-grow: 1;
}

.accordion-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.accordion-header {
  padding: 16px 20px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  font-weight: 500;
}

.accordion-header:hover {
  background: rgba(0, 0, 0, 0.15);
}

.accordion-header i {
  transition: transform 0.3s ease;
  font-size: 14px;
}

.accordion-header.active {
  background: rgba(34, 139, 34, 0.535);
  color: white;
}
/* 在active下旋转90度向下 */
.accordion-header.active i {
  transform: rotate(90deg);
}

.accordion-content {
  max-height: none;
  /* 滚动条不可见 */
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: rgba(0, 0, 0, 0.05);
}

.accordion-content.show {
  max-height: 50rem;
}

.character-list {
  list-style: none;
  padding: 10px 0;
}

.character-list li {
  padding: 12px 20px 12px 45px;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  font-size: 1.4rem;
}

.character-list li:before {
  content: "•";
  margin-right: 10px;
  color: forestgreen;
  font-size: 2rem;
}

.character-list li:hover {
  background: rgba(34, 139, 34, 0.535);
  color: forestgreen;
}

.character-list li.active {
  background: rgba(34, 139, 34, 0.535);
  color: white;
  border-left: 4px solid forestgreen;
}

/* 动画效果 */
.main {
  display: block;
  padding: 3.2rem 3.2rem;
}
.character-card {
  display: none;

  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.character-card.active {
  display: block;
}

.character-header {
  display: flex;
  align-items: center;
  margin-bottom: 3rem;
}

.character-img {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #fff;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.character-img:hover {
  transform: scale(1.05);
  border-radius: 0;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.character-info {
  margin-left: 30px;
}

.character-name {
  font-size: 3.2rem;
  margin-bottom: 5px;
  color: #2c3e50;
}

.character-alias {
  color: forestgreen;
  font-style: italic;
  margin-bottom: 15px;
  font-size: 1.6rem;
}

.character-tags {
  display: flex;
  /* 允许子元素换行 */
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 15px;
}

.tag {
  padding: 5px 12px;
  background: #eaf2ff;
  border-radius: 20px;
  font-size: 14px;
  color: #4a6491;
}

.character-desc {
  line-height: 1.8;
  font-size: 1.6rem;
}

.character-desc p {
  margin-bottom: 20px;
  text-indent: 2em;
}

.section-title {
  font-size: 2.2rem;
  margin: 30px 0 20px;
  padding-left: 15px;
  border-left: 5px solid forestgreen;
  color: #333;
}

.abilities {
  display: grid;
  /* 响应式布局 */
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.ability {
  background: #f9f9f9;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.ability:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.ability h4 {
  color: #2c3e50;
  margin-bottom: 10px;
  font-size: 1.8rem;
}
