/* ============================================================
   文章归档 / 版权说明 / 相关文章
   ------------------------------------------------------------
   单独一个文件，主题升级覆盖 main.css 时不会连带丢掉这些样式。
   配色沿用主题：主色 #27ae60，正文 #333，次要文字 #999，分隔线 #eee。
   ============================================================ */

/* ---------- 文章版权说明 ---------- */

.post-copyright {
    margin: 26px 0 14px;
    padding: 13px 16px 13px 18px;
    background: #fbfcfb;
    border: 1px solid #eceff0;
    border-left: 3px solid #27ae60;
    border-radius: 3px;
    font-size: 13px;
    line-height: 1.9;
    color: #7a8085;
    text-indent: 0;
    word-break: break-word;
}

.post-copyright .post-copyright-label {
    margin: 0 0 3px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    color: #27ae60;
    text-indent: 0;
}

.post-copyright .post-copyright-label::before {
    content: "©";
    margin-right: 6px;
    font-size: 13px;
    font-weight: 400;
}

.post-copyright .post-copyright-text {
    text-indent: 0;
}

.post-copyright a {
    color: #27ae60;
    border-bottom: 1px dotted rgba(39, 174, 96, .5);
    word-break: break-all;
}

.post-copyright a:hover {
    border-bottom-style: solid;
}

/* ---------- 相关文章 ---------- */

.related-posts {
    margin: 34px 0 0;
    padding: 24px 0 0;
    border-top: 1px solid #eee;
}

.related-title {
    position: relative;
    margin: 0 0 12px;
    padding-left: 12px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.5;
    color: #333;
}

.related-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: .32em;
    bottom: .32em;
    width: 3px;
    border-radius: 2px;
    background: #27ae60;
}

.related-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 24px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.related-item a {
    display: block;
    padding: 6px 10px;
    margin-left: -10px;
    border-radius: 3px;
    color: #444;
    transition: background-color .18s ease, color .18s ease;
}

.related-item a:hover {
    background: #f4faf6;
    color: #27ae60;
}

.related-item-title {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 14px;
    line-height: 1.7;
}

.related-item-date {
    display: block;
    margin-top: -1px;
    font-size: 12px;
    line-height: 1.6;
    color: #bbb;
    font-variant-numeric: tabular-nums;
}

/* ---------- 文章归档页 ---------- */

.archives-summary {
    margin: 0 0 20px;
    font-size: 13px;
    line-height: 1.9;
    color: #999;
    text-indent: 0;
}

.archives-summary strong {
    margin: 0 2px;
    font-size: 15px;
    font-weight: 700;
    color: #27ae60;
}

.archives-summary time {
    font-variant-numeric: tabular-nums;
}

