/*
Theme Name: WPLMS Pro
Theme URI: https://www.wplms.cn
Author: wplms365
Author URI: https://www.wplms.cn
Description: WPLMS在线教育学习系统主题 - 支持AI和视频加密可私有云部署，响应式设计，现代化UI
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: wplmspro
Tags: education, lms, ai, responsive, custom-menu
*/

/* 基础重置 */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: #F8FAFC;
    color: #0f172a;
    overflow-x: hidden;
    font-family: 'Noto Sans SC', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 导航毛玻璃效果 */
.glass-nav {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

/* 卡片毛玻璃效果 */
.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
}

/* 渐变文字 */
.text-gradient {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 背景装饰球 */
.bg-blob {
    position: absolute;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.5;
    border-radius: 50%;
}

/* 文章缩略图 */
.post-thumbnail-wrapper img {
    border-radius: 1rem;
    transition: transform 0.5s ease;
}

.post-card-simple:hover .post-thumbnail-wrapper img {
    transform: scale(1.05);
}

/* 侧边栏毛玻璃效果 */
.glass-sidebar {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
}

/* ============================================
   导航栏样式
   ============================================ */

/* 主菜单样式 */
.nav-desktop-menu {
    display: flex !important;
    align-items: center;
    gap: 1.5rem;
}

/* 移动端适配：横向滚动 */
@media (max-width: 767px) {
    .nav-desktop-menu {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .nav-desktop-menu::-webkit-scrollbar {
        display: none;
    }
}

/* WordPress内容样式优化 */
.wp-content {
    font-size: 1rem;
    line-height: 1.7;
    color: #334155;
}

.wp-content p {
    margin-bottom: 1.25rem;
}

.wp-content h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-top: 2.5rem;
    margin-bottom: 1.25rem;
    color: #1e293b;
    line-height: 1.3;
}

.wp-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: #1e293b;
    border-bottom: 2px solid #eff6ff;
    padding-bottom: 0.5rem;
    line-height: 1.4;
}

.wp-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: #1e293b;
    line-height: 1.4;
}

.wp-content h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: #1e293b;
}

.wp-content h5 {
    font-size: 1rem;
    font-weight: 600;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
    color: #475569;
}

.wp-content h6 {
    font-size: 0.875rem;
    font-weight: 600;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
    color: #64748b;
}

.wp-content img {
    border-radius: 0.75rem;
    margin: 1.5rem auto;
    box-shadow: 0 4px 15px -3px rgba(0, 0, 0, 0.1);
    width: 100%;
    height: auto;
}

.wp-content blockquote {
    border-left: 4px solid #3b82f6;
    background: #f8fafc;
    padding: 1rem 1.25rem;
    border-radius: 0 0.75rem 0.75rem 0;
    margin: 1.5rem 0;
    color: #475569;
    font-style: italic;
}

.wp-content blockquote p:last-child {
    margin-bottom: 0;
}

.wp-content a {
    color: #2563eb;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.wp-content a:hover {
    color: #1d4ed8;
}

.wp-content ul,
.wp-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
    color: #475569;
}

.wp-content li {
    margin-bottom: 0.35rem;
}

.wp-content li > ul,
.wp-content li > ol {
    margin-top: 0.35rem;
    margin-bottom: 0.35rem;
}

/* Markdown 代码样式 */
.wp-content code {
    font-family: 'SF Mono', 'Fira Code', 'Monaco', 'Consolas', monospace;
    font-size: 0.875em;
    background: #f1f5f9;
    padding: 0.2em 0.4em;
    border-radius: 4px;
    color: #e11d48;
}

.wp-content pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    font-size: 0.875rem;
    line-height: 1.6;
}

.wp-content pre code {
    background: transparent;
    padding: 0;
    color: inherit;
    font-size: inherit;
}

/* Markdown 表格样式 */
.wp-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.9375rem;
}

.wp-content table th {
    background: #f8fafc;
    font-weight: 600;
    text-align: left;
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    color: #1e293b;
}

.wp-content table td {
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
}

.wp-content table tr:nth-child(even) td {
    background: #f8fafc;
}

.wp-content table tr:hover td {
    background: #eff6ff;
}

/* Markdown 分割线 */
.wp-content hr {
    border: none;
    border-top: 2px solid #e2e8f0;
    margin: 2rem 0;
}

/* Markdown 任务列表 */
.wp-content input[type="checkbox"] {
    margin-right: 0.5rem;
    accent-color: #3b82f6;
}

/* Markdown 删除线 */
.wp-content del {
    color: #94a3b8;
}

/* Markdown 上标下标 */
.wp-content sup,
.wp-content sub {
    font-size: 0.75em;
}

/* Markdown 脚注 */
.wp-content .footnotes {
    font-size: 0.875rem;
    border-top: 1px solid #e2e8f0;
    padding-top: 1rem;
    margin-top: 2rem;
}

.wp-content .footnote-ref {
    font-size: 0.75rem;
    vertical-align: super;
}

/* 页面头部背景 */
.page-header-bg {
    background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
    position: relative;
    overflow: hidden;
}

/* 文章卡片 */
.post-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    transition: all 0.3s ease;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
}

.post-img-wrapper img {
    transition: transform 0.5s ease;
}

.post-card:hover .post-img-wrapper img {
    transform: scale(1.05);
}

/* 区块标题 */
.section-header {
    text-align: center;
    max-width: 48rem;
    margin: 0 auto 4rem auto;
}

