/* 
 * LeleBlog主题样式
 * 与MemberCenter会员中心插件配套的前端样�?
 */

/* CSS变量定义 */
:root {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: rgba(79, 70, 229, 0.2);
    --primary-lighter: rgba(79, 70, 229, 0.1);
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #3b82f6;
    
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-muted: #9ca3af;
    --text-color: #374151;
    
    --bg-color: #f9fafb;
    --bg-white: #ffffff;
    --hover-bg: #f3f4f6;
    --border-color: #e5e7eb;
    
    --border-radius: 8px;
    --border-radius-sm: 4px;
    --border-radius-lg: 12px;
    
    --box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --card-hover-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;

    --prism-bg: #f8f9fa;
    --prism-text: #374151;
    --prism-comment: #6b7280;
    --prism-punctuation: #6b7280;
    --prism-tag: #ef4444;
    --prism-name: #10b981;
    --prism-attr: #3b82f6;
    --prism-value: #8b5cf6;
    --prism-string: #0ea5e9;
    --prism-selector: #d946ef;
    --prism-property: #f59e0b;
    --prism-important: #ef4444;
    --prism-variable: #8b5cf6;
    --prism-operator: #6b7280;
    --prism-keyword: var(--primary-color);
    --prism-function: #ec4899;
    --prism-class: #f59e0b;
    --prism-builtin: #0ea5e9;
    --prism-line-highlight: rgba(99, 102, 241, 0.1);
    --prism-line-number: #9ca3af;
    --prism-toolbar-bg: #e5e7eb;
    --prism-toolbar-text: #6b7280;
    --prism-toolbar-btn-bg: #f3f4f6;
    --prism-toolbar-btn-hover: var(--primary-light);
    --prism-border-color: #e5e7eb;
}

/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 全局滚动条美�?*/
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: rgba(var(--primary-color-rgb, 79, 70, 229), 0.3);
    border-radius: 10px;
    transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(var(--primary-color-rgb, 79, 70, 229), 0.5);
}

/* Firefox滚动�?*/
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(var(--primary-color-rgb, 79, 70, 229), 0.3) transparent;
}

body {
    font-family: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

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

ul, ol {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius-sm);
}

button, .btn {
    cursor: pointer;
    border: none;
    outline: none;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
    font-size: 14px;
}

input, textarea, select {
    font-family: inherit;
    font-size: 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 8px 12px;
    outline: none;
    transition: var(--transition);
    color: var(--text-color);
    background-color: var(--bg-white);
}

input:focus, textarea:focus, select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px var(--primary-light);
}

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

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

.btn-outline-primary {
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: white;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 布局样式 */
.lb-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main {
    flex: 1;
    margin-top: 70px; /* 为固定导航栏预留空间 */
}

.main-container {
    display: flex;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 20px 15px;
    overflow: visible; /* 确保溢出内容不会被裁剪 */
    box-sizing: border-box; /* 确保padding计算在宽度内 */
    flex-wrap: wrap; /* 允许在小屏幕上换行 */
}

.content-wrapper {
    flex: 1;
    min-width: 0; /* 防止flex项目溢出 */
    padding-right: 20px;
    overflow: visible; /* 防止内容溢出 */
    background-color: transparent; /* 确保背景透明 */
}

/* 侧边栏样式 */
.sidebar {
    width: 320px;
    flex-shrink: 0; /* 防止侧边栏被压缩 */
    height: fit-content; /* 防止侧边栏出现滚动条 */
    position: sticky;
    top: 20px; /* 添加一些顶部间距 */
    align-self: flex-start; /* 确保从顶部对齐 */
    margin-left: 0; /* 修复可能的额外外边距 */
}

.widget {
    background-color: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 20px;
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.widget-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
    position: relative;
    padding-left: 12px;
}

.widget-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 18px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

/* 用户小部�?*/
.widget-user {
    padding: 0;
    overflow: hidden;
}

.widget-user-header {
    padding: 20px;
    display: flex;
    align-items: center;
}

.widget-user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 15px;
}

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

.widget-user-info {
    flex: 1;
}

