
/* -------- 移动端导航修复 ------ */
.z-60 {
    z-index: 60;
}

/* -------- 中国山水画纹路样式 ------ */
.chinese-landscape-pattern {
    position: relative;
    background: linear-gradient(135deg, #f8f6f0 0%, #f5f1e8 50%, #f0ece4 100%);
    overflow: hidden;
}

.chinese-landscape-pattern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 200"><path d="M0,150 Q50,120 100,140 T200,130 T300,145 T400,135 L400,200 L0,200 Z" fill="rgba(139,69,19,0.03)" stroke="rgba(139,69,19,0.05)" stroke-width="1"/><path d="M0,160 Q80,140 150,155 T250,150 T350,160 T400,155 L400,200 L0,200 Z" fill="rgba(160,82,45,0.04)" stroke="rgba(160,82,45,0.06)" stroke-width="1"/><path d="M0,170 Q100,155 180,165 T280,160 T400,170 L400,200 L0,200 Z" fill="rgba(184,134,11,0.02)" stroke="rgba(184,134,11,0.04)" stroke-width="1"/><circle cx="50" cy="50" r="30" fill="rgba(0,0,0,0.01)" /><circle cx="150" cy="80" r="25" fill="rgba(0,0,0,0.008)" /><circle cx="250" cy="60" r="35" fill="rgba(0,0,0,0.012)" /><circle cx="350" cy="90" r="20" fill="rgba(0,0,0,0.009)" /><ellipse cx="100" cy="100" rx="60" ry="15" fill="rgba(255,255,255,0.15)" /><ellipse cx="300" cy="120" rx="80" ry="20" fill="rgba(255,255,255,0.12)" /><path d="M30,180 L30,160 M25,165 L35,165 M25,155 L35,155 M27,145 L33,145" stroke="rgba(34,139,34,0.08)" stroke-width="1"/><path d="M320,175 L320,155 M315,160 L325,160 M315,150 L325,150 M317,140 L323,140" stroke="rgba(34,139,34,0.06)" stroke-width="1"/><path d="M200,40 Q210,30 220,40 Q230,30 240,40 Q250,30 260,40" fill="none" stroke="rgba(139,69,19,0.03)" stroke-width="1"/><path d="M80,60 Q90,50 100,60 Q110,50 120,60" fill="none" stroke="rgba(139,69,19,0.025)" stroke-width="1"/></svg>');
    background-size: cover;
    background-position: center;
    opacity: 0.7;
    z-index: 1;
}

.chinese-landscape-pattern::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at top right, transparent 0%, rgba(139,69,19,0.02) 50%, transparent 100%),
                radial-gradient(ellipse at bottom left, transparent 0%, rgba(160,82,45,0.015) 50%, transparent 100%);
    z-index: 2;
}

/* header区域中式装饰边框 */
.chinese-header-border {
    position: relative;
    border: 1px solid rgba(139,69,19,0.1);
    border-top: 2px solid rgba(184,134,11,0.2);
    border-bottom: 2px solid rgba(139,69,19,0.15);
}

.chinese-header-border::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(184,134,11,0.3) 20%, rgba(184,134,11,0.3) 80%, transparent 100%);
}

.chinese-header-border::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 15%;
    right: 15%;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(139,69,19,0.25) 30%, rgba(139,69,19,0.25) 70%, transparent 100%);
}

/* 传统纹样装饰 */
.chinese-pattern-decoration {
    position: relative;
}

.chinese-pattern-decoration::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -20px;
    width: 40px;
    height: 40px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40"><circle cx="20" cy="20" r="18" fill="none" stroke="rgba(184,134,11,0.2)" stroke-width="1"/><path d="M20,2 L20,38 M2,20 L38,20" stroke="rgba(184,134,11,0.15)" stroke-width="0.5"/><circle cx="20" cy="20" r="12" fill="none" stroke="rgba(184,134,11,0.1)" stroke-width="0.5"/><circle cx="20" cy="20" r="6" fill="none" stroke="rgba(184,134,11,0.08)" stroke-width="0.5"/></svg>');
    transform: translateY(-50%);
    opacity: 0.6;
}

