.bookshelf-container {
  margin-top: 75px;
  background: #FFFFFF;
  min-width: 343px;
  border-radius: 16px;
}
/* Status Label */
.status-label {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.status-label.update {
    background-color: #ff6b6b;
    color: white;
}

.status-label.completed {
    background-color: #4caf50;
    color: white;
}

/* Actions Buttons */
.item__actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.btn {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
}

.btn-primary {
    background-color: #8e2de2;
    color: white;
    border: none;
}

.btn-secondary {
    background-color: transparent;
    color: #8e2de2;
    border: 1px solid #8e2de2;
}
/* Library 样式 - 一行5个 */
#library-items {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

#library-items .col-6 {
    flex: 0 0 10%;
    max-width: 10%;
    padding: 0;
}

#library-items .item--list {
    display: block;
    box-shadow: none;
    margin-top: 25px;
    margin-left: 10px;
    padding: 0;
}

#library-items .item__row {
    flex-direction: column;
    margin: 0;
    padding: 0;
}

#library-items .item__cover-wrapper {
    aspect-ratio: 2/3;
    height: 178px;
    width: 128px;
    margin: 0;
}

#library-items .item__cover {
    width: 100%;
    height: 100%;
}

#library-items .item__content {
    padding: 0;
    height: 44px;
    display: flex;
    align-items: center;
    width: 128px;
    margin: 0;
}

#library-items .item__title {
    margin-bottom: 0;
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-wrap: break-word;
    flex: 1;

    width: 128px;
    height: 44px;
    font-family: Roboto, Roboto;
    font-weight: 700;
    font-size: 16px;
    color: #333333;
    line-height: 22px;
    text-align: left;
    font-style: normal;
    text-transform: none;
}

#library-items .item__title a {
    color: #333;
    text-decoration: none;
    display: block;
    width: 100%;
    height: 100%;
}

/* History 样式 - 参考 search-results.css */
#history-items .item {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  margin-bottom: 20px;
  display: flex;
  flex-direction: row;
  padding: 0;
  gap: 20px;
  flex-grow: 1;
  z-index: 0;
  position: static;
  width: 100%;
  height: auto;
  opacity: 1;
  background-color: #FFFFFF;
}
#history-items .item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

#history-items .item__cover-wrapper {
  position: static;
  width: 153px;
  height: 213px;
  overflow: hidden;
  flex-shrink: 0;
  border-radius: 10px;
  background: #EEEEEE;
  opacity: 1;
  z-index: 0;
}

#history-items .item__cover {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

#history-items .item__cover:hover {
    transform: scale(1.05);
}

#history-items .item__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  background-color: rgba(123, 77, 255, 0.8);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

#history-items .item__cover:hover .item__play {
  opacity: 1;
}

#history-items .item__play svg {
  width: 24px;
  height: 24px;
  fill: white;
}

#history-items .item__content {
  position: static;
  width: 630px;
  height: 214px;
  opacity: 1;
  display: flex;
  flex-direction: column;
  padding: 0;
  gap: 8px;
  flex-grow: 1;
  z-index: 1;
  background-color: white;
  left: 173px;
}

#history-items .item__title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
  line-height: 1.4;
  text-decoration: none;
  transition: color 0.2s ease;
}

#history-items .item__title a { 
    color: #333;
}


#history-items .item__title:hover {
  color: #7b4dff;
}


#history-items .item__author {
  font-size: 14px;
  color: #666;
  margin-bottom: 8px;
}

#history-items .item__description {
  font-size: 14px;
  color: #666;
  margin-bottom: 8px;
  line-height: 1.4;
  max-height: 48px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

#history-items .item__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

#history-items .item__tag {
  display: inline-block;
  padding: 4px 8px;
  background-color: #f0f0f0;
  border-radius: 12px;
  font-size: 12px;
  color: #666;
  transition: background-color 0.2s ease;
}

#history-items .item__tag:hover {
  background-color: #e0e0e0;
}

/* 状态和统计信息 */
#history-items .item__info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: #666;
  margin-bottom: 12px;
  width: 100%;
}

