/* ============================================
   MCP Theme - 样式表
   单栏布局 + 卡片式设计
   ============================================ */

/* CSS 变量 */
:root {
    --primary-color: #1a1a2e;
    --secondary-color: #4a4a6a;
    --accent-color: #e94560;
    --text-color: #333;
    --text-light: #888;
    --bg-color: #f5f5f7;
    --card-bg: #ffffff;
    --border-color: #e8e8ed;
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.12);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.2);
    --card-border: 2px solid #1a1a1a;
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 20px;
    --header-height: 64px;
    --max-width: 720px;
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--bg-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--accent-color);
}

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

/* Header - 悬浮式通栏导航 */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: box-shadow 0.3s ease;
}

.site-header.scrolled {
    box-shadow: var(--shadow-sm);
}

.header-inner {
    max-width: var(--max-width);
    height: 100%;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-left {
    display: flex;
    align-items: center;
}

.site-logo {
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 20px;
    color: var(--primary-color);
}

.site-logo img {
    height: 36px;
    width: auto;
}

.logo-text {
    letter-spacing: 1px;
}

.header-nav {
    display: flex;
    align-items: center;
}

.nav-menu {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-menu a {
    font-size: 15px;
    font-weight: 500;
    color: var(--secondary-color);
    padding: 8px 0;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width 0.3s ease;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.nav-menu a:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--primary-color);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.header-placeholder {
    height: var(--header-height);
}

/* Main Content */
.site-main {
    min-height: calc(100vh - var(--header-height) - 100px);
    padding: 24px 0;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Post Card - 卡片式布局 */
.post-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
    border: var(--card-border);
    box-shadow: var(--shadow-md);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.post-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

/* 卡片右上角分类标识 */
.post-card {
    position: relative;
    overflow: visible;
}

.card-category-badge {
    position: absolute;
    top: -1px;
    right: -1px;
    background: #1a1a1a;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    padding: 8px 14px;
    border-radius: 0 var(--radius-lg) 0 var(--radius-lg);
    text-decoration: none;
    letter-spacing: 0.3px;
    z-index: 2;
    transition: background 0.2s ease;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-category-badge:hover {
    background: #333;
    color: #fff;
    text-decoration: none;
}

/* Post Header */
.post-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.post-author {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.author-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--border-color);
}

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

.author-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.author-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
}

.post-time {
    font-size: 12px;
    color: var(--text-light);
}

.post-title {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    text-align: right;
    flex: 1;
    margin: 0;
}

.post-title a {
    color: var(--primary-color);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-title a:hover {
    color: var(--accent-color);
}

/* Post Body */
.post-body {
    margin-bottom: 16px;
}

/* 分类2全文展示时，段落间距紧凑 */
.post-body > p:last-child {
    margin-bottom: 0;
}

.post-body p:empty {
    display: none;
}

.post-excerpt {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-color);
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-excerpt-wrap {
    position: relative;
}

.read-more-link {
    display: inline-block;
    margin-top: 6px;
    color: #1a1a1a;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px solid #1a1a1a;
    padding-bottom: 1px;
    transition: opacity 0.15s ease;
}

.read-more-link:hover {
    opacity: 0.7;
}

/* Image Grid - 九宫格 */
.post-gallery {
    margin-bottom: 16px;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.grid-item {
    display: block;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 6px;
    transition: transform 0.3s ease;
}

.grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.grid-item:hover img {
    transform: scale(1.05);
}

/* Post Actions */
.post-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.actions-left,
.actions-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-light);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-btn:hover {
    color: var(--accent-color);
    background: rgba(233, 69, 96, 0.08);
}

.action-btn svg {
    flex-shrink: 0;
}

.like-btn.liked {
    color: var(--accent-color);
}

.like-btn.liked svg {
    fill: var(--accent-color);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 32px 0;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border-radius: 50%;
    font-size: 14px;
    color: var(--secondary-color);
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.pagination a:hover {
    color: var(--accent-color);
    border-color: var(--accent-color);
}

.pagination .current {
    color: #fff;
    background: var(--accent-color);
    border-color: var(--accent-color);
}

/* ============================================
   Inline Comments - 内联评论
   ============================================ */
.post-comments {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    overflow: hidden;
}

.comments-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.comments-section-title,
.comments-form-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 16px;
}

.comments-count {
    color: var(--text-light);
    font-weight: 400;
    font-size: 13px;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.inline-comment-item {
    padding: 4px 0;
    background: none;
    border: none;
    border-radius: 0;
}

/* 超过3条时默认隐藏的评论项 */
.inline-comment-item.comment-hidden-extra {
    display: none;
}

/* 查看更多评论按钮 */
.show-more-comments-btn {
    display: block;
    width: 100%;
    margin-top: 12px;
    padding: 10px;
    background: transparent;
    color: var(--text-color);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s ease;
    text-align: center;
}

.show-more-comments-btn:hover {
    background: var(--bg-color);
    border-color: var(--text-color);
    border-style: solid;
}

/* ========================================
   首页列表内联评论（简洁单行布局）
   仅作用于首页/归档页的文章卡片，不影响详情页
   ======================================== */
.post-comments-inline {
    margin-top: 12px;
    padding: 0 4px;
}

.comments-inline-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.comment-inline-row {
    line-height: 1.6;
    font-size: 12px;
    color: var(--text-color);
    word-break: break-word;
    display: block;
}

.comment-inline-row.comment-inline-hidden {
    display: none;
}

.comment-inline-author {
    font-weight: 600;
    color: #1a1a1a;
}

.comment-inline-text {
    color: var(--text-color);
}

.comment-inline-time {
    color: #999;
    font-size: 11px;
    margin-left: 4px;
}

/* 评论项可点击 */
.comment-inline-row {
    cursor: pointer;
    transition: background 0.15s ease;
    padding: 2px 4px;
    border-radius: 3px;
}

.comment-inline-row:hover {
    background: rgba(0, 0, 0, 0.04);
}

/* 回复关系显示 */
.comment-inline-reply-arrow {
    color: #999;
    font-size: 11px;
}

.comment-inline-reply-to {
    color: #555;
    font-weight: 500;
}

.comment-inline-sep {
    color: var(--text-color);
}

/* 回复提示框 */
.reply-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.04);
    border-left: 3px solid #1a1a1a;
    border-radius: 3px;
    font-size: 12px;
}

.reply-hint-text {
    color: #1a1a1a;
    font-weight: 500;
    flex: 1;
}

.cancel-reply-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    padding: 2px 8px;
    font-size: 11px;
    color: #666;
    cursor: pointer;
    transition: all 0.15s ease;
}

.cancel-reply-btn:hover {
    background: #1a1a1a;
    color: #fff;
    border-color: #1a1a1a;
}

.inline-comment-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.inline-comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

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

.inline-comment-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.inline-comment-author {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-color);
}