.chinese-pattern-decoration::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -20px;
    width: 40px;
    height: 40px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40"><circle cx="20" cy="20" r="18" fill="none" stroke="rgba(184,134,11,0.2)" stroke-width="1"/><path d="M20,2 L20,38 M2,20 L38,20" stroke="rgba(184,134,11,0.15)" stroke-width="0.5"/><circle cx="20" cy="20" r="12" fill="none" stroke="rgba(184,134,11,0.1)" stroke-width="0.5"/><circle cx="20" cy="20" r="6" fill="none" stroke="rgba(184,134,11,0.08)" stroke-width="0.5"/></svg>');
    transform: translateY(-50%);
    opacity: 0.6;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .chinese-pattern-decoration::before,
    .chinese-pattern-decoration::after {
        display: none;
    }
    
    .chinese-landscape-pattern::before {
        background-size: 200% auto;
    }
}

/* -------- calendar ------ */
.calendartop,
.calendar {
    width: 100%;
    text-align: center;
}

.calendartop {
    line-height: 1.6;
}

.calendar {
    line-height: 2;
}

.calendartop tbody tr:first-child td a {
    padding: .25em .65em;
}

.calendar tbody tr:first-child td {
    background-color: var(--color-text-1-light);
}

.calendar tbody tr:first-child td:first-child {
    border-top-left-radius: 3px;
    border-bottom-left-radius: 3px;
}

.calendar tbody tr:first-child td:last-child {
    border-top-right-radius: 3px;
    border-bottom-right-radius: 3px;
}

.calendar .day,
.calendar td a {
    position: relative;
    color: var(--color-theme-light);
}

.calendar td a {
    text-decoration: underline;
}

.calendar .day::after,
.calendar td a:hover::after {
    content: '';
    display: block;
    width: 24px;
    height: 24px;
    position: absolute;
    left: calc(50% - 12px);
    top: calc(50% - 12px);
    border: 1px solid var(--color-theme-light);
    border-radius: 100%;
}

/* Captcha styles */
  .captcha-container {
    display: flex;
    align-items: center;
    gap: 1rem;
  }
  
  .captcha {
    width: 6rem;
    height: 2.4rem;
    border-radius: 0.375rem;
    border: 1px solid #d1d5db;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  }
  
  .captcha_input {
    width: 8rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    font-size: 0.875rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
  }
  
  .captcha_input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);
  }

/* 评论样式优化 */
.comment-item {
    transition: all 0.3s ease;
}

.comment-item:hover {
    transform: translateY(-2px);
}

/* 相邻文章导航样式 */
.neighbor-header h4 {
    color: #1e293b;
    letter-spacing: 0.1em;
    border-color: rgba(120, 53, 15, 0.1);
}

.neighbor-link {
    text-decoration: none;
    display: block;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    position: relative;
}

.neighbor-link:hover {
    background-color: rgba(120, 53, 15, 0.05);
    transform: translateY(-1px);
}

.neighbor-label {
    font-size: 0.75rem;
    color: #64748b;
    letter-spacing: 0.05em;
}

/* 防止文章item hover闪烁 */
article.group {
    will-change: transform;
    backface-visibility: hidden;
}

