/**
 * 漫画详情页样式
 */

/* ========== 页面容器 ========== */
.page-detail {
    width: 100%;
}

/* ========== 搜索区域 ========== */
.detail-search-section {
    width: 100%;
    height: 30vh;
    background-image: url(../../images/pages/detail/bg_search.webp);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center center;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 搜索输入框 */
.detail-search-section .search-input {
    width: 35%;
}

.detail-search-section .search-input .el-input__inner {
    height: 60px;
    line-height: 60px;
    font-size: 15px;
    border-radius: 8px;
    padding-right: 50px;
}

.detail-search-section .search-input .el-input__icon {
    font-size: 20px;
    cursor: pointer;
}

/* ========== 内容区域 ========== */
.detail-content-section {
    width: 100%;
    padding: 0 0 35px;
}

/* ========== 漫画信息区域 ========== */
.detail-manga-info {
    display: flex;
    gap: 40px;
    padding: 30px 0;
    border-bottom: 1px solid #e4e7ed;
    margin-bottom: 30px;
}

/* 漫画封面 */
.detail-manga-info .manga-cover {
    flex-shrink: 0;
    width: 20%;
    height: 21vw;
    border-radius: 5px;
    overflow: hidden;
}

.detail-manga-info .manga-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 漫画详情 */
.detail-manga-info .manga-detail {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 详情行 */
.detail-manga-info .detail-row {
    display: flex;
    align-items: flex-start;
}

/* 标题行 */
.detail-manga-info .detail-title-row {
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.detail-manga-info .manga-name {
    font-size: 36px;
    font-weight: 700;
    color: var(--el-text-color-primary);
    margin: 0;
}

/* 收藏按钮 */
.favorite-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 20px;
    border: 1px solid #f5a623;
    border-radius: 4px;
    color: #f5a623;
    background-color: #fff9e6;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.favorite-btn:hover {
    background-color: #f5a623;
    color: var(--el-bg-color);
}

.favorite-btn i {
    font-size: 16px;
}

/* 收藏接口成功回包后的短时按压反馈（与 toggleFavorite 中 detail-favorite-anim 类联动） */
.favorite-btn.detail-favorite-anim {
    animation: detailFavoritePulse 0.28s ease;
}

@keyframes detailFavoritePulse {
    0% {
        transform: scale(1);
    }
    45% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.favorite-btn.favorite-btn--requesting {
    pointer-events: none;
    opacity: 0.88;
    cursor: wait;
}

/* 详情标签 */
.detail-label {
    font-size: 18px;
    font-weight: 600;
    color: var(--el-text-color-primary);
    min-width: 80px;
}

.detail-value {
    font-size: 18px;
    color: var(--el-text-color-primary);
}

/* 标签列表 */
.detail-tags .tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    flex: 1;
}

.detail-tags .el-tag {
    color: var(--el-text-color-primary);
}

.detail-tags .el-tag.el-tag--info {
    background-color: #f4f4f5;
    border-color: #e9e9eb;
}

/* 简介区域 */
.detail-intro {
    align-items: flex-start;
}

.intro-content {
    flex: 1;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.intro-text {
    flex: 1;
    font-size: 18px;
    color: var(--el-text-color-primary);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.intro-text.intro-expanded {
    -webkit-line-clamp: unset;
    display: block;
}

.intro-expand-btn {
    color: #409eff;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
    flex-shrink: 0;
}

.intro-expand-btn:hover {
    color: #66b1ff;
}

/* 开始阅读按钮 */
.start-read-btn {
    margin-top: 10px;
    border: 1px solid #67c23a;
    background-color: #e1f3d8;
    color: #67c23a;
}

.start-read-btn:hover {
    background-color: #67c23a;
    color: var(--el-bg-color);
}

/* ========== 章节列表标题 ========== */
.chapter-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e4e7ed;
}

.chapter-list-title {
    font-size: 22px;
    font-weight: 700;
    color: #303133;
    margin: 0;
}

.sort-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    border: 1px solid #409eff;
    background-color: #ecf5ff;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    color: #409eff;
}

.sort-btn:hover {
    background-color: #409eff;
    color: var(--el-bg-color);
}

.sort-btn i {
    font-size: 12px;
}

/* ========== 章节列表 ========== */
.chapter-list {
    margin-bottom: 20px;
}

.chapter-item {
    padding: 12px 15px;
    background-color: #d5d5d5;
    border: 1px solid #e4e7ed;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-size: 12px;
    color: #606266;
    margin-bottom: 20px;
}

.chapter-item:hover {
    border-color: #409eff;
    color: #409eff;
    background-color: #ecf5ff;
}

/* ========== 展开全部章节按钮 ========== */
.expand-all-btn {
    text-align: center;
    margin-bottom: 30px;
}

.expand-all-btn .el-button {
    padding: 12px 40px;
    background-color: #409eff;
    color: var(--el-bg-color);
    border-color: #409eff;
}

.expand-all-btn .el-button:hover {
    background-color: #66b1ff;
    border-color: #66b1ff;
}

/* ========== 回复区域 ========== */
.reply-section {
    padding: 20px 0;
    border-top: 1px solid #e4e7ed;
    margin-bottom: 20px;
}

.reply-title {
    font-size: 20px;
    font-weight: 600;
    color: #303133;
    text-align: left;
    margin: 0 0 20px 0;
}

.comment-compose {
    margin-bottom: 20px;
}

.comment-compose-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}

/* wangEditor（与 PC animationDetail 同源） */
.pc-detail-comment-editor-wrap,
.pc-detail-reply-editor-wrap {
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    overflow: hidden;
}

.pc-detail-comment-editor-wrap .w-e-text-container,
.pc-detail-reply-editor-wrap .w-e-text-container {
    min-height: 140px;
}

.pc-detail-reply-editor-wrap .w-e-text-container {
    min-height: 120px;
}

.reply-children {
    margin-top: 8px;
    padding: 8px 10px;
    background-color: #f5f7fa;
    border-radius: 4px;
    font-size: 13px;
    line-height: 1.5;
}

.reply-child-row {
    margin-bottom: 6px;
}

.reply-child-row:last-child {
    margin-bottom: 0;
}

.reply-child-name {
    font-weight: 600;
    color: #606266;
}

.reply-child-text {
    color: #606266;
}

.reply-child-count {
    margin-left: 2px;
    color: #909399;
    font-size: 13px;
}

/* ========== 回复列表 ========== */
.reply-list {
    margin-bottom: 30px;
}

.reply-item {
    display: flex;
    align-items: flex-start;
    padding: 20px 0;
    border-bottom: 1px solid #e4e7ed;
}

.reply-item:last-child {
    border-bottom: none;
}

/* 头像右侧：上部（正文+日期）+ 旧版内联回复编辑区 */
.reply-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.reply-top-row {
    display: flex;
    align-items: flex-start;
    width: 100%;
}

.reply-top-row .reply-content {
    flex: 1;
    min-width: 0;
}

.reply-top-row .reply-date {
    margin-left: 20px;
}

.reply-inline-compose {
    width: 100%;
    margin-top: 10px;
}

.reply-inline-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: 10px;
}