.inline-comment-time {
    font-size: 11px;
    color: var(--text-light);
}

.inline-comment-body {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-color);
    word-break: break-word;
}

.no-comments {
    text-align: center;
    color: var(--text-light);
    font-size: 14px;
    padding: 20px 0;
}

/* Comment Form */
.inline-comment-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.comment-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
}

.comment-user-info img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.comment-user-info span {
    font-size: 14px;
    font-weight: 500;
    color: var(--primary-color);
}

.comment-guest-fields {
    display: flex;
    gap: 12px;
}

.comment-guest-fields input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.comment-guest-fields input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.inline-comment-form textarea {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    resize: vertical;
    transition: border-color 0.2s ease;
    font-family: inherit;
    line-height: 1.6;
}

.inline-comment-form textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
}

.submit-comment-btn {
    padding: 10px 24px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.submit-comment-btn:hover {
    background: var(--accent-color);
}

.submit-comment-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* 列表页"去详情页写评论"跳转按钮 */
.go-comment-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #2d2d5a 100%);
    color: #fff;
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 2px solid var(--primary-color);
}
.go-comment-link:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
    color: #fff;
}
.go-comment-link:active {
    transform: translateY(0);
}

.comments-closed-note {
    text-align: center;
    padding: 14px 20px;
    color: var(--text-light);
    background: var(--bg-color);
    border-radius: var(--radius-sm);
    font-size: 13px;
    margin: 0;
}

