/* Element Plus 风格 PC 模板布局与组件补充 */

.ep-layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.ep-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--ep-header-height);
    background: var(--el-bg-color);
    border-bottom: 1px solid var(--el-border-color-light);
    box-shadow: var(--el-box-shadow-lighter);
}

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

.ep-logo img {
    height: 40px;
    width: auto;
    vertical-align: middle;
}

.ep-nav {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
}

.ep-nav > ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}

.ep-nav-item {
    position: relative;
}

.ep-nav-item > a {
    display: inline-flex;
    align-items: center;
    padding: 0 14px;
    height: 36px;
    border-radius: var(--el-border-radius-base);
    color: var(--el-text-color-regular);
    font-size: 15px;
    font-weight: 500;
}

.ep-nav-item > a:hover {
    color: var(--el-color-primary);
    background: var(--el-color-primary-light-9);
}

.ep-nav-item.is-active > a {
    color: var(--el-color-primary);
    background: var(--el-color-primary-light-9);
}

.ep-nav-arrow {
    margin-left: 4px;
    font-size: 10px;
    opacity: 0.65;
}

/* 子菜单与父级之间禁止留 margin，否则鼠标经过空隙时父级失去 :hover，菜单会收起 */
.ep-submenu {
    display: none;
    position: absolute;
    left: 0;
    top: 100%;
    min-width: 180px;
    padding: 8px 0;
    margin: 0;
    background: var(--el-bg-color-overlay);
    border: 1px solid var(--el-border-color-light);
    border-radius: var(--el-border-radius-base);
    box-shadow: var(--el-box-shadow-light);
    list-style: none;
    z-index: 200;
}

.ep-nav-item:hover > .ep-submenu {
    display: block;
}

.ep-submenu li a {
    display: block;
    padding: 8px 16px;
    color: var(--el-text-color-regular);
    font-size: 14px;
}

.ep-submenu li a:hover {
    background: var(--el-fill-color-light);
    color: var(--el-color-primary);
}

.ep-submenu li.is-active > a {
    color: var(--el-color-primary);
    font-weight: 600;
}

/* 三级菜单与二级项之间不留缝；左侧透明带承接鼠标，避免移入时丢 hover */
.ep-submenu-nested {
    left: 100%;
    top: 0;
    margin-left: 0;
    padding-left: 0;
}

.ep-submenu-nested::before {
    content: "";
    position: absolute;
    left: -14px;
    top: 0;
    bottom: 0;
    width: 14px;
}

.ep-submenu > li {
    position: relative;
}

.ep-submenu > li:hover > .ep-submenu-nested {
    display: block;
}

.ep-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.ep-search-popover {
    position: relative;
}

.ep-search-toggle {
    cursor: pointer;
    padding: 8px;
    border-radius: var(--el-border-radius-base);
    color: var(--el-text-color-secondary);
}

.ep-search-toggle:hover {
    background: var(--el-fill-color-light);
    color: var(--el-color-primary);
}

/* 与 ep-submenu 相同：不能与触发区留缝，否则 .ep-search-popover 仅图标高度，鼠标经空隙会丢 hover */
.ep-search-panel {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 0;
    width: 320px;
    padding: 16px;
    padding-top: 20px;
    background: var(--el-bg-color-overlay);
    border: 1px solid var(--el-border-color-light);
    border-radius: var(--el-border-radius-base);
    box-shadow: var(--el-box-shadow-light);
    z-index: 300;
}

.ep-search-panel::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -12px;
    height: 12px;
}

.ep-search-popover:hover .ep-search-panel {
    display: block;
}

.ep-user {
    position: relative;
}

.ep-user-trigger {
    cursor: pointer;
    display: flex;
    align-items: center;
}

.ep-user-trigger img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--el-border-color-lighter);
}

.ep-user-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 0;
    min-width: 200px;
    padding: 8px 0;
    background: var(--el-bg-color-overlay);
    border: 1px solid var(--el-border-color-light);
    border-radius: var(--el-border-radius-base);
    box-shadow: var(--el-box-shadow-light);
    z-index: 300;
}

.ep-user-menu::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -12px;
    height: 12px;
}

.ep-user:hover .ep-user-menu {
    display: block;
}