#history-items .item__status {
  font-size: 14px;
  color: #666;
  flex-shrink: 0;
}

/* 统计图标 */
#history-items .item__stats {
  display: flex;
  gap: 16px;
  margin-left: auto; /* 将统计信息推到右边 */
}

#history-items .item__stat {
  display: flex;
  align-items: center;
  gap: 4px;
}

#history-items .item__stat svg {
  width: 16px;
  height: 16px;
  fill: #666;
}

/* 操作按钮组 - 右侧 */
#history-items .item__actions {
  position: static;
  width: 201px;
  height: 117px;
  opacity: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
  gap: 28px;
  z-index: 0;
  background-color: white;
}

/* 添加到书架按钮 - 上方 */
#history-items .add-to-library-btn {
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 0;
  gap: 10px;
  z-index: 0;
  background-color: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  background-image: url('../img/add-to-library.png');
  background-size: 112px 24px; /* 修改为指定尺寸 */
  background-repeat: no-repeat;
  background-position: center;
  width: 148px;
  height: 24px;
  top: 4px;
}

/* 已在书架按钮 - 上方 */
#history-items .in-library-btn {
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 0;
  gap: 10px;
  z-index: 0;
  background-color: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  background-image: url('../img/in-library.png');
  background-size: 112px 24px; /* 修改为指定尺寸 */
  background-repeat: no-repeat;
  background-position: center;
  width: 112px;
  height: 24px;
  top: 4px;
}

#history-items .in-library-btn:hover {
  background-color: #f0f0ff;
}

/* 阅读按钮 - 下方 */
#history-items .read-now-btn {
  /* position: absolute;
  width: 201px;
  height: 65px; */
  border-radius: 33.5px;
  opacity: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 13px 52px;
  gap: 5px;
  background: #9E6DFC;
  border: none;
  color: white;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 160px;
  background-image: url('../img/read-now.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  width: 150px;
  height: 40px;
}

#history-items .read-now-btn:hover {
  background-color: #8a58d8;
  transform: translateY(-1px);
}

/* 在 search-results.css 中添加或修改以下样式 */

/* 统一图片容器尺寸 */
.item__cover-wrapper {
  position: relative;
  width: 128px;
  height: 350px;
  overflow: hidden;
  flex-shrink: 0;
  border-radius: 10px;
  background: #EEEEEE;
  opacity: 1;
  z-index: 0;
  margin-left: 20px;
  /* 添加以下属性以确保统一尺寸 */
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 统一图片尺寸和样式 */
.item__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  display: block;
}

/* 确保播放按钮居中 */
.item__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  background-color: rgba(123, 77, 255, 0.8);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 2;
}

.item__cover:hover .item__play {
  opacity: 1;
}

/* Tab 头部布局 */
.tab-header {
    margin-bottom: 20px;
}

/* 编辑按钮样式 */
.btn-edit-library {
    background: none;
    border: none;
    padding: 5px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s;
    height: 36px;
    width: 36px;
}

.btn-edit-library:hover {
    background-color: #f0f0f0;
}

.btn-edit-library.active {
    background-color: #e0e0e0;
}

.btn-edit-library img {
    width: 60px;
    height: 20px;
    vertical-align: middle;
}

/* 编辑模式下的选择指示器 */
.item-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.selection-indicator {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
}

.selection-circle {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #ccc;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    box-sizing: border-box;
}

.selection-circle:hover {
    border-color: #4A90E2;
}

.item--list.selected .selection-circle {
    background: #4A90E2; /* 蓝色背景 */
    border-color: #4A90E2; /* 蓝色边框 */
}

.checkmark {
    width: 16px;
    height: 16px;
    opacity: 0;
    transition: opacity 0.2s;
}

.item--list.selected .checkmark {
    opacity: 1;
}

/* 删除按钮容器 */
.delete-selected-container {
    text-align: center;
    margin-bottom: 20px;
    padding: 10px;
}

#delete-selected-btn {
    background-color: #ff4d4d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s;
}

#delete-selected-btn:hover:not(:disabled) {
    background-color: #ff1a1a;
}

#delete-selected-btn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}