/* 详情页评论关闭提示 */
.comments-closed {
    padding: 20px;
    text-align: center;
    color: var(--text-light);
    background: var(--bg-color);
    border-radius: var(--radius-md);
}
.comments-closed p {
    margin: 0;
    font-size: 14px;
}

/* 详情页评论表单补充样式 */
.respond {
    margin-top: 24px;
}

.cancel-comment-reply {
    margin-bottom: 12px;
}
.cancel-comment-reply a {
    color: var(--accent-color);
    font-size: 13px;
    text-decoration: none;
}

.comment-form-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 16px;
}

.respond p {
    margin-bottom: 12px;
}

.comment-user {
    padding: 10px 16px;
    background: var(--bg-color);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-light);
}
.comment-user a {
    color: var(--accent-color);
    text-decoration: none;
}

.comments-closed-title {
    font-size: 16px;
    color: var(--text-light);
    text-align: center;
    padding: 20px;
    margin: 0;
}

/* Comment button active state */
.action-btn.comment-btn.active,
.action-btn.count-btn.active {
    color: var(--accent-color);
    background: rgba(233, 69, 96, 0.08);
}

/* Page Header - 归档/分类页标题 */
.page-header {
    margin-bottom: 24px;
    padding: 20px 24px;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    border: var(--card-border);
    box-shadow: var(--shadow-md);
}

.page-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
}

/* Post Detail */
.post-detail-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 32px;
    border: var(--card-border);
    box-shadow: var(--shadow-md);
}

.detail-header {
    margin-bottom: 32px;
}

.detail-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.4;
    margin-bottom: 16px;
}

.detail-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.post-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.post-tags a {
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 12px;
    background: var(--bg-color);
    color: var(--secondary-color);
}

.post-tags a:hover {
    background: rgba(233, 69, 96, 0.1);
    color: var(--accent-color);
}

.detail-content {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: 32px;
}

.detail-content h1,
.detail-content h2,
.detail-content h3,
.detail-content h4 {
    color: var(--primary-color);
    margin: 24px 0 16px;
    line-height: 1.3;
}

.detail-content h2 {
    font-size: 22px;
}

.detail-content h3 {
    font-size: 18px;
}

.detail-content p {
    margin-bottom: 16px;
}

.detail-content img {
    border-radius: var(--radius-md);
    margin: 16px 0;
}

.detail-content blockquote {
    border-left: 3px solid var(--accent-color);
    padding: 12px 16px;
    margin: 16px 0;
    background: var(--bg-color);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.detail-content pre {
    background: #f8f8fa;
    padding: 16px;
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin: 16px 0;
}

.detail-content code {
    background: var(--bg-color);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 14px;
}

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

.detail-content ul,
.detail-content ol {
    padding-left: 24px;
    margin-bottom: 16px;
}

.detail-content li {
    margin-bottom: 8px;
}

.detail-content a {
    color: var(--accent-color);
    text-decoration: underline;
}

.post-nav {
    display: flex;
    justify-content: space-between;
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 32px;
}

.post-nav a {
    font-size: 14px;
    color: var(--secondary-color);
    max-width: 45%;
    line-height: 1.5;
}

.post-nav a:hover {
    color: var(--accent-color);
}

/* Comments */
.comments-area {
    margin-top: 32px;
}

.comments-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.comments-list {
    list-style: none;
}

.comment-item {
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.comment-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
}

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

.comment-author {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
}

.comment-time {
    font-size: 12px;
    color: var(--text-light);
}

.comment-content {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-color);
}

.comment-form {
    margin-top: 24px;
}

.comment-form textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    resize: vertical;
    transition: border-color 0.2s ease;
    font-family: inherit;
}

.comment-form textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

.comment-form button {
    margin-top: 12px;
    padding: 10px 24px;
    background: var(--accent-color);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s ease;
}

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

/* ============================================
   Detail Page Comments - 详情页评论
   ============================================ */
