/* 博客系统现代化样式 */
:root {
    --primary-color: #4361ee;
    --secondary-color: #3f37c9;
    --accent-color: #4cc9f0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --success-color: #4caf50;
    --warning-color: #ff9800;
    --error-color: #f44336;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    --border-radius: 8px;
    --border-radius-sm: 4px;
    /* 侧边栏渐变色变量 - 可在后台修改 */
    --sidebar-gradient-start: var(--primary-color);
    --sidebar-gradient-end: var(--secondary-color);
    /* 主内容容器顶部边距变量 - 可在后台修改 */
    --main-content-margin-top: 80px;
    --main-content-margin-top-mobile: 64px;
    /* 顶部导航栏高度 */
    --top-nav-height: 64px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.2;
    color: var(--dark-color);
    background-color: white; /* 改为白色背景 */
    min-height: 100vh;
    padding: 0;
    overflow-x: hidden;
}

/* 容器布局 */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
    background-color: transparent; /* 背景透明，显示body的背景 */
    position: relative;
}

/* 顶部导航栏 */
.top-nav {
    display: block;
    background: transparent; /* 完全透明，仅依靠磨砂效果 */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08); /* 更柔和的阴影 */
    z-index: 1000;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    backdrop-filter: blur(20px); /* 增强磨砂模糊效果 */
    -webkit-backdrop-filter: blur(20px); /* Safari支持 */
    border-bottom: 1px solid rgba(255, 255, 255, 0.05); /* 极微妙的浅色底部边框 */
}

.top-nav-container {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    height: 64px;
    width: 100%;
    padding: 0 max(1.5rem, 2%);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
}

.nav-brand-icon {
    font-size: 1.75rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    margin-left: auto; /* 将导航菜单推到右侧 */
    padding: 0;
}

.nav-menu li {
    display: flex;
    align-items: center;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-menu a:hover {
    color: white;
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.nav-menu a.active {
    color: white;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-sm);
}

.nav-menu .nav-icon {
    font-size: 1.25rem;
}

/* 下拉菜单样式 */
.nav-dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.dropdown-caret {
    font-size: 0.75rem;
    margin-left: 0.25rem;
    transition: transform var(--transition-fast);
}

.nav-dropdown:hover .dropdown-caret {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 190px;
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    list-style: none;
    padding: 0.4rem 0.3rem;
    margin-top: 0.3rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-fast);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 0.5rem 1rem;
    font-weight: 600;
    color: var(--gray-600);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid var(--gray-200);
    margin-bottom: 0.25rem;
}

.dropdown-loading {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    color: var(--gray-500);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.dropdown-category-item {
    padding: 0.02rem 1rem;
    margin: 0.1rem 0.5rem;
    color: var(--gray-700) !important;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    transition: all var(--transition-fast);
    width: calc(100% - 1rem);
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    height: auto;
    min-height: 24px;
    line-height: 1.2;
}

.dropdown-category-item:hover {
    background: rgba(255, 255, 255, 0.8);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.dropdown-category-item i {
    display: none;
}

/* 侧边栏（移动端） */
.sidebar {
    position: fixed;
    top: 0;
    left: -65%;
    width: 65%;
    height: 100vh;
    /* 背景样式由PHP动态生成并以内联样式方式应用 */
    box-shadow: var(--shadow-lg);
    transition: left var(--transition-normal);
    z-index: 2000;
    padding: 1rem;
    overflow-y: auto;
}

.sidebar.open {
    left: 0;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-brand {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background var(--transition-fast);
}

.sidebar-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li {
    margin-bottom: 0.75rem;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    transition: all var(--transition-fast);
    font-weight: 500;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.sidebar-menu .nav-icon {
    font-size: 1.25rem;
    width: 24px;
    text-align: center;
}

/* 侧边栏下拉菜单 */
.sidebar-dropdown {
    position: relative;
}

.sidebar-dropdown .dropdown-toggle {
    color: rgba(255, 255, 255, 0.9);
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    transition: all var(--transition-fast);
}

.sidebar-dropdown .dropdown-toggle:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.sidebar-dropdown .dropdown-caret {
    margin-left: auto;
    transition: transform var(--transition-fast);
}

.sidebar-dropdown.open .dropdown-caret {
    transform: rotate(180deg);
}

.sidebar-dropdown .dropdown-menu {
    position: static;
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: none;
    margin: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: max-height var(--transition-normal);
    border-radius: var(--border-radius-sm);
}

.sidebar-dropdown.open .dropdown-menu {
    max-height: 300px;
    margin: 0.1rem 1rem 0.3rem 1rem;
    padding: 0.3rem 0.3rem;
}

.sidebar-dropdown .dropdown-header {
    color: rgba(255, 255, 255, 0.7);
    border-bottom-color: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
}

.sidebar-dropdown .dropdown-loading {
    color: rgba(255, 255, 255, 0.6);
    padding: 0.75rem 1rem;
}

.sidebar-dropdown .dropdown-category-item {
    color: rgba(220, 220, 220, 0.9) !important;
    padding: 0.02rem 1rem;
    margin: 0.08rem 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    width: calc(100% - 1rem);
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    height: auto;
    min-height: 24px;
    line-height: 1.2;
}

.sidebar-dropdown .dropdown-category-item:hover {
    background: rgba(255, 255, 255, 0.4);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 汉堡菜单按钮 */
.menu-toggle {
    position: relative;
    width: auto;
    height: auto;
    background: none;
    border: none;
    border-radius: 0;
    color: white; /* 改为白色以匹配导航栏文字颜色 */
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    margin-left: 1rem;
    flex-shrink: 0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 0.5rem;
}

.menu-toggle:hover {
    transform: scale(1.1);
    box-shadow: none;
    background: none;
    border-color: transparent;
    color: #333; /* 悬停时稍浅黑色 */
}

/* 标语和一言文字居中容器 - 在顶部导航栏和云层之间垂直居中 */
.slogan-hitokoto-container {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: max(50px, calc(var(--main-content-margin-top) - var(--top-nav-height)));
    z-index: 1;
}

/* 首页标语横幅 */
.home-slogan-banner {
    width: 100%;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    z-index: 1;
    margin-top: var(--home-slogan-margin-top, 3rem); /* 使用变量控制标语顶部间距，可在后台修改 */
}

.home-slogan-inner {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

.home-slogan-text {
    color: white;
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    letter-spacing: 1px;
}

/* 一言打字效果 */
.hitokoto-typing-container {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0.5rem 1rem;
    position: relative;
    z-index: 1;
}

.hitokoto-typing-text {
    color: white;
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 1.4;
    margin: 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
    display: inline-block;
    position: relative;
    min-height: 1.5em;
    padding: 12px 24px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.hitokoto-typing-text::after {
    content: '|';
    color: rgba(255, 255, 255, 0.8);
    animation: cursor-blink 1s infinite;
    font-weight: 300;
    margin-left: 2px;
}

@keyframes cursor-blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}



/* 移动端适配 */
@media (max-width: 767px) {
    .hitokoto-typing-text {
        font-size: 1.25rem;
        padding: 10px 18px;
        border-radius: 12px;
    }
    .hitokoto-typing-container {
        padding: 0.25rem 1rem;
    }
    
}

/* 主内容区域 */
.main-content {
    flex: 1;
    padding: 2rem 3rem 3rem 3rem; /* 增加内边距以留出更多间隙 */
    max-width: 100%;
    background: rgba(255, 255, 255, 0.81); /* 降低透明度以增强磨砂效果 */
    backdrop-filter: blur(0px); /* 增强磨砂玻璃模糊效果 */
    -webkit-backdrop-filter: blur(0px); /* Safari支持 */
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08); /* 柔和阴影 */
    background: linear-gradient(to bottom, rgba(255,255,255,0.81), white);

    position: relative;
}



/* 云层波浪效果 - 所有文章上方 */
.cloud-top-container {
    position: relative;
    width: 100%;
    height: 100px;
    overflow: hidden;
    margin-bottom: 0rem;
    margin-top: var(--main-content-margin-top); /* 使用变量控制云层顶部间距，可在后台修改 */
    z-index: 0;
    /* 调试背景色 - 临时添加以便查看容器 */
    background: linear-gradient(to bottom, rgba(240, 248, 255, 0.5), rgba(224, 240, 255, 0.3));
}

.cloud-top-svg {
    position: absolute;
    bottom: 0;
    left: -15%;
    width: 130%;
    min-width: 1300px;
    height: 105%;
    transform: scaleY(-1); /* 重新应用垂直翻转，使波浪朝上 */
}

.cloud-wave-path {
    animation: cloudWaveAnimation 15s ease-in-out infinite;
    fill: rgba(255, 255, 255, 0.98);
    stroke: rgba(255, 255, 255, 0.5);
    stroke-width: 0.6;
    filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.15));
}

.cloud-wave-path:nth-child(2) {
    animation-delay: -5s;
    animation-duration: 12s;
    fill: rgba(255, 255, 255, 0.9);
    stroke: rgba(255, 255, 255, 0.4);
    stroke-width: 0.5;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.12));
}

.cloud-wave-path:nth-child(3) {
    animation-delay: -7s;
    animation-duration: 12s;
    fill: rgba(255, 255, 255, 0.8);
    stroke: rgba(255, 255, 255, 0.3);
    stroke-width: 0.4;
    filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.1));
}

