/**
 * Moedes 移动端响应式样式
 * 专注于移动设备适配和响应式布局
 */

/* ============================================
   移动端响应式设计
   ============================================ */

@media (max-width: 768px) {
    /* 防止页面横向滚动 */
    html, body {
        overflow-x: hidden;
        max-width: 100vw;
    }
    
    /* 强制论坛布局在手机端单栏显示 */
    .forum-three-column-layout {
        display: block;
        width: 100%;
        max-width: 100vw;
        grid-template-columns: none;
    }
    
    /* 侧边栏在手机端堆叠显示 */
    .forum-left-sidebar,
    .forum-right-sidebar {
        width: 100%;
        float: none;
        display: block;
    }
    
    /* 主内容区占满宽度 */
    .forum-main-content {
        width: 100%;
        float: none;
    }
    
    /* 容器适配手机屏幕 */
    .container,
    .main-container {
        width: 100%;
        max-width: 100vw;
        padding-left: 15px;
        padding-right: 15px;
    }
    
    /* 手机端图片优化 - 等比例缩放，不强制高度 */
    .imgbox-container.lists-imgs span img.fit-cover {
        width: auto !important;
        height: auto !important;
        max-width: 120px !important;
        max-height: 80px !important;
        object-fit: contain !important;
        object-position: center !important;
    }
    
    .imgbox-container.lists-imgs {
        gap: 2px;
    }
    
    /* 论坛头部手机端优化 */
    .forum-header {
        padding: 6px;
        margin: 6px 0;
    }
    
    .forum-header .plate-thumb {
        width: 60px;
        height: 60px;
    }
    
    .forum-header .forum-title {
        font-size: 14px;
    }
    
    .forum-header .px12-sm {
        gap: 4px;
        font-size: 11px;
    }
    
    .forum-header .more-btns {
        top: 6px;
        right: 6px;
        gap: 4px;
    }
    
    .forum-header .desc {
        font-size: 12px;
        padding: 6px 0 4px 8px;
    }
    
    /* 视图切换功能已移除 */
    
    /* 返回顶部按钮手机端优化 */
    #move-to-top {
        bottom: 15px;
        right: 15px;
        width: 45px;
        height: 45px;
    }
    
    /* 目录功能手机端优化 */
    .toc-container {
        padding: 10px;
        margin: 15px 0;
    }
    
    .toc-title {
        font-size: 14px;
    }
    
    .toc-list li {
        padding-left: 12px;
    }
    
    /* 下拉菜单手机端优化 */
    .dropdown-menu {
        min-width: 100px;
        font-size: 14px;
    }
    
    .dropdown-menu a {
        padding: 6px 10px;
    }
    
    /* 按钮在手机端的调整 */
    .forum-header .more-btns .btn-follow,
    .forum-header .more-btns .dropdown > a {
        padding: 3px 6px;
        font-size: 10px;
        width: 20px;
        height: 20px;
    }
}

/* 平板端适配 */
@media (max-width: 1024px) and (min-width: 769px) {
    .forum-header .plate-thumb {
        width: 75px;
        height: 75px;
    }
    
    .forum-header .forum-title {
        font-size: 16px;
    }
    
    .imgbox-container.lists-imgs span img.fit-cover {
        width: auto !important;
        height: auto !important;
        max-width: 180px !important;
        max-height: 120px !important;
        object-fit: contain !important;
        object-position: center !important;
    }
}

/* 超小屏幕优化 */
@media (max-width: 480px) {
    .forum-header {
        padding: 4px;
    }
    
    .forum-header .plate-thumb {
        width: 50px;
        height: 50px;
    }
    
    .forum-header .forum-title {
        font-size: 13px;
    }
    
    .forum-header .desc {
        font-size: 11px;
    }
    
    .imgbox-container.lists-imgs span img.fit-cover {
        width: auto !important;
        height: auto !important;
        max-width: 120px !important;
        max-height: 80px !important;
        object-fit: contain !important;
        object-position: center !important;
    }
    
    #move-to-top {
        width: 40px;
        height: 40px;
        bottom: 10px;
        right: 10px;
    }
}/**
 * Moedes 论坛核心样式
 * 专注于论坛布局和基础样式
 */