/* 左侧头像 */
.reply-avatar {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    margin-right: 12px;
}

.reply-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

/* 中间内容 */
.reply-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* 第一行：昵称 + 等级 */
.reply-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.reply-nickname {
    font-size: 16px;
    font-weight: 600;
    color: #303133;
}

.reply-level {
    padding: 2px 8px;
    border: 1px solid #303133;
    border-radius: 3px;
    font-size: 12px;
    color: #303133;
    background-color: transparent;
}

/* 第二行：回复内容 */
.reply-text {
    font-size: 14px;
    color: #606266;
    line-height: 1.6;
}

/* 第三行：点赞 + 收藏 */
.reply-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.reply-action-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: #909399;
    cursor: pointer;
    transition: color 0.3s ease;
}

.reply-action-item:hover {
    color: #409eff;
}

.reply-action-item i {
    font-size: 16px;
}

.reply-action-item .thumb-icon {
    display: inline-block;
    vertical-align: middle;
    margin-top: -2px;
}

/* 右侧日期（与 .reply-top-row 联用，外边距在 .reply-top-row .reply-date） */
.reply-date {
    flex-shrink: 0;
    font-size: 14px;
    color: #909399;
    white-space: nowrap;
}

/* ========== 分页器 ========== */
.pagination-wrapper-bottom {
    display: flex;
    justify-content: center;
    padding: 15px 0;
    border-top: 1px solid #e4e7ed;
    margin-top: 15px;
}

.el-pagination {
    font-weight: 600;
}

.el-pagination.is-background .el-pager li:not(.disabled).active {
    background-color: #409eff;
}

/* ========== 夜间模式 - 回复列表 ========== */
.dark-mode .reply-item {
    border-bottom-color: var(--el-border-color-light);
}

