/* =============================================
   Typecho-Five-Theme - Main Stylesheet
   Author: RAO | https://qi.loc.cc/
   Version: 1.3.0
   ============================================= */

/* === Reset & Base === */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.8;
    color: #333;
    background: #f5f5f5;
}

a {
    color: #2c5faa;
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: #1a3f7a;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    list-style: none;
}

input, textarea, button {
    font-family: inherit;
    font-size: inherit;
    outline: none;
    border: none;
}

/* === Layout === */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 15px;
}

.content-wrap {
    display: flex;
    gap: 25px;
    padding: 30px 0;
    align-items: flex-start;
}

.main-content {
    flex: 1;
    min-width: 0;
}

.sidebar {
    width: 260px;
    flex-shrink: 0;
}

/* === Header === */
.site-header {
    background: #1a1a2e;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    align-items: center;
    height: 50px;
    gap: 20px;
}

.header-logo a {
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
}

.header-logo .logo-img {
    height: 36px;
    width: auto;
    max-width: 160px;
    display: block;
    object-fit: contain;
}

.header-logo .logo-text {
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 1px;
}

/* === Reward Modal === */
.reward-modal-inner {
    background: #fff;
    border-radius: 16px;
    padding: 28px 32px 24px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.35);
    min-width: 280px;
    max-width: 340px;
    width: 90%;
    position: relative;
    animation: rewardFadeIn 0.2s ease;
}

@keyframes rewardFadeIn {
    from { transform: scale(0.88); opacity: 0; }
    to   { transform: scale(1);    opacity: 1; }
}

.reward-modal-inner h4 {
    font-size: 17px;
    font-weight: 600;
    color: #222;
    margin: 0 0 16px;
}

.reward-modal-inner img {
    width: 220px;
    height: 220px;
    object-fit: contain;
    border-radius: 8px;
    display: block;
    margin: 0 auto 14px;
}

.reward-modal-tip {
    font-size: 13px;
    color: #999;
    margin: 0 0 18px;
}

.reward-modal-close {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f5f5f5;
    color: #555;
    border: none;
    padding: 8px 22px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s, color 0.2s;
}

.reward-modal-close:hover {
    background: #e0e0e0;
    color: #222;
}

.header-nav {
    flex: 1;
}

.header-nav > ul {
    display: flex;
    gap: 5px;
    align-items: center;
}

.header-nav ul li {
    position: relative;
}

.header-nav ul li a {
    color: #ccc;
    padding: 6px 14px;
    border-radius: 3px;
    font-size: 14px;
    transition: all 0.2s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
}

.header-nav ul li a:hover,
.header-nav ul li.active > a {
    color: #4a9eff;
    background: rgba(74, 158, 255, 0.1);
}

/* 下拉菜单 */
.header-nav li.has-dropdown > a .fa-angle-down {
    font-size: 11px;
    transition: transform 0.2s;
}

.header-nav li.has-dropdown:hover > a .fa-angle-down {
    transform: rotate(180deg);
}

.header-nav .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #252540;
    min-width: 130px;
    border-radius: 4px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    z-index: 200;
    padding: 5px 0;
    flex-direction: column;
    gap: 0;
}

.header-nav li.has-dropdown:hover .dropdown-menu {
    display: flex;
}

.header-nav .dropdown-menu li {
    width: 100%;
}

.header-nav .dropdown-menu li a {
    padding: 8px 16px;
    border-radius: 0;
    display: block;
    color: #bbb;
    font-size: 13px;
    white-space: nowrap;
}

.header-nav .dropdown-menu li a:hover,
.header-nav .dropdown-menu li.active a {
    background: rgba(74, 158, 255, 0.15);
    color: #4a9eff;
}

