/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
.ImageEdit-button{
    /*抵消新版发布器的问题*/
    display: none;
}
.gallery-item img,.gallery-item{
    margin:0 !important;
}
:root {
    --news: 19px;
    --icons: 18px;
}

/*图片弹窗限制*/
.header-container{
    z-index: 1000 !important;
}
.disabled{
    cursor: default;
    opacity: .5;
    pointer-events: none;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    line-height: 1.67;
    color: #1a1a1a;
    background-color: #f6f6f6;
    padding: 0;
}

.none {
    display: none !important;
}

/*  页面容器 */
.zhihu-container {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    position: relative;
    /* background: #ffffff; */
}

/* 主内容区 */
.main-wrapper {
    flex: 1;
    display: flex;
    /* gap: 10px; */
    /* 增加侧边栏与主内容的间距 */
    padding: 16px 0;
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
}

/* 内容主体 */
.content-area {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* 文章容器 - 用于粘性定位的参考 */
.article-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    background: #ffffff;
     padding: 16px 20px;
}

/* 侧边栏 */
.sidebar-area {
    width: 296px;
    flex-shrink: 0;
    padding: 0 10px;
}

/*  头部样式 */
.article-header {
    padding: 20px 0;
    margin-bottom: 16px;
}

.article-title {
    font-size: 24px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 12px;
    color: #121212;
    letter-spacing: 0;
}

.article-meta {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #8590a6;
    flex-wrap: wrap;
    gap: 8px;
}

.author-info {
    display: flex;
    align-items: center;
    margin-right: 12px;
}

.author-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #0084ff;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    margin-right: 6px;
    overflow: hidden;
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.meta-item {
    display: inline-flex;
    align-items: center;
    margin-right: 12px;    font-size:13px;
}

/* 文章摘要 */
.article-summary {
    background: #f8f9fa;
    border-left: 3px solid #0084ff;
    padding: 16px;
    margin: 20px 0;
    border-radius: 0 4px 4px 0;
    font-size: 14px;
    line-height: 1.6;
    color: #595959;
}

/* 文章标签 */
.article-tags {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.tag {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    display: block;
    text-decoration: none;
}

.tag-original {
    color: #1772F6;
    vertical-align: top;
    border-radius: 100px;
    background: rgba(23, 114, 246, 0.1);
}

.tag-category {
    background: #f0f7ff;
    color: #1890ff;
    border: 1px solid #d1e8ff;
}

.tag-tech {
    background-color: rgba(255, 241, 224, 0.9);
    color: #ff9100;
}
 
/* 文章内容 - 增加内边距 */
.article-content {
    /*padding: 20px 0;*/
    /* font-size: 15px; */
    color: #1a1a1a;
    flex: 1;

    word-wrap: break-word;
    word-break: break-all;
    overflow: hidden;
    line-height: 1.67;
    text-indent: initial;
}

.article-content div,.article-content p{
    /*margin-bottom: 20px;*/
    text-align: justify;
    line-height: 1.67; 
        margin: 1.4em 0;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 20px auto;
    cursor: zoom-in;
    transition: transform 0.3s;
    /*box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);*/


    width: 100%;
    display: block;
}

.article-content img:hover {
    /* transform: scale(1.02); */
}

 
.note-box {
    background: #f6f6f6;
    border-radius: 4px;
    padding: 16px;
    margin: 20px 0;
    font-size: 14px;
    color: #646464;
    border-left: 3px solid #ebebeb;
}

.note-box strong {
    color: #8590a6;
    font-weight: 500;
}

/* 文章操作 - 固定在文章容器底部 */
.article-actions {
    display: flex;
    gap: 12px;
    margin-top: 32px;
    padding: 10px 20px;
    left: 0;
    width: 100%;
    background: white;
    position: sticky;
    bottom: 0;
    z-index: 100; 

}

.zhihu-btn {
    padding: 8px 16px;
    border: none;
    background: transparent;
    color: #646464;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    line-height: 1;
    display: flex;
    align-items: center;
    gap: 6px;
}


.zhihu-btn.primary {
    display: flex;
    border-color: transparent;
    line-height: 30px;
    padding: 0 12px;
    color: #1772f6;
    transition: all 0.2s;
    border-radius: 4px;
    background: rgba(85, 142, 255, .1);
}



.zhihu-btn.liked {
    background-color: #1772f6;
    color: #FFF;
}

/* 上下一篇导航 */
.article-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border: 1px solid #f0f0f0;
    border-radius: 4px;
    background: white;
    color: #646464;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
    max-width: 45%;
}

