/*
Theme Name: TPTP-MINIMAL
Description: 基于Layui的极简WordPress主题，支持响应式设计，兼容PC端和移动端
Version: 1.0.0
Author: TPTP Team
Text Domain: tptp-minimal
*/

/* 基础重置和通用样式 */
* {
    box-sizing: border-box;
}

/* 确保WordPress自带菜单不会遮挡头部 */
#wpadminbar {
    z-index: 9998 !important;
}

/* 确保其他WordPress元素不会遮挡头部 */
.wp-block-navigation,
.wp-block-navigation__responsive-container,
.wp-block-navigation__responsive-container-open,
.wp-block-navigation__responsive-container-close,
.wp-block-navigation__responsive-dialog {
    z-index: 9997 !important;
}

/* 确保Ultimate Member模态框等插件不会遮挡头部 */
.um-modal,
.um-popup,
.um-overlay,
.modal-backdrop {
    z-index: 9996 !important;
}

/* WordPress管理员栏适配 - 桌面端 */
.admin-bar .layui-header {
    top: 32px !important;
}

.admin-bar .layui-body {
    margin-top: 82px !important; /* 50px(默认header高度) + 32px(admin-bar高度) */
}

.admin-bar .mobile-menu {
    top: 88px !important; /* 56px(header) + 32px(admin-bar) */
}

/* 为有管理员栏的body添加额外的顶部间距 */
body.admin-bar {
    padding-top: 32px;
}

/* WordPress管理员栏适配 - 移动端（小于782px时管理员栏高度为46px） */
@media screen and (max-width: 782px) {
    .admin-bar .layui-header {
        top: 46px !important;
    }
    
    .admin-bar .mobile-menu {
        top: 102px !important; /* 56px(header) + 46px(admin-bar) */
    }
    
    .admin-bar .layui-body {
        margin-top: 102px !important; /* 56px(header) + 46px(admin-bar) */
    }
    
    body.admin-bar {
        padding-top: 46px;
    }
}

body {
    font-family: "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f8f8;
    margin: 0;
    padding: 0;
}

/* Layui布局适配 */
.layui-layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 头部样式 */
.layui-header {
    background: linear-gradient(135deg, #2F4056 0%, #1a2332 100%);
    border-bottom: 2px solid #5FB878;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    width: 100%;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
    gap: 24px;
}

.site-logo {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    margin-left: 10px;
}

.site-logo-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.site-icon-wrapper {
    flex-shrink: 0;
}

.site-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.1);
}

.site-icon:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.site-title-wrapper {
    flex: 1;
}

.site-logo img {
    display: block;
    max-width: 100%;
    height: auto;
}

.site-title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.site-title a {
    color: #fff !important;
    text-decoration: none;
    transition: all 0.3s ease;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.site-title a:hover {
    color: #5FB878 !important;
    transform: translateY(-1px);
    text-shadow: 0 2px 8px rgba(95, 184, 120, 0.4);
}

.site-description {
    margin: 4px 0 0 0;
    font-size: 13px;
    color: #bbb;
    font-style: italic;
    font-weight: 400;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.custom-logo {
    max-height: 60px;
    width: auto;
    display: block !important;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
    transition: all 0.3s ease;
    opacity: 1;
    visibility: visible;
}

.custom-logo:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.15));
}

/* 确保logo链接正常显示 */
.site-logo a {
    display: block;
    text-decoration: none;
}

.site-logo a:hover {
    text-decoration: none;
}

/* 左侧导航菜单（链接样式，与右侧按钮区分） */
.site-navigation {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    min-width: 0;
}

.main-navigation {
    display: flex;
    align-items: center;
}

.main-navigation .nav-menu,
.main-navigation .layui-nav {
    background: none;
    border: none;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2px;
}

.main-navigation .layui-nav-item {
    margin: 0;
}

.main-navigation .layui-nav-item > a {
    color: #fff;
    font-size: 14px;
    padding: 8px 14px;
    border-radius: 6px;
    transition: all 0.25s ease;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    text-decoration: none;
    display: inline-block;
}