.cloud-wave-path:nth-child(4) {
    animation-delay: -14s;
    animation-duration: 9s;
    fill: rgba(255, 255, 255, 0.7);
    stroke: rgba(255, 255, 255, 0.25);
    stroke-width: 0.3;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.08));
}

.cloud-wave-path:nth-child(5) {
    animation-delay: -21s;
    animation-duration: 7s;
    fill: rgba(255, 255, 255, 0.6);
    stroke: rgba(255, 255, 255, 0.2);
    stroke-width: 0.25;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.06));
}

@keyframes cloudWaveAnimation {
    0% {
        opacity: 0.8;
        transform: translateX(0) translateY(0) scale(1);
    }
    12.5% {
        opacity: 0.85;
        transform: translateX(8px) translateY(-1px) scale(1.002);
    }
    25% {
        opacity: 0.9;
        transform: translateX(15px) translateY(-2px) scale(1.005);
    }
    37.5% {
        opacity: 0.85;
        transform: translateX(22px) translateY(-1px) scale(1.002);
    }
    50% {
        opacity: 0.8;
        transform: translateX(30px) translateY(0) scale(1);
    }
    62.5% {
        opacity: 0.85;
        transform: translateX(22px) translateY(1px) scale(0.998);
    }
    75% {
        opacity: 0.9;
        transform: translateX(15px) translateY(2px) scale(0.995);
    }
    87.5% {
        opacity: 0.85;
        transform: translateX(8px) translateY(1px) scale(0.998);
    }
    100% {
        opacity: 0.8;
        transform: translateX(0) translateY(0) scale(1);
    }
}

/* Canvas泡沫效果 */
#foam-canvas {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* 移动端Canvas泡沫效果适配 */
@media (max-width: 767px) {
    #foam-canvas {
        height: 60px; /* 移动端云层更薄 */
    }
}

/* 覆盖层 */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1900;
    backdrop-filter: blur(2px);
}

.overlay.active {
    display: block;
}

/* 分类筛选器 */
.category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--gray-200);
}

.category-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--gray-100);
    color: var(--gray-700);
    border-radius: var(--border-radius-sm);
    text-decoration: none;
    font-size: 0.9rem;
    border: 1px solid var(--gray-200);
    transition: all var(--transition-fast);
}

.category-item:hover {
    background: var(--gray-200);
    color: var(--gray-800);
    border-color: var(--gray-300);
    transform: translateY(-2px);
}

.category-item.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-color: var(--primary-color);
    font-weight: 500;
}

.category-item i {
    font-size: 0.8rem;
}

/* 文章列表 */
.post-list {
    display: grid;
    gap: 1.5rem;
    width: 100%;
}

.post-card {
    background: white; /* 默认白色背景 */
    padding: 0 1.5rem 0.5rem;
    border-radius: 12px;
    transition: all var(--transition-fast);
    cursor: pointer;
    border: 1px solid rgba(0, 0, 0, 0.08);
    text-align: center;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    position: relative; /* 为覆盖链接提供定位上下文 */
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(67, 97, 238, 0.3);
}

/* 卡片覆盖链接 - 使整个卡片可点击 */
.post-card-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1; /* 在卡片内容下方，分类标签上方 */
    text-decoration: none;
    color: transparent;
    cursor: pointer;
}

/* 新卡片布局样式 */
.post-card-image {
    width: calc(100% + 3rem);
    height: 180px;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
    margin: 0 -1.5rem 1rem -1.5rem;
    background-color: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative; /* 为绝对定位的分类标签提供参照 */
}

.post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

.post-card:hover .post-card-image img {
    transform: scale(1.05);
}

.post-card-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-500);
    font-size: 3rem;
}