/* 动画关键帧 */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

@keyframes pulse-slow {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.8; }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-float-delayed {
    animation: float 6s ease-in-out 3s infinite;
}

.animate-pulse-slow {
    animation: pulse-slow 4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .wp-content {
        font-size: 1rem;
    }
    
    .wp-content h2 {
        font-size: 1.5rem;
    }
    
    .wp-content h3 {
        font-size: 1.25rem;
    }
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 4rem;
}

.pagination .page-numbers {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    background: white;
    border: 1px solid #e5e7eb;
    color: #4b5563;
    font-weight: 500;
    transition: all 0.2s ease;
}

.pagination .page-numbers:hover {
    background: #f3f4f6;
    color: #2563eb;
}

.pagination .page-numbers.current {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

/* 移动端菜单 */
.mobile-menu {
    display: none;
    position: fixed;
    top: 5rem;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    z-index: 40;
}

/* 宽屏下始终隐藏移动端菜单 */
@media (min-width: 768px) {
    .mobile-menu {
        display: none !important;
    }
}

/* 窄屏下active时显示 */
@media (max-width: 767px) {
    .mobile-menu.active {
        display: block;
    }
}

.mobile-menu a {
    display: block;
    padding: 0.75rem 1rem;
    color: #374151;
    font-weight: 500;
    border-radius: 0.5rem;
}

.mobile-menu a:hover {
    background: #eff6ff;
    color: #2563eb;
}

/* Gutenberg 区块宽度控制 */
.wp-content > * {
    max-width: 100%;
}

/* 普通内容宽度 */
.wp-content > p,
.wp-content > h1,
.wp-content > h2,
.wp-content > h3,
.wp-content > h4,
.wp-content > h5,
.wp-content > h6,
.wp-content > ul,
.wp-content > ol,
.wp-content > blockquote,
.wp-content > pre {
    max-width: 48rem;
    margin-left: auto;
    margin-right: auto;
}

/* 宽区块 */
.wp-content .alignwide,
.wp-content .wp-block-alignwide {
    max-width: 80rem;
    margin-left: auto;
    margin-right: auto;
}

/* 全宽区块 */
.wp-content .alignfull,
.wp-content .wp-block-alignfull {
    max-width: none;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
}

/* 文章内容区内的图片 */
.wp-content img {
    max-width: 100%;
    height: auto;
}

/* 确保首页区块样式正确 */
section > .max-w-7xl {
    margin-left: auto;
    margin-right: auto;
}

/* 广告模块样式 */
.wplms-ad-module {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid #bfdbfe;
    transition: all 0.3s ease;
}

.wplms-ad-module:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.15);
    border-color: #93c5fd;
}

.wplms-ad-module a {
    text-decoration: none;
}

.wplms-ad-module p {
    margin: 0;
    line-height: 1.5;
}

/* 侧边栏广告模块样式 */
.wplms-sidebar-ad {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid #bfdbfe;
    box-shadow: 0 4px 15px -3px rgba(59, 130, 246, 0.15);
    transition: all 0.3s ease;
}

.wplms-sidebar-ad:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.2);
}

.wplms-sidebar-ad p {
    margin: 0;
    line-height: 1.5;
}

/* 底部链接菜单样式 */
.wplms-footer-links {
    font-size: 13px;
}

.wplms-footer-links a {
    color: #cccccc;
    text-decoration: none;
}

.wplms-footer-links a:hover {
    color: #ffffff;
}

/* 文章目录导航样式 */
.wplms-toc {
    max-height: 400px;
    overflow-y: auto;
}

.wplms-toc-nav {
    font-size: 0.875rem;
}

.wplms-toc-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.wplms-toc-nav li {
    margin: 0;
    padding: 0;
}

.wplms-toc-nav a {
    display: block;
    padding: 0.5rem 0;
    color: #64748b;
    text-decoration: none;
    border-left: 2px solid transparent;
    padding-left: 0.75rem;
    transition: all 0.2s ease;
    line-height: 1.5;
}

.wplms-toc-nav a:hover {
    color: #3b82f6;
    border-left-color: #3b82f6;
    background: linear-gradient(to right, #eff6ff, transparent);
}

.wplms-toc-nav a.active {
    color: #2563eb;
    border-left-color: #2563eb;
    font-weight: 500;
    background: linear-gradient(to right, #eff6ff, transparent);
}

/* 层级缩进样式 - H2到H5 */
.wplms-toc-nav .toc-level-0 {
    font-weight: 500;
    color: #334155;
    padding-left: 0.75rem;
}

.wplms-toc-nav .toc-level-1 {
    padding-left: 1.5rem;
    font-size: 0.8125rem;
}

.wplms-toc-nav .toc-level-2 {
    padding-left: 2.25rem;
    font-size: 0.75rem;
    color: #94a3b8;
}

.wplms-toc-nav .toc-level-3 {
    padding-left: 3rem;
    font-size: 0.6875rem;
    color: #94a3b8;
}

/* 目录导航sticky定位 */
.wplms-toc-sticky {
    position: sticky;
    top: 100px; /* 导航栏高度 + 间距 */
}

.wplms-toc .toc-empty {
    color: #94a3b8;
    font-size: 0.875rem;
    text-align: center;
    padding: 1rem 0;
}

/* 目录导航滚动条样式 */
.wplms-toc::-webkit-scrollbar {
    width: 4px;
}

.wplms-toc::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 2px;
}

.wplms-toc::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 2px;
}

.wplms-toc::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