.ep-user-menu a {
    display: block;
    padding: 10px 16px;
    color: var(--el-text-color-regular);
    font-size: 14px;
}

.ep-user-menu a:hover {
    background: var(--el-fill-color-light);
    color: var(--el-color-primary);
}

.ep-user-hd {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--el-border-color-lighter);
}

.ep-user-hd img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.ep-main {
    flex: 1;
    padding: 20px 0 40px;
}

.ep-container {
    max-width: var(--ep-container-max);
    margin: 0 auto;
    padding: 0 20px;
}

.ep-breadcrumb {
    margin-bottom: 16px;
    font-size: 14px;
    color: var(--el-text-color-secondary);
}

.ep-breadcrumb a {
    color: var(--el-text-color-secondary);
}

.ep-breadcrumb a:hover {
    color: var(--el-color-primary);
}

.ep-breadcrumb .ep-bc-sep {
    margin: 0 8px;
    color: var(--el-text-color-placeholder);
}

.ep-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-start;
}

.ep-col-main {
    flex: 1 1 640px;
    min-width: 0;
}

.ep-col-side {
    flex: 0 1 340px;
    min-width: 280px;
}

@media (max-width: 991px) {
    .ep-col-main,
    .ep-col-side {
        flex: 1 1 100%;
    }
    .ep-nav {
        display: none;
    }
}

.ep-card {
    background: var(--el-bg-color-overlay);
    border-radius: var(--el-border-radius-base);
    border: 1px solid var(--el-border-color-lighter);
    overflow: hidden;
    margin-bottom: 20px;
}

.ep-card-hd {
    padding: 16px 20px;
    border-bottom: 1px solid var(--el-border-color-lighter);
    font-size: 16px;
    font-weight: 600;
    color: var(--el-text-color-primary);
}

.ep-card-bd {
    padding: 20px;
}

.ep-list-item {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--el-border-color-lighter);
}

.ep-list-item:last-child {
    border-bottom: none;
}

.ep-thumb {
    width: 120px;
    height: 80px;
    border-radius: var(--el-border-radius-base);
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
    background-color: var(--el-fill-color);
}

img.ep-thumb {
    object-fit: cover;
    display: block;
}

.ep-thumb--sm {
    width: 72px;
    height: 48px;
}

@media (max-width: 576px) {
    .mobile-hidden {
        display: none !important;
    }
    .ep-list-item {
        flex-direction: column;
    }
    .ep-thumb,
    img.ep-thumb {
        width: 100%;
        height: 160px;
    }
}

.ep-article-title {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 600;
}

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

.ep-article-title a:hover {
    color: var(--el-color-primary);
}

.ep-meta {
    font-size: 13px;
    color: var(--el-text-color-secondary);
}

.ep-meta span,
.ep-meta a {
    margin-right: 12px;
}

.ep-badge {
    display: inline-block;
    padding: 0 8px;
    height: 22px;
    line-height: 22px;
    font-size: 12px;
    border-radius: var(--el-border-radius-round);
    background: var(--el-color-primary-light-9);
    color: var(--el-color-primary);
    margin: 4px 8px 4px 0;
}

.ep-badge.is-plain {
    background: var(--el-fill-color-blank);
    border: 1px solid var(--el-color-primary-light-5);
}

.ep-footer {
    margin-top: auto;
    padding: 20px;
    background: var(--el-bg-color);
    border-top: 1px solid var(--el-border-color-light);
    font-size: 14px;
    color: var(--el-text-color-secondary);
}

.ep-footer-inner {
    max-width: var(--ep-container-max);
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.ep-footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
}

.ep-footer-links a {
    color: var(--el-text-color-secondary);
}

.ep-footer-links a:hover {
    color: var(--el-color-primary);
}

.ep-scrolltop {
    position: fixed;
    right: 24px;
    bottom: 32px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--el-color-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--el-box-shadow);
    z-index: 99;
    border: none;
    transition: opacity 0.2s;
}

.ep-scrolltop:hover {
    opacity: 0.9;
}

/* 分页区域（系统 {$pages} 输出）
   典型结构：<div class="xrpagination"><ul class="pagination"><li class="active"><a>1</a></li>...</ul></div> */
