/* ===== 全局样式重置 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    background: transparent;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* ===== CSS变量定义 ===== */
:root {
    /* 主色调 */
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --accent-color: #f59e0b;
    
    /* 文字颜色 */
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --text-white: #ffffff;
    
    /* 背景颜色 */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-dark: #0f172a;
    
    /* 边框和阴影 */
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    /* 圆角 */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    
    /* 间距 */
    --spacing-xs: 0.5rem;
    --spacing-sm: 0.75rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    
    /* 字体 */
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: "SF Mono", Monaco, Inconsolata, "Roboto Mono", Consolas, "Courier New", monospace;
    
    /* 过渡动画 */
    --transition-fast: 0.15s ease-in-out;
    --transition-normal: 0.3s ease-in-out;
    --transition-slow: 0.5s ease-in-out;
}

/* ===== 基础样式 ===== */

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* ===== 顶部导航栏 ===== */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px) saturate(180%);
    -webkit-backdrop-filter: blur(8px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    z-index: 1000;
    padding: var(--spacing-md) 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.blog-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 60px; /* 明确设置导航栏高度 */
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 0;
    margin: 0;
}

.blog-header.scrolled {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%; /* 占满导航栏高度 */
    padding: 8px var(--spacing-md); /* 添加上下内边距 */
    gap: var(--spacing-lg);
    flex-wrap: nowrap; /* 强制不换行 */
    overflow: hidden; /* 防止溢出 */
}

.logo-section {
    flex-shrink: 0;
}

.site-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 0.05rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.site-tagline {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    font-weight: 500;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--spacing-md);
    margin: 0;
}

.nav-link {
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.9rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.nav-link:hover,
.nav-link.active {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-fast);
    z-index: 50;
}

.dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    list-style: none;
}

.dropdown-menu a {
    display: block;
    padding: var(--spacing-sm) var(--spacing-md);
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 500;
    transition: all var(--transition-fast);
    border-radius: calc(var(--radius-md) - 2px);
}

.dropdown-menu a:hover {
    background-color: rgba(255, 255, 255, 0.25);
    color: rgba(255, 255, 255, 1);
    transform: translateX(2px);
}

/* ===== 搜索容器样式 ===== */
.search-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-box {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    padding: 0.15rem;
}

.search-box form {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 0;
}

.search-input {
    border: none;
    background: transparent;
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
    color: #ffffff;
    font-weight: 500;
    outline: none;
    flex: 1;
    min-width: 120px;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-btn {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border: none;
    padding: 0.4rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-weight: 600;
    flex-shrink: 0;
}

.search-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.search-help-btn {
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.8);
    border: none;
    padding: 0.4rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 0.75rem;
    margin-left: 0.25rem;
}

.search-help-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
    transform: translateY(-1px);
}

.search-exit-btn {
    background: #ef4444;
    color: white;
    border: none;
    padding: 0.6rem 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 0.85rem;
    font-weight: 500;
    margin-left: 0.5rem;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.2);
}

.search-exit-btn:hover {
    background: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(239, 68, 68, 0.3);
}

/* ===== 高级搜索帮助弹窗样式 ===== */
.search-help-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.search-help-modal.show {
    opacity: 1;
    visibility: visible;
}

.search-help-modal .modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.search-help-modal .modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.search-help-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(147, 51, 234, 0.1));
    color: #1f2937;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.search-help-modal .modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.search-help-modal .modal-close {
    background: rgba(0, 0, 0, 0.05);
    border: none;
    color: #6b7280;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-help-modal .modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #374151;
    transform: scale(1.05);
}

.search-help-modal .modal-body {
    padding: 1.5rem;
}

.search-help-modal .help-section {
    margin-bottom: 1.5rem;
}

.search-help-modal .help-section:last-child {
    margin-bottom: 0;
}

.search-help-modal .help-section h4 {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    border-left: 4px solid var(--primary-color);
    padding-left: 0.75rem;
}