.post-card-time {
    color: var(--gray-600);
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.post-card-title {
    color: var(--gray-800);
    margin-bottom: 0.5rem;
    font-size: 1.125rem;
    text-align: center;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.post-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.post-card-title a:hover {
    color: var(--primary-color);
}

.post-card-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.post-card-views,
.post-card-comments {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
}

.post-card-views i {
    color: #ff6b6b;
}

.post-card-comments i {
    color: #ffffff;
}

.post-card-category {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    background-color: rgba(67, 97, 238, 0.1);
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 0.875rem;
    margin: 0 auto;
}

/* 图片右上角分类标签 */
.category-overlay {
    position: absolute;
    top: 12px;
    right: 12px;
    margin: 0;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(67, 97, 238, 0.2);
    z-index: 10;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.category-overlay:hover {
    background-color: rgba(67, 97, 238, 0.1);
    border-color: rgba(67, 97, 238, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* 预览图左上角热度和评论 */
.image-overlay-left {
    position: absolute;
    top: 12px;
    left: 12px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-radius: 20px;
    padding: 0.4rem 0.75rem;
    z-index: 10;
}

/* 文章详情页全宽样式 */
.post-detail .post-content {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* 在桌面端文章详情页隐藏左侧侧边栏，让文章内容占据全宽 */
@media (min-width: 1024px) {
    /* 当文章详情显示时，隐藏左侧统计侧边栏，让右侧内容占据全宽 - 已禁用（PC端不隐藏）
    .desktop-layout:has(.post-detail) .left-column,
    .desktop-layout:has(.right-column:has(.post-detail)) .left-column {
        display: none !important;
    }
    */
    
    /* 当文章详情显示时，右侧内容占据全宽 - 已禁用（PC端侧边栏显示）
    .right-column:has(.post-detail) {
        flex: 1 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
        min-width: 800px !important; /* 强制最小宽度，防止内容少时收缩 */
    }
    */
    
    
    
    
    
    /* 当文章详情显示时，调整主内容内部容器的宽度限制 - 已禁用（PC端侧边栏显示）
    .main-content-inner:has(.right-column:has(.post-detail)) {
        max-width: none !important;
        width: 100% !important;
        margin: 0 !important;
    }
    */
    
    /* 当文章详情显示时，调整桌面布局容器的间隙 */
    .desktop-layout:has(.right-column:has(.post-detail)) {
        gap: 0 !important;
        width: 100% !important;
    }
}

.image-overlay-left .post-card-views,
.image-overlay-left .post-card-comments {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: white;
    font-size: 0.8rem;
    font-weight: 500;
}

.image-overlay-left .post-card-views i {
    color: #ff9e6b;
}

.image-overlay-left .post-card-comments i {
    color: #6bc1ff;
}

/* 确保热度与评论数字为白色 */
.image-overlay-left .post-card-views span,
.image-overlay-left .post-card-comments span {
    color: white !important;
}

/* 预览图右下角发布时间 */
.image-overlay-right {
    position: absolute;
    bottom: 12px;
    right: 12px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: white;
    border-radius: 20px;
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 500;
    z-index: 10;
}

.image-overlay-right i {
    color: rgba(255, 255, 255, 0.9);
}

/* 移动端优化 */
@media (max-width: 767px) {
    .image-overlay-left {
        gap: 0.5rem;
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
    }
    
    .image-overlay-left .post-card-views,
    .image-overlay-left .post-card-comments {
        gap: 0.2rem;
        font-size: 0.75rem;
    }
    
    .image-overlay-right {
        gap: 0.4rem;
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
    }
    
    /* 调整卡片标题边距，因为底部内容已移除 */
    .post-card-title {
        margin-bottom: 0.5rem;
    }
    
    /* 调整卡片底部内边距 */
    .post-card {
        padding: 0 1rem 0.75rem;
    }
}



.post-meta {
    color: var(--gray-600);
    font-size: 0.875rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.post-excerpt {
    color: var(--gray-700);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-align: center;
}



.post-detail .post-meta {
    font-size: 1rem;
    margin-bottom: 2rem;
}

.post-content {
  //  font-size: 0rem;
    line-height: 1.6;
    color: var(--gray-800);
    /* 最小宽度 + 居中 */
    min-width: 50vw;
    max-width: 50vw;    /* 建议加个最大宽度，不然太宽难看 */
    margin: 0 auto;      /* 关键：水平居中 */
}

.post-content p {
   // margin-bottom: 0rem;/* 手机端文章详情字体大小 */
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    margin: 1.5rem 0;
}

/* 表单样式 */
.form-card {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
    font-weight: 600;
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--dark-color);
    background-color: white;
    border: 2px solid var(--gray-300);
    border-radius: var(--border-radius-sm);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.15);
    outline: none;
}

textarea.form-control {
    min-height: 200px;
    resize: vertical;
}

/* 按钮样式 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--gray-600);
    color: white;
}

.btn-secondary:hover {
    background: var(--gray-700);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    font-size: 1.25rem;
}

/* 消息提示 */
.message-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 3000;
    max-width: 400px;
}

.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: var(--shadow-md);
    animation: slideIn 0.3s ease;
    transform: translateX(0);
    transition: transform var(--transition-normal);
}

.alert.hidden {
    transform: translateX(100%);
}

.alert-success {
    background: var(--success-color);
    color: white;
    border-left: 4px solid darken(#4caf50, 10%);
}

.alert-error {
    background: var(--error-color);
    color: white;
    border-left: 4px solid darken(#f44336, 10%);
}

.alert-warning {
    background: var(--warning-color);
    color: white;
    border-left: 4px solid darken(#ff9800, 10%);
}

.alert-info {
    background: var(--accent-color);
    color: white;
    border-left: 4px solid darken(#4cc9f0, 10%);
}

.alert-icon {
    font-size: 1.25rem;
}

/* 搜索结果信息样式 */
.search-results-info {
    width: 100%;
    box-sizing: border-box;
    max-width: 100%;
    overflow: hidden;
}

/* 搜索结果信息样式 */
.content-card {
    width: 100%;
    box-sizing: border-box;
    max-width: 100%;
    overflow: hidden;
}
.search-results-info .alert,
.search-results-alert {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    bottom: auto !important;
    max-width: 100% !important;
    width: 100% !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    margin: 1rem 0 !important;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    box-sizing: border-box;
    overflow: hidden;
}

.search-results-info .alert span,
.search-results-alert span {
    flex: 1;
    min-width: 0; /* 允许flex item收缩 */
    max-width: 100%;
    overflow: hidden;
    word-break: break-word;
}

.search-results-info .alert strong,
.search-results-alert strong {
    word-break: break-all;
}

.search-results-info .alert button,
.search-results-alert button {
    flex-shrink: 0;
    white-space: nowrap;
}

/* 移动端适配 */
@media (max-width: 767px) {
    .search-results-info {
        padding: 0 0.5rem;
    }
    
    .search-results-info .alert,
    .search-results-alert {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        padding: 0.75rem !important;
        margin: 0.75rem 0 !important;
    }
    
    .search-results-info .alert span,
    .search-results-alert span {
        width: 100%;
        font-size: 0.9rem;
        line-height: 1.4;
    }
    
    .search-results-info .alert button,
    .search-results-alert button {
        align-self: flex-end;
        margin-top: 0.5rem;
        margin-left: 0 !important;
    }
}

/* 加载状态 */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    text-align: center;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--gray-300);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

.loading-text {
    color: var(--gray-600);
    font-size: 1rem;
}

/* 页脚 */
.footer {
    background: transparent; /* 改为全透明，以便清晰看到鱼群跳跃 */
    color: white;
    padding: 2rem 2rem 4rem 2rem; /* 增加底部内边距，为鱼群留出空间 */
    text-align: center;
    margin-top: auto;
    position: relative; /* 确保z-index生效 */
    /* 不设置z-index，避免创建堆叠上下文，让子元素与页面其他元素自由排序 */
}

.footer-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -10; /* 背景层在鱼群之下，使用负值确保最低层 */
    pointer-events: none; /* 防止交互干扰 */
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    background: transparent; /* 确保内容区域背景透明 */
    position: relative; /* 确保z-index生效 */
    z-index: 10; /* 文字在鱼群之上，确保清晰可见 */
}

.footer p {
    color: white; /* 改为白色，提高在鱼群背景上的可读性 */
    font-size: 0.875rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); /* 添加阴影增强对比度 */
}

/* 两列布局样式 */
.desktop-layout {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* 移动端只显示一列 */
.left-column, .right-column {
    width: 100%;
}

/* 移动端调整显示顺序：搜索框在最上方，文章列表在下方 */
@media (max-width: 767px) {
    /* 减少两列布局的间距 */
    .desktop-layout {
        gap: 0.5rem !important;
    }
    
    /* 移动端主内容区域更紧凑 */
    .main-content {
        padding: 1rem 1rem 2rem 1rem !important;
    }
    
    .left-column {
        order: 1; /* 搜索框卡片在最上面 */
        display: block !important;
        position: relative;
        height: auto;
        margin-bottom: 0.5rem; /* 减少与文章列表的间距 */
        margin-top: 0; /* 确保顶部无间距 */
    }
    
    /* 隐藏left-column中的所有内容，除了搜索框卡片 */
    .left-column > .sidebar-card:not(.search-card) {
        display: none !important;
    }
    
    /* 搜索框卡片样式 - 在移动端更紧凑，位于最顶部 */
    .search-card {
        display: block !important;
        margin: 0 auto 0.5rem !important; /* 顶部无间距，底部小间距 */
        width: 100%;
        max-width: 500px;
        background: white;
        border-radius: 12px;
        border: 1px solid rgba(0, 0, 0, 0.08);
        box-shadow: var(--shadow-sm);
        position: relative;
        z-index: 10;
    }
    
    /* 搜索框卡片头部更紧凑 */
    .search-card-header {
        padding: 0.375rem 0.5rem 0 !important;
        margin-bottom: 0.5rem !important;
    }
    
    /* 搜索输入框更紧凑 */
    .search-container {
        padding: 0 0.375rem 0.375rem !important;
    }
    
    #mainContent {
        order: 2; /* 文章列表在搜索框下面 */
        margin-top: 0 !important;
    }
    
    /* 确保搜索卡片在移动端位于最顶部 */
    .desktop-layout {
        display: flex !important;
        flex-direction: column !important;
    }
    .left-column {
        width: 100% !important;
        flex-shrink: 0 !important;
        order: 1 !important;
        display: block !important;
        margin-bottom: 0.5rem !important;
    }
    #mainContent {
        width: 100% !important;
        order: 2 !important;
    }
    .right-column {
        width: 100% !important;
    }
    .search-card {
        display: block !important;
        width: 100% !important;
        max-width: 500px !important;
        margin: 0 auto 0.5rem !important;
    }
    
    /* 在文章详情页隐藏整个左侧边栏 */
    .desktop-layout:has(.post-detail) .left-column,
    .desktop-layout:has(.right-column:has(.post-detail)) .left-column {
        display: none !important;
    }
    /* 在文章详情页隐藏搜索卡片（双重保障） */
    .desktop-layout:has(.post-detail) .search-card,
    .desktop-layout:has(.right-column:has(.post-detail)) .search-card {
        display: none !important;
    }
    /* 基于JS添加的post-detail-active类隐藏左侧边栏和搜索卡片（更可靠的方案） */
    .post-detail-active .desktop-layout .left-column,
    .post-detail-active .desktop-layout .left-column .search-card,
    .post-detail-active .desktop-layout .left-column > .sidebar-card {
        display: none !important;
    }
}

/* 侧边栏卡片 */
.sidebar-card {
    transition: all var(--transition-fast);
}

.stats-card {
    background: linear-gradient(to bottom, transparent, #00d1b2);
}

.search-card {
    background: white;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    margin-top: 1rem;
    box-shadow: var(--shadow-sm);
}

.popular-posts-card {
    background: white;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    margin-top: 1rem;
    box-shadow: var(--shadow-sm);
}

.latest-posts-card {
    background: white;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    margin-top: 1rem;
    box-shadow: var(--shadow-sm);
}

.sidebar-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* 管理员信息样式 */
.admin-info {
    text-align: center;
}

.admin-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin: 0 auto 1rem;
    display: block;
}

.admin-avatar-placeholder {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4361ee, #3f37c9);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.5rem;
    border: 4px solid white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin: 0 auto 1rem;
}

.admin-nickname {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.5rem;
}



/* 统计信息样式 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0rem;
    margin-top: 0rem;
}

.stat-item {
    background: transparent;
    border-radius: 10px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all var(--transition-fast);
}

.stat-item:hover {
    transform: translateY(-2px);
}

.stat-item-header {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    margin-bottom: 0rem;
}

.stat-icon {
    font-size: 0.8rem;
    color: var(--primary-color);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-3px);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--gray-600);
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 1;
}

.stat-value {
    font-size: 1rem;
    width: auto;
    color: white;
}



/* 移动端适配 */
@media (max-width: 767px) {
    .stat-item {
        padding: 0.75rem;
    }
    
    .stat-icon {
        font-size: 1rem;
        transform: translateY(-1px);
    }
    
    .stat-label {
        font-size: 0.8125rem;
    }
    
}

/* 搜索卡片头部样式 */
.search-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between; /* 左边内容，右边窗口控制按钮 */
    margin-bottom: 0.75rem;
    padding: 0.5rem 0.5rem 0;
}

.search-header-left {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.search-window-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.search-card-icon {
    font-size: 1rem !important;
    width: auto !important;
    height: auto !important;
    line-height: 1 !important;
    color: var(--primary-color);
}

.search-card-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-800);
}

