/* ===================================
   Argon Theme for Typecho
   =================================== */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary-color: #5e72e4;
    --gradient-start: #667eea;
    --gradient-end: #764ba2;
    --text-color: #525f7f;
    --heading-color: #32325d;
    --border-color: #e9ecef;
    --bg-color: #f8f9fe;
    --card-shadow: 0 15px 35px rgba(50,50,93,.1), 0 5px 15px rgba(0,0,0,.07);
    --card-hover-shadow: 0 20px 40px rgba(50,50,93,.15), 0 8px 20px rgba(0,0,0,.1);
    --transition: all 0.3s ease;
    --navbar-height: 90px;
    --header-height: 300px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--bg-color);
    overflow-x: hidden;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--gradient-end);
}

/* Loading */
#page-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

#page-loading.active {
    opacity: 1;
    visibility: visible;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Header Banner - 无遮罩 */
.header-banner {
    height: var(--header-height);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.header-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    padding: 0 20px;
    margin-top: calc(var(--navbar-height) - 20px);
}

/* 打字机效果 */
.typewriter-text {
    font-size: 2rem;
    font-weight: 600;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    min-height: 2.5rem;
}

.typewriter-cursor {
    display: inline-block;
    width: 3px;
    height: 1.2em;
    background: white;
    margin-left: 5px;
    animation: blink 1s infinite;
    vertical-align: middle;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Navbar - 渐变色写死 */
/* Navbar - 默认透明，滚动后半透明渐变 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--navbar-height);
    z-index: 1000;
    background: transparent;
    transition: var(--transition);
    display: flex;
    align-items: center;
}

.navbar.scrolled {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.9) 0%, rgba(118, 75, 162, 0.9) 100%);
    box-shadow: 0 2px 20px rgba(0,0,0,0.15);
    height: 70px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.nav-mode-static .navbar {
    position: absolute;
}

.nav-mode-auto .navbar.scrolled.hidden {
    transform: translateY(-100%);
}

.nav-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* 导航栏左侧 - logo和菜单靠左 */
.nav-left {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-logo {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    text-shadow: 0 2px 5px rgba(0,0,0,0.2);
    white-space: nowrap;
}

.nav-logo:hover {
    color: white;
    transform: scale(1.02);
}

.nav-menu {
    display: flex;
    gap: 5px;
}

.nav-link {
    color: rgba(255,255,255,0.9);
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 500;
    transition: var(--transition);
    white-space: nowrap;
}

.nav-link:hover {
    color: white;
    background: rgba(255,255,255,0.15);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* 搜索框 - 点击展开，无关闭按钮 */
.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition);
    z-index: 2;
}

.search-btn:hover {
    background: rgba(255,255,255,0.3);
}

.search-form {
    position: absolute;
    right: 0;
    display: flex;
    align-items: center;
    width: 0;
    overflow: hidden;
    transition: width 0.4s ease;
}

.search-form.active {
    width: 280px;
}

.search-input {
    width: 100%;
    padding: 12px 50px 12px 20px;
    border: none;
    border-radius: 25px;
    font-size: 0.95rem;
    outline: none;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

/* 移动端菜单按钮 */
.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 42px;
    height: 42px;
    min-width: 42px;
    min-height: 42px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: var(--transition);
    padding: 0;
    line-height: 1;
}

.nav-toggle:hover {
    background: rgba(255,255,255,0.3);
}

.nav-toggle i {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* 移动端菜单 */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1100;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    height: 100%;
    background: white;
    z-index: 1200;
    transition: var(--transition);
    overflow-y: auto;
    box-shadow: -5px 0 30px rgba(0,0,0,0.1);
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--heading-color);
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    color: var(--text-color);
    padding: 5px;
}

.mobile-menu-content {
    padding: 15px;
}

/* 移动端搜索 */
.mobile-search {
    margin-bottom: 15px;
}

.mobile-search form {
    display: flex;
    background: var(--bg-color);
    border-radius: 10px;
    overflow: hidden;
}

.mobile-search input {
    flex: 1;
    padding: 12px 15px;
    border: none;
    background: transparent;
    font-size: 0.95rem;
    outline: none;
}