.header-search {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.header-search .search-form {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
}

.header-search input {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-right: none;
    color: #fff;
    padding: 0 10px;
    border-radius: 3px 0 0 3px;
    width: 150px;
    height: 30px;
    font-size: 13px;
    flex-shrink: 0;
}

.header-search input::placeholder {
    color: #888;
}

.header-search button {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.2);
    color: #ccc;
    width: 34px;
    height: 30px;
    border-radius: 0 3px 3px 0;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.header-search button:hover {
    background: rgba(255,255,255,0.3);
    color: #fff;
}

/* Thumbnail placeholder */
.recent-post-thumb.no-image {
    background: #f0f2f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.thumb-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #ccc;
    font-size: 20px;
}

.header-user {
    font-size: 13px;
    color: #ccc;
    white-space: nowrap;
}

.header-user a {
    color: #ccc;
    transition: color 0.2s;
}

.header-user a:hover {
    color: #fff;
}

.header-user span {
    margin: 0 5px;
    color: #555;
}

/* === Post List (index.php) === */
.post-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.post-card {
    background: #fff;
    padding: 20px 25px;
    margin-bottom: 15px;
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    border: 1px solid #eee;
}

.post-card-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.5;
}

.post-card-title a {
    color: #1a3f7a;
}

.post-card-title a:hover {
    color: #2c5faa;
}

.post-card-meta {
    font-size: 13px;
    color: #888;
    margin-bottom: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.post-card-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.post-card-body {
    display: flex;
    gap: 18px;
    align-items: flex-start;
}

.post-card-thumb {
    flex-shrink: 0;
    width: 150px;
    height: 120px;
    overflow: hidden;
    border-radius: 3px;
    display: block;
}

.post-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.post-card-thumb:hover img {
    transform: scale(1.05);
}

.post-card-excerpt {
    flex: 1;
    min-width: 0;
}

.post-card-excerpt p {
    color: #555;
    line-height: 1.8;
    font-size: 14px;
    margin-bottom: 12px;
}

.read-more-btn {
    display: inline-block;
    background: #1a1a2e;
    color: #fff;
    padding: 6px 18px;
    border-radius: 3px;
    font-size: 13px;
    float: right;
    transition: background 0.2s;
}

.read-more-btn:hover {
    background: #2c5faa;
    color: #fff;
}

/* === Pagination === */
.pagination {
    background: #fff;
    padding: 15px 25px;
    border-radius: 4px;
    border: 1px solid #eee;
    margin-top: 5px;
}

/* 外层 flex 容器，把 prev、数字区、next 三者横向排列 */
.pagination .pager-outer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
}

/* Typecho pageNav 可能输出 ul>li 或 div>a 结构，全部兼容 */
.pagination .pager-wrap,
.pagination ul.pager-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
}

.pagination .pager-wrap li {
    list-style: none;
    display: inline-flex;
}

/* 所有分页元素基础样式 */
.pagination .pager-wrap a,
.pagination .pager-wrap span,
.pagination .pager-wrap li a,
.pagination .pager-wrap li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    font-size: 14px;
    color: #444;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    transition: all 0.2s;
    line-height: 1;
    text-decoration: none;
}

/* 数字链接 hover */
.pagination .pager-wrap a:hover,
.pagination .pager-wrap li a:hover {
    background: #2c5faa;
    border-color: #2c5faa;
    color: #fff;
}

/* 当前页 - 覆盖所有可能的结构 */
.pagination .pager-wrap span.current,
.pagination .pager-wrap a.current,
.pagination .pager-wrap li.current a,
.pagination .pager-wrap li.current span,
.pagination .pager-wrap li span.current,
.pagination .pager-wrap li a.current {
    background: #2c5faa !important;
    border-color: #2c5faa !important;
    color: #fff !important;
    font-weight: 600;
    cursor: default;
}

/* 省略号（非当前页的 span） */
.pagination .pager-wrap > span:not(.current),
.pagination .pager-wrap li > span:not(.current) {
    border-color: transparent;
    background: none;
    color: #aaa;
    min-width: auto;
    cursor: default;
}

/* 前一页/后一页 - 在 pager-wrap 外或内都能正确显示 */
.pagination .pager-outer > a,
.pagination .pager-wrap a.prev,
.pagination .pager-wrap a.next,
.pagination .pager-wrap li:first-child a,
.pagination .pager-wrap li:last-child a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 12px;
    font-size: 13px;
    color: #555;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
}

.pagination .pager-outer > a:hover,
.pagination .pager-wrap a.prev:hover,
.pagination .pager-wrap a.next:hover {
    background: #2c5faa;
    border-color: #2c5faa;
    color: #fff;
}

/* === Single Post === */
.post-single {
    background: #fff;
    padding: 30px;
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    border: 1px solid #eee;
}