/* 热门文章样式 */
.popular-posts-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    padding: 0.5rem 0.5rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.popular-posts-icon {
    font-size: 1rem;
    color: #ff6b35;
    margin-right: 0.5rem;
}

.popular-posts-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-800);
}

.popular-posts-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.popular-posts-item {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
}

.popular-posts-item:last-child {
    border-bottom: none;
}

.popular-posts-rank {
    font-size: 0.75rem;
    font-weight: bold;
    color: #ff6b35;
    width: 20px;
    text-align: center;
    margin-right: 0.5rem;
}

.popular-posts-link {
    flex: 1;
    font-size: 0.875rem;
    color: var(--gray-700);
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.popular-posts-link:hover {
    color: var(--primary-color);
}

.popular-posts-views {
    font-size: 0.75rem;
    color: white;
    margin-left: 0.5rem;
    white-space: nowrap;
}

/* 热门文章窗口控制按钮样式 */
.popular-posts-window-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.popular-posts-header-left {
    display: flex;
    align-items: center;
}

.popular-posts-window-control {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.popular-posts-window-control-close {
    background-color: #ff6b35; /* 深橙色 */
}

.popular-posts-window-control-minimize {
    background-color: #ff9a3d; /* 中等橙色 */
}

.popular-posts-window-control-maximize {
    background-color: #ffc16b; /* 浅橙色 */
}

/* 最新文章样式 */
.latest-posts-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    padding: 0.5rem 0.5rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.latest-posts-icon {
    font-size: 1rem;
    color: #4361ee; /* 蓝色 */
    margin-right: 0.5rem;
}

.latest-posts-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-800);
}

.latest-posts-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.latest-posts-item {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
}

.latest-posts-item:last-child {
    border-bottom: none;
}

.latest-posts-rank {
    font-size: 0.75rem;
    font-weight: bold;
    color: #4361ee; /* 蓝色 */
    width: 20px;
    text-align: center;
    margin-right: 0.5rem;
}

.latest-posts-link {
    flex: 1;
    font-size: 0.875rem;
    color: var(--gray-700);
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.latest-posts-link:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.latest-posts-date {
    font-size: 0.75rem;
    color: var(--gray-600);
    margin-left: 0.5rem;
    white-space: nowrap;
}

.latest-posts-empty {
    text-align: center;
    padding: 1.5rem;
    color: var(--gray-500);
}

.latest-posts-empty i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    display: block;
}

.latest-posts-empty p {
    margin: 0;
    font-size: 0.875rem;
}

.latest-posts-header-left {
    display: flex;
    align-items: center;
}

.latest-posts-window-controls {
    display: flex;
    gap: 6px;
}

