/*
Theme Name: PurpleDream
Theme URI: https://mcyanyu.com/theme-demo/
Author: 卿梦
Author URI: https://mcyanyu.com/
Description: PurpleDream是一款现代、简洁且功能丰富的WordPress主题，适合博客、个人网站和内容创作者。
Version: 1.0.0
*/


:root {
    --primary-color: #54a4f3;
    --text-color: #333;
    --text-secondary:#615f5f;
    --bg-color: #fff;
    --secondary-bg: #f5f5f5;
    --border-color: #eee;
    --strong-color:#54a4f3;
    --header-height: 60px;
    --container-width: 1460px;
    --spacing: 20px;
    --code-bg-color: #c5c2c2;
    --code-text-color: #fff;
}

/* 暗色模式变量 */
[data-theme="dark"] {
    --text-color: #e1e1e1;
    --bg-color: #1a1a1a;
    --secondary-bg: #2d2d2d;
    --border-color: #3d3d3d;
    --code-bg-color: #3b3939; 
    --code-text-color: #e1e1e1;
    --strong-color:#e9aa34;
}

/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
 
a{
    text-decoration: none;
}
li{
    list-style: none;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--secondary-bg);
}

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

/* 头部样式 */
.site-header {
    background: var(--bg-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

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

/* Logo和导航放在同一边 */
.header-left {
    display: flex;
    align-items: center;
    gap: 40px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.site-logo{
    margin-left: 0;
    font-weight: 600;
    position: relative;
}
.footer-logo{
    margin-right: 120px;
}
.site-logo h1 a,
.footer-logo h1 a {
    font-size: 1.4rem;
    color: var(--primary-color);
    position: relative;
    transition: all 0.3s ease;
}

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

.site-logo h1 a:hover::after {
    width: 100%;
}

/* 最简洁的导航样式 */
.main-navigation {
    position: relative;
}

.main-navigation ul {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
}

.main-navigation li {
    position: relative;
}

.main-navigation a {
    color: var(--text-color);
    text-decoration: none;
    padding: 8px 0;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    position: relative;
    display: block;
    white-space: nowrap;
}

.main-navigation a:hover,
.main-navigation a.active {
    color: var(--primary-color);
}


.header-icon-tooltip {
  position: relative;
  display: inline-block;
}
.header-icon-tooltip .tooltip {
  display: none;
  position: absolute;
  top: 120%;
  left: 50%;
  transform: translateX(-50%);
  background: #f5f5f5;
  color: #333;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 16px;
  white-space: nowrap;
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
  font-size: 16px;
  font-weight: 400;        
  border: 1px solid #e0e0e0; 
}
.header-icon-tooltip:hover .tooltip {
  display: block;
  opacity: 1;
}
.header-icon-tooltip .tooltip::after {
  content: '';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: #f5f5f5 transparent transparent transparent;
}
[data-theme="dark"] .header-icon-tooltip .tooltip {
  background: #fff;
  color: #23272e;
  border: 1px solid #d0d0d0; 
}
[data-theme="dark"] .header-icon-tooltip .tooltip::after {
  border-color: #fff transparent transparent transparent;
}

/* 最简洁的功能按钮样式 */
.header-tools {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-tools i {
    font-size: 18px;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.header-tools button {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    padding: 8px;
    transition: color 0.3s ease;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    min-height: 32px;
}

.header-tools button:hover {
    color: var(--primary-color);
}

.header-tools button:hover i {
    color: var(--primary-color);
}

.mobile-menu-toggle{
    display: none;
}

.scroll-progress-bubble {
    position: relative;
    right: auto;
    bottom: auto;
    margin-left: 10px;
    min-width: 44px;
    min-height: 28px;
    background: #23272e;
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    border-radius: 16px;
    display: none; /* 默认隐藏，JS控制显示 */
    align-items: center;
    justify-content: center;
    z-index: 1;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: background 0.2s, color 0.2s;
    cursor: pointer;
    user-select: none;
    padding: 0 12px;
}
.scroll-progress-bubble.show {
    display: flex;
}
.scroll-progress-bubble.top {
    background: #23272e;
    color: #fff;
}

/* 最简洁的登录注册按钮 */
.auth-buttons {
    display: flex;
    gap: 15px;
}

.auth-btn {
    padding: 6px 0;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.3s ease;
    background: none;
    border: none;
    color: var(--text-color);
}

.login-btn:hover {
    color: var(--primary-color);
}

.register-btn {
    color: var(--primary-color);
}

.register-btn:hover {
    color: #6b36b3;
}

/* 登录注册弹窗样式 */
.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1100;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.auth-modal.active {
    display: flex;
    opacity: 1;
}

.auth-container {
    background: var(--bg-color);
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    position: relative;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
}

.auth-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
    transition: all 0.3s ease;
}

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

.auth-title {
    font-size: 1.5rem;
    color: var(--text-color);
    margin-bottom: 20px;
    text-align: center;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.auth-form input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 14px;
    transition: all 0.3s ease;
}

.auth-form input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(124, 63, 204, 0.1);
}

.auth-form button {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: var(--primary-color);
    color: white;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.auth-form button:hover {
    background: #6b36b3;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(124, 63, 204, 0.2);
}

.auth-links {
    margin-top: 15px;
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
}

.auth-links a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.auth-links a:hover {
    color: #6b36b3;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .auth-buttons {
        margin-right: 10px;
    }
    
    .auth-btn {
        padding: 5px 12px;
        font-size: 13px;
    }
    
    .auth-container {
        padding: 20px;
        width: 95%;
    }
    
    .auth-title {
        font-size: 1.3rem;
        margin-bottom: 15px;
    }
    
    .auth-form input,
    .auth-form button {
        padding: 10px;
        font-size: 14px;
    }
}

/* 主导航样式调整 */
.main-navigation {
    position: relative;
}

/* 最简洁的子菜单样式 */
.main-navigation .sub-menu {
    position: absolute;
    top: calc(100% + 12px);
    left: -50px;
    background: var(--bg-color);
    min-width: 130px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(5px);
    transition: all 0.3s ease;
    z-index: 100;
    border-radius: 4px;
    padding: 8px 0;
    border: 1px solid var(--border-color);
}


/* 最简洁的子菜单项样式 */
.main-navigation .sub-menu li {
    display: block;
    width: 100%;
    padding: 0;
}

.main-navigation .sub-menu a {
    padding: 10px 16px;
    display: block;
    color: var(--text-color);
    font-size: 0.9rem;
    white-space: nowrap;
    transition: color 0.3s ease;
}

.main-navigation .sub-menu a:hover {
    color: var(--primary-color);
}

/* 显示子菜单 */
.main-navigation li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* 暗色模式适配 */
[data-theme="dark"] .main-navigation .sub-menu {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

/* 多级子菜单 */
.main-navigation .sub-menu .sub-menu {
    left: calc(100% + 4px);
    top: 0;
    transform: translateX(10px);
}

.main-navigation .sub-menu .sub-menu:hover {
    transform: translateX(0);
}

/* 取消下拉箭头 */
.main-navigation li.menu-item-has-children > a:after {
    display: none;
}

/* PC端导航响应式优化 */
@media (max-width: 1200px) {
    .main-navigation {
        margin: 0 20px;
    }
    
    .main-navigation a {
        padding: 10px 18px;
        font-size: 0.85rem;
    }
}

@media (max-width: 992px) {
    .main-navigation {
        margin: 0 15px;
    }
    
    .main-navigation a {
        padding: 8px 16px;
        font-size: 0.8rem;
    }
    
    .main-navigation ul {
        gap: 2px;
        padding: 4px;
    }
}

/* 移动端导航样式保持不变 */
@media (max-width: 768px) {
    .main-navigation {
        display: none !important;
    }
    
    .main-navigation .sub-menu {
        position: static;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        padding-left: 20px;
        background: transparent;
    }
    
    .main-navigation .sub-menu a {
        padding: 8px 0;
    }
    
    .header-tools {
        gap: 15px;
    }
    
    .header-tools button {
        min-width: 32px;
        min-height: 32px;
        padding: 6px;
    }
}

/* 主要内容区域 */
.site-main {
    margin-top: var(--header-height);
    min-height: calc(100vh - var(--header-height) - 200px);
}

.content-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 20px; 
}

/* 文章卡片样式 */
.posts-grid {
    column-count: 3;
    column-gap: 20px;
}

.post-card {
    break-inside: avoid;
    margin-bottom: 20px;
    display: inline-block;
    width: 100%;
    background: var(--bg-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.post-thumbnail {
    position: relative;
    padding-top: 60%;
}

.post-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-categories {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 1;
}

.post-categories a {
    display: inline-block;
    padding: 5px 12px;
    background: var(--primary-color);
    color: white;
    font-size: 0.85rem;
    border-radius: 15px;
    text-decoration: none;
    transition: all 0.3s;
}

.post-categories a:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(124, 63, 204, 0.2);
}

.post-content {
    padding: 20px;
}

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

.post-title a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s;
}

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

.post-meta {
    display: flex;
    gap: 15px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 12px;
}

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

.post-meta span a{
    color: var(--text-secondary);
}
.post-meta i {
    font-size: 0.9rem;
    opacity: 0.7;
}

.post-excerpt {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* 加载更多按钮样式 */
.load-more-wrapper {
    width: 100%;
    text-align: center;
    margin: 30px auto;
}

.load-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 15px; 
    color: var(--text-color);
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.load-more-btn:hover {
    color: var(--bg-color);
    background: var(--primary-color);
}

.load-more-btn .loading {
    display: none;
    margin-left: 8px;
}

.load-more-btn.loading .text {
    opacity: 0.7;
}

.load-more-btn.loading .loading {
    display: inline-block;
}

/* 加载动画 */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.load-more-btn .loading i {
    animation: spin 1s linear infinite;
}


/* 暗色主题适配 */
[data-theme="dark"] .post-card {
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .post-card:hover {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

/* PC端暗色模式导航适配 */
[data-theme="dark"] .site-header {
    background: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
}

/* 侧边栏样式 */
.sidebar{
    position: sticky;
    height: fit-content;
    top: 70px;
}
.sidebar .widget {
    background: var(--bg-color);
    border-radius: 8px;
    padding: var(--spacing);
    margin-bottom: var(--spacing);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.widget-title {
    color: var(--text-color);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}




.search-form {
    display: flex;
    gap: 10px;
}

.search-form input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-color);
    color: var(--text-color);
}

.search-form button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
}

/* 侧边栏分类目录两列分布 */
.category-widget ul {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 16px; 
    padding-left: 0;
}

.category-widget li {
    width: 100%;
}

.category-widget a {
    color: var(--text-color);
    text-decoration: none;
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-cloud a {
    display: inline-block;
    padding: 5px 12px;
    background: var(--secondary-bg);
    color: var(--text-color);
    border-radius: 8px;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s;
}

.tag-cloud a:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* 页脚样式 */
.site-footer {
    background: var(--bg-color);
    padding: var(--spacing);
    margin-top: auto;
}

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

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    color: var(--text-color);
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--primary-color);
}

#back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--primary-color);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

#back-to-top:hover {
    transform: translateY(-5px);
}

/* 页脚底部样式 */
.footer-bottom {
    padding: 15px 0;
    text-align: center;
    color: var(--text-color-light);
    font-size: 14px;
}

 

.beian {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.beian a {
    color: var(--theme-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.beian-gongan {
    display: flex;
    align-items: center;
    gap: 5px;
}

.beian-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    background: url('../images/gongan.png') no-repeat center;
    background-size: contain;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .beian {
        flex-direction: column;
        gap: 8px;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .content-layout {
        grid-template-columns: 1fr;
    }

    .posts-grid {
        column-count: 1;
        column-gap: 0;
        margin: 20px;
    }

    .post-card {
        margin-bottom: 15px;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .post-content {
        padding: 15px;
    }

    .post-title {
        font-size: 1.2rem;
        margin: 8px 0;
    }

    .post-excerpt {
        font-size: 0.9rem;
        -webkit-line-clamp: 3;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .main-navigation {
        position: fixed;
        top: 0;
        left: -280px;
        width: 280px;
        height: 100vh;
        background: var(--bg-color);
        box-shadow: 2px 0 8px rgba(0,0,0,0.1);
        padding: 60px 20px 20px;
        transition: transform 0.3s ease;
        z-index: 999;
    }

    .main-navigation.active {
        transform: translateX(280px);
    }

    .main-navigation ul {
        flex-direction: column;
        gap: 10px;
    }

    .main-navigation a {
        display: block;
        padding: 10px;
    }

    .mobile-menu-toggle {
        background: none;
        border: none;
        color: var(--text-color);
        font-size: 1.2rem;
        cursor: pointer;
        padding: 8px;
        z-index: 1000;
    }

    .mobile-menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 998;
    }

    .mobile-menu-overlay.active {
        display: block;
    }

    .footer-content {
        flex-direction: column;
        gap: var(--spacing);
        text-align: center;
    }
    .footer-logo{
        margin-right: 0;
    }
    .footer-bottom{
        border-top: 1px solid var(--border-color);
    }

    /* 调整侧边栏在移动端的样式 */
    .sidebar {
        padding: 0 15px;
    }

    .widget {
        margin-bottom: 15px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .posts-grid {
        column-count: 2;
    }

    .content-layout {
        grid-template-columns: 1fr 240px;
        gap: 15px;
    }

    .sidebar .widget {
        padding: 15px;
    }

    .container {

        padding: 0 15px;
    }

    /* 调整搜索框样式 */
    .search-form {
        flex-wrap: nowrap;
        gap: 5px;
    }

    .search-form input {
        padding: 6px 8px;
        font-size: 0.9rem;
    }

    .search-form button {
        padding: 6px 10px;
        font-size: 0.9rem;
        white-space: nowrap;
    }

    /* 调整其他小部件样式 */
    .widget-title {
        font-size: 1rem;
        margin-bottom: 10px;
        padding-bottom: 8px;
    }

    .tag-cloud {
        gap: 5px;
    }

    .tag-cloud a {
        padding: 3px 8px;
        font-size: 0.85rem;
    }
}

@media (min-width: 1025px) {
    .container {
        max-width: var(--container-width);
        padding: 0 20px;
    }
    .category-list {
        column-count: 4 !important;
    }
    .posts-grid {
        column-count: 3;
        column-gap: 20px;
    }

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

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.post-card {
    animation: fadeIn 0.5s ease-out;
    height: fit-content;
}

/* PC端导航动画效果 */
.site-header {
    animation: slideInFromTop 0.6s ease-out;
}

.main-navigation a::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.main-navigation a:hover::after {
    width: 80%;
}

/* 移动端导航样式 */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 80vw;
    max-width: 340px;
    height: 100vh;
    background: var(--bg-color);
    z-index: 2000;
    box-shadow: 2px 0 10px rgba(0,0,0,0.08);
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(.4,0,.2,1);
    display: block;
    overflow-y: auto;
    border-radius: 0 16px 16px 0;
}
.mobile-menu.active {
    transform: translateX(0);
}
.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px 10px 20px;
    border-bottom: 1px solid var(--border-color);
}
.mobile-menu-close {
    background: none;
    border: none;
    font-size: 1rem;
    color: var(--text-color);
    cursor: pointer;
    transition: color 0.2s;
}
.mobile-menu-close:hover {
    color: var(--primary-color);
}
.menu-nav .menu {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 16px;
    padding: 0 20px;
    margin: 20px 0;
}

.menu-nav .menu a {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid #cccbcb;
    border-radius: 8px;
    color: var(--text-color);
    font-size: 1.05rem;
    transition: background 0.2s, color 0.2s, border 0.2s;
    min-height: 38px;
}
.menu-nav .menu a:hover {
    background: var(--secondary-bg);
    color: var(--primary-color);
}
.mobile-auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
}
.mobile-menu-footer {
    padding: 18px 20px 20px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: center;
}
.mobile-theme-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--secondary-bg);
    color: var(--text-color);
    border: none;
    border-radius: 20px;
    padding: 10px 70px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.mobile-theme-toggle:hover {
    background: var(--primary-color);
    color: #fff;
}
.mobile-theme-toggle i {
    font-size: 1.2rem;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .header-tools .theme-toggle{
        display: none;
    }
    .main-navigation {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-menu {
        display: block;
    }

    .header-tools {
        gap: 5px;
    }

    .header-tools button {
        width: 40px;
        height: 40px;
    }

    .site-header {
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    }

    .logo h1 {
        font-size: 1.3rem;
    }
}

/* 暗色主题适配 */
[data-theme="dark"] .mobile-menu {
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .site-header {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* 搜索面板 */
.search-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.search-panel.active {
    display: block;
    opacity: 1;
}

.search-panel-inner {
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 600px;
}

.search-panel .search-form {
    position: relative;
    width: 100%;
}

.search-panel input[type="search"] {
    width: 100%;
    padding: 15px 60px 15px 20px;
    border: none;
    border-radius: 8px;
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 1.1rem;
    outline: none;
}

.search-panel button[type="submit"] {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0 10px;
    z-index: 2;
}

/* 添加清除按钮样式 */
.search-panel input[type="search"]::-webkit-search-cancel-button {
    position: relative;
    right: 35px;
    -webkit-appearance: none;
    height: 20px;
    width: 20px;
    background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23999'><path d='M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z'/></svg>") no-repeat 50% 50%;
    cursor: pointer;
}

.search-panel input[type="search"]::-webkit-search-cancel-button:hover {
    background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%237c3fcc'><path d='M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z'/></svg>") no-repeat 50% 50%;
}

.search-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    transition: transform 0.3s;
}

.search-close:hover {
    transform: rotate(90deg);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .search-panel-inner {
        top: 15%;
        width: calc(100% - 30px);
    }

    .search-panel input[type="search"] {
        padding: 12px 50px 12px 15px;
        font-size: 1rem;
    }

    .search-panel input[type="search"]::-webkit-search-cancel-button {
        right: 30px;
        height: 16px;
        width: 16px;
    }

    .search-close {
        top: -35px;
        font-size: 1.2rem;
    }
}

/* 文章分享按钮 */
.post-actions {
    padding: 20px;
    margin: 30px 0;
    display: flex;
    gap: 15px;
    justify-content: center;
}

.share-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border: none;
    border-radius: 12px;
    background: var(--primary-color);
    color: white;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
}
.share-btn img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(124, 63, 204, 0.3);
}

.share-btn i {
    font-size: 1.1rem;
}

.generate-poster{
    margin-right: auto;
}



/* 移动端菜单按钮 */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    margin-right: 15px;
}

/* 移动端菜单 */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 80%;
    height: 100%; 
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

.mobile-menu-inner {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100%;
    background: var(--bg-color);
    padding: 20px;
    overflow-y: auto;
    transition: right 0.3s ease;
}

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

.menu-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 24px;
    cursor: pointer;
    padding: 0;
}

.mobile-navigation {
    margin-top: 60px;
}

.mobile-navigation .menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-navigation .menu li {
    margin-bottom: 15px;
}

.mobile-navigation .menu a {
    display: block;
    color: var(--text-color);
    font-size: 18px;
    text-decoration: none;
    padding: 10px 0;
    transition: color 0.3s ease;
}

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


@media (max-width: 1024px), (max-height: 500px) and (orientation: landscape) {
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .menu-toggle {
        display: block;
    }
    .mobile-menu {
        display: block;
    }
    .main-navigation {
        display: none !important;
    }
    .logo h1 a{
        font-size: 1.3rem;
    }
    .custom-content,
    .wallpaper-carousel {
        height: 243px !important;
    }
    .wallpaper-caption{
        bottom: 0 !important;
    }
}

/* 分页 */
.pagination-wrapper {
    margin: 40px 0;
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 15px;
    background: var(--bg-color);
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem;
    color: var(--text-color);
    transition: all 0.3s;
    border: 1px solid #eee;
}

.pagination a:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(124, 63, 204, 0.2);
}

.pagination .current {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    font-weight: 500;
    box-shadow: 0 5px 15px rgba(124, 63, 204, 0.2);
}

.pagination .prev,
.pagination .next {
    gap: 5px;
}

/* 移动端适配 */
@media screen and (max-width: 768px) {
    .pagination-wrapper {
        margin: 30px 0;
    }
    
    .pagination .page-numbers {
        min-width: 32px;
        height: 32px;
        margin: 0 2px;
        padding: 0 8px;
        font-size: 13px;
    } 
}

/* 用户菜单样式 */
.user-menu {
    position: relative;
}

.user-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border: none;
    background: none;
    color: var(--text-color);
    cursor: pointer;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.user-btn:hover {
    background: rgba(124, 63, 204, 0.1);
}

.user-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: var(--bg-color);
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    min-width: 150px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.user-menu:hover .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown a {
    display: block;
    padding: 10px 15px;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.user-dropdown a:hover {
    background: rgba(124, 63, 204, 0.1);
    color: var(--primary-color);
}

.user-dropdown a:not(:last-child) {
    border-bottom: 1px solid var(--border-color);
}

/* 消息提示样式 */
.message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    z-index: 2000;
    animation: slideIn 0.3s ease;
}

.message-success {
    background: #4caf50;
}

.message-error {
    background: #f44336;
}

.message-info {
    background: #2196f3;
}

.message.fade-out {
    animation: slideOut 0.3s ease forwards;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* 移动端适配 */
@media (max-width: 768px) {
    .user-btn {
        padding: 4px 8px;
    }

    .user-avatar {
        width: 20px;
        height: 20px;
    }

    .user-dropdown {
        right: -10px;
    }

    .message {
        left: 20px;
        right: 20px;
        text-align: center;
    }
}

/* PC端和移动端按钮显示控制 */
.desktop-auth-buttons { 
    display: flex; 
}
.mobile-auth-buttons { 
    display: none; 
}

/* PC端登录注册按钮极简风格优化 */
.desktop-auth-buttons .auth-btn {
    min-width: 80px;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 6px;
    padding: 8px 20px;
    border: 1px solid var(--primary-color);
    background: transparent;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.desktop-auth-buttons .auth-btn:hover {
    background: var(--primary-color);
    color: #fff;
}

.desktop-auth-buttons .register-btn {
    background: var(--primary-color);
    color: #fff;
    border: 1px solid var(--primary-color);
}

.desktop-auth-buttons .register-btn:hover {
    background: #6b36b3;
}

@media (max-width: 768px) {
    .desktop-auth-buttons { 
        display: none; 
    }
    .mobile-auth-buttons { 
        display: flex; 
        flex-direction: row;
        gap: 10px;
    }
    .mobile-auth-buttons .auth-btn {
        width: 50%;
        min-width: 0;
        border-radius: 20px;
        font-size: 1rem;
        margin: 0;
        justify-content: center;
    }
    .mobile-auth-buttons .login-btn {
        background: #fff;
        color: var(--primary-color);
        border: 1.5px solid var(--primary-color);
    }
    .mobile-auth-buttons .login-btn:hover {
        background: var(--primary-color);
        color: #fff;
    }
    .mobile-auth-buttons .register-btn {
        background: var(--primary-color);
        color: #fff;
        border: 1.5px solid var(--primary-color);
    }
    .mobile-auth-buttons .register-btn:hover {
        background: #fff;
        color: var(--primary-color);
    }
}


.site-stats-widget{
    margin-top: 20px;
    padding-top: 15px;
    border-top: 2px dotted var(--primary-color);
}

.site-stats-widget li {
    display: flex;
    justify-content: space-between; 
    align-items: center;
    margin-bottom: 8px;
    padding: 5px 0;
    border-bottom: 1px solid var(--border-color); 
}

.site-stats-widget li i {
    margin-right: 10px;
    color: var(--primary-color); 
}

.site-stats-widget li span {
    flex-grow: 1; 
    display: flex;
    justify-content: space-between; 
    align-items: center;
}

.site-stats-widget li span .label {
    margin-right: 10px;
    color: var(--text-color);
}

.site-stats-widget li span .value {
    color: var(--text-secondary);
    font-weight: 500;
}

/* 首页特色区域样式 */
.featured-section {
    margin:80px 0 30px 0;
}

.featured-section .row {
    flex-wrap: wrap;
    margin: 0 -7.5px; 
}

.featured-section .col-md-6 {
    flex: 0 0 50%;
    padding: 0 7.5px; 
}

/* 自定义内容区域样式 */
.custom-content {
    background: var(--bg-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    height: 420px;
}

.custom-content .design-image {
    width: 100%;
    height: 100%; 
    position: relative; 
    overflow: hidden;
}

.custom-content .design-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 壁纸轮播区域样式 */
/* 壁纸轮播区域样式 */
.wallpaper-carousel,
.wallpaper-carousel-wrapper,
.wallpaper-carousel-inner,
.wallpaper-slider,
.wallpaper-slides {
    background: var(--bg-color);
    border-radius: 12px;
    overflow: hidden;
    height: 420px;
    min-height: 200px;
    position: relative;
}

.wallpaper-carousel-wrapper {
    position: relative;
    height: 100%;
}

.wallpaper-slider {
    height: 100%;
    position: relative;
}

.wallpaper-slides {
    height: 100%;
    position: relative;
}

.wallpaper-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    display: none;
}

.wallpaper-slide.active {
    opacity: 1;
    display: block;
}

.wallpaper-slide a {
    display: block;
    height: 100%;
    position: relative;
}

.wallpaper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.wallpaper-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    color: #fff;
}

.wallpaper-caption h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 500;
}

/* 原生轮播导航点样式 */
.wallpaper-dots {
    position: absolute;
    bottom: 30px;
    right: 20px;
    left: auto;
    transform: none;
    display: flex;
    gap: 8px;
    z-index: 10;
}

.wallpaper-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.wallpaper-dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

.wallpaper-dot.active {
    background: #fff;
    transform: scale(1.2);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .featured-section{
        padding: 0 15px;
        margin: 0;
    }
    .featured-section .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 20px;
    }

    .featured-section .col-md-6:last-child {
        margin-bottom: 0;
    }

    .custom-content,
    .wallpaper-carousel {
        height: 243px !important;
    }

    
    .wallpaper-carousel {
        height: 223px;
    }
    .wallpaper-caption{
        bottom: 46px !important;
    }
    
    .wallpaper-dots {
        bottom: 10px;
    }
    
    .wallpaper-dot {
        width: 8px;
        height: 8px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .footer-content {
        flex-direction: row;
        align-items: center;
        gap: 18px;
        text-align: center;
    }
    .footer-logo {
        margin-right: 0;
        margin-bottom: 10px;
    }
    .footer-logo h1 {
        font-size: 1.1rem;
    }
    .footer-logo p {
        font-size: 0.95rem;
        margin-top: 6px;
    }
    .footer-bottom {
        padding: 10px 0;
        font-size: 13px;
        border-top: 1px solid var(--border-color);
    }
    .beian {
        flex-direction: column;
        gap: 6px;
        font-size: 13px;
    }
    .runtime {
        margin-top: 6px;
        font-size: 13px;
    }
    #back-to-top {
        width: 36px;
        height: 36px;
        font-size: 18px;
        bottom: 16px;
        right: 16px;
    }
}

[data-theme="dark"] #nprogress .bar {
    background: var(--primary-color, #7c8cf8) !important;
}
[data-theme="dark"] #nprogress .peg {
    box-shadow: 0 0 10px var(--primary-color, #7c8cf8), 0 0 5px var(--primary-color, #7c8cf8) !important;
}
[data-theme="dark"] #nprogress .spinner-icon {
    border-top-color: var(--primary-color, #7c8cf8) !important;
    border-left-color: var(--primary-color, #7c8cf8) !important;
}