.mobile-search button {
    padding: 12px 18px;
    border: none;
    background: var(--primary-color);
    color: white;
    cursor: pointer;
}

.mobile-menu-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    color: var(--heading-color);
    border-radius: 10px;
    transition: var(--transition);
    margin-bottom: 5px;
}

.mobile-menu-link:hover {
    background: var(--bg-color);
    color: var(--primary-color);
}

.mobile-menu-link i {
    width: 20px;
    text-align: center;
    color: var(--primary-color);
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 300px);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 30px;
    margin-top: -50px;
    position: relative;
    z-index: 10;
}

/* Cards */
.card {
    background: white;
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    margin-bottom: 25px;
    overflow: hidden;
    transition: var(--transition);
}

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

.card-header {
    padding: 18px 22px;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    color: var(--heading-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-header i {
    color: var(--primary-color);
}

.card-body {
    padding: 20px 22px;
}

/* 公告卡片 - 新样式 */
.announcement-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.announcement-icon {
    width: 45px;
    height: 45px;
    background: rgba(255,255,255,0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.announcement-content {
    flex: 1;
    line-height: 1.7;
}

.announcement-card:hover {
    transform: translateY(-3px);
}

/* 个人信息卡片 */
.author-card {
    text-align: center;
    padding: 30px 20px;
}

.author-avatar {
    width: 90px;
    height: 90px;
    margin: 0 auto 15px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    border: 3px solid white;
}

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

.avatar-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.author-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--heading-color);
    margin-bottom: 20px;
}

.author-stats {
    display: flex;
    justify-content: space-around;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

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

.stat-item.clickable {
    cursor: pointer;
    transition: var(--transition);
}

.stat-item.clickable:hover {
    transform: scale(1.1);
}

.stat-item.clickable:hover .stat-value {
    color: var(--gradient-end);
}

.stat-value {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    font-size: 0.85rem;
    color: #8898aa;
    margin-top: 3px;
}

/* 最新文章/评论列表 */
.recent-list {
    list-style: none;
}

.recent-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    gap: 15px;
}

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

.recent-title {
    flex: 1;
    color: var(--text-color);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: var(--transition);
}

.recent-title:hover {
    color: var(--primary-color);
}

.recent-date {
    font-size: 0.85rem;
    color: #adb5bd;
    flex-shrink: 0;
}

/* Post Cards */
.posts-container {
    flex: 1;
    min-width: 0;
}

.post-card {
    background: white;
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    margin-bottom: 25px;
    overflow: hidden;
    transition: var(--transition);
}

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

.post-thumbnail {
    height: 200px;
    overflow: hidden;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.post-content {
    padding: 25px;
}

.post-title {
    font-size: 1.35rem;
    margin-bottom: 12px;
    line-height: 1.4;
}

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

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

.post-meta {
    color: #8898aa;
    font-size: 0.9rem;
    margin-bottom: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.meta-item i {
    margin-right: 5px;
}

.post-excerpt {
    color: var(--text-color);
    line-height: 1.8;
    margin-bottom: 20px;
}

.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    font-weight: 500;
}

.read-more:hover {
    gap: 12px;
}

/* 归档/分类/标签页面样式 */
.archive-header-card {
    padding: 30px;
    text-align: center;
    background: white;
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    margin-bottom: 25px;
}

.archive-title {
    font-size: 1.6rem;
    color: var(--heading-color);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-weight: 700;
}

.archive-title i {
    color: var(--primary-color);
}

.archive-desc {
    color: #8898aa;
    font-size: 0.95rem;
    margin: 0;
}

/* 确保文章卡片在分类页正常显示 */
.posts-container .post-card {
    background: white;
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    margin-bottom: 25px;
    overflow: hidden;
    transition: var(--transition);
}

.posts-container .post-card:hover {
    box-shadow: var(--card-hover-shadow);
    transform: translateY(-5px);
}

.posts-container .post-card .post-content {
    padding: 25px;
}

.posts-container .post-card .post-title {
    font-size: 1.35rem;
    margin-bottom: 12px;
    line-height: 1.4;
}

.posts-container .post-card .post-title a {
    color: var(--heading-color);
    transition: var(--transition);
}

.posts-container .post-card .post-title a:hover {
    color: var(--primary-color);
}

.posts-container .post-card .post-meta {
    color: #8898aa;
    font-size: 0.9rem;
    margin-bottom: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.posts-container .post-card .post-excerpt {
    color: var(--text-color);
    line-height: 1.8;
}

/* Pagination */
.pagination {
    margin-top: 30px;
    display: flex;
    justify-content: center;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    margin: 0 4px;
    background: white;
    border-radius: 10px;
    color: var(--text-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: var(--transition);
}

.pagination a:hover,
.pagination .current {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    transform: translateY(-2px);
}

/* Post Single */
/* Post Single - 修复内容页面样式 */
.post-single {
    width: 100%;
}

.post-card-single {
    background: white;
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
}

.post-card-single:hover {
    box-shadow: var(--card-hover-shadow);
}

.post-header {
    padding: 35px 40px;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, rgba(102,126,234,0.05) 0%, rgba(118,75,162,0.05) 100%);
}

.post-title-single {
    font-size: 1.8rem;
    color: var(--heading-color);
    margin-bottom: 15px;
    line-height: 1.4;
    font-weight: 700;
}

.post-meta-single {
    color: #8898aa;
    font-size: 0.9rem;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

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

.post-meta-single i {
    color: var(--primary-color);
}

.post-content-wrapper {
    padding: 40px;
}

.post-body {
    font-size: 1.05rem;
    line-height: 1.9;
    color: var(--text-color);
}

.post-body h1, .post-body h2, .post-body h3,
.post-body h4, .post-body h5, .post-body h6 {
    color: var(--heading-color);
    margin: 1.8em 0 0.8em;
    font-weight: 600;
    line-height: 1.4;
}

.post-body h1 { font-size: 1.8rem; }
.post-body h2 { font-size: 1.5rem; }
.post-body h3 { font-size: 1.3rem; }
.post-body h4 { font-size: 1.15rem; }

.post-body p {
    margin-bottom: 1.2em;
}

.post-body ul, .post-body ol {
    margin: 1em 0;
    padding-left: 2em;
}

.post-body li {
    margin: 0.5em 0;
}

.post-body img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    margin: 1em 0;
}

.post-body pre {
    background: #282c34;
    border-radius: 12px;
    padding: 20px;
    overflow-x: auto;
    margin: 1.5em 0;
}

.post-body code {
    font-family: 'Fira Code', Consolas, Monaco, monospace;
    font-size: 0.9em;
}

.post-body p code {
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary-color);
    padding: 2px 6px;
    border-radius: 4px;
}

.post-body blockquote {
    border-left: 4px solid var(--primary-color);
    padding: 15px 20px;
    margin: 1.5em 0;
    background: var(--bg-color);
    border-radius: 0 12px 12px 0;
    color: #666;
}

.post-body blockquote p:last-child {
    margin-bottom: 0;
}

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

.post-body th, .post-body td {
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    text-align: left;
}

.post-body th {
    background: var(--bg-color);
    font-weight: 600;
    color: var(--heading-color);
}

.post-body a {
    color: var(--primary-color);
    border-bottom: 1px dashed var(--primary-color);
}

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

.post-body hr {
    border: none;
    height: 1px;
    background: var(--border-color);
    margin: 2em 0;
}

/* 侧边栏在内容页的样式 */
.post-sidebar {
    position: relative;
}

.post-sidebar .card {
    margin-bottom: 20px;
}

.post-sidebar .toc-card {
    position: sticky;
    top: 100px;
}

/* 浮动工具栏 */
.floating-toolbar {
    position: fixed;
    right: 30px;
    bottom: 100px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 999;
}

.toolbar-item {
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-color);
}

.toolbar-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    color: var(--primary-color);
}

/* 阅读进度 */
.reading-progress {
    position: relative;
}

.progress-ring {
    width: 50px;
    height: 50px;
    transform: rotate(-90deg);
}

.progress-ring-bg {
    stroke: #e9ecef;
}

.progress-ring-fill {
    stroke: var(--primary-color);
    stroke-linecap: round;
    stroke-dasharray: 100.53;
    stroke-dashoffset: 100.53;
    transition: stroke-dashoffset 0.3s;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--heading-color);
}