.latest-posts-window-control {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.latest-posts-window-control-close {
    background-color: #4361ee; /* 蓝色 */
}

.latest-posts-window-control-minimize {
    background-color: #7b9fff; /* 中等蓝色 */
}

.latest-posts-window-control-maximize {
    background-color: #b0c4ff; /* 浅蓝色 */
}

/* 窗口控制按钮样式 */
.window-control {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.window-control-close {
    background-color: #ff605c;
}

.window-control-minimize {
    background-color: #ffbd44;
}

.window-control-maximize {
    background-color: #00ca4e;
}

/* 搜索框样式 */
.search-container {
    margin-top: 0.25rem;
    margin-bottom: 0.75rem;
    padding: 0 0.5rem;
}

.search-form {
    width: 100%;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 0.5rem;
    color: var(--gray-500);
    font-size: 0.875rem;
    z-index: 1;
}

.search-input {
    width: 100%;
    padding: 0.5rem 0.5rem 0.5rem 2rem;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: 0.875rem;
    background: rgba(255, 255, 255, 0.9);
    transition: all var(--transition-fast);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

.search-submit {
    position: absolute;
    right: 0.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.search-submit:hover {
    background: var(--primary-color-dark);
    transform: translateY(-1px);
}

.search-submit:active {
    transform: translateY(0);
}

/* 友链按钮 */
.friend-link {
    display: block;
    width: 100%;
    background: var(--secondary-color);
    color: white;
    padding: 0.75rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    margin-top: 1.5rem;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.friend-link:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
    text-decoration: none;
}

/* 加载状态 */
.admin-info-loading {
    text-align: center;
    padding: 2rem;
    color: var(--gray-600);
}

.search-loading {
    text-align: center;
    padding: 1.5rem;
    color: var(--gray-600);
}

.loading-spinner-small {
    width: 30px;
    height: 30px;
    border: 2px solid var(--gray-300);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

/* 响应式设计 */
@media (min-width: 768px) {
    .main-content {
        padding: 2rem 3rem 3rem 3rem; /* 增加内边距以留出更多间隙 */
    }
    
    /* 桌面端主内容内部容器限制宽度 */
    .main-content-inner {
        max-width: 100%;
       // max-width: 1200px;
        margin: 0 auto;
        width: 100%;
    }
    
    .post-list {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
    
    
    .menu-toggle {
        display: none;
    }
    
    /* 在文章详情页隐藏左侧侧边栏 - 已禁用（PC端不隐藏）
    .desktop-layout:has(.post-detail) .left-column,
    .desktop-layout:has(.right-column:has(.post-detail)) .left-column {
        display: none !important;
    }
    */
}

@media (max-width: 767px) {
    :root {
        --top-nav-height: 56px;
    }
    
    .nav-menu {
        display: none;
    }
    
    .menu-toggle {
        display: flex;
        margin-left: 0; /* 不再自动推到右侧，由 flex order 控制 */
    }
    
    .top-nav {
        /* 内边距已移动到.top-nav-container */
    }
    
    .top-nav-container {
        height: 56px;
        padding: 0 max(1rem, 3%);
    }
    
    .main-content {
        padding: 1rem 2rem 2rem 2rem; /* 移动端内边距 */
    }
    
    /* 移动端主内容内部容器全宽 */
    .main-content-inner {
        max-width: 100%;
        padding: 0;
    }
    
    
    /* 移动端标语和一言文字居中容器 - 在顶部导航栏和云层之间垂直居中 */
    .slogan-hitokoto-container {
        position: relative;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 100%;
        min-height: max(40px, calc(var(--main-content-margin-top-mobile) - var(--top-nav-height)));
        z-index: 1;
    }
    
    /* 移动端首页标语响应式 */
    .home-slogan-banner {
        padding: 0.75rem 1rem;
        margin-top: var(--home-slogan-margin-top-mobile, 2.5rem); /* 使用变量控制移动端标语顶部间距，可在后台修改 */
    }
    .home-slogan-text {
        font-size: 1.75rem;
    }
    
    /* 移动端分类筛选器 */
    .category-filter {
        gap: 0.375rem;
        margin-top: 0.75rem;
        margin-bottom: 1rem;
        padding: 0.75rem 0;
    }
    
    .category-item {
        padding: 0.375rem 0.75rem;
        font-size: 0.85rem;
    }

    .post-list {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 1024px) {
    .main-content {
        padding: 1.5rem 4rem 4rem 4rem; /* 减少顶部内边距，让内容卡片更靠上 */
    }
    
    /* 主内容内部容器居中显示 */
    .main-content-inner {
        max-width: 1400px;
        margin: 0 auto;
        width: 100%;
    }
    
    /* 桌面端两列布局 */
    .desktop-layout {
        flex-direction: row;
        gap: 2rem;
    }
    
    .left-column {
        width: 320px;
        flex-shrink: 0;
    }
    
    /* 在文章详情页隐藏左侧侧边栏 - 已禁用（PC端不隐藏）
    .desktop-layout:has(.post-detail) .left-column,
    .desktop-layout:has(.right-column:has(.post-detail)) .left-column {
        display: none !important;
    }
    */
    
    .right-column {
        flex: 1;
        min-width: 0; /* 防止内容溢出 */
        min-width: 950px;
    }
    
    .post-list {
        grid-template-columns: repeat(3, minmax(280px, 1fr));
    }
    
    .content-card .post-list {
        grid-template-columns: repeat(3, minmax(280px, 1fr));
    }
}

/* 动画 */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}



/* 工具类 */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p---

/* 后台管理特定样式 */
.admin-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .admin-layout {
        grid-template-columns: 2fr 1fr;
    }
}

.admin-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.admin-table th {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-weight: 600;
    padding: 1rem;
    text-align: left;
    border: none;
}

.admin-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-200);
    background: white;
}

.admin-table tr:hover td {
    background: var(--gray-100);
}

.admin-table .actions {
    display: flex;
    gap: 0.5rem;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--gray-600);
}

.empty-state-icon {
    font-size: 3rem;
    color: var(--gray-400);
    margin-bottom: 1rem;
}

/* 图标大小调整（保留布局样式） */
.nav-icon {
    font-size: 1.25rem;
    width: 24px;
    display: inline-block;
    text-align: center;
}



/* 图标对齐和间距 */
.nav-brand-icon, .sidebar-brand i, .btn i {
    margin-right: 0.5rem;
}

/* 加载动画图标 */
.fa-spin {
    animation: spin 1s linear infinite;
}

/* 调整特定图标大小 */
.menu-toggle i,
.sidebar-close i {
    font-size: 1.25rem;
}



/* 调整日历图标 */
.fa-calendar {
    font-size: 0.875em;
    margin-right: 0.25rem;
}

/* 消息提示图标调整 */
.alert-icon {
    font-size: 1.25rem;
    width: 24px;
    text-align: center;
}



/* 确保图标在按钮中垂直居中 */
.btn i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* 品牌图标大小 */
.nav-brand-icon {
    font-size: 1.75rem;
}

/* 空状态图标 */
.empty-state-icon {
    font-size: 3rem;
}

/* 返回顶部按钮 */
.back-to-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* 确保火箭图标朝上（-45度旋转） */
.back-to-top-btn i {
    transform: rotate(-45deg);
}



.back-to-top-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(67, 97, 238, 0.3);
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
}

.back-to-top-btn:active {
    transform: translateY(0);
}

/* 响应式调整 */
@media (max-width: 767px) {
    .back-to-top-btn {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
}

/* ============================
   新年快乐布局样式
   ============================ */

/* Hero区域 */
.hero-section {
    position: relative;
    min-height: 500px;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    padding: 4rem 2rem;
    margin-top: 80px;
    overflow: hidden;
}

/* 波浪效果背景 */
.wave-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 150px;
    overflow: hidden;
}

.wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 200%;
    height: 100%;
    background: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB2aWV3Qm94PSIwIDAgMTIwMCAzMTAiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbD0icmdiYSgyNTUsMjU1LDI1NSwwLjMpIiBmaWxsLW9wYWNpdHk9IjAuMyIgZD0iTTAsMjEwQzc1LDIwMCwxNTAsMjIwLDIyNSwyNjBDMzAwLDMwMCwzNzUsMjYwLDQ1MCwyOTBDNTI1LDMxMCw2MDAsMjUwLDY3NSwyMTBDNzUwLDE2MCw4MjUsMTYwLDkwMCwxODBDOTc1LDIwMCwxMDUwLDI0MCwxMTI1LDI2MEMxMjAwLDI4MCwxMTI1LDMxMCwxMjAwLDMxMEwxMjAwLDQwMEwwLDQwMFoiPjwvcGF0aD48L3N2Zz4=');
    background-size: 50% 100%;
    animation: wave 12s linear infinite;
}