.post-title {
    font-size: 24px;
    font-weight: 700;
    color: #1a3f7a;
    line-height: 1.5;
    margin-bottom: 12px;
}

.post-meta {
    font-size: 13px;
    color: #888;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* === Post Content === */
.post-content {
    font-size: 15px;
    line-height: 1.9;
    color: #444;
    margin-bottom: 25px;
}

.post-content p {
    margin-bottom: 1em;
}

.post-content h2,
.post-content h3,
.post-content h4 {
    font-weight: 700;
    color: #222;
    margin: 1.5em 0 0.5em;
    line-height: 1.4;
}

.post-content h2 { font-size: 1.5em; }
.post-content h3 { font-size: 1.3em; }
.post-content h4 { font-size: 1.1em; }

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 1em 0;
}

.post-content ul,
.post-content ol {
    padding-left: 2em;
    margin-bottom: 1em;
    list-style: disc;
}

.post-content ol {
    list-style: decimal;
}

.post-content blockquote {
    border-left: 4px solid #2c5faa;
    padding: 10px 20px;
    background: #f8f9ff;
    color: #555;
    margin: 1em 0;
    border-radius: 0 4px 4px 0;
}

.post-content pre {
    background: #1a1a2e;
    color: #e8e8e8;
    padding: 15px;
    border-radius: 4px;
    overflow-x: auto;
    margin: 1em 0;
    font-size: 13px;
    line-height: 1.6;
}

.post-content code {
    background: #f0f0f0;
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 0.9em;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

.post-content pre code {
    background: none;
    padding: 0;
}

.post-content a {
    color: #2c5faa;
    border-bottom: 1px solid rgba(44, 95, 170, 0.3);
}

.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
}

.post-content table th,
.post-content table td {
    border: 1px solid #ddd;
    padding: 8px 12px;
    text-align: left;
}

.post-content table th {
    background: #f5f5f5;
    font-weight: 700;
}

/* === Post Tags === */
.post-tags {
    margin: 20px 0;
    padding: 12px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    font-size: 13px;
    color: #888;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.post-tag {
    background: #f0f0f0;
    color: #555;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    transition: all 0.2s;
}

.post-tag:hover {
    background: #2c5faa;
    color: #fff;
}

/* === Post Actions (share/reward) === */
.post-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin: 25px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 4px;
}

.post-reward,
.post-share {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #666;
}

.reward-buttons,
.share-buttons {
    display: flex;
    gap: 8px;
}

.reward-btn,
.share-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    transition: transform 0.25s cubic-bezier(.34,1.56,.64,1), box-shadow 0.25s ease, filter 0.25s ease;
    position: relative;
    text-decoration: none;
}