/* TOC */
.toc-card {
    position: sticky;
    top: 100px;
}

.toc-container {
    max-height: 50vh;
    overflow-y: auto;
}

.toc-title {
    font-weight: 600;
    color: var(--heading-color);
    padding: 18px 22px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.toc-title i {
    color: var(--primary-color);
}

.toc-list {
    list-style: none;
    padding: 15px 22px;
}

.toc-item {
    margin: 6px 0;
}

.toc-item a {
    color: var(--text-color);
    font-size: 0.92rem;
    display: block;
    padding: 5px 0 5px 12px;
    border-left: 2px solid transparent;
    transition: var(--transition);
}

.toc-item a:hover,
.toc-item a.active {
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

.toc-level-2 { padding-left: 12px; }
.toc-level-3 { padding-left: 24px; }
.toc-level-4 { padding-left: 36px; }

/* 评论子回复样式 */
.comment-children {
    list-style: none;
    padding: 0;
    margin: 0;
    margin-left: 65px;
    border-left: 2px solid var(--border-color);
    padding-left: 20px;
}

.comment-children .comment-body {
    padding: 15px 0;
}

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

.comment-children .comment-children {
    margin-left: 55px;
}

/* 取消回复链接 */
.cancel-comment-reply {
    margin-bottom: 15px;
}

.cancel-comment-reply a {
    color: #dc3545;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

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

.cancel-comment-reply a::before {
    content: '✕';
    font-size: 0.8rem;
}


/* 回复按钮样式 */
.comment-reply a,
.comment-footer a {
    color: var(--primary-color);
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.comment-reply a:hover,
.comment-footer a:hover {
    color: var(--gradient-end);
}

/* 无评论提示 */
.no-comments {
    text-align: center;
    padding: 40px 20px;
    color: #8898aa;
    background: var(--bg-color);
    border-radius: 12px;
    margin-bottom: 30px;
}

/* 评论已关闭 */
.comments-closed {
    text-align: center;
    padding: 30px 20px;
    color: #8898aa;
    background: var(--bg-color);
    border-radius: 12px;
}

/* 登录用户提示 */
.logged-in-as {
    margin-bottom: 20px;
    padding: 12px 18px;
    background: var(--bg-color);
    border-radius: 10px;
    font-size: 0.95rem;
}

.logged-in-as a {
    color: var(--primary-color);
    font-weight: 500;
}

.logged-in-as a:last-child {
    margin-left: 15px;
    color: #8898aa;
}
/* 表单字段容器 */
.comment-form-fields {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--heading-color);
    font-weight: 500;
}

.form-group label.required::after {
    content: ' *';
    color: #dc3545;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 0.95rem;
    transition: var(--transition);
    background: white;
    color: var(--text-color);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(94, 114, 228, 0.15);
}

.form-control::placeholder {
    color: #adb5bd;
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}
/* 已登录用户 */
.logged-in-as {
    margin-bottom: 20px;
    padding: 15px 20px;
    background: white;
    border-radius: 10px;
    font-size: 0.95rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.logged-in-as a {
    color: var(--primary-color);
    font-weight: 500;
}

.logged-in-as a:last-child {
    margin-left: 10px;
    color: #8898aa;
}

.logged-in-as a:last-child:hover {
    color: var(--primary-color);
}
/* 评论分页 */
.comments-pagination {
    margin-top: 25px;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.comments-pagination a,
.comments-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    background: white;
    border-radius: 8px;
    color: var(--text-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: var(--transition);
}

.comments-pagination a:hover,
.comments-pagination .current {
    background: var(--primary-color);
    color: white;
}
/* 提交按钮 */
.form-submit {
    margin-top: 10px;
}

.submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 28px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.submit-btn:active {
    transform: translateY(0);
}
/* 评论已关闭 */
.comments-closed {
    text-align: center;
    padding: 50px 20px;
    color: #8898aa;
    background: var(--bg-color);
    border-radius: 16px;
    margin-top: 40px;
}

.comments-closed i {
    font-size: 2.5rem;
    margin-bottom: 15px;
    display: block;
    opacity: 0.5;
}
/* Modal - 只能点击关闭按钮关闭 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 450px;
    max-height: 70vh;
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: var(--transition);
}

.modal-overlay.active .modal-content {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, rgba(102,126,234,0.1) 0%, rgba(118,75,162,0.1) 100%);
}

.modal-header h3 {
    font-size: 1.15rem;
    color: var(--heading-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-header h3 i {
    color: var(--primary-color);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    color: #8898aa;
    transition: var(--transition);
    padding: 5px;
}

.modal-close:hover {
    color: var(--heading-color);
    transform: rotate(90deg);
}

.modal-body {
    padding: 25px;
    max-height: 50vh;
    overflow-y: auto;
}

/* 弹窗中的标签云样式 - 统一样式 */
.modal-tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.modal-tag-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-color);
    border-radius: 20px;
    color: var(--text-color);
    font-size: 0.9rem;
    transition: var(--transition);
}

.modal-tag-item:hover {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    transform: scale(1.05);
}

.modal-tag-item .count {
    background: rgba(0,0,0,0.1);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
}

.modal-tag-item:hover .count {
    background: rgba(255,255,255,0.2);
}

/* Footer */
.site-footer {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    padding: 40px 20px;
    margin-top: 50px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-content p {
    margin: 8px 0;
    opacity: 0.9;
}

.footer-content a {
    color: white;
    opacity: 0.8;
}

.footer-content a:hover {
    opacity: 1;
}

/* No Posts */
.no-posts {
    text-align: center;
    padding: 60px 20px;
    color: #8898aa;
}

.no-posts i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

/* PJAX Loading Bar */
.pjax-loading-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
    z-index: 9999;
    transition: width 0.3s ease;
}

/* 响应式布局 */
@media (max-width: 1024px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        margin-top: 20px;
    }
    
    .post-sidebar .toc-card {
        position: static;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 220px;
        --navbar-height: 70px;
    }
    
    .nav-menu {
        display: none;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .search-wrapper {
        display: none;
    }
    
    .nav-left {
        gap: 15px;
    }
    
    .nav-logo {
        font-size: 1.3rem;
    }
    
    .typewriter-text {
        font-size: 1.4rem;
    }
    
    .post-thumbnail {
        height: 160px;
    }
    
    .post-header {
        padding: 25px 20px;
    }
    
    .post-content-wrapper {
        padding: 25px 20px;
    }
    
    .post-title-single {
        font-size: 1.4rem;
    }
    
    .post-meta-single {
        gap: 12px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
  .comments-area {
        padding: 25px 20px;
    }
    
    .comment-form-fields {
        grid-template-columns: 1fr;
    }
    
    .comment-children {
        margin-left: 30px;
        padding-left: 15px;
    }
    
    .comment-children .comment-children {
        margin-left: 20px;
    }
    
    .respond {
        padding: 20px;
    }
    
    .comment-body {
        gap: 12px;
    }
    
    .comment-avatar img {
        width: 45px;
        height: 45px;
    }
    
    .post-navigation {
        flex-direction: column;
    }
    
    .post-navigation a {
        max-width: 100%;
    }
    
    .floating-toolbar {
        right: 15px;
        bottom: 80px;
    }
    
    .toolbar-item {
        width: 45px;
        height: 45px;
    }
    
    .progress-ring {
        width: 45px;
        height: 45px;
    }
    
    .archive-header-card {
        padding: 20px;
    }
    
    .archive-title {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 20px 12px;
    }
    
    .post-content {
        padding: 18px;
    }
    
    .author-stats {
        gap: 10px;
    }
    
    .stat-item {
        flex: 1;
        min-width: 60px;
    }
    
    .nav-container {
        padding: 0 15px;
    }
 .comment-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .comment-children {
        margin-left: 20px;
        padding-left: 12px;
    }
    
    .comment-children .comment-avatar img {
        width: 35px;
        height: 35px;
    }
}
/* Highlight.js 增强 */
.hljs {
    padding: 1.5em !important;
    border-radius: 12px;
}

/* KaTeX 数学公式 */
.katex-display {
    overflow-x: auto;
    overflow-y: hidden;
    padding: 10px 0;
}