.wave:nth-child(2) {
    animation: wave 10s linear infinite;
    opacity: 0.5;
}

.wave:nth-child(3) {
    animation: wave 8s linear infinite;
    opacity: 0.3;
}

@keyframes wave {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    animation: fadeInUp 1s ease;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: fadeInUp 1s ease 0.2s both;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2.5rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-size: 1.125rem;
    font-weight: 600;
    transition: all 0.3s ease;
    animation: fadeInUp 1s ease 0.4s both;
}

.hero-cta:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* 主内容布局 */
.main-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 3rem 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

@media (min-width: 1024px) {
    .main-layout {
        grid-template-columns: 350px 1fr;
        padding: 3rem 2rem;
    }
}

/* 左侧用户信息面板 */
.user-panel {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    padding: 2.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.user-avatar-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
    object-fit: cover;
}

.user-name {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.user-bio {
    color: var(--gray-600);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.user-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}


.user-stats .stat-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--gray-600);
}

.create-post-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.create-post-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(67, 97, 238, 0.3);
}

/* 右侧文章内容区域 */
.content-area {
    position: relative;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.content-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-900);
}

/* 现代文章网格 */
.modern-post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.modern-post-card {
    background: transparent;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
}

.modern-post-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    background: transparent;
}

.post-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.post-image-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 4rem;
}


.post-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.75rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-content h3 a {
    color: inherit;
    text-decoration: none;
}

.post-excerpt-small {
    color: var(--gray-600);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.post-date {
    color: var(--gray-500);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.post-category-badge {
    padding: 0.375rem 0.75rem;
    background: rgba(67, 97, 238, 0.1);
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 评论区域样式 */
.comments-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-300);
}

.comments-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.comment-form-container {
    background: var(--gray-100);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 0.3rem;
    border: 1px solid var(--gray-300);
}

.comment-input-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.comment-input {
    width: 100%;
    min-height: 120px;
    padding: 1rem;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--gray-800);
    background: white url('/assets/20260327002544.png') no-repeat right bottom;
    background-size: contain;
    background-origin: content-box;
    border: 1px solid var(--gray-400);
    border-radius: var(--border-radius-sm);
    resize: vertical;
    transition: border-color var(--transition-fast);
}

.comment-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.comment-input:disabled {
    background: var(--gray-200);
    cursor: not-allowed;
    color: var(--gray-600);
}

.comment-input-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.user-info-placeholder {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: white;
    border-radius: 50px;
    color: var(--gray-600);
    border: 1px solid var(--gray-300);
    font-size: 0.875rem;
    cursor: default;
}

.user-info-placeholder i {
    font-size: 1.25rem;
    color: var(--gray-500);
}

.user-info-active {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background: rgba(67, 97, 238, 0.05);
}

.user-info-active i {
    color: var(--primary-color);
}

.login-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    margin-left: 0.25rem;
}

.login-link:hover {
    text-decoration: underline;
}

.comment-submit-btn {
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all var(--transition-fast);
}

.comment-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: var(--gray-500) !important;
}

.btn-disabled {
    background: var(--gray-500) !important;
}

.user-avatar-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    object-fit: cover;
}

.comments-container {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.loading-comments {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    color: var(--gray-600);
    gap: 1rem;
}

.loading-comments i {
    font-size: 2rem;
}

.no-comments {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    color: var(--gray-500);
    gap: 1rem;
    text-align: center;
}

.no-comments i {
    font-size: 3rem;
    opacity: 0.5;
}

.error-message {
    padding: 1.5rem;
    background: rgba(244, 67, 54, 0.1);
    color: var(--error-color);
    border-radius: var(--border-radius);
    border: 1px solid rgba(244, 67, 54, 0.3);
    text-align: center;
}

.comment-item {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    background: white;
    border-radius: var(--border-radius);
    border: 1px solid var(--gray-300);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.comment-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.comment-avatar {
    flex-shrink: 0;
}

.comment-avatar-img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    object-fit: cover;
}

.comment-avatar-icon {
    font-size: 3rem;
    color: var(--gray-400);
}

.comment-content {
    flex: 1;
    min-width: 0; /* 防止flex项目溢出 */
}

.comment-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
    margin-bottom: 0.75rem;
    position: relative;
    width: 100%;
}

.comment-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    width: 100%;
}

.comment-username {
    font-weight: 600;
    color: orange;
    font-size: 1.1rem;
}

.comment-user-level {
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.comment-time {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--gray-500);
    font-size: 0.875rem;
    align-self: flex-start;
}

.comment-body {
    color: var(--gray-700);
    line-height: 3;
}

.comment-body p {
    margin: 0;
}

/* 回复相关样式 */
.comment-actions {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.reply-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.reply-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
}

.reply-btn i {
    font-size: 0.7rem;
}

.reply-count {
    color: var(--gray-500);
    font-size: 0.75rem;
    background: var(--gray-100);
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    margin-left: 0.25rem;
    border: 1px solid var(--gray-200);
}

/* 查看回复按钮 */
.view-replies-section {
    padding-left: 2rem;
    margin: 0.5rem 0;
}

.view-replies-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.875rem;
    background: var(--gray-100);
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
    border-radius: 20px;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.view-replies-btn:hover {
    background: var(--gray-200);
    color: var(--gray-800);
    border-color: var(--gray-400);
}

.view-replies-btn.expanded .view-replies-icon {
    transform: rotate(180deg);
}

.view-replies-icon {
    font-size: 0.75rem;
    transition: transform var(--transition-fast);
}

/* 回复表单 */
.reply-form-container {
    margin-top: 1rem;
    margin-left: 2rem;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--border-radius);
    border: 1px solid var(--gray-300);
    display: none;
}

.reply-form-container.active {
    display: block;
    animation: fadeInUp 0.3s ease;
}

.reply-input {
    width: 100%;
    min-height: 80px;
    padding: 0.75rem;
    font-family: inherit;
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--gray-800);
    background: white;
    border: 1px solid var(--gray-400);
    border-radius: var(--border-radius-sm);
    resize: vertical;
    margin-bottom: 0.75rem;
}

.reply-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.reply-form-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.reply-submit-btn,
.reply-cancel-btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.reply-submit-btn {
    background: var(--primary-color);
    color: white;
    border: none;
}

.reply-submit-btn:hover:not(:disabled) {
    background: var(--secondary-color);
    transform: translateY(-1px);
}

.reply-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.reply-cancel-btn {
    background: transparent;
    color: var(--gray-600);
    border: 1px solid var(--gray-400);
}

.reply-cancel-btn:hover {
    background: var(--gray-100);
    color: var(--gray-800);
}

/* 回复列表 */
.replies-container {
    margin-top: 1rem;
    margin-left: 2rem;
    display: none;
}

.replies-container.has-replies {
    display: block;
}

.reply-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--gray-50);
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--gray-300);
    margin-bottom: 0.5rem;
}

.reply-item:last-child {
    margin-bottom: 0;
}

.reply-item .comment-avatar-img {
    width: 32px;
    height: 32px;
}

.reply-item .comment-avatar-icon {
    font-size: 2rem;
}

.reply-item .comment-header {
    margin-bottom: 0.5rem;
}

.reply-item .comment-username {
    font-size: 1rem;
}

.reply-item .comment-time {
    font-size: 0.75rem;
}

.reply-item .comment-body {
    font-size: 0.9375rem;
    color: var(--gray-700);
}

.view-replies-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    background: transparent;
    color: var(--gray-600);
    border: 1px solid var(--gray-400);
    border-radius: 15px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-top: 0rem;
}


.view-replies-btn:hover {
    background: var(--gray-100);
    color: var(--gray-800);
}