.dark-mode .reply-nickname {
    color: var(--el-text-color-primary);
}

.dark-mode .reply-level {
    border-color: var(--el-text-color-primary);
    color: var(--el-text-color-primary);
}

.dark-mode .reply-text {
    color: var(--el-text-color-regular);
}

.dark-mode .reply-action-item {
    color: var(--el-text-color-secondary);
}

.dark-mode .reply-action-item:hover {
    color: #409eff;
}

.dark-mode .reply-date {
    color: var(--el-text-color-secondary);
}

/* ========== 夜间模式 - 分页器 ========== */
.dark-mode .pagination-wrapper-bottom {
    border-top-color: var(--el-border-color-light);
}

/* ========== 没有更多回复 ========== */
.no-more-reply {
    text-align: center;
    color: #909399;
    font-size: 16px;
    padding: 10px 0;
}

/* ========== 请先登录 ========== */
.login-tip {
    text-align: center;
    color: #606266;
    font-size: 16px;
    padding: 20px 0;
}

.login-link {
    color: #409eff;
    text-decoration: none;
    font-weight: 600;
    margin-left: 5px;
}

.login-link:hover {
    color: #66b1ff;
}

/* ========== 夜间模式样式 ========== */

/* 漫画信息区域边框 */
.dark-mode .detail-manga-info {
    border-bottom-color: var(--el-border-color-light);
}

/* 标签样式 */
.dark-mode .detail-tags .el-tag.el-tag--info {
    background-color: var(--el-fill-color-light);
    border-color: var(--el-border-color);
}

/* 章节列表标题边框 */
.dark-mode .chapter-list-header {
    border-bottom-color: var(--el-border-color-light);
}

/* 章节列表标题文字 */
.dark-mode .chapter-list-title {
    color: var(--el-text-color-primary);
}

/* 排序按钮 */
.dark-mode .sort-btn {
    background-color: var(--el-fill-color-light);
    border-color: var(--el-border-color);
    color: var(--el-text-color-regular);
}

.dark-mode .sort-btn:hover {
    background-color: #409eff;
    color: #fff;
}

/* 章节列表项 */
.dark-mode .chapter-item {
    background-color: var(--el-fill-color-light);
    border-color: var(--el-border-color);
    color: var(--el-text-color-regular);
}

.dark-mode .chapter-item:hover {
    border-color: #409eff;
    color: #409eff;
    background-color: var(--el-bg-color-hover);
}

/* 回复区域边框 */
.dark-mode .reply-section {
    border-top-color: var(--el-border-color-light);
}

/* 回复标题 */
.dark-mode .reply-title {
    color: var(--el-text-color-primary);
}

/* 没有更多回复 */
.dark-mode .no-more-reply {
    color: var(--el-text-color-secondary);
}

/* 登录提示 */
.dark-mode .login-tip {
    color: var(--el-text-color-regular);
}

/* 开始阅读按钮 */
.dark-mode .start-read-btn {
    border-color: #67c23a;
    background-color: var(--el-fill-color-light);
    color: #67c23a;
}

.dark-mode .start-read-btn:hover {
    background-color: #67c23a;
    color: #fff;
}

/* 收藏按钮 */
.dark-mode .favorite-btn {
    background-color: var(--el-fill-color-light);
    border-color: #f5a623;
    color: #f5a623;
}

.dark-mode .favorite-btn:hover {
    background-color: #f5a623;
    color: #fff;
}

.dark-mode .favorite-btn.favorite-btn--requesting {
    opacity: 0.88;
}

.banner-ads-container{
    margin: 20px 0;
}
.banner-aads-row{
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}
.banner-ad-item{
    flex: 1;
    max-width: 728px;
    min-width: 300px;
}

/* Popup类型广告悬浮在左下角 */
.popup-ad-item {
    position: fixed;
    bottom: 40px;
    left: 20px;
    z-index: 1001;
    width: 400px;
    height: 200px;
    border-radius: 4px;
    overflow: hidden;
}

.chapter-page-more {
    margin: 12px 0 8px;
}

.chapter-page-more-link {
    color: #409eff;
    text-decoration: none;
}

.chapter-page-more-link:hover {
    text-decoration: underline;
}

.reply-action-clickable {
    cursor: pointer;
}

/* ========== 回到顶部按钮 ========== */
/* 确保回到顶部按钮在经验值容器之上 */
.el-backtop {
    z-index: 2002 !important;
}