.xrpagination {
    width: 100%;
    margin-top: 24px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.xrpagination ul.pagination {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.xrpagination ul.pagination li {
    margin: 0;
    padding: 0;
    list-style: none;
}

.xrpagination ul.pagination li > a,
.xrpagination ul.pagination li > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 12px;
    font-size: 14px;
    line-height: 1;
    border-radius: var(--el-border-radius-base);
    border: 1px solid var(--el-border-color);
    background: var(--el-bg-color-overlay);
    color: var(--el-text-color-regular);
    box-sizing: border-box;
    text-decoration: none;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}

/* 总条数等无 href 的 <a> */
.xrpagination ul.pagination li > a:not([href]) {
    cursor: default;
    background: var(--el-fill-color-light);
    border-color: var(--el-border-color-lighter);
    color: var(--el-text-color-secondary);
}

.xrpagination ul.pagination li > a[href]:hover {
    color: var(--el-color-primary);
    border-color: var(--el-color-primary-light-5);
}

.xrpagination ul.pagination li.active > a,
.xrpagination ul.pagination li.active > span {
    background: var(--el-color-primary);
    border-color: var(--el-color-primary);
    color: #fff;
    cursor: default;
}

.xrpagination ul.pagination li.active > a:hover {
    color: #fff;
    border-color: var(--el-color-primary);
    background: var(--el-color-primary);
}

.xrpagination ul.pagination li.disabled > a,
.xrpagination ul.pagination li.disabled > span {
    cursor: not-allowed;
    opacity: 0.55;
    background: var(--el-fill-color-light);
}

/* 兼容：分页直接挂在 .xrpagination 下（无 ul） */
.xrpagination > a,
.xrpagination > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 12px;
    font-size: 14px;
    border-radius: var(--el-border-radius-base);
    border: 1px solid var(--el-border-color);
    background: var(--el-bg-color-overlay);
    color: var(--el-text-color-regular);
    box-sizing: border-box;
    text-decoration: none;
}

.xrpagination > a:hover {
    color: var(--el-color-primary);
    border-color: var(--el-color-primary-light-5);
}

.xrpagination .active > span,
.xrpagination .active > a,
.xrpagination li.active > a,
.xrpagination span.current,
.xrpagination .current {
    background: var(--el-color-primary);
    border-color: var(--el-color-primary);
    color: #fff;
}

/* 正文区域 */
.neirong {
    line-height: 1.75;
    font-size: 15px;
    color: var(--el-text-color-regular);
}

.neirong img {
    max-width: 100%;
    height: auto;
}

.fc-show-prev-next {
    font-size: 14px;
    color: var(--el-text-color-secondary);
}

/* Swiper 容器在首页 */
.ep-swiper-wrap {
    border-radius: var(--el-border-radius-base);
    overflow: hidden;
    border: 1px solid var(--el-border-color-lighter);
    background: var(--el-bg-color-overlay);
}

.ep-swiper-wrap .swiper-slide img {
    display: block;
    width: 100%;
    height: 400px;
    object-fit: cover;
}

/* 提示页 / 404 */
.ep-auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: linear-gradient(135deg, var(--el-color-primary-light-9) 0%, var(--el-fill-color-light) 100%);
}

.ep-auth-card {
    width: 100%;
    max-width: 480px;
    text-align: center;
}

.ep-auth-card .el-card__body {
    padding: 40px 32px;
}

.ep-404-visual {
    width: 100%;
    max-width: 280px;
    height: 160px;
    margin: 0 auto 16px;
    border-radius: var(--el-border-radius-base);
    background: linear-gradient(145deg, var(--el-color-primary-light-7), var(--el-color-primary-light-9));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    font-weight: 700;
    color: var(--el-color-primary);
}

/* ========== 页面模块化（模板不写内联 style） ========== */
.ep-mt-8 {
    margin-top: 8px;
}

.ep-mb-20 {
    margin-bottom: 20px;
}

.ep-mb-16 {
    margin-bottom: 16px;
}

.ep-mt-16 {
    margin-top: 16px;
}

.ep-flex-grow {
    flex: 1;
    min-width: 0;
}

.ep-list-desc {
    margin: 0 0 8px;
    font-size: 14px;
    color: var(--el-text-color-secondary);
    line-height: 1.6;
}