.search-help-modal .help-item {
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: rgba(249, 250, 251, 0.8);
    border-radius: var(--radius-md);
    border-left: 3px solid rgba(37, 99, 235, 0.3);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.search-help-modal .help-item:last-child {
    margin-bottom: 0;
}

.search-help-modal .help-item .help-item-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.search-help-modal .help-item strong {
    color: var(--primary-color);
    font-weight: 600;
    white-space: nowrap;
}

.search-help-modal .help-item code {
    background: rgba(37, 99, 235, 0.1);
    color: #1e40af;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid rgba(37, 99, 235, 0.2);
    word-break: break-all;
    flex: 1;
    min-width: 0;
}

.search-help-modal .help-item p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

.search-help-modal .help-example {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.search-help-modal .help-example code {
    display: block;
    background: var(--bg-dark);
    color: #10b981;
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    font-family: 'Courier New', monospace;
    margin-bottom: 0.5rem;
    word-break: break-all;
}

/* ===== 管理员功能区域样式 ===== */
.search-help-modal .admin-section {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding-top: 1rem;
    margin-top: 1rem;
}

.search-help-modal .admin-section h4 {
    color: #dc2626;
    border-left-color: #dc2626;
}

.search-help-modal .admin-controls {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.search-help-modal .admin-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

.search-help-modal .admin-btn:hover {
    background: linear-gradient(135deg, #b91c1c, #991b1b);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
}

.search-help-modal .admin-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.3);
}

.search-help-modal .admin-btn i {
    font-size: 0.85rem;
}

/* ===== 高级搜索模式UI样式 ===== */
.blog-header.advanced-search-mode .logo-section {
    display: none;
}

.blog-header.advanced-search-mode .header-content {
    flex-wrap: nowrap !important;
    gap: 0.5rem;
    padding: 8px var(--spacing-md);
}

.blog-header.advanced-search-mode .main-nav {
    justify-content: flex-start;
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.blog-header.advanced-search-mode .nav-menu {
    display: none;
}

.blog-header.advanced-search-mode .sort-controls.advanced-mode {
    order: -1;
    margin-right: 0;
    flex-shrink: 0;
    white-space: nowrap;
}

.blog-header.advanced-search-mode .search-container.advanced-mode {
    flex: 1;
    max-width: none;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.blog-header.advanced-search-mode .search-container.advanced-mode .search-box {
    flex: 1;
    min-width: 0;
}

.blog-header.advanced-search-mode .search-container.advanced-mode .search-input {
    width: 100%;
    min-width: 150px;
    flex: 1;
}

/* ===== 主要内容区域 ===== */
.main-content {
    padding: 0;
    /* 背景图片将通过JavaScript动态设置 */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    margin-top: 0; /* 移除顶部边距 */
    position: relative;
    z-index: 0;
    min-height: 100vh;
}

/* articles页面专用：为固定顶栏预留空间 */
.main-content.articles-page {
    padding-top: 80px; /* 顶栏60px + 20px额外间距 */
}

/* 首页不应用模糊效果 */

/* 仅在文章页面应用模糊和不透明度效果 */
.main-content.articles-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: -1;
}

.content-wrapper {
    display: block;
    padding: 0;
}

.main-column {
    min-width: 0;
}

/* ===== 欢迎轮播区域 ===== */
.welcome-carousel-section {
    margin-bottom: var(--spacing-2xl);
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    position: relative;
    height: 100vh; /* 占满整个视窗高度 */
}

.carousel-container {
    position: relative;
    overflow: hidden;
    height: 100%; /* 占满父容器高度 */
    width: 100%;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease-in-out;
    padding: 2rem;
    box-sizing: border-box;
}

.carousel-slide.active {
    opacity: 1;
    transform: translateY(0);
}

.slide-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 4px 8px rgba(0,0,0,0.6), 0 2px 4px rgba(0,0,0,0.4);
    line-height: 1.2;
}

.slide-subtitle {
    font-size: 1.2rem;
    font-weight: 300;
    margin-bottom: 1.5rem;
    opacity: 0.9;
    max-width: 600px;
    line-height: 1.6;
    text-shadow: 0 2px 6px rgba(0,0,0,0.5), 0 1px 3px rgba(0,0,0,0.3);
}

.slide-status {
    font-size: 1rem;
    font-weight: 500;
    padding: 0.5rem 1.5rem;
    background: rgba(255,100,150,0.3);
    border-radius: 25px;
    backdrop-filter: blur(15px) saturate(180%);
    border: 1px solid rgba(255,150,200,0.4);
    text-shadow: 0 1px 4px rgba(0,0,0,0.4);
    box-shadow: 0 4px 15px rgba(255,100,150,0.2);
}

/* ===== 中部内容区域 - 独占区域 ===== */
.central-content-area {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    position: relative;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(5px) saturate(180%);
    -webkit-backdrop-filter: blur(0.5px) saturate(180%);
    border-radius: var(--radius-lg);
    padding: var(--spacing-2xl);
    margin-top: var(--spacing-2xl);
    margin-bottom: 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* ===== 站长忠告栏目 ===== */
.webmaster-advice-section {
    margin-bottom: var(--spacing-2xl);
}

.advice-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

.advice-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px) saturate(180%);
    -webkit-backdrop-filter: blur(8px) saturate(180%);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all var(--transition-normal);
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
}

.advice-card:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.advice-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.advice-text h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.advice-text p {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.35);
    padding: var(--spacing-sm);
    border-radius: var(--radius-sm);
}

/* ===== 占位符文章卡片样式 ===== */
.placeholder-card {
    opacity: 0.6;
    position: relative;
}

.placeholder-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(255, 255, 255, 0.05) 10px,
        rgba(255, 255, 255, 0.05) 20px
    );
    border-radius: var(--radius-md);
    pointer-events: none;
}

.placeholder-card .article-title span {
    color: var(--text-secondary);
    font-style: italic;
}

.placeholder-card .article-category {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
}

.placeholder-card .placeholder-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-style: italic;
}

.placeholder-card:hover {
    transform: none;
    background: rgba(255, 255, 255, 0.08);
}

/* ===== 文章列表区域 ===== */
.articles-section {
    position: relative;
    z-index: 1;
}