.archives-intro {
    margin: 0 0 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.archives-empty {
    padding: 40px 0;
    font-size: 14px;
    color: #aaa;
    text-align: center;
    text-indent: 0;
}

.archives-note {
    margin: 18px 0 0;
    font-size: 12px;
    color: #aaa;
    text-indent: 0;
}

/* 年份快速跳转 */
.archives-years {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 30px;
}

.archives-years a {
    display: inline-block;
    padding: 2px 12px;
    border: 1px solid #e8e8e8;
    border-radius: 20px;
    font-size: 13px;
    line-height: 1.9;
    color: #666;
    transition: color .2s ease, border-color .2s ease, background-color .2s ease;
}

.archives-years a:hover {
    border-color: #27ae60;
    background: #f4faf6;
    color: #27ae60;
}

.archives-years span {
    margin-left: 5px;
    font-size: 11px;
    color: #bbb;
}

.archives-years a:hover span {
    color: #27ae60;
}

/* 年份分组 */
.archives-year {
    margin: 0 0 34px;
    scroll-margin-top: 20px;
}

.archives-year:last-of-type {
    margin-bottom: 0;
}

.archives-year-title {
    margin: 0 0 14px;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
    color: #333;
    letter-spacing: .02em;
}

.archives-year-title em {
    margin-left: 10px;
    font-size: 12px;
    font-style: normal;
    font-weight: 400;
    color: #aaa;
    letter-spacing: 0;
}

/* 月份分组：左侧一条时间轴 */
.archives-month {
    position: relative;
    margin: 0 0 18px;
    padding: 0 0 0 18px;
    border-left: 1px solid #efefef;
}

.archives-month:last-child {
    margin-bottom: 0;
}

.archives-month::before {
    content: "";
    position: absolute;
    left: -4px;
    top: 9px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #dcdcdc;
    transition: background-color .2s ease;
}

.archives-month:hover::before {
    background: #27ae60;
}

.archives-month-title {
    margin: 0 0 2px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.8;
    color: #999;
}

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

.archives-list li {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 2px 0;
    line-height: 1.9;
}

.archives-list a {
    display: flex;
    align-items: baseline;
    flex: 1;
    min-width: 0;
    color: #333;
    transition: color .2s ease;
}

/* 标题与日期之间的虚线，把两端的空白连起来 */
.archives-list a::after {
    content: "";
    flex: 1;
    margin: 0 10px 0 8px;
    border-bottom: 1px dotted #e2e2e2;
    transform: translateY(-4px);
}

.archives-list a:hover {
    color: #27ae60;
}

.archives-list a:hover::after {
    border-bottom-color: #b7e0c6;
}

.archives-item-title {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 15px;
}

.archives-list time {
    flex: none;
    font-size: 12px;
    color: #c0c0c0;
    font-variant-numeric: tabular-nums;
}

/* 底部标签云 */
.archives-tags {
    margin: 40px 0 0;
    padding: 22px 0 0;
    border-top: 1px solid #eee;
}

.archives-tags-title {
    position: relative;
    margin: 0 0 12px;
    padding-left: 12px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.5;
    color: #333;
}

.archives-tags-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: .32em;
    bottom: .32em;
    width: 3px;
    border-radius: 2px;
    background: #27ae60;
}

.archives-taglist {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.archives-taglist a {
    display: inline-block;
    padding: 1px 11px;
    border: 1px solid #eee;
    border-radius: 3px;
    font-size: 13px;
    line-height: 1.9;
    color: #666;
    transition: color .2s ease, border-color .2s ease, background-color .2s ease;
}

.archives-taglist a:hover {
    border-color: #27ae60;
    background: #f4faf6;
    color: #27ae60;
}

.archives-taglist span {
    margin-left: 5px;
    font-size: 11px;
    color: #bbb;
}

.archives-taglist a:hover span {
    color: #27ae60;
}

/* ---------- 小屏 ---------- */

@media (max-width: 768px) {
    .related-list {
        grid-template-columns: 1fr;
    }

    .archives-year-title {
        font-size: 22px;
    }

    .archives-years {
        margin-bottom: 24px;
    }

    .archives-year {
        margin-bottom: 28px;
    }

    .archives-item-title {
        font-size: 14px;
    }
}

/* ---------- 评论访客标识：系统 / 浏览器 / 归属地 ---------- */

/* 挂在昵称（cite.fn）之后，跟随名字基线，不单独占一行 */
.visitor-badges {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-left: 7px;
    vertical-align: -2px;
    line-height: 1;
}

.visitor-badges .vb {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: default;
    outline: 0;
}

.visitor-badges .vb img {
    width: 14px;
    height: 14px;
    display: block;
    opacity: .62;
    transition: opacity .15s ease;
}

.visitor-badges .vb:hover img,
.visitor-badges .vb:focus img {
    opacity: 1;
}

/* 提示气泡：用 data-tip 而不是 title，避免原生提示和气泡同时弹出。
   从图标左边缘向右展开并向下弹出——昵称在左侧，右边有足够空间，
   既不会顶到上一条评论，也不会把页面撑出横向滚动条。 */
.visitor-badges .vb::after {
    content: attr(data-tip);
    position: absolute;
    left: -2px;
    top: 150%;
    padding: 4px 9px;
    border-radius: 5px;
    background: rgba(20, 20, 20, .88);
    color: #fff;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: 0;
    text-align: left;
    white-space: nowrap;
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-4px);
    transition: opacity .15s ease, transform .15s ease, visibility .15s;
    z-index: 20;
}