.widget-user-name {
    font-weight: 600;
    font-size: 16px;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.widget-user-level {
    color: var(--warning-color);
    font-size: 14px;
    font-weight: 500;
}

.widget-user-stats {
    display: flex;
    background-color: var(--hover-bg);
    padding: 10px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.user-stat-item {
    flex: 1;
    text-align: center;
}

.stat-value {
    font-weight: 600;
    font-size: 16px;
    color: var(--primary-color);
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.widget-user-actions {
    padding: 15px;
    display: flex;
    gap: 10px;
}

.user-action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 0;
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    background-color: var(--primary-lighter);
    color: var(--primary-color);
}

.user-action-btn:hover {
    background-color: var(--primary-light);
    transform: translateY(-2px);
}

.user-action-btn i {
    margin-right: 5px;
}

.sign-in-action {
    background-color: var(--primary-color);
    color: white;
}

.sign-in-action:hover {
    background-color: var(--primary-hover);
    color: white;
}

/* 搜索小部�?*/
.widget-search .widget-content {
    position: relative;
}

.widget-search .search-input {
    width: 100%;
    padding: 8px 10px;
    padding-right: 32px;
    font-size: 13px;
    border-radius: 18px;
    background-color: var(--hover-bg);
    border: 1px solid transparent;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.widget-search .search-input:focus {
    background-color: var(--bg-white);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px var(--primary-lighter);
}

.widget-search .search-submit {
    position: absolute;
    right: 2px;
    top: 50%;
    transform: translateY(-50%);
    height: 28px;
    width: 28px;
    border-radius: 50%;
    background-color: transparent;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.widget-search .search-submit:hover {
    color: var(--primary-color);
    background-color: var(--primary-lighter);
}

/* 分类小部�?*/
.category-list {
    margin: 0;
    padding: 0;
}

.category-item {
    margin-bottom: 10px;
}

.category-item:last-child {
    margin-bottom: 0;
}

.category-item a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background-color: var(--hover-bg);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    transition: var(--transition);
}

.category-item a:hover {
    background-color: var(--primary-lighter);
    color: var(--primary-color);
    transform: translateX(5px);
}

.category-item.active a {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

.category-count {
    background-color: var(--primary-color);
    color: white;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 10px;
}

/* 最新文章小部件 - 改进版 */
.recent-post-list {
    margin: 0;
    padding: 0;
}

.recent-post-item {
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.recent-post-item:last-child {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.recent-post-link {
    display: flex;
    align-items: flex-start;
}

.post-number {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 13px;
    margin-right: 12px;
    flex-shrink: 0;
}

.post-number-1 {
    background: linear-gradient(135deg, #ff6b6b, #ee5253);
}

.post-number-2 {
    background: linear-gradient(135deg, #ff9f43, #ee5253);
}

.post-number-3 {
    background: linear-gradient(135deg, #10ac84, #1dd1a1);
}

.post-number-4 {
    background: linear-gradient(135deg, #54a0ff, #2e86de);
}

.post-number-5 {
    background: linear-gradient(135deg, #5f27cd, #8854d0);
}

.recent-post-info {
    flex: 1;
}

.recent-post-title {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 5px;
    font-size: 14px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    white-space: nowrap;
}

.recent-post-date {
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
}

.recent-post-date i {
    margin-right: 4px;
    font-size: 12px;
    color: var(--text-muted);
}

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

/* 最新评论小部件 */
.recent-comment-list {
    margin: 0;
    padding: 0;
}

.recent-comment-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.recent-comment-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 10px;
}

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

.comment-content {
    flex: 1;
}

.comment-author {
    font-weight: 500;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.comment-text {
    font-size: 13px;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.comment-text a {
    color: var(--text-secondary);
}

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

/* 标签云小部件 */
.widget-tags .tag-cloud {
    display: flex;
    flex-wrap: wrap;
}

.widget-tags .tag {
    margin: 0 8px 8px 0;
}

/* 归档小部�?*/
.archive-list {
    margin: 0;
    padding: 0;
}

.archive-item {
    margin-bottom: 10px;
}

.archive-item:last-child {
    margin-bottom: 0;
}

.archive-item a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background-color: var(--hover-bg);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    transition: var(--transition);
}

.archive-item a:hover {
    background-color: var(--primary-lighter);
    color: var(--primary-color);
    transform: translateX(5px);
}

.archive-count {
    background-color: var(--primary-color);
    color: white;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 10px;
}

/* 友情链接小部�?*/
.friend-link-list {
    margin: 0;
    padding: 0;
}

.friend-link-item {
    margin-bottom: 10px;
}

.friend-link-item:last-child {
    margin-bottom: 0;
}

.friend-link-item a {
    display: block;
    padding: 8px 12px;
    background-color: var(--hover-bg);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    transition: var(--transition);
}

.friend-link-item a:hover {
    background-color: var(--primary-lighter);
    color: var(--primary-color);
    transform: translateX(5px);
}

/* 文章列表 */
.article-list {
    margin-bottom: 30px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    grid-gap: 20px;
}

.article-item {
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
    background-color: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    overflow: hidden;
    position: relative;
    height: 100%;
    border: 1px solid var(--border-color);
}

.article-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-hover-shadow);
    border-color: var(--primary-color);
}

.article-img {
    width: 100%;
    margin-right: 0;
    height: 180px;
    overflow: hidden;
    position: relative;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.article-img::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0) 100%);
    z-index: 1;
    opacity: 0.8;
    transition: var(--transition);
}

.article-img img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.article-img:hover img {
    transform: scale(1.05);
}

.article-category {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    margin-bottom: 0;
}

.article-category a {
    display: inline-block;
    font-size: 12px;
    padding: 3px 10px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 20px;
    margin-right: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.article-category a:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
}

.article-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.article-header {
    margin-bottom: 10px;
}

.article-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 15px;
    line-height: 1.4;
}

.article-title a {
    color: var(--text-primary);
    transition: var(--transition);
}

.article-title a:hover {
    color: var(--primary-color);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-decoration-color: var(--primary-lighter);
    text-underline-offset: 3px;
}

.article-excerpt {
    color: var(--text-secondary);
    margin-bottom: 15px;
    font-size: 14px;
    line-height: 1.6;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    flex: 1;
}

.article-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px dashed var(--border-color);
}

.article-meta span {
    display: flex;
    align-items: center;
    margin-right: 12px;
}

.article-meta i {
    margin-right: 5px;
    color: var(--primary-color);
    opacity: 0.7;
}

/* 置顶文章包装容器 */
.featured-posts-wrapper {
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

/* 置顶文章 */
.featured-posts {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
  /*   background-color: var(--bg-white);  */
  /*   border-radius: var(--border-radius);  */
  /*   padding: 20px;  */
 /*   box-shadow: var(--box-shadow);  */
}

.featured-post {
    flex: 1;
    background-color: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    max-width: 100%;
    min-width: 280px;
    margin-bottom: 10px;
    border: 1px solid var(--border-color);
}

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

.featured-img {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
    background-repeat: no-repeat;
    width: 100%;
    border-bottom: 2px solid var(--primary-light);
}

.featured-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: var(--primary-color);
    color: white;
    padding: 5px 10px;
    border-radius: var(--border-radius-sm);
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.featured-tag i {
    font-size: 10px;
}

.featured-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.featured-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 10px;
    line-height: 1.4;
}

.featured-title a {
    color: var(--text-primary);
    transition: var(--transition);
}

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

.featured-excerpt {
    color: var(--text-secondary);
    margin-bottom: 15px;
    font-size: 14px;
    line-height: 1.6;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    flex: 1;
}

.featured-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: auto;
}

.featured-meta span {
    display: flex;
    align-items: center;
    margin-right: 15px;
}

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

/* 分页 */
.pagination {
    margin-top: 30px;
}

.pagination-list {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.pagination-list li {
    margin: 0 5px;
}

.pagination-list li a,
.pagination-list li span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--bg-white);
    color: var(--text-primary);
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
}

.pagination-list li a:hover {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

.pagination-list li.active span {
    background-color: var(--primary-color);
    color: white;
}

.pagination-list li.prev a,
.pagination-list li.next a {
    font-size: 18px;
}

/* 存档页面 */
.archive-header {
    background-color: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 20px;
    margin-bottom: 20px;
}

.archive-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 10px;
}

.archive-description {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

/* 无内容提�?*/
.no-content {
    background-color: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 40px 20px;
    text-align: center;
}

.no-content-icon {
    font-size: 50px;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.no-content-text {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.back-home {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: white;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.back-home:hover {
    background-color: var(--primary-hover);
    color: white;
    transform: translateY(-2px);
}

/* 搜索结果�?*/
.search-header {
    background-color: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 20px;
    margin-bottom: 20px;
}

.search-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 15px;
}

.search-form-container {
    position: relative;
}

.search-result-info {
    background-color: var(--primary-lighter);
    color: var(--primary-color);
    padding: 10px 15px;
    border-radius: var(--border-radius-sm);
    margin-bottom: 20px;
    font-size: 14px;
}

.search-count {
    font-weight: 600;
}

.no-search-result {
    background-color: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 40px 20px;
    text-align: center;
}

.no-search-icon {
    font-size: 50px;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.no-search-text {
    font-size: 18px;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.no-search-tips {
    margin-bottom: 30px;
    color: var(--text-secondary);
}

.no-search-tips p {
    margin-bottom: 10px;
}

.no-search-tips ul {
    text-align: left;
    max-width: 300px;
    margin: 0 auto;
    padding-left: 20px;
    list-style-type: disc;
}

.no-search-tips li {
    margin-bottom: 5px;
}

/* 头部样式 - 完全禁用，由sidebar-custom.css控制 */
/* .header {
    background-color: var(--bg-white);
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 100;
    margin-bottom: 0;
} */

.header {
    /* 所有头部样式均由sidebar-custom.css控制 */
}

.header-container {
    /* 头部容器样式由sidebar-custom.css控制 */
}

.logo {
    /* Logo样式由sidebar-custom.css控制 */
}

.logo a {
    /* Logo链接样式由sidebar-custom.css控制 */
}

.logo img {
    /* Logo图片样式由sidebar-custom.css控制 */
}

.main-nav {
    /* 导航样式由sidebar-custom.css控制 */
}

.nav-list {
    /* 导航列表样式由sidebar-custom.css控制 */
}

.nav-item {
    /* 导航项样式由sidebar-custom.css控制 */
}

.nav-item a {
    /* 导航链接样式由sidebar-custom.css控制 */
}

.nav-item a:hover {
    /* 导航链接悬停样式由sidebar-custom.css控制 */
}

.nav-item.active a {
    /* 激活导航样式由sidebar-custom.css控制 */
}

.header-right {
    /* 头部右侧区域样式由sidebar-custom.css控制 */
}

.search-btn {
    /* 搜索按钮样式由sidebar-custom.css控制 */
}

.search-btn:hover {
    /* 搜索按钮悬停样式由sidebar-custom.css控制 */
}

.theme-toggle {
    /* 主题切换按钮样式由sidebar-custom.css控制 */
}

.theme-toggle:hover {
    /* 主题切换按钮悬停样式由sidebar-custom.css控制 */
}

/* 相关文章 */
.related-posts-card {
    background-color: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 25px;
    padding: 25px 30px;
    width: 100%;
    max-width: 100%;
}

.related-title {
    margin-bottom: 25px;
    position: relative;
    padding-left: 15px;
    border-left: 4px solid var(--primary-color);
}

.related-title h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
}

.related-title h3 i {
    color: var(--primary-color);
    margin-right: 10px;
    font-size: 18px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.related-item {
    transition: all 0.3s ease;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
}

.related-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-hover-shadow);
    border-color: var(--primary-color);
}

.related-link {
    display: block;
    color: inherit;
    text-decoration: none;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.related-img {
    height: 160px;
    background-size: cover;
    background-position: center;
    border-bottom: 2px solid var(--primary-color);
}

.related-info {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.related-post-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.related-post-date {
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
}

.related-post-date i {
    margin-right: 5px;
    color: var(--primary-color);
}

.no-related {
    padding: 30px;
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    background-color: var(--hover-bg);
    border-radius: var(--border-radius);
}

/* 响应式布局调整 */
@media (max-width: 992px) {
    .main-container {
        flex-direction: column;
    }
    
    .content-wrapper {
        padding-right: 0;
        width: 100%;
    }
    
    .sidebar {
        width: 100%;
        margin-top: 20px;
    }
    
    .post-content-wrapper,
    .post-tags,
    .post-actions,
    .post-navigation-card,
    .related-posts-card,
    .comments-area {
        max-width: 100%;
        overflow-x: hidden;
    }
}

@media (max-width: 768px) {
    .content-wrapper {
        padding-right: 0;
    }
    
    .post-container {
        padding: 0;
    }
    
    .post-header {
        padding: 20px 20px 15px;
    }
    
    .post-title {
        font-size: 24px;
    }
    
    .post-meta {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .post-content-wrapper {
        padding: 0 20px;
    }
    
    .post-content {
        padding: 20px 0;
    }
    
    .post-tags, .post-actions {
        padding: 15px 20px;
    }
    
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .post-navigation {
        flex-direction: column;
        gap: 20px;
    }
    
    .prev-post, .next-post {
        max-width: 100%;
        text-align: left;
        padding: 0 0 0 15px;
        border-right: none;
    }
    
    .next-post {
        border-left: 3px solid var(--primary-color);
    }
    
    .next-post .nav-label {
        justify-content: flex-start;
    }
    
    .next-post .nav-label i {
        margin-left: 0;
        margin-right: 5px;
    }
    
    .post-navigation-card,
    .related-posts-card,
    .comments-area {
        padding: 20px;
    }
}

@media (max-width: 576px) {
    .post-meta {
        justify-content: flex-start;
    }
    
    .post-title {
        font-size: 22px;
        text-align: left;
    }
    
    .post-header {
        text-align: left;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
    
    .post-share {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .share-btns {
        width: 100%;
    }
    
    .share-btn {
        flex: 1;
        justify-content: center;
    }
}

/* 代码高亮样式定制 */

/* 覆盖默认Prism样式 */
pre[class*="language-"],
code[class*="language-"] {
    color: var(--prism-text);
    background: none;
    font-family: 'JetBrains Mono', Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
    font-size: 0.95em;
    text-align: left;
    white-space: pre;
    word-spacing: normal;
    word-break: normal;
    word-wrap: normal;
    line-height: 1.7;
    -moz-tab-size: 4;
    -o-tab-size: 4;
    tab-size: 4;
    -webkit-hyphens: none;
    -moz-hyphens: none;
    -ms-hyphens: none;
    hyphens: none;
}

/* 代码块容器 - 确保宽度限制 */
pre[class*="language-"] {
    padding: 0;  /* 重置内边距 */
    margin: 2em 0;
    background: var(--prism-bg);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
    position: relative;
    max-height: none;
    overflow: hidden;
    width: 100%;
    max-width: 100%; /* 确保不超过容器宽度 */
}

/* 代码块顶部区?*/
pre[class*="language-"]::before {
    content: attr(data-language);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--primary-color);
    color: white;
    padding: 0.5em 1em;
    font-size: 0.8em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.5;
    text-align: center;
    z-index: 5;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
}

/* 代码内容区域 */
pre[class*="language-"] > code {
    display: block;
    padding: 2.5em 1.5em 1.5em 1.5em;
    overflow-x: auto;
}

:not(pre) > code[class*="language-"],
pre[class*="language-"] {
    background: var(--prism-bg);
}

/* 行内代码 */
:not(pre) > code[class*="language-"] {
    padding: 0.2em 0.4em;
    border-radius: 3px;
    white-space: normal;
    border: 1px solid var(--prism-border-color);
}

/* 语法高亮颜色 */
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
    color: var(--prism-comment);
    font-style: italic;
}

.token.punctuation {
    color: var(--prism-punctuation);
}

.token.namespace {
    opacity: 0.7;
}

.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol {
    color: var(--prism-property);
}

.token.tag {
    color: var(--prism-tag);
}

.token.attr-name {
    color: var(--prism-attr);
}

.token.string,
.token.char {
    color: var(--prism-string);
}

.token.attr-value {
    color: var(--prism-value);
}

.token.operator,
.token.entity,
.token.url {
    color: var(--prism-operator);
}

.token.atrule,
.token.attr-value,
.token.keyword {
    color: var(--prism-keyword);
}

.token.function,
.token.class-name {
    color: var(--prism-function);
}

.token.selector {
    color: var(--prism-selector);
}

.token.important,
.token.bold {
    font-weight: bold;
}

.token.italic {
    font-style: italic;
}

.token.entity {
    cursor: help;
}

/* 行号插件样式 */
pre[class*="language-"].line-numbers {
    position: relative;
    counter-reset: linenumber;
}

pre[class*="language-"].line-numbers > code {
    margin-left: 3.5em;  /* 为行号预留空?*/
    padding-left: 1em;   /* 代码与行号之间的间距 */
    border-left: 1px solid rgba(0, 0, 0, 0.05);  /* 添加分隔?*/
}

.line-numbers .line-numbers-rows {
    position: absolute;
    pointer-events: none;
    top: 2.5em;     /* 与顶部语言标签对齐 */
    left: 0;
    width: 3.5em;   /* 行号区域宽度 */
    letter-spacing: -1px;
    user-select: none;
    padding: 0 1em 0 0;  /* 调整行号右侧内边?*/
    text-align: center;
    background-color: rgba(0, 0, 0, 0.02);
    height: calc(100% - 2.5em);
}

.line-numbers-rows > span {
    display: block;
    counter-increment: linenumber;
    line-height: 1.7;
    color: var(--prism-line-number);
}

.line-numbers-rows > span:before {
    content: counter(linenumber);
    color: var(--prism-line-number);
    display: block;
    text-align: center;  /* 居中行号 */
    font-size: 0.9em;
}

/* 工具栏样式- 复制按钮 */
div.code-toolbar {
    position: relative;
}

div.code-toolbar > .toolbar {
    position: absolute;
    top: 0.4em;  /* 调整顶部距离 */
    right: 0.5em;
    z-index: 20;
}

div.code-toolbar > .toolbar > .toolbar-item > button {
    color: white;
    font-size: 0.8em;
    padding: 0.3em 0.7em;
    background-color: rgba(255, 255, 255, 0.25);
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    backdrop-filter: blur(2px);  /* 轻微模糊效果 */
}

div.code-toolbar > .toolbar > .toolbar-item > button:hover {
    background-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
}

div.code-toolbar > .toolbar > .toolbar-item > button:before {
    content: "\f0c5";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    margin-right: 6px;
}

/* 复制成功状态?*/
div.code-toolbar > .toolbar > .toolbar-item > button.copy-to-clipboard-button[aria-label="Copied!"],
div.code-toolbar > .toolbar > .toolbar-item > button.copy-to-clipboard-button[aria-label="已复制?"] {
    background-color: rgba(72, 187, 120, 0.7);
}

div.code-toolbar > .toolbar > .toolbar-item > button.copy-to-clipboard-button[aria-label="Copied!"]:before,
div.code-toolbar > .toolbar > .toolbar-item > button.copy-to-clipboard-button[aria-label="已复制?"]:before {
    content: "\f00c";
}

/* 暗色模式调整 */
[data-theme="dark"] .line-numbers .line-numbers-rows {
    background-color: rgba(255, 255, 255, 0.03);
    border-right-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] pre[class*="language-"].line-numbers > code {
    border-left-color: rgba(255, 255, 255, 0.1);
}

/* 代码块语言图标 */
pre[class*="language-"][data-language]::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    display: inline-block;
    margin-right: 5px;
}

pre[class*="language-"][data-language="html"]::before {
    content: "\f13b \00a0 HTML";
}

pre[class*="language-"][data-language="css"]::before {
    content: "\f13c \00a0 CSS";
}

pre[class*="language-"][data-language="javascript"]::before,
pre[class*="language-"][data-language="js"]::before {
    content: "\f3b8 \00a0 JAVASCRIPT";
}

pre[class*="language-"][data-language="php"]::before {
    content: "\f457 \00a0 PHP";
}

pre[class*="language-"][data-language="python"]::before,
pre[class*="language-"][data-language="py"]::before {
    content: "\f3e2 \00a0 PYTHON";
}

pre[class*="language-"][data-language="bash"]::before,
pre[class*="language-"][data-language="shell"]::before {
    content: "\f120 \00a0 BASH";
}

pre[class*="language-"][data-language="sql"]::before {
    content: "\f1c0 \00a0 SQL";
}

pre[class*="language-"][data-language="json"]::before {
    content: "\f15c \00a0 JSON";
}

/* 自定义滚动条样式 */
pre[class*="language-"] > code::-webkit-scrollbar {
    height: 8px;
    width: 8px;
}

pre[class*="language-"] > code::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

pre[class*="language-"] > code::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 4px;
}

[data-theme="dark"] pre[class*="language-"] > code::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
}

/* 暗色模式下的代码块阴影增?*/
[data-theme="dark"] pre[class*="language-"] {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

/* 激活行高亮 */
.line-highlight {
    background: var(--prism-line-highlight);
    margin-top: 0.65em;
    padding: 0.15em 0;
}

/* 代码颜色重置 */
.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol {
    color: var(--prism-property);
}

.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
    color: var(--prism-string);
}

.token.atrule,
.token.attr-value,
.token.keyword {
    color: var(--prism-keyword);
}

.token.function,
.token.class-name {
    color: var(--prism-function);
}

/* 不带行号的代码块调整 */
pre:not(.line-numbers) > code[class*="language-"] {
    padding-left: 2em;
}

/* 检查文件是否存在?*/
/* 将添加滚动条美化样式 */

/* ===== 暗黑模式背景修复 ===== */
[data-theme="dark"] .main-container {
    background-color: var(--bg-color);
}

[data-theme="dark"] .content-wrapper {
    background-color: var(--bg-color);
}

[data-theme="dark"] .sidebar {
    background-color: var(--bg-color);
}

[data-theme="dark"] .widget {
    background-color: var(--bg-white);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .post-container {
    background-color: var(--bg-color);
}

[data-theme="dark"] .post-card {
    background-color: var(--bg-white);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .comments-area {
    background-color: var(--bg-white);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .post-related {
    background-color: var(--bg-white);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .post-content {
    color: var(--text-color);
}

[data-theme="dark"] .article-list-header {
    background-color: var(--bg-white);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* 增加页脚暗色模式样式 */
[data-theme="dark"] .footer {
    background-color: var(--bg-white);
    color: var(--text-color);
}

[data-theme="dark"] .copyright {
    background-color: rgba(0, 0, 0, 0.2);
    color: var(--text-muted);
}

/* 修复搜索面板 */
[data-theme="dark"] .search-panel {
    background-color: rgba(0, 0, 0, 0.85);
}

[data-theme="dark"] .search-panel-container {
    background-color: var(--bg-white);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* 修复移动菜单 */
[data-theme="dark"] .mobile-menu {
    background-color: rgba(0, 0, 0, 0.85);
}

[data-theme="dark"] .mobile-menu-header {
    background-color: var(--bg-white);
}

[data-theme="dark"] .no-tags {
    color: #9ca3af;
}

/* 页脚样式 */
.footer {
    background-color: var(--bg-white);
    padding: 40px 0;
    margin-top: 30px;
}

/* 侧边栏社交链接样式 */
.sidebar .widget-social .sidebar-social-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar .widget-social .social-link {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    border-radius: 6px;
    background-color: var(--primary-lighter);
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.sidebar .widget-social .social-link:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateX(5px);
}

.sidebar .widget-social .social-link i {
    font-size: 16px;
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.sidebar .widget-social .social-link span {
    font-size: 14px;
}

.sidebar .widget-social .wechat-link {
    position: relative;
}

.sidebar .widget-social .wechat-qrcode {
    position: absolute;
    top: 0;
    left: 100%;
    width: 120px;
    background-color: white;
    border-radius: var(--border-radius-sm);
    box-shadow: var(--box-shadow);
    padding: 10px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 10;
    margin-left: 10px;
}

.sidebar .widget-social .wechat-link:hover .wechat-qrcode {
    opacity: 1;
    visibility: visible;
}

.sidebar .widget-social .wechat-qrcode img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius-sm);
}

/* 用户等级旁边的社交图标 */
.widget-user-level {
    display: flex;
    align-items: center;
}

.user-social-icons {
    display: flex;
    align-items: center;
    margin-left: 10px;
}

.user-social-icons a {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 5px;
    color: var(--primary-color);
    font-size: 12px;
    transition: all 0.3s ease;
}

.user-social-icons a:hover {
    color: #fff;
    background-color: var(--primary-color);
    border-radius: 50%;
    transform: translateY(-2px);
}

.user-social-icons .wechat-link {
    position: relative;
}

.user-social-icons .wechat-qrcode {
    position: absolute;
    top: 25px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    background-color: white;
    border-radius: var(--border-radius-sm);
    box-shadow: var(--box-shadow);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 100;
}

.user-social-icons .wechat-link:hover .wechat-qrcode {
    opacity: 1;
    visibility: visible;
}

/* 作者的其他文章列表样式 */
.author-other-posts {
    margin-top: 20px;
    width: 100%;
}

.section-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 15px 0;
}

.other-posts-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    border-left: 3px solid var(--primary-color);
    padding-left: 10px;
}

.other-posts-title::before {
    content: "\f02d";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    margin-right: 8px;
    color: var(--primary-color);
}

.other-posts-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.other-post-item {
    border-bottom: 1px dashed var(--border-color);
    transition: all 0.2s ease;
}

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

.other-post-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 10px;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 6px;
}

.other-post-link:hover {
    background-color: rgba(99, 102, 241, 0.08);
    transform: translateX(5px);
}

.post-info {
    flex: 1;
    min-width: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.post-date {
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    white-space: nowrap;
    margin-left: 15px;
    flex-shrink: 0;
}

.post-date i {
    margin-right: 5px;
    color: var(--primary-color);
    opacity: 0.7;
    font-size: 12px;
}

.post-title {
    font-size: 15px;
    font-weight: 500;
    color: #444;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.2s ease;
    line-height: 1.5;
    margin-right: 10px;
    flex: 1;
}

.post-comments {
    margin-left: 15px;
    display: inline-flex;
    align-items: center;
}

.post-comments i {
    margin-right: 5px;
    color: var(--primary-color);
    opacity: 0.7;
}

.post-arrow {
    margin-left: 10px;
    color: var(--primary-color);
    opacity: 0;
    transform: translateX(-5px);
    transition: all 0.3s ease;
}

.other-post-link:hover .post-arrow {
    opacity: 1;
    transform: translateX(0);
}

.no-posts {
    padding: 15px 0;
    color: var(--text-muted);
    font-style: italic;
    text-align: center;
}

/* 暗黑模式适配 */
[data-theme="dark"] .section-divider {
    background-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .other-post-link:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* 文章容器样式 */
.post-container {
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden; /* 防止内容溢出 */
    background-color: transparent; /* 确保容器背景透明 */
    box-sizing: border-box;
}

/* 文章卡片样式 */
.post-header-card,
.post-content-card,
.post-navigation-card,
.author-article-card,
.author-other-posts,
.related-posts-card,
.links-header-card,
.links-navigation-card,
.links-content,
.apply-links-card,
.archive-header,
.comments-area,
.guestbook-card,
.archives-card,
.timeline-card,
.page-card,
.article-item,
.guestbook-header-card,
.archive-page-header,
.archive-navigation-card,
.archive-content,
.search-result-stat,
.no-search-result-card,
.search-info-bar,
.search-header-card,
.header-container {
    transition: all 0.3s ease;
}

.post-header-card:hover,
.post-content-card:hover,
.post-navigation-card:hover,
.author-article-card:hover,
.author-other-posts:hover,
.related-posts-card:hover,
.links-header-card:hover,
.links-navigation-card:hover,
.links-content:hover,
.apply-links-card:hover,
.archive-header:hover,
.comments-area:hover,
.guestbook-card:hover,
.archives-card:hover,
.timeline-card:hover,
.page-card:hover,
.article-item:hover,
.guestbook-header-card:hover,
.archive-page-header:hover,
.archive-navigation-card:hover,
.archive-content:hover,
.search-result-stat:hover,
.no-search-result-card:hover,
.search-info-bar:hover,
.search-header-card:hover,
.header-container:hover {
    box-shadow: var(--card-hover-shadow);
    transform: translateY(-3px);
    border-color: var(--primary-color);
}

/* 文章链接样式 */
.article-link {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s;
    width: 100%;
    display: inline-block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.article-link:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* 登录注册模态框样式 */
.modal-content {
    border: none;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--card-hover-shadow);
    background: var(--bg-white);
    overflow: hidden;
}

.modal-header {
    padding: 1rem;
}

.btn-close {
    background-color: var(--bg-color);
    border-radius: 50%;
    padding: 0.75rem;
    opacity: 0.8;
    transition: all 0.2s;
}

.btn-close:hover {
    background-color: rgba(var(--primary-color-rgb, 79, 70, 229), 0.1);
    opacity: 1;
}

.auth-container {
    padding: 0 1rem;
}

.auth-title {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    text-align: center;
    position: relative;
    padding-bottom: 0.75rem;
}

.auth-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--primary-hover));
    border-radius: 2px;
}

.auth-form {
    margin-bottom: 1.5rem;
}

.form-floating > label {
    padding-left: 2.5rem;
    color: var(--text-secondary);
}

.form-floating > .form-control {
    padding-left: 2.5rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    box-shadow: none;
    transition: all 0.3s ease;
}

.form-floating > .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(var(--primary-color-rgb, 79, 70, 229), 0.1);
}

.form-floating i {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

.password-field {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    transition: color 0.3s ease;
    z-index: 4;
}

.toggle-password:hover {
    color: var(--primary-color);
}

.remember-me {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.5rem 0;
}

.form-check-input {
    margin-top: 0;
    border-color: rgba(var(--primary-color-rgb, 79, 70, 229), 0.3);
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.forgot-link {
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    margin-left: auto;
    transition: color 0.3s;
}

.forgot-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.auth-submit {
    width: 100%;
    padding: 0.75rem;
    border-radius: var(--border-radius);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    border: none;
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(var(--primary-color-rgb, 79, 70, 229), 0.3);
}

.auth-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(var(--primary-color-rgb, 79, 70, 229), 0.4);
}

.auth-submit:active {
    transform: translateY(0);
}

.auth-submit::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        to right,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transform: skewX(-25deg);
    animation: btnLight 3s infinite;
}

@keyframes btnLight {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

.auth-links {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.auth-links a {
    color: var(--primary-color);
    font-weight: 600;
    transition: color 0.3s;
}

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

.login-error,
.register-error {
    background-color: rgba(239, 68, 68, 0.1);
    color: #e53e3e;
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.login-success {
    background-color: rgba(56, 161, 105, 0.1);
    color: #38a169;
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    border: 1px solid rgba(56, 161, 105, 0.2);
}

.password-strength {
    height: 5px;
    background-color: var(--border-color);
    border-radius: 2px;
    margin-top: 0.75rem;
    overflow: hidden;
}

.password-strength span {
    display: block;
    height: 100%;
    width: 0;
    transition: all 0.3s ease;
}

#password-feedback {
    display: block;
    text-align: right;
    margin-top: 0.3rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.form-text {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 0.3rem;
}

.agreement {
    padding: 0.75rem;
    border-radius: var(--border-radius);
    background-color: rgba(var(--primary-color-rgb, 79, 70, 229), 0.05);
    transition: background-color 0.3s;
    margin-bottom: 1.5rem;
}

.agreement:hover {
    background-color: rgba(var(--primary-color-rgb, 79, 70, 229), 0.08);
}

.agreement a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.agreement a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* 模态框响应式样式 */
@media (max-width: 576px) {
    .modal-dialog {
        margin: 1rem;
        width: calc(100% - 2rem);
        max-width: none;
    }
    
    .auth-title {
        font-size: 1.5rem;
    }
    
    .form-floating {
        font-size: 0.9rem;
    }
    
    .auth-submit {
        padding: 0.6rem;
        font-size: 0.95rem;
    }
}