.invisible-placeholder {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
    height: 0;
    visibility: hidden;
    opacity: 0;
}
.Placeholder {
    height: 20px; /* 大幅减少占位高度从80px到20px */
    width: 100px;
    opacity: 0;
}

.section-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
}

.section-line {
    flex: 1;
    height: 2px;
    background: linear-gradient(to right, var(--primary-color), transparent);
}

/* ===== 文章页面专用网格样式 ===== */
.articles-grid-page {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-sm); /* 减少间距从1rem到0.75rem */
    padding-bottom: var(--spacing-sm);
    min-height: auto; /* 移除固定最小高度，让内容自然撑开 */
}

.articles-grid-page::-webkit-scrollbar {
    height: 6px;
}

.articles-grid-page::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.articles-grid-page::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.articles-grid-page::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* ===== 主页文章推荐网格样式 ===== */
.articles-grid {
    display: flex;
    flex-wrap: nowrap; /* 改为不换行 */
    gap: var(--spacing-md);
    justify-content: flex-start;
    overflow-x: auto; /* 添加水平滚动 */
    overflow-y: hidden; /* 隐藏垂直滚动 */
    padding-bottom: 10px; /* 为滚动条留出空间 */
}

.articles-grid::-webkit-scrollbar {
    height: 6px;
}

.articles-grid::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.articles-grid::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.articles-grid::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.article-card {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(10px) saturate(180%);
    -webkit-backdrop-filter: blur(10px) saturate(180%);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all var(--transition-normal);
    border: 1px solid rgba(255, 255, 255, 0.2);
    flex: 0 0 260px; /* 固定宽度，不收缩不扩展 */
    height: 250px; /* 固定高度 */
    min-width: 260px; /* 确保最小宽度 */
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.75);
}

.article-image {
    position: relative;
    height: 130px; /* 压缩图片高度从140px到130px */
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.article-card:hover .article-image img {
    transform: scale(1.05);
}

/* 观看人数覆盖层 - 位于图片左下角 */
.article-views-overlay {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.article-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.article-card:hover .article-overlay {
    opacity: 1;
}

.read-more-btn {
    background: var(--primary-color);
    color: var(--text-white);
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 500;
    transition: background-color var(--transition-fast);
}

.read-more-btn:hover {
    background: var(--primary-hover);
}

.article-content {
    padding: var(--spacing-sm) var(--spacing-md); /* 减少上下内边距 */
    height: 120px; /* 调整内容区域高度以匹配卡片总高度 */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-sm);
}

.article-category {
    background: var(--primary-color);
    color: var(--text-white);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
}

.article-date {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 300; /* 设置为细体 */
}

.article-title {
    margin-bottom: var(--spacing-xs); /* 减少标题下边距 */
}

.article-title a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.05rem; /* 稍微减小标题字体 */
    font-weight: 700; /* 增加粗体 */
    line-height: 1.2; /* 进一步减小行高 */
    transition: color var(--transition-fast);
    display: -webkit-box;
    -webkit-line-clamp: 2; /* 限制标题最多2行 */
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-title a:hover {
    color: var(--primary-color);
}

.article-excerpt {
    color: var(--text-secondary);
    font-size: 0.8rem; /* 进一步减小摘要字体 */
    line-height: 1.4; /* 减小行高 */
    margin-bottom: var(--spacing-md);
    display: -webkit-box;
    -webkit-line-clamp: 2; /* 限制摘要最多2行 */
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.35);
    padding: var(--spacing-xs); /* 减小内边距 */
    border-radius: var(--radius-sm);
}

