/* 侧边栏 */

.widget {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.widget:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.widget img {
  display: block;
  width: 100%;
  border-radius: 10px;
}

/* 个人信息小部件 */
.widget .avatar {
  border-radius: 10px;
  margin: 0 auto 15px;
}

.widget .name {
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  color: #333;
}

.widget .gap {
  margin: 8px auto;
  width: 20px;
  height: 6px;
  border-radius: 10px;
  background-color: #d14d21;
}

.widget .motto {
  font-size: 14px;
  color: #666;
  text-align: center;
  line-height: 1.6;
  margin-bottom: 20px;
  padding: 0 10px;
}

.widget .contact {
  display: flex;
  justify-content: center;
  gap: 12px;
  border-top: 1px solid #f0f0f0;
  padding-top: 15px;
}

.widget .contact .item {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f5f5f5 0%, #ffffff 100%);
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.widget .contact .item:hover {
  transform: translateY(-3px) scale(1.1);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  background: linear-gradient(135deg, #ffffff 0%, #f8f8f8 100%);
}

.widget .contact .item a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  text-decoration: none;
}

.widget .contact .item img {
  width: 24px;
  height: 24px;
  margin: 0;
  border-radius: 0;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.08));
}

/* 标题 */

.widget-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f0f0f0;
  position: relative;
}

.widget-title::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 40px;
  height: 2px;
  background: #d14d21;
}

/* 列表类型 */

.widget-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.widget-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  font-size: 16px;
  border-radius: 10px;
}

.widget-list li:hover {
  background-color: #d14d21;
  color: #fff;
}

.widget-list li:hover a {
  color: #fff;
}

.widget-list li a {
  text-decoration: none;
}

/* 标签类型 */

.widget-tag {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.widget-tag li {
  display: inline-block;
}

.widget-tag li a {
  display: inline-block;
  padding: 11px 10px;
  background: #f8f9fa;
  color: #666;
  border-radius: 10px;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 1px solid #eee;
}

.widget-tag li a:hover {
  background: #d14d21;
  color: #fff;
  border-color: #d14d21;
  transform: scale(1.05);
}

/* 书籍卡片样式 */

.metas {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.book-card {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.book-cover-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  aspect-ratio: 3 / 4;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

.book-cover-wrapper:hover {
  transform: scale(1.05) rotateZ(-2deg);
}

.book-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.book-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.book-title {
  font-size: 16px;
  font-weight: 700;
  color: #333;
  margin: 0;
  line-height: 1.4;
  word-break: break-word;
}

.book-author {
  font-size: 13px;
  color: #999;
  margin: 0;
  font-style: italic;
}

.book-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 5px;
}

.progress-bar {
  flex: 1;
  height: 6px;
  background: #f0f0f0;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #d14d21 0%, #ff6b35 100%);
  border-radius: 10px;
  transition: width 0.5s ease;
  box-shadow: 0 0 10px rgba(215, 26, 27, 0.3);
}

.progress-text {
  font-size: 12px;
  font-weight: 600;
  color: #d14d21;
  min-width: 35px;
  text-align: right;
}

/* 音乐卡片样式 */

.music-card {
  display: flex;
  flex-direction: column;
  gap: 15px;
  position: relative;
}

.music-cover-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  aspect-ratio: 1 / 1;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  background: linear-gradient(135deg, #f5f5f5 0%, #ffffff 100%);
}

.music-cover-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 1;
  border-radius: 10px;
}

.music-cover-wrapper:hover::before {
  opacity: 1;
}

.music-cover-wrapper::after {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  font-size: 48px;
  color: #fff;
  z-index: 2;
  text-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  opacity: 0;
}

.music-cover-wrapper:hover::after {
  transform: translate(-50%, -50%) scale(1) rotate(15deg);
  opacity: 1;
}

.music-cover-wrapper:hover {
  transform: scale(1.03) rotateZ(-1deg);
}

.music-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
  border-radius: 10px;
}

.music-cover-wrapper:hover .music-cover {
  transform: scale(1.1);
}

.music-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 5px;
}

.music-title {
  font-size: 16px;
  font-weight: 700;
  color: #333;
  margin: 0;
  line-height: 1.4;
  word-break: break-word;
  position: relative;
  display: inline-block;
}

.music-title::before {
  content: '🎵';
  margin-right: 6px;
  font-size: 14px;
  animation: musicNote 2s ease-in-out infinite;
}

@keyframes musicNote {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}

.music-artist {
  font-size: 13px;
  color: #999;
  margin: 0;
  font-style: italic;
  display: flex;
  align-items: center;
  gap: 5px;
}

.music-artist::before {
  content: '';
  width: 4px;
  height: 4px;
  background: #d14d21;
  border-radius: 50%;
  display: inline-block;
}

/* 音乐播放动画效果 */
.music-card::before {
  content: '';
  position: absolute;
  top: -5px;
  left: -5px;
  right: -5px;
  bottom: -5px;
  background-size: 400% 400%;
  border-radius: 15px;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s ease;
  animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.music-card:hover::before {
  opacity: 0.15;
}