.main-navigation .layui-nav-item > a:hover,
.main-navigation .layui-nav-item.layui-this > a {
    background: rgba(255,255,255,0.15);
    color: #fff;
}

/* 「更多」下拉：标准 ul/li，悬停显示 */
.main-navigation .layui-nav-item-more.nav-has-dropdown {
    position: relative;
}

.main-navigation .layui-nav-item-more .nav-dropdown-trigger {
    cursor: pointer;
}

.main-navigation .layui-nav-item-more .nav-dropdown-caret {
    font-size: 10px;
    margin-left: 4px;
    opacity: 0.9;
}

.main-navigation .layui-nav-child.nav-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    margin: 0;
    padding: 0;
    padding-top: 4px; /* 与按钮之间无空隙，避免鼠标移入时离开 li 导致收起 */
    padding-bottom: 6px;
    padding-left: 0;
    padding-right: 0;
    list-style: none;
    background: #fff;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.12);
    border: 1px solid #e8e8e8;
    border-top: none;
    margin-top: 0;
    z-index: 1000;
}

.main-navigation .layui-nav-item-more:hover .layui-nav-child.nav-dropdown,
.main-navigation .layui-nav-item-more.layui-nav-itemed .layui-nav-child.nav-dropdown {
    display: block;
}

.main-navigation .layui-nav-child.nav-dropdown li {
    margin: 0;
    padding: 0;
    list-style: none;
}

.main-navigation .layui-nav-child.nav-dropdown a {
    display: block;
    padding: 10px 16px;
    color: #333;
    font-size: 14px;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.main-navigation .layui-nav-child.nav-dropdown a:hover {
    background: rgba(95, 184, 120, 0.12);
    color: #2F4056;
}

/* 右侧：注册/登录/个人中心/退出（按钮样式） */
.header-auth-wrap {
    flex: 0 0 auto;
    margin-left: auto;
    margin-right: 10px;
}

.header-auth {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.header-auth .nav-btn {
    display: inline-block;
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    text-align: center;
    text-decoration: none;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.6);
    color: #fff;
    background: transparent;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.header-auth .nav-btn:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.9);
    color: #fff;
}

.header-auth .nav-btn-login,
.header-auth .nav-btn-account {
    background: rgba(95, 184, 120, 0.9);
    border-color: #5FB878;
}

.header-auth .nav-btn-login:hover,
.header-auth .nav-btn-account:hover {
    background: #5FB878;
    border-color: #5FB878;
}

.header-auth .nav-btn-logout:hover {
    border-color: rgba(255,255,255,0.9);
    background: rgba(255,255,255,0.15);
}