.article-stats {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.article-engagement-stats {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.article-engagement-stats .stat-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.7rem;
    color: var(--text-muted);
    transition: color 0.2s ease;
    background: transparent;
    border: none;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
}

.article-engagement-stats .stat-item:hover {
    color: var(--primary-color);
    background: rgba(var(--primary-color-rgb), 0.1);
}

.article-engagement-stats .stat-item i {
    font-size: 0.65rem;
}

.article-stats span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* 排序控制按钮样式 */
.sort-controls {
    display: flex;
    align-items: center;
    margin: 0 1rem;
}

.sort-buttons {
    display: flex;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.25rem;
    border-radius: var(--radius-md);
    backdrop-filter: blur(10px);
}

.sort-btn {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 0.75rem;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.sort-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

.sort-btn.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.sort-btn i {
    font-size: 0.75rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sort-controls {
        margin: 0.5rem 0;
        order: 3;
        width: 100%;
        justify-content: center;
    }
    
    .sort-buttons {
        width: 100%;
        justify-content: space-around;
    }
    
    .sort-btn {
        flex: 1;
        justify-content: center;
        padding: 0.4rem 0.5rem;
        font-size: 0.75rem;
    }
}

/* 发稿时间样式 - 改为细体 */
.article-publish-date {
    font-weight: 300 !important; /* 改为细体 */
    color: var(--text-primary) !important;
    font-size: 0.75rem !important; /* 减小字体 */
    margin-top: var(--spacing-xs); /* 减少上边距 */
}

.no-articles {
    text-align: center;
    padding: var(--spacing-2xl);
    color: var(--text-muted);
}

.no-articles i {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
    opacity: 0.5;
}

/* ===== 分页导航 ===== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
    margin-top: var(--spacing-2xl);
}

.page-btn {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--bg-primary);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    transition: all var(--transition-fast);
}

.page-btn:hover {
    background: var(--primary-color);
    color: var(--text-white);
    border-color: var(--primary-color);
}

.page-numbers {
    display: flex;
    gap: 0.25rem;
}

.page-num {
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--bg-primary);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    transition: all var(--transition-fast);
}

.page-num:hover,
.page-num.active {
    background: var(--primary-color);
    color: var(--text-white);
    border-color: var(--primary-color);
}

.page-dots {
    padding: var(--spacing-sm) var(--spacing-md);
    color: var(--text-muted);
}

/* ===== 发帖界面样式 ===== */
.post-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.post-editor-section {
    padding: 20px 0;
}

.post-form {
    width: 100%;
}

/* Markdown编辑器工具栏 */
.markdown-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    border-bottom: none;
}

.toolbar-group {
    display: flex;
    gap: 4px;
}

.markdown-toolbar .btn {
    padding: 6px 10px;
    font-size: 12px;
    border: 1px solid var(--border-color);
    background: white;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.markdown-toolbar .btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Markdown编辑器 */
.markdown-editor {
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    border-top: none;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    min-height: 400px;
}

.markdown-editor:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* 预览区域 */
.preview-toggle {
    margin-bottom: 10px;
}

.markdown-preview {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: white;
    max-height: 500px;
    overflow-y: auto;
}

.preview-content {
    padding: 20px;
}

/* 右侧设置卡片 */
.settings-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.settings-card .card-header {
    background: var(--bg-secondary);
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
}

.settings-card .card-header h6 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.settings-card .card-body {
    padding: 16px;
}

/* 表单样式增强 */
.post-form .form-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
    display: block;
    font-size: 14px;
}

.post-form .form-label i {
    margin-right: 6px;
    color: var(--primary-color);
}

.post-form .form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    transition: all 0.2s ease;
    background: white;
}

.post-form .form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.post-form .form-control::placeholder {
    color: var(--text-muted);
}

/* 按钮样式增强 */
.post-form .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    gap: 6px;
}

.post-form .btn-primary {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.post-form .btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
}

.post-form .btn-secondary {
    background: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
}

.post-form .btn-secondary:hover {
    background: #475569;
    border-color: #475569;
}

.post-form .btn-outline-primary {
    background: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.post-form .btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
}

.post-form .btn-outline-secondary {
    background: transparent;
    color: var(--secondary-color);
    border-color: var(--border-color);
}

.post-form .btn-outline-secondary:hover {
    background: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
}

.post-form .btn-block {
    width: 100%;
}

.post-form .btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* 语法帮助 */
.syntax-help {
    font-size: 12px;
}

.help-item {
    margin-bottom: 8px;
    padding: 6px 0;
    border-bottom: 1px solid var(--border-light);
}

.help-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.help-item strong {
    color: var(--primary-color);
    display: inline-block;
    width: 50px;
}

/* 响应式布局 */
@media (max-width: 768px) {
    .markdown-toolbar {
        flex-direction: column;
        gap: 8px;
    }
    
    .toolbar-group {
        justify-content: center;
    }
    
    .post-form .col-md-8, 
    .post-form .col-md-4 {
        width: 100%;
        margin-bottom: 20px;
    }
}

/* 工具提示 */
.markdown-toolbar .btn[title] {
    position: relative;
}

.markdown-toolbar .btn[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    z-index: 1000;
    margin-bottom: 5px;
}

/* 文本危险色 */
.text-danger {
    color: #dc2626;
}

/* 间距工具类 */
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 24px; }

/* 行布局 */
.post-form .row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.post-form .col-md-8 {
    flex: 0 0 66.666667%;
    max-width: 66.666667%;
    padding: 0 15px;
}

.post-form .col-md-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
    padding: 0 15px;
}

/* ===== 底部栏 ===== */
.blog-footer {
    background: var(--text-primary);
    color: var(--text-white);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-2xl);
    padding: var(--spacing-2xl) 0;
}

.footer-section {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.footer-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    color: var(--text-white);
}

.footer-text {
    color: #cbd5e1;
    line-height: 1.6;
}

.social-links {
    display: flex;
    gap: var(--spacing-md);
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-white);
    border-radius: 50%;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.social-link:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.footer-links a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--text-white);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: var(--spacing-lg) 0;
    text-align: center;
}

.copyright {
    color: #94a3b8;
    font-size: 0.875rem;
}

.copyright p {
    margin: 0.25rem 0;
}

/* ===== 回到顶部按钮 ===== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: var(--text-white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition-normal);
    z-index: 100;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

/* ===== 响应式设计 ===== */
@media (max-width: 1024px) {
    .content-wrapper {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }
    
    .featured-post {
        grid-template-columns: 1fr;
    }
    
    .featured-image {
        height: 200px;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: var(--spacing-lg);
        text-align: center;
    }
    
    .main-nav {
        flex-direction: column;
        gap: var(--spacing-md);
        width: 100%;
    }
    
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .search-input {
        width: 150px;
    }
    
    .articles-grid {
        /* 移除响应式的grid-template-columns设置，保持flex布局 */
        flex-wrap: nowrap;
        overflow-x: auto;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    .main-content {
        padding: 0;
    }
    
    .featured-content {
        padding: var(--spacing-lg);
    }
    
    .article-content {
        padding: var(--spacing-md);
    }
    
    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
    }
}