.view-replies-btn i {
    font-size: 0.7rem;
    transition: transform var(--transition-fast);
}

.view-replies-btn.expanded i {
    transform: rotate(180deg);
}

/* 回复指示器 */
.reply-to-indicator {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    background: var(--gray-100);
    border-radius: 4px;
    color: var(--gray-600);
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
    border-left: 2px solid var(--primary-color);
}

.reply-to-indicator .reply-to-username {
    color: var(--primary-color);
    font-weight: 500;
}

.cancel-reply-btn {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--gray-500);
    cursor: pointer;
    font-size: 0.75rem;
    padding: 0.125rem 0.375rem;
    border-radius: 2px;
}

.cancel-reply-btn:hover {
    background: var(--gray-200);
    color: var(--gray-700);
}

/* 移动端适配 */
@media (max-width: 767px) {
    .reply-form-container {
        margin-left: 1rem;
        padding: 0.75rem;
    }
    
    .replies-container {
        margin-left: 1rem;
    }
    
    .reply-item {
        padding: 0.5rem;
        gap: 0.5rem;
    }
    
    /* 移动端查看回复按钮 */
    .view-replies-section {
        padding-left: 1rem;
    }
    
    .view-replies-btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
        width: 100%;
        justify-content: space-between;
    }
}

/* 添加一个淡灰色变量 */
:root {
    --gray-50: #f8fafc;
}

/* 回复模态框样式 */
.reply-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.3s ease;
}

.reply-modal {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 500px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
}

.reply-modal-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--gray-300);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.reply-modal-title {
    font-weight: 600;
    color: var(--gray-800);
    font-size: 1rem;
}

.reply-username {
    color: var(--primary-color);
    font-weight: 600;
}

.reply-modal-close {
    background: none;
    border: none;
    color: var(--gray-600);
    font-size: 1.125rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-fast);
}

.reply-modal-close:hover {
    color: var(--gray-800);
    background: var(--gray-100);
}

.reply-modal-body {
    padding: 1.5rem;
    flex: 1;
    overflow-y: auto;
}

.reply-modal-input {
    width: 100%;
    min-height: 120px;
    padding: 0.875rem;
    font-family: inherit;
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--gray-800);
    background: white;
    border: 1px solid var(--gray-400);
    border-radius: var(--border-radius-sm);
    resize: vertical;
    transition: border-color var(--transition-fast);
}

.reply-modal-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.reply-modal-input::placeholder {
    color: var(--gray-500);
}

.reply-modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--gray-300);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.reply-modal-footer-buttons {
    display: flex;
    gap: 0.75rem;
}

.reply-modal-submit-btn,
.reply-modal-cancel-btn {
    padding: 0.625rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 500;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    border: none;
    transition: all var(--transition-fast);
}

.reply-modal-submit-btn {
    background: var(--primary-color);
    color: white;
}

.reply-modal-submit-btn:hover:not(:disabled) {
    background: var(--secondary-color);
}

.reply-modal-submit-btn:disabled {
    background: var(--gray-400);
    cursor: not-allowed;
}

.reply-modal-cancel-btn {
    background: var(--gray-200);
    color: var(--gray-700);
}

.reply-modal-cancel-btn:hover {
    background: var(--gray-300);
}

/* 动画 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(20px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

/* 隐藏回复表单容器 */
.reply-form-container {
    display: none !important;
}