/* 强制显示的板块头部样式 */
.moedes-plate-header-forced {
    margin-bottom: 20px;
}

/* ============================================
   论坛头部样式
   ============================================ */

.forum-header.blur-header,
.forum-header {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    padding: 12px;
    margin: 0 0 8px 0;
    position: relative;
    overflow: visible;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* 移除背景遮罩和模糊效果 */
.forum-header .abs-blur-bg,
.forum-header .forum-mask {
    display: none;
}

/* 中间容器透明化 */
.forum-header .header-content {
    display: contents;
}

/* 上栏：图片、标题、统计数据 */
.forum-header .flex.ac {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    margin: 0 0 2px 0;
    position: relative;
}

/* 图片区域 */
.forum-header .plate-thumb {
    width: 85px;
    height: 85px;
    flex-shrink: 0;
    overflow: hidden;
    border: 1px solid #e9ecef;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.forum-header .plate-thumb:hover {
    transform: scale(1.02);
}

.forum-header .plate-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 信息区域 */
.forum-header .item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 85px;
    height: auto;
    position: relative;
}

/* 标题行 */
.forum-header .title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    margin-bottom: 0;
}

.forum-header .forum-title {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.2;
}

.forum-header .forum-title a {
    color: #000;
    text-decoration: none;
}

.forum-header .forum-title a:hover {
    color: #ff9800;
}

/* 标签样式 */
.forum-header .badg {
    background: #e9ecef;
    color: #495057;
    border: 1px solid #dee2e6;
    padding: 2px 8px;
    font-size: 12px;
    text-decoration: none;
}