/* ===== 加载动画 ===== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.8s ease-out, visibility 0.8s ease-out;
    font-family: var(--font-mono);
}

.loading-screen.fade-out,
.loading-screen[style*="display: none"] {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.loading-screen.warp-effect {
    animation: warpTransition 1s ease-in-out forwards;
}

.terminal-container {
    width: 80%;
    max-width: 800px;
    background: #000;
    color: #00ff00;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.4;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
    transform-origin: center center;
}

.loading-screen.warp-effect .terminal-container {
    animation: terminalWarp 1s ease-in-out forwards;
}

.terminal-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #333;
}

.terminal-buttons {
    display: flex;
    gap: 8px;
    margin-right: 15px;
}

.terminal-button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.terminal-button.close { background: #ff5f56; }
.terminal-button.minimize { background: #ffbd2e; }
.terminal-button.maximize { background: #27ca3f; }

.terminal-title {
    color: #888;
    font-size: 12px;
}

.terminal-content {
    min-height: 200px;
}

.terminal-line {
    opacity: 0;
    animation: typewriter 0.8s ease-out forwards;
    margin-bottom: 4px;
}

.terminal-line:nth-child(1) { animation-delay: 0.2s; }
.terminal-line:nth-child(2) { animation-delay: 0.6s; }
.terminal-line:nth-child(3) { animation-delay: 1.0s; }
.terminal-line:nth-child(4) { animation-delay: 1.4s; }
.terminal-line:nth-child(5) { animation-delay: 1.8s; }
.terminal-line:nth-child(6) { animation-delay: 2.2s; }
.terminal-line:nth-child(7) { animation-delay: 2.6s; }

.terminal-cursor {
    display: inline-block;
    width: 8px;
    height: 16px;
    background: #00ff00;
    animation: blink 1s infinite;
    margin-left: 2px;
}

.boot-progress {
    color: #00ff00;
}

.boot-ok {
    color: #00ff00;
}

.boot-info {
    color: #0099ff;
}

.boot-warning {
    color: #ffaa00;
}

@keyframes typewriter {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

@keyframes warpTransition {
    0% {
        transform: scale(1);
        opacity: 1;
        background: #000;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.8;
        background: #111;
        filter: blur(2px);
    }
    80% {
        transform: scale(2.5);
        opacity: 0.3;
        background: #222;
        filter: blur(8px);
    }
    100% {
        transform: scale(10);
        opacity: 0;
        background: #000;
        filter: blur(20px);
    }
}

@keyframes terminalWarp {
    0% {
        transform: scale(1) perspective(1000px) rotateX(0deg);
        opacity: 1;
        filter: brightness(1);
    }
    30% {
        transform: scale(1.1) perspective(1000px) rotateX(5deg);
        opacity: 0.9;
        filter: brightness(1.2);
    }
    60% {
        transform: scale(1.5) perspective(1000px) rotateX(15deg);
        opacity: 0.6;
        filter: brightness(1.5) blur(2px);
    }
    80% {
        transform: scale(3) perspective(1000px) rotateX(30deg);
        opacity: 0.2;
        filter: brightness(2) blur(5px);
    }
    100% {
        transform: scale(8) perspective(1000px) rotateX(60deg);
        opacity: 0;
        filter: brightness(3) blur(15px);
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.main-content-wrapper {
    opacity: 0;
    transition: opacity 0.5s ease-in;
    background-color: transparent;
    position: relative;
    z-index: 1;
}

.main-content-wrapper.show {
    opacity: 1;
}

/* ===== 分类页面样式 ===== */
.glass-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all var(--transition-normal);
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.category-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.3);
}

.category-icon i {
    font-size: 2rem;
    color: white;
}

.breadcrumb {
    background: transparent;
    padding: 0;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: ">";
    color: var(--text-muted);
    font-weight: bold;
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.breadcrumb-item a:hover {
    color: var(--primary-hover);
}

.breadcrumb-item.active {
    color: var(--text-secondary);
}

/* 分页样式 */
.pagination {
    gap: 0.5rem;
}

.page-link {
    border: none;
    padding: 0.75rem 1rem;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.page-link:hover {
    transform: translateY(-1px);
}

.btn-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    border: none;
    color: white;
}

/* 侧边栏样式 */
.sidebar .list-group-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.sidebar .list-group-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.sidebar .list-group-item.active {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    border-color: var(--primary-color);
}

.badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    .header-content {
        flex-direction: column;
        gap: var(--spacing-sm);
        height: auto;
        padding: var(--spacing-sm);
    }
    
    .blog-header {
        height: auto;
        position: relative;
    }
    
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .search-box {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    .main-content {
        padding: 0;
    }
    
    .featured-content {
        padding: var(--spacing-lg);
    }
    
    .article-content {
        padding: var(--spacing-md);
    }
    
    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
    }
}