.visitor-badges .vb:hover::after,
.visitor-badges .vb:focus::after {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* ---------- 发表评论表单 ---------- */

/* 标题左侧绿条，与「相关文章」保持同一套视觉语言。
   只作用于两个区块标题，避免评论正文里的 h2 也被加上绿条。 */
#comments > .respond > h2,
#comments > .respondtitle > h2 {
    position: relative;
    margin-top: 20px;
    padding-left: 12px;
    color: #333;
}

#comments > .respond > h2::before,
#comments > .respondtitle > h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: .32em;
    bottom: .32em;
    width: 3px;
    border-radius: 2px;
    background: #27ae60;
}

/* 称呼 / 邮箱 / 网址 / 验证题 并排一行，窄屏自动折行。
   用 flex 而不是固定列数的 grid：插件没启用时少一个字段也不会留空。 */
#comment-form .comment-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

#comment-form .comment-fields p {
    flex: 1 1 148px;
    min-width: 0;
    margin: 0;
}

/* 验证题固定窄一点，不与上面三项抢宽度 */
#comment-form .comment-fields .comment-antispam {
    flex: 0 0 110px;
}

/* 防垃圾插件未启用时这个 p 是空的，不要占一个格子 */
#comment-form .comment-fields .comment-antispam:empty {
    display: none;
}

#comment-form .comment-logged {
    margin-bottom: 10px;
}

/* 控件统一样式：去掉 main.css 里 30px 高、2px 圆角的旧观感 */
#comment-form input[type="text"],
#comment-form input[type="email"],
#comment-form input[type="url"],
#comment-form textarea {
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 0 12px;
    height: 38px;
    border: 1px solid #e3e3e3;
    border-radius: 4px;
    background: #fafafa;
    color: #333;
    font-size: 14px;
    line-height: 36px;
    transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

#comment-form textarea {
    height: auto;
    min-height: 108px;
    padding: 10px 12px;
    line-height: 1.7;
    resize: vertical;
}

#comment-form input:focus,
#comment-form textarea:focus {
    outline: 0;
    border-color: #27ae60;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(39, 174, 96, .1);
}

#comment-form input::placeholder,
#comment-form textarea::placeholder {
    color: #b3b3b3;
}

#comment-form .comment-body {
    margin: 0;
}

/* 按钮收窄并右对齐，不再通栏；左侧留给「记住我的信息」 */
#comment-form .comment-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
    margin: 12px 0 0;
    text-align: right;
}

/* 记住访客：main.css 里有 appearance:none，原生勾选框会被清空，所以自己画一个 */
#comment-form .comment-remember {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-right: auto;
    color: #8a8f98;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
}

#comment-form .comment-remember input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    position: relative;
    flex: 0 0 auto;
    width: 14px;
    height: 14px;
    margin: 0;
    padding: 0;
    border: 1px solid #d0d0d0;
    border-radius: 3px;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}

#comment-form .comment-remember:hover input[type="checkbox"] {
    border-color: #27ae60;
}

#comment-form .comment-remember input[type="checkbox"]:checked {
    border-color: #27ae60;
    background: #27ae60;
}

#comment-form .comment-remember input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 1px;
    width: 3px;
    height: 7px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

#comment-form button.submit {
    width: auto;
    min-width: 132px;
    height: 36px;
    padding: 0 20px;
    margin: 0;
    border: 0;
    border-radius: 4px;
    background: #27ae60;
    color: #fff;
    font-size: 14px;
    line-height: 36px;
    cursor: pointer;
    transition: background .18s ease, transform .1s ease;
}

#comment-form button.submit:hover {
    background: #219653;
}

#comment-form button.submit:active {
    transform: translateY(1px);
}

/* 手机端：按钮占满一行更好点，省得点不准 */
@media (max-width: 520px) {
    #comment-form .comment-actions {
        flex-direction: column;
        align-items: stretch;
    }

    #comment-form .comment-remember {
        margin: 0;
    }

    #comment-form button.submit {
        width: 100%;
        min-width: 0;
    }
}