.nav-btn:hover {
    border-color: #d0d0d0;
    background: #fafafa;
}

.nav-btn.prev {
    text-align: left;
}

.nav-btn.next {
    text-align: right;
    margin-left: auto;
}

.nav-btn .nav-arrow {
    font-size: 16px;
    color: #8590a6;
}

.nav-btn .nav-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

 /* 图片模态框 */
.image-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:rgba(0,0,0,0.45);
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

/* 图片容器 */
.modal-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 图片 */
.modal-image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    cursor: zoom-in;
    transition: transform 0.25s ease, opacity 0.15s ease;
    transform-origin: center center;
    user-select: none;
    -webkit-user-drag: none;
}

/* 关闭按钮 */
.modal-close {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.modal-close i {
    font-size: 18px;
    color: white;
}

/* 导航箭头 */
.nav-arrows {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    opacity: 0.8;
    z-index: 99;
    backdrop-filter: blur(10px);
}

.nav-arrows:hover {
    background: rgba(255, 255, 255, 0.2);
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

.arrow-left {
    left: 20px;
}

.arrow-right {
    right: 20px;
}

.nav-arrows i {
    font-size: 20px;
    color: white;
}

/* 图片指示器 */
.image-indicator {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    opacity: 0.8;
    transition: opacity 0.3s ease;
    z-index: 10;
}

/* 右下角功能按钮组 */
.image-tools {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 10;
}

.tool-btn {
    width: 34px;
    height: 34px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    position: relative;
    backdrop-filter: blur(10px);
}

.tool-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.tool-btn.active {
    background: rgba(255, 255, 255, 0.25);
}

.tool-btn::after {  
    content: attr(title);
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #1772f6;
    /* background: rgba(0, 0, 0, 0.8); */
    color: white;
    padding: 6px 10px;
    border-radius: 9px;
    font-size: 11px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.tool-btn:hover::after {
    opacity: 1;
    /* bottom: -35px; */
}

.tool-btn i {
    font-size: 11px;
    color: white;
}

/* 复制提示 */
.copy-hint {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 10001;
    animation: fadeInOut 2s ease;
    backdrop-filter: blur(10px);
}

@keyframes fadeInOut {

    0%,
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }

    20%,
    80% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* 键盘快捷键提示 */
.keyboard-hint {
    position: absolute;
    bottom: 20px;
    left: 20px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    z-index: 10;
}

.keyboard-hint kbd {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    margin: 0 2px;
    font-family: monospace;
}

/* 触摸设备优化 */
@media (max-width: 768px) {
    .modal-close {
        top: 10px;
        left: 10px;
        width: 36px;
        height: 36px;
    }

    .modal-close i {
        font-size: 16px;
    }

    .nav-arrows {
        width: 40px;
        height: 40px;
    }

    .arrow-left {
        left: 10px;
    }

    .arrow-right {
        right: 10px;
    }

    .nav-arrows i {
        font-size: 16px;
    }

    .image-tools {
        bottom: 10px;
        right: 10px;
        gap: 8px;
    }

    .tool-btn {
        width: 34px;
        height: 34px;
        border-radius: 50%;
    }

    .tool-btn i {
        font-size: 11px;
    }

    .image-indicator {
        top: 10px;
        right: 10px;
        padding: 5px 10px;
        font-size: 12px;
    }
}

/* 图片模态框  end*/ 
 
/* 侧边栏组件 */
.sidebar-card {
    background: white;
    border-radius: 4px;
    margin-bottom: 12px;
    overflow: hidden;
    border: 1px solid #f0f0f0;
}

.card-header {
    padding: 12px 16px;
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    font-weight: 600;
    color: #121212;
    display: flex;
    gap: 3px;
    align-items: center;
    line-height: 1.5;
}

.card-content {
    padding: 16px;
}

/* 目录样式 */
.toc-list {
    list-style: none;
}

.toc-item {
    margin-bottom: 10px;
    position: relative;
    padding-left: 12px;
}

.toc-item::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #8590a6;
    font-size: 16px;
}

.toc-link {
    text-decoration: none;
    color: #175199;
    font-size: 14px;
    display: block;
    padding: 2px 0;
    transition: color 0.2s;
    line-height: 1.4;
}

.toc-link:hover {
    color: #0084ff;
}

/* 推荐阅读 */
.recommendation-list {
    list-style: none;
}

.recommendation-item {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
}

.recommendation-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.recommendation-link {
    text-decoration: none;
    color: #1a1a1a;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 500;
    display: block;
    margin-bottom: 4px;
}

.recommendation-link:hover {
    color: #175199;
}

.recommendation-meta {
    font-size: 12px;
    color: #8590a6;
}

/* 作者信息卡片 - 增强版 */
.author-card {
    padding: 16px;
}

.author-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.author-avatar-large {
    width: 60px;
    border-radius: 4px;
    overflow: hidden;
  height: 60px;
    background: #0084ff;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-right: 12px;
    flex-shrink: 0;
}

.author-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-details h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 0px;
    color: #121212;
    display: flex;
    gap: 2px;
    flex-direction: row;
    align-items: center;
}

.author-details .author-title {
    font-size: 12px;
    color: #8590a6;
    /*margin-bottom: 6px;*/
}

.author-stats {
    display: flex;
    gap: 16px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

.stat-item {
    text-align: center;
    flex: 1;
}

.stat-number {
    font-size: 16px;
    font-weight: 600;
    color: #121212;
    display: block;
}

.stat-label {
    font-size: 12px;
    color: #8590a6;
}

.author-bio {
    font-size: 13px;
    color: #646464;
    line-height: 1.5;
    margin-top: 12px;
}

/* 热门文章卡片 */
.hot-articles {
    margin-top: 8px;
}

.hot-article-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f5f5f5;
}

.hot-article-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.hot-article-rank {
    width: 20px;
    height: 20px;
    background: #f6f6f6;
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #8590a6;
    margin-right: 10px;
    flex-shrink: 0;
    margin-top: 2px;
}

.hot-article-rank.top {
    background: #fff2e8;
    color: #fa541c;
}

.hot-article-content {
    flex: 1;
}

.hot-article-link {
    text-decoration: none;
    color: #1a1a1a;
    font-size: 14px;
    line-height: 1.4;
    display: block;
    margin-bottom: 4px;
}

.hot-article-link:hover {
    color: #175199;
}

.hot-article-meta {
    font-size: 12px;
    color: #8590a6;
}

/* 分类标签 */
.category-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
}