/* ===== 加载动画 ===== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.8s ease-out, visibility 0.8s ease-out;
    font-family: var(--font-mono);
}

.loading-screen.fade-out,
.loading-screen[style*="display: none"] {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.loading-screen.warp-effect {
    animation: warpTransition 1s ease-in-out forwards;
}

.terminal-container {
    width: 80%;
    max-width: 800px;
    background: #000;
    color: #00ff00;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.4;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
    transform-origin: center center;
}

.loading-screen.warp-effect .terminal-container {
    animation: terminalWarp 1s ease-in-out forwards;
}

.terminal-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #333;
}

.terminal-buttons {
    display: flex;
    gap: 8px;
    margin-right: 15px;
}

.terminal-button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.terminal-button.close { background: #ff5f56; }
.terminal-button.minimize { background: #ffbd2e; }
.terminal-button.maximize { background: #27ca3f; }

.terminal-title {
    color: #888;
    font-size: 12px;
}

.terminal-content {
    min-height: 200px;
}

.terminal-line {
    opacity: 0;
    animation: typewriter 0.8s ease-out forwards;
    margin-bottom: 4px;
}

.terminal-line:nth-child(1) { animation-delay: 0.2s; }
.terminal-line:nth-child(2) { animation-delay: 0.6s; }
.terminal-line:nth-child(3) { animation-delay: 1.0s; }
.terminal-line:nth-child(4) { animation-delay: 1.4s; }
.terminal-line:nth-child(5) { animation-delay: 1.8s; }
.terminal-line:nth-child(6) { animation-delay: 2.2s; }
.terminal-line:nth-child(7) { animation-delay: 2.6s; }

.terminal-cursor {
    display: inline-block;
    width: 8px;
    height: 16px;
    background: #00ff00;
    animation: blink 1s infinite;
    margin-left: 2px;
}

.boot-progress {
    color: #00ff00;
}

.boot-ok {
    color: #00ff00;
}

.boot-info {
    color: #0099ff;
}

.boot-warning {
    color: #ffaa00;
}

@keyframes typewriter {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

@keyframes warpTransition {
    0% {
        transform: scale(1);
        opacity: 1;
        background: #000;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.8;
        background: #111;
        filter: blur(2px);
    }
    80% {
        transform: scale(2.5);
        opacity: 0.3;
        background: #222;
        filter: blur(8px);
    }
    100% {
        transform: scale(10);
        opacity: 0;
        background: #000;
        filter: blur(20px);
    }
}

@keyframes terminalWarp {
    0% {
        transform: scale(1) perspective(1000px) rotateX(0deg);
        opacity: 1;
        filter: brightness(1);
    }
    30% {
        transform: scale(1.1) perspective(1000px) rotateX(5deg);
        opacity: 0.9;
        filter: brightness(1.2);
    }
    60% {
        transform: scale(1.5) perspective(1000px) rotateX(15deg);
        opacity: 0.6;
        filter: brightness(1.5) blur(2px);
    }
    80% {
        transform: scale(3) perspective(1000px) rotateX(30deg);
        opacity: 0.2;
        filter: brightness(2) blur(5px);
    }
    100% {
        transform: scale(8) perspective(1000px) rotateX(60deg);
        opacity: 0;
        filter: brightness(3) blur(15px);
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.main-content-wrapper {
    opacity: 0;
    transition: opacity 0.5s ease-in;
    background-color: transparent;
    position: relative;
    z-index: 1;
}

.main-content-wrapper.show {
    opacity: 1;
}

/* ===== 全局滚动条液态玻璃效果 ===== */
/* 主滚动条 */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.2) 0%, 
        rgba(255, 255, 255, 0.15) 50%, 
        rgba(255, 255, 255, 0.1) 100%);
    border-radius: 10px;
    backdrop-filter: blur(15px) saturate(180%);
    -webkit-backdrop-filter: blur(15px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.3) 0%, 
        rgba(255, 255, 255, 0.25) 50%, 
        rgba(255, 255, 255, 0.2) 100%);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    transform: scale(1.05);
}

::-webkit-scrollbar-thumb:active {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.4) 0%, 
        rgba(255, 255, 255, 0.35) 50%, 
        rgba(255, 255, 255, 0.3) 100%);
    transform: scale(0.95);
}

::-webkit-scrollbar-corner {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Firefox滚动条样式 */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) rgba(255, 255, 255, 0.05);
}

/* 针对特定容器的滚动条优化 */
.articles-grid::-webkit-scrollbar {
    height: 8px;
}

.articles-grid::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.articles-grid::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.25) 0%, 
        rgba(255, 255, 255, 0.2) 50%, 
        rgba(255, 255, 255, 0.15) 100%);
    border-radius: 6px;
    backdrop-filter: blur(12px) saturate(150%);
    -webkit-backdrop-filter: blur(12px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.articles-grid::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.35) 0%, 
        rgba(255, 255, 255, 0.3) 50%, 
        rgba(255, 255, 255, 0.25) 100%);
}

/* ===== 加载指示器样式 ===== */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-lg);
    margin: var(--spacing-lg) 0;
}