/* 移动端评论样式优化 */
@media (max-width: 767px) {
    .comments-section {
        margin-top: 0.5rem;
        padding-top: 0.5rem;
    }
    
    .comments-title {
        font-size: 1.25rem;
    }
    
    .comment-form-container {
        padding: 1rem;
    }
    
    .comment-input {
        min-height: 100px;
        font-size: 0.9375rem;
    }
    
    .comment-input-footer {
        flex-direction: column;
        align-items: stretch;
    }
    
    .comment-submit-btn {
        width: 100%;
        justify-content: center;
    }
    
    .comment-item {
        flex-direction: row;
        gap: 0.75rem;
        padding: 1rem;
        align-items: flex-start;
    }
    
    .comment-avatar-img {
        width: 40px;
        height: 40px;
        border-width: 1.5px;
    }
    
    .comment-avatar-icon {
        font-size: 2.5rem;
    }
    
    .comment-header {
        display: grid;
        grid-template-columns: 1fr auto; /* 左侧用户信息区域，右侧回复按钮 */
        grid-template-rows: auto auto; /* 昵称和等级标签一行，时间一行 */
        align-items: start;
        gap: 0.1rem 0.5rem;
        margin-bottom: 0;
        margin-top: 0;
        width: 100%;
    }
    
    .comment-user {
        grid-column: 1;
        grid-row: 1;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        min-width: 0;
        flex-wrap: nowrap;
        overflow: hidden;
    }
    
    .comment-username {
        font-size: 0.9rem; /* 稍微再缩小一点 */
        color: orange;
        font-weight: 600;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 60%; /* 防止昵称过长挤压等级标签 */
    }
    
    .comment-user-level {
        font-size: 0.65rem; /* 稍微再缩小一点 */
        white-space: nowrap;
        flex-shrink: 0; /* 防止等级标签被挤压 */
    }
    
    .comment-time {
        grid-column: 1;
        grid-row: 2;
        align-self: flex-start;
        margin-top: 0.05rem; /* 更贴近昵称 */
        font-size: 0.7rem; /* 稍微再缩小一点 */
        color: var(--gray-500);
        display: flex;
        align-items: center;
        gap: 0.375rem;
        white-space: nowrap;
    }
    
    .comment-actions {
        grid-column: 2;
        grid-row: 1 / span 2; /* 跨两行 */
        align-self: center;
        justify-self: end;
        margin: 0;
        padding: 0;
        flex-shrink: 0;
    }
    
    .reply-btn {
        font-size: 0.7rem;
        padding: 0.2rem 0.6rem;
        white-space: nowrap;
    }
    
    .comment-content {
        margin-top: 0;
        padding-top: 0;
        align-self: flex-start;
    }
    
    /* 移动端回复模态框样式 */
    .reply-modal-overlay {
        padding: 0.5rem;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .reply-modal {
        background: white;
        border-radius: 12px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
        width: calc(100% - 2rem);
        max-width: 100%;
        max-height: 85vh;
        margin: 0 auto;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        animation: slideUp 0.3s ease;
    }
    
    .reply-modal-header {
        padding: 0.875rem 1rem;
    }
    
    .reply-modal-title {
        font-size: 0.9375rem;
    }
    
    .reply-modal-body {
        padding: 1rem;
    }
    
    .reply-modal-input {
        min-height: 100px;
        font-size: 0.9375rem;
    }
    
    .reply-modal-footer {
        padding: 1rem;
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .reply-modal-footer-buttons {
        width: 100%;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .reply-modal-cancel-btn,
    .reply-modal-submit-btn {
        width: 100%;
        padding: 0.75rem 1rem;
        font-size: 0.9375rem;
    }
    
    /* 隐藏旧回复表单容器（确保隐藏） */
    .reply-form-container {
        display: none !important;
    }
    
    /* 移动端搜索弹出框样式 */
    
    .mobile-search-modal {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 1100;
    }
    
    .mobile-search-modal.active {
        display: block;
    }
    
    .mobile-search-overlay {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(4px);
    }
    
    .mobile-search-dialog {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 90%;
        max-width: 500px;
        background: white;
        border-radius: 16px;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
        overflow: hidden;
        z-index: 1101;
        animation: modalSlideIn 0.3s ease;
    }
    
    @keyframes modalSlideIn {
        from {
            opacity: 0;
            transform: translate(-50%, -40%);
        }
        to {
            opacity: 1;
            transform: translate(-50%, -50%);
        }
    }
    
    .mobile-search-header {
        padding: 1.25rem 1.5rem;
        border-bottom: 1px solid var(--gray-200);
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    
    .mobile-search-title {
        margin: 0;
        font-size: 1.25rem;
        font-weight: 600;
        color: var(--gray-800);
    }
    
    .mobile-search-close {
        background: none;
        border: none;
        color: var(--gray-500);
        font-size: 1.25rem;
        cursor: pointer;
        padding: 0.25rem;
        border-radius: 50%;
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background-color 0.2s;
    }
    
    .mobile-search-close:hover {
        background: var(--gray-100);
    }
    
    .mobile-search-content {
        padding: 1.5rem;
    }
    
    .mobile-search-form {
        width: 100%;
    }
    
    .mobile-search-input-wrapper {
        position: relative;
        display: flex;
        align-items: center;
        background: var(--gray-100);
        border-radius: 12px;
        padding: 0.5rem 1rem;
        border: 2px solid transparent;
        transition: border-color 0.2s;
    }
    
    .mobile-search-input-wrapper:focus-within {
        border-color: var(--accent-color);
        background: white;
    }
    
    .mobile-search-icon {
        color: var(--gray-500);
        font-size: 1.125rem;
        margin-right: 0.75rem;
        flex-shrink: 0;
    }
    
    .mobile-search-input {
        flex: 1;
        border: none;
        background: transparent;
        font-size: 1rem;
        padding: 0.75rem 0;
        color: var(--gray-800);
        outline: none;
    }
    
    .mobile-search-input::placeholder {
        color: var(--gray-500);
    }
    
    .mobile-search-submit {
        background: var(--accent-color);
        border: none;
        color: white;
        border-radius: 10px;
        width: 44px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        font-size: 1.125rem;
        transition: background-color 0.2s;
        flex-shrink: 0;
        margin-left: 0.5rem;
    }
    
    .mobile-search-submit:hover {
        background: var(--accent-color-dark);
    }
    
    /* 移动端显示搜索按钮 */
    @media (max-width: 767px) {
        #mobileSearchToggle.mobile-search-toggle,
        .mobile-search-toggle {
            display: flex !important;
            align-items: center;
            justify-content: center;
            background: none;
            border: none;
            color: white;
            font-size: 1.25rem;
            width: 44px;
            height: 44px;
            border-radius: 50%;
            cursor: pointer;
            margin-right: 0.25rem; /* 搜索和汉堡菜单之间的间距 */
            transition: background-color 0.2s;
            order: 2; /* 确保在汉堡菜单之前 */
        }
        
        .mobile-search-toggle:hover {
            background: rgba(255, 255, 255, 0.1);
        }
        
        /* 汉堡菜单按钮 */
        .menu-toggle {
            order: 3;
        }
        
        /* 品牌标志占据左侧空间 */
        .nav-brand {
            margin-right: auto;
            order: 1;
        }
    }
    
    /* PC端隐藏移动搜索按钮（确保在PC端不显示） */
    @media (min-width: 768px) {
        #mobileSearchToggle.mobile-search-toggle,
        .mobile-search-toggle {
            display: none !important;
            visibility: hidden !important;
            width: 0 !important;
            height: 0 !important;
            padding: 0 !important;
            margin: 0 !important;
            border: 0 !important;
            position: absolute !important;
            overflow: hidden !important;
            clip: rect(0, 0, 0, 0) !important;
            opacity: 0 !important;
            pointer-events: none !important;
        }
        
        /* PC端隐藏侧边栏搜索框（如果不需要） */
        .search-container {
            display: none !important;
        }
    }
    
}

/* 波浪横幅容器 */
.wave-banner-container {
    position: relative;
    width: 100%;
    height: 150px; /* 根据需要调整高度 */
    overflow: hidden;
    background: transparent;
    z-index: 0;
}

/* 隐藏原始图片，使用背景图实现无缝滚动 */
.wave-banner {
    display: none;
}

/* 波浪图片容器伪元素 - 第一张图片 */
.wave-banner-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../bannerWave1.png');
    background-repeat: repeat-x;
    background-size: auto 100%;
    background-position: 0 0;
    opacity: 0.8;
    animation: waveBannerLeft 30s linear infinite;
}

/* 波浪图片容器伪元素 - 第二张图片 */
.wave-banner-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../bannerWave2.png');
    background-repeat: repeat-x;
    background-size: auto 100%;
    background-position: 0 0;
    opacity: 0.6;
    animation: waveBannerRight 25s linear infinite;
}

/* 向左移动的关键帧动画：移动背景位置 */
@keyframes waveBannerLeft {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: -100% 0;
    }
}

/* 向右移动的关键帧动画：移动背景位置 */
@keyframes waveBannerRight {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 100% 0;
    }
}

/* 波浪向下滚动指示器 */
.wave-scroll-down {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -70%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.scroll-down-icon {
    font-size: 2.5rem;
    color: white;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    animation: bounce 2s ease-in-out infinite;
    cursor: pointer;
    padding: 12px;
    background: transparent;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.scroll-down-icon:hover {
    background: transparent;
    transform: scale(1.1);
    box-shadow: none;
}

/* 滚动时激活的动画 */
.scroll-down-icon.scrolling-active {
    animation: rotate360 0.3s linear 1, bounce 0.3s ease-in-out 1;
    border-color: rgba(255, 255, 255, 0.8);
    color: rgba(255, 255, 255, 0.9);
    animation-fill-mode: forwards;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@keyframes rotate360 {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* 移动端适配 */
@media (max-width: 767px) {
    .wave-banner-container {
        height: 100px; /* 移动端减小高度 */
    }
    
    .scroll-down-icon {
        font-size: 2rem;
        width: 50px;
        height: 50px;
        padding: 8px;
    }
}

/* 文章详情页隐藏左侧边栏 - 已禁用（PC端不隐藏）
.post-detail-active .desktop-layout .left-column {
    display: none !important;
}
*/

/* Markdown 代码块样式 */
.code-block {
    margin: 1.5rem 0;
    padding: 1rem;
    background: #1a1a1a;
    border-left: 4px solid var(--primary-color);
    border-radius: 6px;
    overflow-x: auto;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.code-block code {
    font-family: inherit;
    background: transparent;
    padding: 0;
    font-size: inherit;
    color: inherit;
    white-space: pre;
    overflow-wrap: normal;
    overflow-x: auto;
    display: block;
}

/* 内联代码样式 */
.post-content code:not(pre code) {
    background: var(--gray-200);
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
    color: var(--dark-color);
}

/* 语法高亮颜色增强（深色主题适配） */
.code-block .keyword { color: #ff6b6b; }
.code-block .string { color: #4ecdc4; }
.code-block .comment { color: #9aa5b1; }
.code-block .function { color: #a855f7; }
.code-block .number { color: #4dabf7; }
.code-block .operator { color: #ffa94d; }
.code-block .class-name { color: #51cf66; }

/* Markdown 引用样式 */
.post-content blockquote {
    margin: 1rem 0;
    padding: 0.75rem 1rem;
    background: var(--gray-100);
    border-left: 3px solid var(--accent-color);
    border-radius: 4px;
    color: var(--gray-700);
    font-style: italic;
}

/* Markdown 列表样式 */
.post-content ul,
.post-content ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.post-content li {
    margin: 0.25rem 0;
    line-height: 1.5;
}

.post-content ul {
    list-style-type: disc;
}

.post-content ol {
    list-style-type: decimal;
}

/* 内联代码样式 */
.post-content code:not(pre code) {
    background: var(--gray-200);
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
    color: var(--dark-color);
}