.comments-count-badge {
    color: var(--text-light);
    font-weight: 400;
    font-size: 15px;
}

.detail-comment-item {
    padding: 16px;
    margin-bottom: 12px;
}

.comment-reply-action {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--border-color);
}

.reply-link {
    font-size: 13px;
    color: var(--accent-color);
    cursor: pointer;
}

.reply-link:hover {
    text-decoration: underline;
}

.comment-form-section {
    margin-top: 24px;
    padding: 20px;
    background: var(--bg-color);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.comment-form-heading {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 16px;
}

.detail-comment-form {
    gap: 14px;
}

.detail-comment-form .comment-guest-fields {
    flex-wrap: wrap;
}

.detail-comment-form .comment-guest-fields input {
    min-width: calc(50% - 6px);
}

@media (max-width: 480px) {
    .detail-comment-form .comment-guest-fields input {
        min-width: 100%;
    }
}

/* Typecho Comments */
.comments-area .comment-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.comments-area .comment-list > li {
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
}

.comments-area .comment-list > li:last-child {
    border-bottom: none;
}

.comments-area .comment-author-name {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 14px;
}

.comments-area .comment-author-ava {
    margin-right: 10px;
}

.comments-area .comment-author-ava img {
    border-radius: 50%;
}

.comments-area .comment-body {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-color);
    margin: 8px 0;
}

.comments-area .comment-meta {
    font-size: 12px;
    color: var(--text-light);
}

.comments-area .comment-children {
    margin-top: 16px;
    padding-left: 20px;
    border-left: 2px solid var(--border-color);
}

.comments-area .reply-btn {
    display: inline-block;
    margin-top: 8px;
    font-size: 12px;
    color: var(--accent-color);
    cursor: pointer;
}

.comments-area .comment-form-input {
    margin-bottom: 12px;
}

.comments-area .comment-form-input input,
.comments-area .comment-form-input textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    transition: border-color 0.2s ease;
    font-family: inherit;
}

.comments-area .comment-form-input input:focus,
.comments-area .comment-form-input textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

.comments-area .comment-form-input textarea {
    min-height: 100px;
    resize: vertical;
}

.comments-area .submit {
    padding: 10px 24px;
    background: var(--accent-color);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.comments-area .submit:hover {
    background: #d63851;
}

/* No Result */
.no-result {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

/* Footer */
.site-footer {
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    padding: 24px 20px;
    margin-top: 40px;
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    text-align: center;
}

.copyright {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 6px;
}

.icp {
    font-size: 12px;
    color: var(--text-light);
}

.icp a:hover {
    color: var(--accent-color);
}

/* Responsive */
@media (max-width: 768px) {
    :root {
        --header-height: 56px;
    }

    .nav-menu {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--card-bg);
        padding: 20px;
        gap: 16px;
        box-shadow: var(--shadow-md);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-toggle {
        display: flex;
    }

    .post-header {
        flex-direction: column;
        align-items: flex-start;
    }

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

    .detail-title {
        font-size: 22px;
    }

    .post-detail-card {
        padding: 20px;
    }

    .post-card {
        padding: 20px;
    }

    .actions-left,
    .actions-right {
        gap: 8px;
    }

    .action-btn {
        padding: 6px 10px;
        font-size: 12px;
    }

    .image-grid {
        gap: 4px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .author-avatar {
        width: 36px;
        height: 36px;
    }

    .post-title {
        font-size: 16px;
    }

    .action-btn span {
        display: none;
    }
}

/* 详情页评论 - 回复按钮和博主标识 */
.detail-comment-item {
    padding: 4px 0;
    border-bottom: none;
}

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

.detail-comment-item .inline-comment-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 2px;
}

.detail-comment-item .inline-comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.detail-comment-item .inline-comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-comment-item .inline-comment-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.detail-comment-item .inline-comment-author {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 6px;
}

.detail-comment-item .inline-comment-time {
    font-size: 12px;
    color: var(--text-light);
}

.detail-comment-item .inline-comment-body {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-color);
    word-break: break-word;
    margin-bottom: 8px;
}

/* 博主标识 */
.author-badge {
    display: inline-block;
    padding: 1px 6px;
    background: var(--primary-color);
    color: #fff;
    font-size: 10px;
    font-weight: 500;
    border-radius: 3px;
    line-height: 1.4;
}

/* 回复按钮 */
.comment-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.comment-actions a {
    font-size: 12px;
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.15s ease;
}

.comment-actions a:hover {
    color: var(--accent-color);
}

.reply-link {
    cursor: pointer;
    margin-left: 8px;
    font-size: 12px;
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.15s ease;
}

.reply-link:hover {
    color: var(--accent-color);
}

/* 回复关系文本 */
.reply-to-text {
    font-size: 12px;
    color: var(--text-light);
    font-weight: normal;
    margin: 0 2px;
}

.reply-to-author {
    font-size: 12px;
    color: var(--accent-color);
    font-weight: normal;
    margin-right: 4px;
}

/* 子评论 - 无卡片框样式 */
.child-comment {
    padding: 12px 0 !important;
    border-bottom: none !important;
    background: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    border: none !important;
}

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

.child-avatar {
    width: 32px !important;
    height: 32px !important;
}

/* 评论组 - 一级评论+回复用同一个卡片框 */
.comment-group {
    background: var(--card-bg);
    border: 1px solid #d0d0d0;
    border-radius: var(--radius-md);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    padding: 10px 14px;
    margin-bottom: 10px;
}

.comment-group:last-child {
    margin-bottom: 0;
}

/* 子回复（嵌套评论） */
.children {
    margin-top: 4px;
    padding-left: 20px;
    border-left: none;
}

.children .detail-comment-item {
    padding: 2px 0;
}

/* 取消回复链接 */
.cancel-comment-reply {
    margin-bottom: 12px;
    padding: 8px 12px;
    background: var(--bg-color);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-light);
}