.loading-indicator .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: var(--spacing-sm);
}

.loading-indicator p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin: 0;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== 分页按钮样式优化 ===== */
.pagination button {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.pagination button:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.pagination button.active {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    font-weight: 600;
}

/* ===== 响应式布局优化 ===== */
@media (max-width: 1200px) {
    .articles-grid-page {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .articles-grid-page {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-sm);
    }
}

@media (max-width: 480px) {
    .articles-grid-page {
        grid-template-columns: 1fr;
    }
    
    .pagination {
        flex-wrap: wrap;
        gap: var(--spacing-xs);
    }
    
    .page-numbers {
        order: 3;
        width: 100%;
        justify-content: center;
        margin-top: var(--spacing-xs);
    }
}

/* ===== 文章页分页底部间距 ===== */
.articles-page-pagination {
    margin-top: var(--spacing-lg); /* 减少顶部间距从2xl到lg */
    margin-bottom: var(--spacing-lg); /* 减少底部间距从2xl到lg */
    padding-bottom: var(--spacing-md); /* 减少底部内边距从xl到md */
}

/* ===== 搜索结果样式 ===== */
.search-match-info {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-sm);
    padding: var(--spacing-xs) var(--spacing-sm);
    background: rgba(37, 99, 235, 0.1);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    color: var(--text-secondary);
    border-left: 3px solid var(--primary-color);
}

.search-match-info i {
    color: var(--primary-color);
    font-size: 0.75rem;
}

.search-match-content {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.4;
}

.search-highlight {
    background: rgba(255, 235, 59, 0.3);
    color: var(--text-primary);
    padding: 0.125rem 0.25rem;
    border-radius: var(--radius-xs);
    font-weight: 500;
}

/* ===== 底部透明间隔 ===== */
.bottom-spacer {
    height: 1px;
    background: transparent;
    width: 100%;
}

/* ===== 亚克力风格按钮 ===== */
.btn-acrylic {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 0.6rem 1.2rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1), 
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.btn-acrylic::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.btn-acrylic:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15), 
                inset 0 1px 0 rgba(255, 255, 255, 0.3);
    color: #ffffff;
}

.btn-acrylic:hover::before {
    left: 100%;
}

.btn-acrylic:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1), 
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* ===== Markdown 解析容器样式（.md-doc） - 使用共用样式文件 ===== */
/* .md-doc 样式由 md-content-styles.css 提供，此处不再重复定义 */

/* ===== 我的页面样式 ===== */
.my-page {
    animation: none !important;
    min-height: 100vh;
    position: relative;
}

.my-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 1;
    pointer-events: none;
}

.user-profile-section {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.profile-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px) saturate(180%);
    -webkit-backdrop-filter: blur(8px) saturate(180%);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all var(--transition-normal);
}

.profile-header {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
    flex-wrap: wrap;
}

.avatar-section {
    flex-shrink: 0;
}

.user-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.2);
    object-fit: cover;
}

.user-info {
    flex: 1;
    min-width: 200px;
}

.username {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

/* 邮箱悬停显示功能 */
.user-email {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: var(--spacing-xs);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.user-email:hover .email-display {
    display: none;
}

.user-email:hover .email-real {
    display: inline !important;
}

.user-role {
    color: var(--primary-color);
    font-size: 0.85rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    display: inline-block;
}

.logout-section {
    margin-left: auto;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

.stat-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1rem;
    flex-shrink: 0;
}

.stat-info h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: #ffffff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    margin-bottom: 2px;
}

.stat-info p {
    font-size: 0.9rem;
    color: #ffffff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    font-weight: 500;
}

.registration-time {
    color: #ffffff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

/* ===== 发帖按钮样式 ===== */
.post-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.post-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.4);
    background: linear-gradient(135deg, var(--primary-hover), var(--primary-color));
    color: white;
    text-decoration: none;
}

.post-button i {
    font-size: 0.85rem;
}

/* ===== 管理员按钮容器样式 ===== */
.admin-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.admin-db-button {
    background: linear-gradient(135deg, #059669, #047857);
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.3);
}

.admin-db-button:hover {
    background: linear-gradient(135deg, #047857, #059669);
    box-shadow: 0 4px 16px rgba(5, 150, 105, 0.4);
    color: white;
    text-decoration: none;
}

/* ===== 历史记录卡片样式 ===== */
.history-card.profile-card {
    margin-top: var(--spacing-xl);
    position: relative;
    z-index: 3; /* 提升层级确保清晰显示 */
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.card-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.card-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #ffffff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    margin: 0;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.card-header i {
    color: var(--primary-color);
    font-size: 1.1rem;
}

/* ===== 历史记录标签页 ===== */
.history-tabs {
    display: flex;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-lg);
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    padding: 0.25rem;
}

.tab-button {
    flex: 1;
    padding: var(--spacing-sm) var(--spacing-md);
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: center;
}

.tab-button.active {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.tab-button:hover:not(.active) {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.9);
}