.category-tag {
    padding: 4px 10px;
    background: #f6f6f6;
    border-radius: 12px;
    font-size: 12px;
    color: #8590a6;
    text-decoration: none;
    transition: all 0.2s;
}

.category-tag:hover {
    background: #e6f7ff;
    color: #1890ff;
}

/*  风格footer */
.zhihu-footer {
    background: #f6f6f6;
    padding: 24px 0;
    margin-top: 40px;
    border-top: 1px solid #ebebeb;
    position: relative;
}

.footer-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 16px;
}

.footer-link {
    text-decoration: none;
    color: #8590a6;
    font-size: 13px;
    transition: color 0.2s;
}

.footer-link:hover {
    color: #175199;
}

.footer-copyright {
    font-size: 13px;
    color: #8590a6;
    margin-top: 8px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .main-wrapper {
        flex-direction: column;
        padding: 0;
        gap: 0;
    }

    .content-area {
        /*padding: 0 16px;*/
    }

    .sidebar-area {
        width: 100%;
        padding: 0 16px;
        margin-top: 24px;
    }

    .article-header {
        padding: 16px 0;
    }

  

    .article-content {
        padding-top: 12px;
    }

    .article-actions {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        margin: 0;
        padding: 12px 6px;
        border-top: 1px solid #e0e0e0;
        border-radius: 0;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    }

    .zhihu-footer {
        margin-top: 24px;
        padding-bottom: 70px;
    }
}