article.group h2 a {
    display: inline-block;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* 优化边框过渡 */
article.group {
    border: 2px solid rgba(120, 53, 15, 0.15);
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

article.group:hover {
    border-color: rgba(120, 53, 15, 0.3);
}

.neighbor-title {
    font-size: 0.875rem;
    line-height: 1.25rem;
    color: #1e293b;
    font-weight: 500;
    letter-spacing: 0.025em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.neighbor-link:hover .neighbor-title {
    color: #7f1d1d;
}

.neighbor-divider {
    background-color: rgba(120, 53, 15, 0.1);
}

/* 箭头图标样式 */
.neighbor-arrow {
    display: inline-block;
    width: 1.5rem;
    height: 1.5rem;
    position: relative;
    flex-shrink: 0;
}

.neighbor-arrow::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0.5rem;
    height: 0.5rem;
    border-style: solid;
    border-width: 0 0.125rem 0.125rem 0;
    transform-origin: center;
}

.neighbor-arrow-prev::before {
    border-color: #64748b;
    transform: translate(-25%, -50%) rotate(135deg);
}

.neighbor-arrow-next::before {
    border-color: #64748b;
    transform: translate(-75%, -50%) rotate(-45deg);
}

.neighbor-link:hover .neighbor-arrow-prev::before,
.neighbor-link:hover .neighbor-arrow-next::before {
    border-color: #7f1d1d;
}

/* 禁用状态的样式 */
.neighbor-item.opacity-50 .neighbor-arrow-prev::before,
.neighbor-item.opacity-50 .neighbor-arrow-next::before {
    border-color: #cbd5e1;
}

/* 搜索按钮样式修复 */
form.flex {
    display: flex;
    align-items: stretch;
}

form.flex input[type="search"] {
    flex: 1;
    min-width: 0;
}

form.flex button[type="submit"] {
    flex-shrink: 0;
    white-space: nowrap;
}

/* 移动端搜索样式优化 */
@media (max-width: 640px) {
    form.flex {
        flex-direction: row;
    }
    
    form.flex input[type="search"] {
        font-size: 16px; /* 防止iOS缩放 */
    }
}

/* 文章标题悬停下划线效果 */
article h2 a {
    text-decoration: none;
    position: relative;
    transition: all 0.3s ease;
}

article h2 a:hover {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

.comment-children {
    transition: all 0.3s ease;
}

.comment-children:hover {
    background-color: rgba(255, 255, 255, 0.7);
}

/* 评论表单样式增强 */
.commentform input:focus,
.commentform textarea:focus {
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

/* 按钮悬停效果 */
#comment_submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 字符计数器样式 */
#comment-count {
    font-family: monospace;
    font-weight: 500;
}

/* 回复按钮动画 */
.comment-actions button {
    transition: all 0.2s ease;
}

.comment-actions button:hover {
    transform: translateX(2px);
}

/* 评论区域整体样式 */
#comments {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* -------- 分页样式优化 ------ */
.pagination {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 8px 16px;
    margin: 0 2px;
    text-decoration: none;
    color: #dc2626;
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 14px;
    line-height: 1.5;
    min-width: 40px;
    text-align: center;
    opacity: 0.7;
}

.pagination a:hover {
    background-color: #fee2e2;
    color: #991b1b;
    border-color: #fca5a5;
    opacity: 1;
    transform: translateY(-1px);
}

.pagination span {
    background-color: #fef2f2;
    color: #dc2626;
    border-color: #fecaca;
    cursor: default;
    opacity: 0.7;
}

.pagination a:active {
    transform: translateY(0);
    background-color: #fee2e2;
}

/* 当前页码高亮 */
.pagination span[style*="font-weight: bold"],
.pagination span[style*="font-weight:bold"],
.pagination .current {
    background-color: #dc2626;
    color: #ffffff;
    border-color: #dc2626;
    font-weight: 600;
    opacity: 1;
}

/* 上一页下一页按钮 */
.pagination .prev,
.pagination .next {
    font-weight: 500;
    padding: 8px 12px;
}

/* 移动端适配 */
@media (max-width: 640px) {
    .pagination a,
    .pagination span {
        padding: 6px 10px;
        font-size: 13px;
        margin: 0 1px;
        min-width: 32px;
    }
    
    .pagination {
        flex-wrap: wrap;
        gap: 4px;
    }
}

.icon-eye {
    display: inline-block;
    width: 1.2em;
    height: 1.2em;
    background: no-repeat center/contain;
    background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.0007 12C15.0007 13.6569 13.6576 15 12.0007 15C10.3439 15 9.00073 13.6569 9.00073 12C9.00073 10.3431 10.3439 9 12.0007 9C13.6576 9 15.0007 10.3431 15.0007 12Z" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M12.0012 5C7.52354 5 3.73326 7.94288 2.45898 12C3.73324 16.0571 7.52354 19 12.0012 19C16.4788 19 20.2691 16.0571 21.5434 12C20.2691 7.94291 16.4788 5 12.0012 5Z" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>');
}
.icon-comment {
    display: inline-block;
    width: 1.2em;
    height: 1.2em;
    background: no-repeat center/contain;
    background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 -0.5 25 25" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M9.0001 8.517C8.58589 8.517 8.2501 8.85279 8.2501 9.267C8.2501 9.68121 8.58589 10.017 9.0001 10.017V8.517ZM16.0001 10.017C16.4143 10.017 16.7501 9.68121 16.7501 9.267C16.7501 8.85279 16.4143 8.517 16.0001 8.517V10.017ZM9.8751 11.076C9.46089 11.076 9.1251 11.4118 9.1251 11.826C9.1251 12.2402 9.46089 12.576 9.8751 12.576V11.076ZM15.1251 12.576C15.5393 12.576 15.8751 12.2402 15.8751 11.826C15.8751 11.4118 15.5393 11.076 15.1251 11.076V12.576ZM9.1631 5V4.24998L9.15763 4.25002L9.1631 5ZM15.8381 5L15.8438 4.25H15.8381V5ZM19.5001 8.717L18.7501 8.71149V8.717H19.5001ZM19.5001 13.23H18.7501L18.7501 13.2355L19.5001 13.23ZM18.4384 15.8472L17.9042 15.3207L17.9042 15.3207L18.4384 15.8472ZM15.8371 16.947V17.697L15.8426 17.697L15.8371 16.947ZM9.1631 16.947V16.197C9.03469 16.197 8.90843 16.23 8.79641 16.2928L9.1631 16.947ZM5.5001 19H4.7501C4.7501 19.2662 4.89125 19.5125 5.12097 19.6471C5.35068 19.7817 5.63454 19.7844 5.86679 19.6542L5.5001 19ZM5.5001 8.717H6.25012L6.25008 8.71149L5.5001 8.717ZM6.56175 6.09984L6.02756 5.5734H6.02756L6.56175 6.09984ZM9.0001 10.017H16.0001V8.517H9.0001V10.017ZM9.8751 12.576H15.1251V11.076H9.8751V12.576ZM9.1631 5.75H15.8381V4.25H9.1631V5.75ZM15.8324 5.74998C17.4559 5.76225 18.762 7.08806 18.7501 8.71149L20.2501 8.72251C20.2681 6.2708 18.2955 4.26856 15.8438 4.25002L15.8324 5.74998ZM18.7501 8.717V13.23H20.2501V8.717H18.7501ZM18.7501 13.2355C18.7558 14.0153 18.4516 14.7653 17.9042 15.3207L18.9726 16.3736C19.7992 15.5348 20.2587 14.4021 20.2501 13.2245L18.7501 13.2355ZM17.9042 15.3207C17.3569 15.8761 16.6114 16.1913 15.8316 16.197L15.8426 17.697C17.0201 17.6884 18.1461 17.2124 18.9726 16.3736L17.9042 15.3207ZM15.8371 16.197H9.1631V17.697H15.8371V16.197ZM8.79641 16.2928L5.13341 18.3458L5.86679 19.6542L9.52979 17.6012L8.79641 16.2928ZM6.2501 19V8.717H4.7501V19H6.2501ZM6.25008 8.71149C6.24435 7.93175 6.54862 7.18167 7.09595 6.62627L6.02756 5.5734C5.20098 6.41216 4.74147 7.54494 4.75012 8.72251L6.25008 8.71149ZM7.09595 6.62627C7.64328 6.07088 8.38882 5.75566 9.16857 5.74998L9.15763 4.25002C7.98006 4.2586 6.85413 4.73464 6.02756 5.5734L7.09595 6.62627Z" fill="black"/></svg>');
}
.icon-like {
    display: inline-block;
    width: 1.2em;
    height: 1.2em;
    background: no-repeat center/contain;
    background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 32 32" fill="black" xmlns="http://www.w3.org/2000/svg"><path d="M10.5,8v2C9.122,10,8,11.121,8,12.5H6C6,10.019,8.019,8,10.5,8z"/><path d="M21.5,5c-2.116,0-4.093,0.881-5.5,2.406C14.593,5.881,12.616,5,10.5,5C6.364,5,3,8.333,3,12.5 C3,21.542,16,27,16,27s13-5.458,13-14.5C29,8.333,25.636,5,21.5,5z M16,24.797C13.378,23.521,5,18.938,5,12.5 C5,9.467,7.467,7,10.5,7c1.55,0,2.982,0.626,4.03,1.762l0.735,0.797h1.47l0.735-0.797C18.518,7.626,19.95,7,21.5,7 c3.033,0,5.5,2.467,5.5,5.5C27,18.938,18.622,23.521,16,24.797z"/></svg>');
}