/* ===== 标签页内容 ===== */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn var(--transition-fast);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== 隐私设置开关 ===== */
.privacy-toggle {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    margin-left: auto;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    cursor: pointer;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: var(--transition-normal);
    border-radius: 12px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: var(--transition-normal);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

.toggle-label {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
    white-space: nowrap;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-lg);
}

.card-header h3 {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin: 0;
}

/* ===== 历史记录列表 ===== */
.history-list {
    max-height: 400px;
    overflow-y: auto;
    padding-right: var(--spacing-xs);
}

.history-list::-webkit-scrollbar {
    width: 4px;
}

.history-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.history-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.history-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* ===== 历史记录项 ===== */
.history-item {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-sm);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    transition: all var(--transition-fast);
    will-change: transform, background, box-shadow;
}

.history-item:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateX(4px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
}

.history-item:last-child {
    margin-bottom: 0;
}

.history-icon {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 0.9rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.history-info {
    flex: 1;
    min-width: 0;
}

.history-info h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 var(--spacing-xs) 0;
    line-height: 1.4;
}

.history-info h4 a {
    color: #ffffff;
    text-decoration: none;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    transition: all var(--transition-fast);
}

.history-info h4 a:hover {
    color: var(--primary-color);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.history-meta {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    flex-wrap: wrap;
    margin-top: var(--spacing-xs);
}

.view-time {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.view-duration {
    color: var(--primary-color);
    font-weight: 500;
}

/* ===== 空状态样式 ===== */
.empty-state {
    text-align: center;
    padding: var(--spacing-2xl);
    color: rgba(255, 255, 255, 0.6);
}

.empty-state i {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-md);
    opacity: 0.5;
    color: rgba(255, 255, 255, 0.4);
}

.empty-state p {
     font-size: 0.9rem;
     margin: 0;
 }
 
/* ===== 收藏夹卡片样式 ===== */
.favorites-card {
    margin-top: var(--spacing-lg);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    z-index: 10;
    position: relative;
}

.favorites-list {
    max-height: 400px;
    overflow-y: auto;
    padding-right: var(--spacing-xs);
}

.favorites-list::-webkit-scrollbar {
    width: 4px;
}

.favorites-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.favorites-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.favorites-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* ===== 收藏项样式 ===== */
.favorite-item {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-sm);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all var(--transition-fast);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.favorite-item:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateX(4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.favorite-item:last-child {
    margin-bottom: 0;
}

.favorite-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
    flex-shrink: 0;
    margin-top: 2px;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

.favorite-info {
    flex: 1;
    min-width: 0;
}

.favorite-info h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 var(--spacing-xs) 0;
    line-height: 1.4;
}

.favorite-info h4 a {
    color: #ffffff;
    text-decoration: none;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    transition: all var(--transition-fast);
}

.favorite-info h4 a:hover {
    color: #ff6b6b;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.favorite-excerpt {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.4;
    margin: var(--spacing-xs) 0;
    background: rgba(255, 255, 255, 0.05);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    border-left: 2px solid #ff6b6b;
}

.favorite-meta {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    flex-wrap: wrap;
    margin-top: var(--spacing-xs);
}

.favorite-time {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.favorite-stats {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.favorite-stats i {
    font-size: 0.75rem;
}

/* ===== 历史记录卡片底边距 ===== */
.history-card {
    margin-bottom: var(--spacing-xl);
}

/* ===== 用户页面专用底部间隔 ===== */
.bottom-spacer-my {
    height: 1px;
    background: transparent;
    width: 100%;
    margin-top: var(--spacing-2xl);
}

 .profile-bio {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-bio h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.profile-bio p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.profile-details {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.detail-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.detail-item i {
    color: var(--primary-color);
    width: 16px;
}

.detail-item a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.detail-item a:hover {
    color: var(--text-primary);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .profile-header {
        flex-direction: column;
        text-align: center;
    }
    
    .logout-section {
        margin-left: 0;
        align-self: center;
    }
    
    .profile-stats {
        grid-template-columns: 1fr;
    }
}

/* ===== 文章卡片响应式优化 ===== */
@media (max-width: 768px) {
    .article-card {
        flex: 0 0 220px; /* 在小屏幕上稍微减小宽度 */
        min-width: 220px;
        height: 230px; /* 稍微减小高度 */
    }
    
    .article-image {
        height: 120px; /* 减小图片高度 */
    }
}

@media (max-width: 480px) {
    .article-card {
        flex: 0 0 200px; /* 在更小屏幕上进一步减小宽度 */
        min-width: 200px;
        height: 220px; /* 进一步减小高度 */
    }
    
    .article-image {
        height: 110px; /* 进一步减小图片高度 */
    }
    
    .article-content {
        padding: var(--spacing-sm); /* 减小内边距 */
    }
}

/* ===== 删除评论样式 ===== */
.comment-author.deleted,
.comment-content.deleted {
    color: #999999 !important;
    font-style: italic;
}

.comment-item .comment-content.deleted {
    opacity: 0.7;
}

.comment-actions button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.comment-images img[src*="img_del.svg"] {
    filter: grayscale(100%);
    opacity: 0.6;
}

.reply-item .comment-author.deleted,
.reply-item .comment-content.deleted {
    color: #999999 !important;
    font-style: italic;
}