/* 阅读进度条 */
.progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: transparent;
    z-index: 999999;
}

.progress-bar {
    height: 2px;
    background: #0084ff;
    width: 0%;
    transition: width 0.3s;
}

/* 按钮图标 */
.btn-icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* 置顶按钮样式 */
.back-to-top-btn {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #8590a6;
    font-size: 14px;
    cursor: pointer;
    transition: color 0.2s;
    padding: 8px 12px;
    border-radius: 4px;
}

.back-to-top-btn:hover {
    color: #0084ff;
}

.back-to-top-btn .btn-icon {
    width: 14px;
    height: 14px;
}

/* 需要密码访问的时候显示 */

.viwe-div {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.685);
    z-index: 999;
    transition: all 0.8s ease-in-out;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 确认按钮 密码 */
.btn-none {
    border: 0;
    background: transparent;

}

.flex {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

/* 密码输入框 */
.input-password {
    margin-bottom: 15px;
    align-items: center;
    background: #fff;
    border: 1px solid #ebeced;
    border-radius: 3px;
    box-sizing: border-box;
    display: flex;
    font-size: 14px;
    height: 34px;
    padding: 4px 10px;
    position: relative;
    width: 100%;
}

.btn-password {
    font-size: 14px;
    border-radius: 3px;
    width: 50%;
    padding: 5px 15px 5px 15px;
    background-color: #ebebeb;

}

.btn-password-yes {
    color: #ffffff;
    background-color: #0084ff;
}















/* 

徽章配置

*/
.title-ico {
    width: var(--icons);
    height: var(--icons);
    display: block;
    background-size: 100% 100%;
    background-image: url(/NewWebTop/imgaes/ico-img/red-top.png);
}

/* 话题 */
.title-ico-topic {
    background-image: url(/NewWebTop/imgaes/ico-img/topic.png);
}

.rf-icon {
    background-image: url(/NewWebTop/imgaes/ico-img/rficon.png);
}

.wenzhang {
    background-image: url(/NewWebTop/imgaes/ico-img/wenzhang.png);
}

/* 颜色配置 */
.bgc-blue {
    background: linear-gradient(to right bottom, rgb(224, 233, 250), rgb(244, 247, 254));
}

.tuiInfo {
    background: linear-gradient(to right bottom, rgb(218, 245, 230), rgb(245, 252, 248));
}

.redagn {
    background: linear-gradient(to right bottom, rgb(210, 241, 244), rgb(241, 250, 251));
}

/* 徽章 */
/* 大师 */
.Badge.master-badge {
    background-image: url(/NewWebTop/imgaes/badgeGroup-icon/master-badge.png);
}

/* 专家 */
.Badge.expert-badge {
    background-image: url(/NewWebTop/imgaes/badgeGroup-icon/expert-badge.png);
}

/* 优秀 */
.Badge.excellent-badge {
    background-image: url(/NewWebTop/imgaes/badgeGroup-icon/excellent-badge.png);
}

/* 活跃 */
.Badge.active-badge {
    background-image: url(/NewWebTop/imgaes/badgeGroup-icon/active-badge.png);
}

/* 知新 */
.Badge.rising-badge {
    background-image: url(/NewWebTop/imgaes/badgeGroup-icon/rising-badge.png);
}
/*高产作者*/
.Badge.reading_champion {
    background-image: url(/NewWebTop/imgaes/badgeGroup-icon/reading_champion.png);
}
.Badge:hover{ 
    transform: scale(2.1); 
    transition:0.3s;
}
.Badge {
    width: 15px;
    height: 15px;
    display: block;
    background-size: 100% 100%;
}





/* 赞同按钮点赞后的样式 */
.Agree.liked {
    background-color: #0084ff; 
}

.Disagree.disliked,
.Agree.liked {
    color: white;
}


/* 反对按钮装饰样式 */
.Disagree.disliked {
    background-color: #0084ff;
}

/* 当处于反对状态时的样式（真正反对，不是装饰） */
.Disagree.disliked[data-disliked="true"] {

    background-color: #0084ff;
}

/*  分享*/
.Share:hover {
    color: #0084ff;
}