.cancel-comment-reply a {
    color: var(--accent-color);
    text-decoration: none;
}

.cancel-comment-reply a:hover {
    text-decoration: underline;
}

/* 评论表单卡片样式 */
.comment-form-card {
    background: var(--card-bg);
    border: 1px solid #d0d0d0;
    border-radius: var(--radius-md);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    padding: 12px 14px;
    margin-top: 12px;
}

/* 表单被移动到评论下方时（内联回复） */
.children .comment-form-card,
.detail-comment-item + .comment-form-card {
    margin-top: 8px;
    margin-bottom: 8px;
    border-color: var(--primary-color);
}

/* 已登录用户信息行 */
.form-user-logged {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 8px;
}

.form-user-logged a {
    color: var(--text-color);
    font-weight: 500;
    text-decoration: none;
}

.form-user-logged .logout-link {
    color: var(--text-light);
    margin-left: 8px;
    font-weight: normal;
}

/* 三字段行：昵称/邮箱/网址 */
.form-fields-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.form-fields-row .form-input {
    flex: 1;
    min-width: 0;
    padding: 8px 10px;
    font-size: 13px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-color);
    color: var(--text-color);
    outline: none;
    transition: border-color 0.2s;
}

.form-fields-row .form-input:focus {
    border-color: var(--primary-color);
}

/* 文本域行 */
.form-textarea-row {
    position: relative;
}

.form-textarea-row textarea {
    width: 100%;
    padding: 10px 12px 36px 12px;
    font-size: 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-color);
    color: var(--text-color);
    resize: vertical;
    outline: none;
    line-height: 1.6;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.form-textarea-row textarea:focus {
    border-color: var(--primary-color);
}

/* 文本域右下角按钮 */
.form-textarea-actions {
    position: absolute;
    right: 8px;
    bottom: 8px;
    display: flex;
    gap: 6px;
}

.form-textarea-actions button {
    padding: 4px 12px;
    font-size: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    background: transparent;
    color: var(--text-light);
}

.form-cancel-btn:hover {
    background: var(--bg-color);
    color: var(--text-color);
}

.form-submit-btn {
    background: var(--primary-color) !important;
    color: #fff !important;
    border-color: var(--primary-color) !important;
}

.form-submit-btn:hover {
    opacity: 0.85;
}