.ep-list-desc--tight {
    line-height: 1.5;
}

.ep-list-item--flush {
    padding: 0;
    border: none;
}

.ep-side-hit-row {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.ep-side-hit-title {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: var(--el-text-color-primary);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

a.ep-side-hit-title:hover {
    color: var(--el-color-primary);
}

.ep-side-hit-desc {
    font-size: 12px;
    color: var(--el-text-color-secondary);
    margin-top: 4px;
}

.ep-latest-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--el-border-color-lighter);
}

.ep-latest-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--el-text-color-primary);
    text-decoration: none;
}

a.ep-latest-title:hover {
    color: var(--el-color-primary);
}

.ep-latest-time {
    font-size: 12px;
    color: var(--el-text-color-secondary);
    margin-top: 4px;
}

.ep-yqlj-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--el-border-color-lighter);
}

.ep-card-body--tight-y {
    padding-top: 8px;
    padding-bottom: 8px;
}

.ep-btn-icon-noshrink {
    flex-shrink: 0;
}

.ep-header-search-input {
    width: 100%;
    margin-bottom: 12px;
}

.ep-header-search-submit {
    width: 100%;
}

.ep-user-name {
    font-weight: 600;
}

.ep-user-meta {
    font-size: 12px;
    color: var(--el-text-color-secondary);
}

/* 搜索页筛选区 */
.ep-search-filters {
    margin-bottom: 24px;
}

.ep-search-row {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.ep-search-row--center {
    align-items: center;
}

.ep-search-label {
    width: 72px;
    font-weight: 600;
    flex-shrink: 0;
}

.ep-search-field {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ep-search-divider {
    border-bottom: 1px dashed var(--el-border-color);
    margin: 12px 0;
}

.ep-search-keyword-wrap {
    width: 260px;
    max-width: 100%;
}

/* 详情页 */
.ep-show-card-body {
    padding: 28px;
}

.ep-show-title {
    margin: 0 0 16px;
    font-size: 22px;
    font-weight: 600;
    color: var(--el-text-color-primary);
}

.ep-show-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
    font-size: 13px;
    color: var(--el-text-color-secondary);
}

.ep-show-tags {
    margin-top: 24px;
}

.ep-show-prevnext-wrap {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--el-border-color-lighter);
}

.ep-show-related {
    margin-top: 28px;
}

.ep-show-related-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
}

.ep-show-related-grid {
    gap: 16px;
}

.ep-show-related-col {
    flex: 1 1 calc(33.333% - 12px);
    min-width: 200px;
}

.ep-related-card {
    height: 100%;
}

.ep-related-cover {
    display: block;
    height: 140px;
    overflow: hidden;
    border-radius: 4px 4px 0 0;
}

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

.ep-related-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--el-text-color-primary);
}

a.ep-related-title:hover {
    color: var(--el-color-primary);
}

.ep-related-desc {
    font-size: 12px;
    color: var(--el-text-color-secondary);
    margin: 8px 0;
}

.ep-related-date {
    font-size: 12px;
    color: var(--el-text-color-placeholder);
}

/* 单页 */
.ep-page-card {
    margin-top: 16px;
}

.ep-page-body {
    padding: 32px 40px;
}

.ep-page-title {
    text-align: center;
    margin: 0 0 24px;
    font-size: 26px;
    font-weight: 600;
}

/* 频道封面标题链 */
.ep-cat-title-link {
    font-size: 16px;
    font-weight: 600;
}

/* 提示 / 404 文案 */
.ep-msg-icon-box {
    font-size: 48px;
    margin-bottom: 16px;
}

.ep-msg-icon--ok {
    color: var(--el-color-success);
}

.ep-msg-icon--err {
    color: var(--el-color-danger);
}

.ep-msg-title {
    margin: 0 0 12px;
    font-size: 20px;
    font-weight: 600;
}

.ep-msg-actions {
    font-size: 14px;
    color: var(--el-text-color-secondary);
}

.ep-404-msg {
    margin: 0 0 20px;
    font-size: 15px;
    color: var(--el-text-color-secondary);
}

/* 可视化编辑占位（dev/action） */
.ep-dev-hint {
    text-align: center;
    padding-top: 30px;
}