/* 移动端菜单 */
.mobile-menu-toggle {
    padding: 8px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.mobile-menu-toggle:hover {
    background-color: rgba(95, 184, 120, 0.2);
}

.mobile-menu-toggle i {
    font-size: 22px;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.mobile-menu {
    display: none !important;
    background: #fff;
    border-top: 1px solid #e6e6e6;
    position: fixed;
    top: 56px; /* 调整为单行header高度 */
    left: 0;
    right: 0;
    z-index: 9998;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 0 0 8px 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.mobile-menu.active {
    display: block !important;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mobile-menu-content .layui-nav {
    background: none;
    border: none;
}

.mobile-menu-content .layui-nav-item {
    border-bottom: 1px solid #f0f0f0;
    background: #fff;
}

.mobile-menu-content .layui-nav-item:last-child {
    border-bottom: none;
}

.mobile-menu-content .layui-nav-item a {
    color: #2F4056 !important;
    padding: 14px 18px;
    display: block;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    background: #fff;
}

.mobile-menu-content .layui-nav-item a:hover {
    background: linear-gradient(135deg, #5FB878 0%, #4a9c5f 100%) !important;
    color: #fff !important;
    transform: translateX(5px);
}

.mobile-menu-content .layui-nav-item.layui-this a {
    background: linear-gradient(135deg, #5FB878 0%, #4a9c5f 100%) !important;
    color: #fff !important;
}

.mobile-menu-content .layui-nav-child.nav-dropdown {
    display: none;
    position: static;
    box-shadow: none;
    border: none;
    border-top: 1px solid #eee;
    margin-top: 0;
    padding-left: 12px;
}
.mobile-menu-content .layui-nav-item-more.layui-nav-itemed .layui-nav-child.nav-dropdown {
    display: block;
}

.mobile-menu-auth {
    padding: 12px 18px;
    border-top: 1px solid #e8e8e8;
    margin-top: 8px;
}
.mobile-menu-auth .header-auth {
    flex-direction: column;
    align-items: stretch;
}
.mobile-menu-auth .nav-btn {
    display: block;
    text-align: center;
    padding: 12px;
    margin-bottom: 8px;
    color: #2F4056;
    border-color: #5FB878;
    background: #fff;
}
.mobile-menu-auth .nav-btn:last-child {
    margin-bottom: 0;
}
.mobile-menu-auth .nav-btn:hover {
    background: rgba(95, 184, 120, 0.15);
    color: #2F4056;
}
.mobile-menu-auth .nav-btn-login,
.mobile-menu-auth .nav-btn-account {
    background: #5FB878;
    color: #fff;
}
.mobile-menu-auth .nav-btn-login:hover,
.mobile-menu-auth .nav-btn-account:hover {
    background: #4a9c5f;
    color: #fff;
}

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

/* 主体内容区域 */
.layui-body {
    flex: 1;
    padding: 40px 20px;
    margin-top: 50px;
}

.main-content {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
    border: 1px solid #f0f0f0;
    max-width: 1200px;
    margin: 0 auto;
}

/* 页面内容样式 */
.page-content {
    padding: 0;
}

.page-article {
    margin-bottom: 30px;
}

.page-article .layui-card-header {
    background: #f8f8f8;
    border-bottom: 1px solid #e6e6e6;
    padding: 20px;
}

.page-title {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    color: #2F4056;
    line-height: 1.3;
}

.page-edit-link {
    margin-top: 10px;
}

.page-edit-link .edit-link a {
    color: #5FB878;
    text-decoration: none;
    font-size: 12px;
}

.page-article .layui-card-body {
    padding: 30px;
}

.page-featured-image {
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
}

.page-content-inner {
    line-height: 1.6;
    font-size: 14px;
}

.page-content-inner p {
    margin-bottom: 20px;
}

.page-content-inner h1,
.page-content-inner h2,
.page-content-inner h3,
.page-content-inner h4,
.page-content-inner h5,
.page-content-inner h6 {
    color: #2F4056;
    margin-top: 30px;
    margin-bottom: 15px;
    font-weight: bold;
}

.page-content-inner h1 { font-size: 20px; }
.page-content-inner h2 { font-size: 18px; }
.page-content-inner h3 { font-size: 16px; }
.page-content-inner h4 { font-size: 15px; }
.page-content-inner h5 { font-size: 14px; }
.page-content-inner h6 { font-size: 13px; }

.page-content-inner ul,
.page-content-inner ol {
    margin-bottom: 20px;
    padding-left: 30px;
}

.page-content-inner li {
    margin-bottom: 8px;
}

.page-content-inner blockquote {
    border-left: 4px solid #5FB878;
    background: #f8f8f8;
    padding: 15px 20px;
    margin: 20px 0;
    font-style: italic;
}

.page-content-inner img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.page-content-inner table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.page-content-inner table th,
.page-content-inner table td {
    border: 1px solid #e6e6e6;
    padding: 10px;
    text-align: left;
}

.page-content-inner table th {
    background: #f8f8f8;
    font-weight: bold;
}

/* 分页链接 */
.page-links {
    margin: 30px 0;
    text-align: center;
}

.page-links .layui-btn {
    margin: 0 5px;
}

/* 搜索表单 */
.search-form {
    position: relative;
    max-width: 300px;
    margin: 0 auto;
}

.search-form .layui-input {
    padding-right: 40px;
    border-radius: 25px;
    border: 1px solid #e6e6e6;
}

.search-form .layui-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    padding: 5px 10px;
    border-radius: 50%;
    width: 30px;
    height: 30px;
}

/* 页脚样式 */
.layui-footer {
    background: linear-gradient(135deg, #2F4056 0%, #1a2332 100%);
    color: #fff;
    padding: 20px 0 20px;
    margin-top: auto;
    border-top: 1px solid #e6e6e6;
}

.footer-content {
    text-align: center;
}

.footer-info {
    max-width: 800px;
    margin: 0 auto;
}

.site-info {
    margin-bottom: 30px;
}

.site-info h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    color: #fff;
    font-weight: 600;
}

.site-info .site-description {
    color: #bbb;
    font-size: 12px;
    margin: 0;
    font-style: italic;
}

.footer-menu {
    margin-bottom: 30px;
}

.footer-nav {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-nav li {
    margin: 0;
}

.footer-nav a {
    color: #ccc;
    text-decoration: none;
    font-size: 15px;
    transition: all 0.3s ease;
    padding: 8px 0;
    position: relative;
}

.footer-nav a:hover {
    color: #5FB878;
    transform: translateY(-1px);
}

.footer-nav a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: #5FB878;
    transition: all 0.3s ease;
}

.footer-nav a:hover:after {
    width: 100%;
    left: 0;
}

.footer-meta {
    border-top: 1px solid #444;
    padding-top: 20px;
}

.footer-meta p {
    margin: 5px 0;
    font-size: 13px;
    color: #999;
}

.footer-meta a {
    color: #5FB878;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-meta a:hover {
    color: #7cc67c;
}

/* 回到顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #5FB878;
    color: #fff;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    z-index: 1000;
}

.back-to-top:hover {
    background: #4a9c5f;
    transform: translateY(-2px);
}

.back-to-top i {
    font-size: 20px;
}

/* 评论区域样式 */
.comments-area {
    margin-top: 30px;
}

.comments-title {
    font-size: 20px;
    color: #2F4056;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #5FB878;
}

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

.comment {
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.comment-meta {
    margin-bottom: 15px;
    font-size: 14px;
    color: #666;
}

.comment-author {
    font-weight: bold;
    color: #2F4056;
}

.comment-content {
    line-height: 1.6;
}

.comment-reply-link {
    color: #5FB878;
    text-decoration: none;
    font-size: 12px;
    margin-left: 10px;
}

.comment-reply-link:hover {
    text-decoration: underline;
}

/* 文章列表样式 */
.posts-container {
    padding: 0;
}

.post-item {
    margin-bottom: 30px;
    transition: all 0.3s ease;
    border: 1px solid #e6e6e6;
}

.post-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.post-item .layui-card-header {
    background: #f8f8f8;
    border-bottom: 1px solid #e6e6e6;
    padding: 20px;
}

.post-title {
    margin: 0 0 12px 0;
    font-size: 18px;
    font-weight: 600;
}

.post-title a {
    color: #2F4056;
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-title a:hover {
    color: #5FB878;
}

.post-meta {
    font-size: 11px;
    color: #999;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

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

.post-meta i {
    font-size: 14px;
}

.post-meta a {
    color: #5FB878;
    text-decoration: none;
}

.post-thumbnail {
    margin: 0;
    overflow: hidden;
}

.post-thumbnail img {
    transition: transform 0.3s ease;
}

.post-item:hover .post-thumbnail img {
    transform: scale(1.05);
}

.post-item .layui-card-body {
    padding: 20px;
}

.post-content {
    line-height: 1.5;
    margin-bottom: 15px;
    font-size: 14px;
}

.post-read-more {
    text-align: right;
}

/* 分页样式 */
.pagination-wrapper {
    margin: 40px 0;
    text-align: center;
}

.layui-laypage {
    display: inline-block;
}

.layui-laypage a,
.layui-laypage span {
    margin: 0 2px;
    border-radius: 4px;
}

/* 无文章提示 */
.no-posts {
    text-align: center;
    margin: 40px 0;
}

.no-posts-content h2 {
    color: #999;
    margin: 20px 0 10px;
}

.no-posts-content p {
    color: #ccc;
    margin-bottom: 20px;
}

/* 404错误页面样式 */
.error-404-content {
    padding: 60px 0;
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
}

.error-card {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.error-content {
    padding: 40px 20px;
}

.error-icon {
    margin-bottom: 30px;
}

.error-title {
    font-size: 72px;
    font-weight: bold;
    color: #5FB878;
    margin: 0 0 10px 0;
    line-height: 1;
}

.error-subtitle {
    font-size: 24px;
    color: #2F4056;
    margin: 0 0 20px 0;
    font-weight: normal;
}

.error-description {
    color: #666;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 40px;
}

.error-actions {
    margin-bottom: 40px;
}

.error-actions .layui-btn {
    margin: 0 10px;
    padding: 10px 20px;
}

.error-search {
    margin-bottom: 40px;
    padding-top: 40px;
    border-top: 1px solid #e6e6e6;
}

.error-search h3 {
    color: #2F4056;
    margin-bottom: 20px;
    font-size: 18px;
}

.error-search .search-form {
    max-width: 400px;
    margin: 0 auto;
}

.error-recent-posts {
    text-align: left;
    padding-top: 40px;
    border-top: 1px solid #e6e6e6;
}

.error-recent-posts h3 {
    color: #2F4056;
    margin-bottom: 20px;
    font-size: 18px;
    text-align: center;
}

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

.recent-posts-list li {
    border-bottom: 1px solid #f0f0f0;
    padding: 15px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.recent-posts-list li:last-child {
    border-bottom: none;
}

.recent-posts-list a {
    color: #333;
    text-decoration: none;
    font-size: 14px;
    flex: 1;
    transition: color 0.3s ease;
}

.recent-posts-list a:hover {
    color: #5FB878;
}

.recent-posts-list .post-date {
    color: #999;
    font-size: 12px;
    margin-left: 15px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .layui-body {
        padding: 30px 15px;
        margin-top: 76px; /* 减少margin，因为header高度降低 */
    }
    
    .admin-bar .layui-body {
        margin-top: 20px !important; /* 76px + 32px */
    }
    
    body.admin-bar {
        padding-top: 32px;
    }
    
    .header-content {
        flex-direction: row; /* 保持水平布局 */
        align-items: center;
        padding: 10px 0; /* 减少padding */
        min-height: auto;
    }
    
    .site-logo {
        flex: 1;
        margin-bottom: 0;
        min-width: 0; /* 允许收缩 */
    }
    
    .site-logo-content {
        flex-direction: row; /* 水平排列 */
        align-items: center;
        gap: 8px;
        text-align: left;
    }
    
    .site-icon-wrapper {
        flex-shrink: 0;
    }
    
    .site-icon {
        width: 36px;
        height: 36px;
        margin: 0;
    }
    
    .site-title-wrapper {
        min-width: 0; /* 允许收缩 */
        overflow: hidden;
    }
    
    .site-title {
        font-size: 16px;
        margin: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .site-description {
        font-size: 11px;
        display: none; /* 移动端隐藏副标题节省空间 */
    }
    
    .site-navigation {
        flex: 0 0 auto;
        justify-content: flex-end;
    }
    
    .page-title {
        font-size: 20px;
    }
    
    .page-article .layui-card-body {
        padding: 20px;
    }
    
    .page-content-inner {
        font-size: 13px;
    }
    
    .post-item .layui-card-header,
    .post-item .layui-card-body {
        padding: 15px;
    }
    
    .post-title {
        font-size: 16px;
    }
    
    .post-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    .layui-footer {
        padding: 15px 0 15px;
    }
    
    .footer-nav {
        flex-direction: column;
        gap: 15px;
    }
    
    .footer-nav li {
        margin: 0;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
    
    /* 移动端菜单样式 */
    body.menu-open {
        overflow: hidden;
    }
    
    .mobile-menu {
        max-height: calc(100vh - 56px); /* 减去header高度 */
        overflow-y: auto;
    }
    
    .admin-bar .mobile-menu {
        max-height: calc(100vh - 88px); /* 减去header和admin-bar高度 */
    }
    
    /* 移动端admin-bar在小于782px时高度为46px */
    @media (max-width: 782px) {
        .admin-bar .mobile-menu {
            max-height: calc(100vh - 102px); /* 56px header + 46px admin-bar */
        }
    }
    
    /* 强制隐藏移动端菜单在PC端 */
    @media (min-width: 769px) {
        .mobile-menu {
            display: none !important;
            opacity: 0 !important;
            visibility: hidden !important;
        }
        
        .mobile-menu-toggle {
            display: none !important;
        }
    }
    
    /* 移动端菜单按钮样式优化 */
    @media (max-width: 768px) {
        .mobile-menu-toggle {
            display: block !important;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 6px;
            padding: 10px;
            transition: all 0.3s ease;
            border: 1px solid rgba(255, 255, 255, 0.2);
        }
        
        .mobile-menu-toggle:hover {
            background: rgba(95, 184, 120, 0.2);
            border-color: rgba(95, 184, 120, 0.4);
        }
        
        .mobile-menu-toggle:active {
            transform: scale(0.95);
        }
    }
    
    /* 404页面移动端样式 */
    .error-404-content {
        padding: 40px 0;
    }
    
    .error-title {
        font-size: 48px;
    }
    
    .error-subtitle {
        font-size: 20px;
    }
    
    .error-actions .layui-btn {
        display: block;
        margin: 10px auto;
        width: 200px;
    }
    
    .recent-posts-list li {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .recent-posts-list .post-date {
        margin-left: 0;
    }
}

@media (max-width: 480px) {
    .layui-header {
        padding: 0 10px;
    }
    
    .site-title {
        font-size: 14px; /* 更小屏幕上进一步缩小字体 */
    }
    
    .site-icon {
        width: 32px; /* 更小的图标 */
        height: 32px;
    }
    
    .mobile-menu-toggle {
        padding: 8px !important; /* 更小的按钮 */
    }
    
    .mobile-menu-toggle i {
        font-size: 18px;
    }
    
    .layui-body {
        padding: 20px 10px;
    }
    
    .page-article .layui-card-body {
        padding: 15px;
    }
    
    .page-title {
        font-size: 18px;
    }
    
    .sidebar {
        margin-top: 20px;
    }
}

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

.page-article {
    animation: fadeIn 0.6s ease-out;
}

/* 打印样式 */
@media print {
    .layui-header,
    .sidebar,
    .layui-footer,
    .back-to-top,
    .mobile-menu-toggle {
        display: none !important;
    }
    
    .layui-body {
        padding: 0;
    }
    
    .main-content {
        box-shadow: none;
        border: none;
    }
    
    .page-article .layui-card {
        border: none;
        box-shadow: none;
    }
}

/* Ultimate Member 插件样式兼容 */
.um {
    max-width: 100% !important;
}

.um-form {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
}

.um-form .um-field {
    margin-bottom: 25px;
}

.um-form .um-field-label label {
    color: #2F4056;
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 6px;
    display: block;
}

.um-form .um-field-area input[type="text"],
.um-form .um-field-area input[type="email"],
.um-form .um-field-area input[type="password"],
.um-form .um-field-area input[type="tel"],
.um-form .um-field-area input[type="url"],
.um-form .um-field-area input[type="number"],
.um-form .um-field-area textarea,
.um-form .um-field-area select {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e6e6e6;
    border-radius: 6px;
    font-size: 14px;
    color: #333;
    background: #fff;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.um-form .um-field-area input:focus,
.um-form .um-field-area textarea:focus,
.um-form .um-field-area select:focus {
    border-color: #5FB878;
    outline: none;
    box-shadow: 0 0 0 3px rgba(95, 184, 120, 0.1);
}

.um-form .um-field-area input::placeholder {
    color: #999;
    font-style: italic;
}

.um-form .um-button {
    background: linear-gradient(135deg, #5FB878 0%, #4a9c5f 100%);
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    box-shadow: 0 3px 8px rgba(95, 184, 120, 0.3);
}

.um-form .um-button:hover {
    background: linear-gradient(135deg, #4a9c5f 0%, #3d8551 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(95, 184, 120, 0.4);
    color: #fff;
    text-decoration: none;
}

.um-form .um-button.um-alt {
    background: transparent;
    color: #5FB878;
    border: 2px solid #5FB878;
    box-shadow: none;
}

.um-form .um-button.um-alt:hover {
    background: #5FB878;
    color: #fff;
    border-color: #5FB878;
}

.um-form .um-col-alt {
    display: flex;
    gap: 15px;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
}

.um-form .um-left,
.um-form .um-right {
    flex: 1;
}

.um-form .um-left .um-button {
    width: 100%;
}

.um-form .um-right .um-button {
    width: 100%;
    text-align: center;
}

.um-req {
    color: #e74c3c;
    margin-left: 3px;
}

/* 表单验证错误样式 */
.um-form .um-field.error input,
.um-form .um-field.error textarea,
.um-form .um-field.error select {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.um-form .um-field.error .um-field-label label {
    color: #e74c3c;
}

.um-form .um-field-error {
    color: #e74c3c;
    font-size: 13px;
    margin-top: 5px;
    display: block;
}

/* 成功消息样式 */
.um-notice.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
}

.um-notice.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
}

/* 注册/登录页面特殊样式 */
.um-page-register .main-content,
.um-page-login .main-content {
    max-width: 500px;
    margin: 5px auto;
}

.um-page-register .page-title,
.um-page-login .page-title {
    text-align: center;
    margin-bottom: 30px;
    color: #2F4056;
}

/* 登录和注册页面美化 */
.login-page .page-title,
.register-page .page-title {
    text-align: center;
    margin-bottom: 10px;
    color: #2F4056;
    font-size: 32px;
    font-weight: 700;
}

.page-subtitle {
    text-align: center;
    color: #666;
    font-size: 16px;
    margin: 0 0 30px 0;
    font-style: italic;
}

.login-page .main-content,
.register-page .main-content {
    max-width: 500px;
    margin: 40px auto;
}

/* 表单容器美化 */
.um-form {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border: 1px solid #f0f0f0;
}

/* 表单字段美化 */
.um-form .um-field {
    position: relative;
    margin-bottom: 25px;
}

.um-form .um-field-label label {
    font-weight: 600;
    color: #2F4056;
    margin-bottom: 8px;
    display: block;
    font-size: 15px;
}

.um-form .um-field-area input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e6e6e6;
    border-radius: 10px;
    font-size: 15px;
    color: #333;
    background: #fff;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.um-form .um-field-area input:focus {
    border-color: #5FB878;
    outline: none;
    box-shadow: 0 0 0 4px rgba(95, 184, 120, 0.15);
    transform: translateY(-1px);
}

.um-form .um-field-area input::placeholder {
    color: #999;
    font-style: italic;
}

/* 按钮美化 */
.um-form .um-button {
    background: linear-gradient(135deg, #5FB878 0%, #4a9c5f 100%);
    color: #fff;
    border: none;
    padding: 14px 35px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    box-shadow: 0 6px 20px rgba(95, 184, 120, 0.3);
    width: 100%;
}

.um-form .um-button:hover {
    background: linear-gradient(135deg, #4a9c5f 0%, #3d8551 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(95, 184, 120, 0.4);
    color: #fff;
    text-decoration: none;
}

.um-form .um-button.um-alt {
    background: transparent;
    color: #5FB878;
    border: 2px solid #5FB878;
    box-shadow: none;
}

.um-form .um-button.um-alt:hover {
    background: #5FB878;
    color: #fff;
    border-color: #5FB878;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(95, 184, 120, 0.3);
}

/* 按钮容器布局 */
.um-form .um-col-alt {
    display: flex;
    gap: 15px;
    justify-content: space-between;
    align-items: center;
    margin-top: 35px;
}

.um-form .um-left,
.um-form .um-right {
    flex: 1;
}

/* 必填字段标识 */
.um-req {
    color: #e74c3c;
    margin-left: 3px;
    font-weight: bold;
}

/* 表单验证样式 */
.um-form .um-field.error input {
    border-color: #e74c3c;
    box-shadow: 0 0 0 4px rgba(231, 76, 60, 0.15);
}

.um-form .um-field.error .um-field-label label {
    color: #e74c3c;
}

.um-form .um-field-error {
    color: #e74c3c;
    font-size: 13px;
    margin-top: 8px;
    display: block;
    font-weight: 500;
}

/* 成功/错误消息 */
.um-notice.success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 10px;
    padding: 15px 20px;
    margin-bottom: 25px;
    box-shadow: 0 4px 12px rgba(21, 87, 36, 0.1);
}

.um-notice.error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 10px;
    padding: 15px 20px;
    margin-bottom: 25px;
    box-shadow: 0 4px 12px rgba(114, 28, 36, 0.1);
}

/* 表单字段状态样式 */
.um-form .um-field-area.focused input {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(95, 184, 120, 0.2);
}

.um-form .um-field-area.filled input {
    border-color: #5FB878;
}

/* 密码强度指示器 */
.um-form .um-field-password .um-field-area {
    position: relative;
}

.um-form .um-field-password .password-strength {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 4px;
    background: #e6e6e6;
    border-radius: 2px;
    margin-top: 5px;
    overflow: hidden;
}

.um-form .um-field-password .password-strength::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #e74c3c 0%, #f39c12 50%, #5FB878 100%);
    transition: width 0.3s ease;
}

.um-form .um-field-password.weak .password-strength::after {
    width: 25%;
    background: #e74c3c;
}

.um-form .um-field-password.medium .password-strength::after {
    width: 50%;
    background: #f39c12;
}

.um-form .um-field-password.strong .password-strength::after {
    width: 75%;
    background: #5FB878;
}

.um-form .um-field-password.very-strong .password-strength::after {
    width: 100%;
    background: #27ae60;
}

/* 表单加载状态 */
.um-form.loading .um-button {
    opacity: 0.7;
    cursor: not-allowed;
    position: relative;
}

.um-form.loading .um-button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 移动端表单优化 */
@media (max-width: 768px) {
    .um-form .um-col-alt {
        flex-direction: column;
        gap: 15px;
    }
    
    .um-form .um-left,
    .um-form .um-right {
        width: 100%;
    }
    
    .um-page-register .main-content,
    .um-page-login .main-content {
        margin: 20px auto;
        padding: 0 15px;
    }
    
    .um-form .um-field-area input[type="text"],
    .um-form .um-field-area input[type="email"],
    .um-form .um-field-area input[type="password"],
    .um-form .um-field-area input[type="tel"],
    .um-form .um-field-area input[type="url"],
    .um-form .um-field-area input[type="number"],
    .um-form .um-field-area textarea,
    .um-form .um-field-area select {
        padding: 14px 16px;
        font-size: 16px;
    }
    
    .um-form {
        padding: 20px;
        margin: 0 10px;
    }
    
    .login-page .page-title,
    .register-page .page-title {
        font-size: 28px;
    }
    
    .page-subtitle {
        font-size: 14px;
    }
}

/* 无障碍支持 */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: #f1f1f1;
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    clip-path: none;
    color: #21759b;
    display: block;
    font-size: 14px;
    font-weight: bold;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}