.reward-wechat { background: #07c160; color: #fff; }
.reward-alipay { background: #1677ff; color: #fff; }
.share-weibo   { background: #e6162d; color: #fff; }
.share-qq      { background: #12b7f5; color: #fff; }
.share-wechat  { background: #07c160; color: #fff; }

.reward-wechat:hover { transform: scale(1.18) translateY(-2px); box-shadow: 0 6px 18px rgba(7,193,96,0.45); filter: brightness(1.08); color: #fff; }
.reward-alipay:hover { transform: scale(1.18) translateY(-2px); box-shadow: 0 6px 18px rgba(22,119,255,0.45); filter: brightness(1.08); color: #fff; }
.share-weibo:hover   { transform: scale(1.18) translateY(-2px); box-shadow: 0 6px 18px rgba(230,22,45,0.45);  filter: brightness(1.08); color: #fff; }
.share-qq:hover      { transform: scale(1.18) translateY(-2px); box-shadow: 0 6px 18px rgba(18,183,245,0.45); filter: brightness(1.08); color: #fff; }
.share-wechat:hover  { transform: scale(1.18) translateY(-2px); box-shadow: 0 6px 18px rgba(7,193,96,0.45);  filter: brightness(1.08); color: #fff; }

/* === Post Prev/Next Nav === */
.post-prev-next {
    display: flex;
    gap: 15px;
    margin: 20px 0;
    padding: 15px 0;
    border-top: 1px solid #eee;
}

.post-prev,
.post-next {
    flex: 1;
    font-size: 14px;
}

.post-prev {
    text-align: left;
}

.post-next {
    text-align: right;
}

.nav-label {
    display: block;
    font-size: 12px;
    color: #999;
    margin-bottom: 3px;
}

.post-prev a,
.post-next a,
.post-prev-next a {
    color: #2c5faa;
    font-weight: 500;
}

.no-post {
    color: #bbb;
}

/* === Related Posts / Archive Grid === */
.related-posts {
    margin: 20px 0;
}

.section-title {
    font-size: 16px;
    font-weight: 700;
    color: #222;
    margin-bottom: 15px;
    padding-left: 10px;
    border-left: 3px solid #2c5faa;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.related-post-item {
    border: 1px solid #eee;
    border-radius: 4px;
    overflow: hidden;
}

.related-post-thumb {
    display: block;
    height: 160px;
    overflow: hidden;
}

.related-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.related-post-thumb:hover img {
    transform: scale(1.05);
}

.no-thumb {
    width: 100%;
    height: 100px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-size: 24px;
}

.related-post-info {
    padding: 10px;
}

.related-post-title {
    display: block;
    font-size: 13px;
    color: #333;
    font-weight: 500;
    margin-bottom: 5px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.5;
}

.related-post-title:hover {
    color: #2c5faa;
}

.related-post-meta {
    font-size: 11px;
    color: #aaa;
    display: flex;
    justify-content: space-between;
}

/* === Page Single === */
.page-single {
    background: #fff;
    padding: 30px;
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    border: 1px solid #eee;
}

.page-title {
    font-size: 26px;
    font-weight: 700;
    color: #1a3f7a;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #2c5faa;
}

.page-content {
    font-size: 15px;
    line-height: 1.9;
    color: #444;
}

.page-content p { margin-bottom: 1em; }

.page-content img {
    max-width: 100%;
    border-radius: 4px;
    margin: 1em 0;
}

/* === Comments === */
.comments-section {
    background: #fff;
    padding: 25px 30px;
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    border: 1px solid #eee;
    margin-top: 15px;
}

.comments-count {
    margin-bottom: 20px;
}

/* --- Comment Form --- */
.comment-form-wrap {
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 18px 20px;
    margin-bottom: 25px;
}

.comment-form-fields {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.comment-form-fields input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 8px 12px;
    font-size: 14px;
    background: #fff;
    transition: border-color 0.2s;
    font-family: inherit;
}

.comment-form-fields input:focus {
    border-color: #2c5faa;
    outline: none;
}

.comment-form-textarea {
    margin-bottom: 12px;
}

.comment-form-textarea textarea {
    width: 100%;
    min-height: 90px;
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 10px 12px;
    font-size: 14px;
    resize: vertical;
    background: #fff;
    transition: border-color 0.2s;
    line-height: 1.7;
    font-family: inherit;
}

.comment-form-textarea textarea:focus {
    border-color: #2c5faa;
    outline: none;
}

.comment-form-submit {
    display: flex;
    align-items: center;
    gap: 10px;
}

.comment-submit-btn {
    background: #2c5faa;
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 3px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.comment-submit-btn:hover {
    background: #1a3f7a;
}

.comment-cancel-btn {
    background: #fff;
    color: #666;
    border: 1px solid #ddd;
    padding: 8px 16px;
    border-radius: 3px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.comment-cancel-btn:hover {
    border-color: #2c5faa;
    color: #2c5faa;
}

.reply-tip {
    font-size: 13px;
    color: #2c5faa;
    background: #f0f4ff;
    padding: 4px 10px;
    border-radius: 10px;
}

/* --- Comment List --- */
.comment-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.comment-item {
    display: flex;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid #f0f0f0;
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-item.comment-by-author > .comment-body {
    background: #f8faff;
    border-radius: 4px;
    padding: 8px 12px;
    border-left: 3px solid #2c5faa;
}

/* highlight on reply */
.comment-highlight {
    background: rgba(44, 95, 170, 0.06) !important;
    transition: background 0.3s;
}

/* --- Avatar --- */
.comment-avatar {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    background: #e8edf5;
}

.comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* --- Comment Body --- */
.comment-body {
    flex: 1;
    min-width: 0;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    flex-wrap: wrap;
    gap: 4px;
}

.comment-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.comment-author {
    font-weight: 600;
    font-size: 14px;
    color: #222;
}

a.comment-author {
    color: #2c5faa;
}

a.comment-author:hover {
    color: #1a3f7a;
}

.comment-badge-author {
    font-size: 11px;
    background: #2c5faa;
    color: #fff;
    padding: 1px 7px;
    border-radius: 10px;
    font-weight: 500;
}

.comment-reply-to {
    font-size: 12px;
    color: #888;
    background: #f0f0f0;
    padding: 1px 8px;
    border-radius: 10px;
}

.comment-reply-to em {
    font-style: normal;
    color: #2c5faa;
}

.comment-floor {
    font-size: 11px;
    color: #2c5faa;
    background: rgba(44, 95, 170, 0.08);
    padding: 1px 6px;
    border-radius: 4px;
    border: 1px solid rgba(44, 95, 170, 0.15);
}

.comment-date {
    font-size: 12px;
    color: #bbb;
    white-space: nowrap;
}

.comment-content {
    font-size: 14px;
    color: #444;
    line-height: 1.75;
    margin-bottom: 6px;
    word-break: break-word;
}

.comment-content p { margin-bottom: 0.5em; }
.comment-content p:last-child { margin-bottom: 0; }

.comment-content a {
    color: #2c5faa;
    border-bottom: 1px solid rgba(44,95,170,0.3);
}

.comment-content code {
    background: #f0f0f0;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 0.9em;
}

.comment-content blockquote {
    border-left: 3px solid #2c5faa;
    padding: 6px 12px;
    background: #f8f9ff;
    color: #555;
    margin: 8px 0;
    border-radius: 0 3px 3px 0;
}

.comment-actions {
    margin-top: 4px;
}

.comment-reply-link {
    font-size: 12px;
    color: #aaa;
    background: transparent;
    padding: 2px 8px;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.comment-reply-link:hover {
    color: #2c5faa;
    background: #f0f4ff;
}

/* --- Nested comments --- */
.comment-children {
    margin-top: 8px;
    margin-left: 28px;
    padding-left: 14px;
    border-left: 2px solid #eef0f5;
}

.comment-children .comment-item {
    padding: 10px 0;
    border-bottom: 1px solid #f8f8f8;
}

.comment-children .comment-avatar {
    width: 32px;
    height: 32px;
}

.comment-children .comment-author {
    font-size: 13px;
}

.comment-children .comment-content {
    font-size: 13px;
}

.comment-children .comment-date {
    font-size: 11px;
}

/* second level */
.comment-children .comment-children {
    margin-left: 20px;
    padding-left: 10px;
    border-left-color: #f0f0f0;
}

.comment-children .comment-children .comment-avatar {
    width: 28px;
    height: 28px;
}

/* third level */
.comment-children .comment-children .comment-children {
    margin-left: 14px;
}

/* --- No comments --- */
.no-comments {
    text-align: center;
    padding: 30px 0;
    color: #bbb;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.no-comments i {
    font-size: 20px;
}

/* --- Comment pager --- */
.comment-pager {
    margin-top: 15px;
    text-align: center;
}

/* === Sidebar Widgets === */
.widget {
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    border: 1px solid #eee;
    padding: 18px;
    margin-bottom: 18px;
}

.widget-title {
    font-size: 15px;
    font-weight: 700;
    color: #222;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid #2c5faa;
    display: flex;
    align-items: center;
    gap: 6px;
}

.widget-title i {
    color: #2c5faa;
}

/* Recent Posts Widget */
.recent-posts-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.recent-post-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.recent-post-thumb {
    flex-shrink: 0;
    width: 70px;
    height: 52px;
    overflow: hidden;
    border-radius: 3px;
    display: block;
}

.recent-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.recent-post-thumb:hover img {
    transform: scale(1.08);
}

.recent-post-info {
    flex: 1;
    min-width: 0;
}

.recent-post-title {
    display: block;
    font-size: 13px;
    color: #333;
    line-height: 1.5;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-bottom: 4px;
    font-weight: 500;
}

.recent-post-title:hover {
    color: #2c5faa;
}

.recent-post-date {
    font-size: 11px;
    color: #bbb;
}

/* Tag Cloud Widget */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    line-height: 1;
}

.tag-item {
    font-size: 12px;
    color: #555;
    padding: 3px 8px;
    background: #f5f5f5;
    border-radius: 2px;
    transition: all 0.2s;
}

.tag-item:hover {
    background: #2c5faa;
    color: #fff;
}

/* Archive Widget */
.archive-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.archive-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 0;
    border-bottom: 1px solid #f5f5f5;
    font-size: 13px;
}

.archive-list li:last-child {
    border-bottom: none;
}

.archive-list a {
    color: #444;
    transition: color 0.2s;
}

.archive-list a:hover {
    color: #2c5faa;
}

.archive-list span {
    color: #bbb;
    font-size: 12px;
}

/* Friend Links Widget */
.friend-links {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.friend-links li {
    padding: 6px 0;
    border-bottom: 1px solid #f5f5f5;
}

.friend-links li:last-child {
    border-bottom: none;
}

.friend-links a {
    color: #555;
    font-size: 13px;
    transition: color 0.2s;
}

.friend-links a:hover {
    color: #2c5faa;
}

/* === Footer === */
.site-footer {
    background: #1a1a2e;
    color: #888;
    padding: 16px 0;
    margin-top: 10px;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.footer-right a {
    color: #aaa;
    transition: color 0.2s;
}

.footer-right a:hover {
    color: #fff;
}

/* === Back to Top === */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 40px;
    height: 40px;
    background: #2c5faa;
    color: #fff;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 999;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: #1a3f7a;
    color: #fff;
    transform: translateY(-3px);
}

/* === Search Results === */
.search-header {
    background: #fff;
    padding: 15px 20px;
    border-radius: 4px;
    border: 1px solid #eee;
    margin-bottom: 15px;
    font-size: 14px;
    color: #666;
}

/* === 404 Page === */
.error-page {
    background: #fff;
    padding: 60px 30px;
    border-radius: 4px;
    text-align: center;
    border: 1px solid #eee;
}

.error-page h1 {
    font-size: 80px;
    font-weight: 900;
    color: #ddd;
    line-height: 1;
    margin-bottom: 10px;
}

.error-page h2 {
    font-size: 22px;
    color: #555;
    margin-bottom: 20px;
}

.error-page p {
    color: #888;
    margin-bottom: 25px;
}

.error-page a {
    display: inline-block;
    background: #2c5faa;
    color: #fff;
    padding: 10px 25px;
    border-radius: 4px;
    font-size: 14px;
}

.error-page a:hover {
    background: #1a3f7a;
    color: #fff;
}

/* === Category/Tag Archive === */
.archive-header {
    background: #fff;
    padding: 20px 25px;
    border-radius: 4px;
    border: 1px solid #eee;
    margin-bottom: 15px;
}

.archive-header h1 {
    font-size: 20px;
    color: #1a3f7a;
    font-weight: 700;
}

/* === Scrollbar === */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #f0f0f0;
}
::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

/* === Responsive === */
@media (max-width: 900px) {
    .content-wrap {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
    }
    .related-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header-inner {
        flex-wrap: wrap;
        height: auto;
        padding: 10px 15px;
    }
    .header-nav {
        order: 3;
        width: 100%;
    }
    .header-nav ul {
        flex-wrap: wrap;
    }
    .header-search {
        order: 4;
    }
    .post-card-body {
        flex-direction: column;
    }
    .post-card-thumb {
        width: 100%;
        height: 160px;
    }
    .post-single,
    .page-single,
    .comments-section {
        padding: 20px;
    }
    .post-actions {
        flex-direction: column;
        gap: 15px;
    }
    .comment-form-fields {
        flex-direction: column;
    }
    .footer-inner {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .related-posts-grid {
        grid-template-columns: 1fr;
    }
    .post-title {
        font-size: 20px;
    }
}

/* 已登录用户评论信息栏 */
.comment-logged-in {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #f0f7ff;
    border: 1px solid #d0e8ff;
    border-radius: 4px;
    margin-bottom: 12px;
    font-size: 14px;
    flex-wrap: wrap;
}
.comment-logged-in .login-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
}
.comment-logged-in .login-name {
    font-weight: 600;
    color: #333;
}
.comment-logged-in .login-hint {
    color: #888;
}
.comment-logged-in .login-logout {
    margin-left: auto;
    font-size: 12px;
    color: #999;
    text-decoration: none;
}
.comment-logged-in .login-logout:hover {
    color: #e74c3c;
}