/* 统计数据行 */
.forum-header .px12-sm.mt10 {
    display: flex;
    gap: 8px;
    margin-top: auto;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.forum-header .mate-posts,
.forum-header .mate-reply,
.forum-header .mate-views,
.forum-header .mate-follow {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 500;
    margin: 0;
    white-space: nowrap;
}

.forum-header .mate-posts {
    background: #fff3e0;
    border: 1px solid #ff9800;
    color: #ff9800;
}

.forum-header .mate-follow {
    background: #e3f2fd;
    border: 1px solid #2196f3;
    color: #2196f3;
}

.forum-header .mate-reply {
    background: #f3e5f5;
    border: 1px solid #9c27b0;
    color: #9c27b0;
}

.forum-header .mate-views {
    background: #e8f5e8;
    border: 1px solid #4caf50;
    color: #4caf50;
}

/* 中间虚线分隔 */
.forum-header .item-info::after {
    content: '';
    display: block;
    width: 100%;
    height: 1px;
    margin: 10px 0;
    border-style: dashed;
    border-width: 1px 0 0 0;
    border-color: #bbb;
    opacity: 0.5;
}

/* 社团说明区域 */
.forum-header .desc-container {
    display: flex;
    align-items: center;
    order: 3;
    margin: 2px 0 0 0;
    width: 100%;
    min-height: 32px;
}

.forum-header .desc {
    background: none;
    border: none;
    padding: 4px 0;
    margin: 0;
    font-size: 13px;
    color: #666;
    line-height: 1.3;
    display: flex;
    align-items: center;
    width: 100%;
    padding-left: 10px;
}

.forum-header .desc::before {
    content: "社团说明";
    display: inline-block;
    color: #ff6b6b;
    font-weight: 600;
    font-size: 12px;
    margin-right: 6px;
    background: #fff;
    padding: 2px 4px;
    border: 1px solid #ff6b6b;
}

/* ============================================
   论坛视图样式
   ============================================ */

/* 详细视图样式 */
html body.forum-view-detail .forum-posts,
html body.forum-view-detail .bbs-post-item {
    background: #ffffff;
    background-color: #ffffff;
    padding: 15px;
    margin-bottom: 12px;
    border: 1px solid #e5e5e5;
    display: block;
    flex-direction: column;
}

html body.forum-view-detail .forum-posts:hover,
html body.forum-view-detail .bbs-post-item:hover {
    background: #f8f9fa;
    background-color: #f8f9fa;
}

/* 简约视图样式 */
html body.forum-view-mini .forum-posts,
html body.forum-view-mini .bbs-post-item {
    padding: 8px 12px;
    margin-bottom: 6px;
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    flex-direction: row;
}

/* 头部顶部样式 */
.forum-header-top {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 10px 0;
    text-align: center;
    color: white;
    font-weight: 600;
    margin-bottom: 10px;
}

.forum-header-top .container {
    max-width: var(--mian-max-width);
    margin: 0 auto;
    padding: 0 15px;
}

.forum-header-top h1 {
    margin: 0;
    font-size: 24px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}/**
 * Moedes 图片布局专用样式
 * 专注于图片排列和显示逻辑
 */

/* ============================================
   图片布局核心功能
   ============================================ */

/* 预隐藏多图容器，防止初始大图显示 */
.imgbox-container.lists-imgs:not(.count-1):not(.layout-ready) {
    opacity: 0;
    visibility: hidden;
    transition: none;
}

/* 布局就绪后立即显示 */
.imgbox-container.lists-imgs:not(.count-1).layout-ready {
    opacity: 1;
    visibility: visible;
    transition: none;
}

/* 基础布局 - 水平排列 */
.imgbox-container.lists-imgs:not(.count-1) {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 4px;
    overflow: visible;
    width: auto;
    max-width: none;
    align-items: flex-start;
    justify-content: flex-start;
}

/* 图片容器 */
.imgbox-container.lists-imgs:not(.count-1) > span {
    flex: 0 0 auto;
    flex-shrink: 0;
    flex-grow: 0;
    display: block;
    border-radius: 4px;
    overflow: visible;
    position: relative;
    padding-bottom: 0;
    margin: 0;
    width: auto;
    height: auto;
}

/* 图片样式 - 等比例缩放，不裁剪 */
.imgbox-container.lists-imgs:not(.count-1) > span > img {
    position: static;
    object-fit: contain;
    display: block;
    border-radius: 4px;
    background-color: transparent;
    flex-shrink: 0;
    max-width: 300px;
    max-height: 200px;
    width: auto;
    height: auto;
    min-width: auto;
    min-height: auto;
    top: auto;
    left: auto;
    right: auto;
    bottom: auto;
    transform: none;
}

/* 防止任何闪烁和变形 */
.imgbox-container.lists-imgs:not(.count-1),
.imgbox-container.lists-imgs:not(.count-1) > span,
.imgbox-container.lists-imgs:not(.count-1) > span > img {
    transition: none;
    animation: none;
}

/* 图片容器优化样式 */
html body .imgbox-container.lists-imgs:not(.count-1) {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 4px;
    overflow: visible;
    width: auto;
    max-width: none;
    align-items: flex-start;
    justify-content: flex-start;
}

/* 强制覆盖动态添加的样式 */
.imgbox-container.lists-imgs:not(.count-1)[style*="transform"] {
    transform: none !important;
}

.imgbox-container.lists-imgs:not(.count-1)[style*="height"] {
    height: auto !important;
}

.imgbox-container.lists-imgs:not(.count-1)[style*="margin-bottom"] {
    margin-bottom: 10px !important;
}

/* 阻止容器缩放和负边距 */
body .imgbox-container.lists-imgs,
html .imgbox-container.lists-imgs,
.imgbox-container.lists-imgs[style] {
    transform: none !important;
    margin-bottom: 10px !important;
    scale: none !important;
}

/* 强制等比例缩放，最高优先级 - 永不裁剪 */
body .imgbox-container.lists-imgs:not(.count-1) > span > img,
body .imgbox-container.lists-imgs:not(.count-1) > span > img.fit-cover,
html .imgbox-container.lists-imgs:not(.count-1) > span > img,
html .imgbox-container.lists-imgs:not(.count-1) > span > img.fit-cover,
.imgbox-container.lists-imgs:not(.count-1) > span > img[style],
.imgbox-container.lists-imgs:not(.count-1) > span > img.fit-cover[style],
.imgbox-container.lists-imgs span img.fit-cover {
    object-fit: contain !important;
    object-position: center !important;
    max-width: 300px !important;
    max-height: 200px !important;
    width: auto !important;
    height: auto !important;
    border-radius: 4px !important;
}

/* 特别针对移动端的fit-cover类 */
@media (max-width: 768px) {
    .imgbox-container.lists-imgs span img.fit-cover {
        max-width: 150px !important;
        max-height: 100px !important;
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    .imgbox-container.lists-imgs span img.fit-cover {
        max-width: 180px !important;
        max-height: 120px !important;
    }
}

@media (max-width: 480px) {
    .imgbox-container.lists-imgs span img.fit-cover {
        max-width: 120px !important;
        max-height: 80px !important;
    }
}

/* 终极强制覆盖 - 处理所有可能的情况 */
body .imgbox-container.lists-imgs span img,
html body .imgbox-container.lists-imgs span img,
.imgbox-container.lists-imgs span img,
.imgbox-container.lists-imgs span img.fit-cover,
.imgbox-container.lists-imgs:not(.count-1) span img,
.imgbox-container.lists-imgs:not(.count-1) span img.fit-cover {
    object-fit: contain !important;
    object-position: center !important;
    width: auto !important;
    height: auto !important;
    max-width: 300px !important;
    max-height: 200px !important;
    border-radius: 4px !important;
}

/* 阻止内联样式覆盖 - 最高优先级 */
.imgbox-container.lists-imgs[style] {
    transform: none !important;
    scale: 1 !important;
    margin-bottom: 10px !important;
}

.imgbox-container.lists-imgs span[style] {
    transform: none !important;
    scale: 1 !important;
}

.imgbox-container.lists-imgs span img[style] {
    object-fit: contain !important;
    width: auto !important;
    height: auto !important;
    max-width: 300px !important;
    max-height: 200px !important;
    transform: none !important;
    scale: 1 !important;
}/**
 * 页面内容对齐和间距修复
 * 与主页保持一致的自然对齐模式
 */

/* 为页面主容器添加适度的顶部间距，避免太靠近导航但不破坏与侧边栏的对齐 */
.container.page-content-box,
.container.page-content-nobox {
    margin-top: 20px;
}

/* 确保所有白色容器有正确的底部间距 */
.main-bg.radius8.main-shadow {
    margin-bottom: 20px;
}

/* 侧边栏小工具间距保持一致 */
.sidebar .zib-widget {
    margin-bottom: 20px;
}

/* 内容布局优化 */
.content-layout {
    padding-top: 0;
}

/* 响应式设计 - 移动端调整 */
@media (max-width: 768px) {
    .container.page-content-box,
    .container.page-content-nobox {
        margin-top: 20px !important;
    }
    
    .content-layout > .main-bg.radius8.main-shadow:first-child {
        margin-top: 15px;
    }
}/**
 * 导航布局修复 - 确保顶部导航在侧边栏上方并占据全宽度
 */

/* 简单的全宽容器向右偏移 */

html {
    --header-bg: #ffffff !important;
    --blur-bg: #ffffff !important;
    --header-color: #333333 !important;
}

:root {
    --header-bg: #ffffff !important;
    --blur-bg: #ffffff !important;
    --header-color: #333333 !important;
}

body {
    --header-bg: #ffffff !important;
    --blur-bg: #ffffff !important;
    --header-color: #333333 !important;
}

/* 暗色主题设置 */
html.dark-theme,
.dark-theme,
body.dark-theme {
    --header-bg: #323335 !important;
    --blur-bg: #323335 !important;
    --header-color: #ffffff !important;
}

/* 导航背景强制设置 */
html body .header,
html body .navbar-top,
body .header,
body .navbar-top {
    --header-bg: #ffffff !important;
    --blur-bg: #ffffff !important;
}

/* 顶部导航固定布局 */
.header,
.navbar-top {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 1050 !important;
    background: var(--header-bg) !important;
    background-color: var(--header-bg) !important;
    border-bottom: 1px solid #e0e0e0 !important;
    box-shadow: none !important;
    margin: 0 !important;
}

/* 导航容器背景 */
.header.header-layout-1 .navbar-top.center,
.container-header,
.header .navbar,
.navbar-top .navbar {
    background: var(--header-bg) !important;
    background-color: var(--header-bg) !important;
}


/* 导航内容容器 */
.header .container-fluid,
.navbar-top .container-fluid {
    max-width: none !important;
    padding: 0 15px !important;
    margin: 0 !important;
    width: 100% !important;
}

/* 页面内容与固定导航的间距 */
body {
    padding-top: 62px !important;
}

/* 主内容区间距调整 */
body:not(.home) main,
body:not(.home) .main-bg.radius8.main-shadow {
    margin-top: 5px !important;
}

.home .tab-content,
.home main.container,
.home .main-bg.radius8.main-shadow,
.home .container.page-content-box {
    margin-top: 0px !important;
}

.home .forum-top-widgets-bar {
    margin: 0 0 10px 0 !important;
}

/* 桌面端左侧导航空间 */
@media (min-width: 1025px) {
    html body {
        margin-left: 200px !important;
    }
}

/* 左侧导航栏定位 */
.moedes-sidebar-nav {
    top: 53px !important;
    height: calc(100vh - 53px) !important;
    z-index: 999 !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
    font-family: inherit !important;
}

.moedes-sidebar-nav * {
    font-family: inherit !important;
    font-size: inherit !important;
}

.sidebar-nav-content {
    top: 53px !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* 移动端适配 */
@media (max-width: 768px) {
    body {
        padding-top: 62px !important;
    }
    
    .moedes-sidebar-nav {
        top: 53px !important;
        height: calc(100vh - 53px) !important;
    }
}

/* 侧边栏显示控制 */
body.forum-two-column-page .moedes-sidebar-nav {
    display: block !important;
}

body.forum-three-column-page:not(.forum-two-column-page) .moedes-sidebar-nav {
    display: none !important;
}

/* 导航菜单优化 */
.navbar-nav {
    margin: 0 !important;
}

.navbar-nav .dropdown-menu,
.navbar-nav .sub-menu {
    z-index: 1051 !important;
}

/* fund页面特定样式 */
body.page-template-pagesMoedes-fund-game-php .anime-stock-game {
    margin-top: 10px !important;
}

/* 论坛主容器对齐 - 与内容保持一致 */
#forum {
    max-width: var(--mian-max-width) !important;
    margin: 0 auto !important;
    padding: 0 15px !important;
}

/* 全宽容器对齐 - 与论坛主容器保持一致 */
.container.fluid-widget {
    max-width: var(--mian-max-width) !important;
    margin: 10px auto 0 auto !important;
    padding: 0 15px !important;
}

/* 超大屏幕缩放节点 */
@media (min-width: 1800px) {
    #forum,
    .container.fluid-widget,
    .home main.container,
    .home .container.page-content-box,
    .container:not(.fluid-widget) {
        max-width: 1600px !important;
        padding: 0 20px !important;
    }
}

@media (min-width: 2000px) {
    #forum,
    .container.fluid-widget,
    .home main.container,
    .home .container.page-content-box,
    .container:not(.fluid-widget) {
        max-width: 1800px !important;
        padding: 0 25px !important;
    }
}


/* 确保版块页面内容不被导航遮挡 */
body.tax-plate_cat,
.tax-plate_cat {
    padding-top: 62px !important; /* 与其他页面保持一致 */
}

/* 版块页面的主要内容调整 */
body.tax-plate_cat main,
body.tax-plate_cat .container,
.tax-plate_cat main,
.tax-plate_cat .container {
    margin-top: 10px;
}


