/* =========================================================
   Ymwl 基础样式（全站加载）
   1. 吸底页脚：短页面页脚贴底
   2. 友情链接页：页头 / 分类标题
   3. 页脚"联系我们"二维码
   ========================================================= */

/* ---------- 1. 吸底页脚 ---------- */
html {
    min-height: 100%;
}
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
body > main {
    flex: 1 0 auto;
}
body > .site-footer {
    flex-shrink: 0;
}

/* ---------- 2. 友情链接页 ---------- */
/* 页头：品牌渐变 */
.sq-links-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #3d68db 0%, #7c5cf0 100%);
}
.sq-links-hero::before {
    content: '';
    position: absolute;
    right: -80px;
    top: -80px;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .09);
}
.sq-links-hero::after {
    content: '';
    position: absolute;
    left: -60px;
    bottom: -90px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .06);
}
.sq-links-hero-title {
    position: relative;
    color: #fff;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 1px;
    margin: 0;
}
.sq-links-hero-title i {
    margin-right: 10px;
}
.sq-links-hero-sub {
    position: relative;
    color: rgba(255, 255, 255, .88);
    font-size: 14px;
    margin: 10px 0 0;
}

/* 分类标题：清爽样式 */
.sq-link-cat {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 17px;
    font-weight: 700;
    color: #1f2733;
    margin: 28px 0 16px;
    padding-left: 12px;
    border-left: 4px solid #4e7cf2;
}
.sq-link-cat i {
    color: #4e7cf2;
}
.sq-link-cat-count {
    background: #eef2ff;
    color: #4e7cf2;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    border-radius: 999px;
    padding: 4px 9px;
}

/* 链接卡片：圆角 + 悬浮 */
.link-item {
    border-radius: 12px;
    transition: box-shadow .2s, transform .2s;
}
.link-item:hover {
    box-shadow: 0 10px 26px rgba(28, 40, 70, .10);
    transform: translateY(-2px);
}

/* ---------- 3. 页脚"联系我们"二维码 ---------- */
.sq-contact-qr {
    float: left;
    margin-right: 14px;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(28, 40, 70, .12);
}
.sq-contact-desc {
    overflow: hidden;
}

/* 深色模式适配 */
html[data-bs-theme="dark"] body .sq-link-cat {
    color: #e8eaee;
}

/* ---------- 4. 壹梦功能集成：导航下拉分类文章数角标（样式移植自壹梦 diy.css） ---------- */
.main-menu .sub-menu li a {
    position: relative;
}
.main-menu .sub-menu .numerji {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    color: #555;
    background: #eee;
    border-radius: 8px;
    text-align: center;
    font-family: Calibri, sans-serif;
    font-size: 12px;
    line-height: 1.4;
    min-width: 32px;
    padding: 1px 6px;
}
@media screen and (max-width: 680px) {
    .main-menu .sub-menu .numerji {
        display: none;
    }
}
html[data-bs-theme="dark"] .main-menu .sub-menu .numerji {
    color: #cbd5e1;
    background: #2a3550;
}

/* ---------- 6. 壹梦功能集成：下拉菜单美化（样式移植自壹梦 diy.css「second level Navigation Style」） ---------- */

/* 顶级菜单项：悬停底部蓝色下划线动画 */
.navbar .nav-list>.menu-item>a {
    position: relative;
}
.navbar .nav-list>.menu-item>a:before {
    content: "";
    position: absolute;
    bottom: 1px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #1d68fc;
    border-radius: 8px 8px 0 0;
    opacity: 0;
    transition: .3s;
}
.navbar .nav-list>.menu-item>a:hover {
    color: #1d68fc !important;
}
.navbar .nav-list>.menu-item>a:hover:before {
    opacity: 1;
    bottom: -1px;
}

/* 子菜单项：字号/内边距/过渡 + 悬停蓝色与左滑缩进 */
.navbar .nav-list .sub-menu .menu-item>a {
    font-size: .875rem;
    padding: .5rem 1rem .5rem 1.5rem;
    position: relative;
    transition: all .3s ease;
}
.navbar .nav-list .sub-menu .menu-item>a:hover,
.navbar .nav-list .sub-menu .menu-item.current-menu-item>a,
.navbar .nav-list .sub-menu .menu-item.current-menu-ancestor>a {
    color: #1d68fc;
    padding-left: 1.75rem;
    opacity: 1;
}

/* ---------- 7. 壹梦功能集成扩展：资源角标 / 内页波浪 / 节日灯笼 / 底部登录栏 ---------- */

/* 7.1 资源文章角标（样式移植壹梦 .vwip10/.vwip30，改为纯 CSS 圆钮） */
.entry-media {
    position: relative;
}
.ymwl-post-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 9;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    font-size: 12px;
    line-height: 1;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .18);
    transition: all .4s ease-in-out;
    pointer-events: none;
}
.ymwl-post-badge.is-pay {
    background: #ffa800;
}
.ymwl-post-badge.is-free {
    background: #22aaff;
}
.ymwl-post-badge img {
    display: block;
    width: 80%;
    height: 80%;
    object-fit: contain;
}

/* 7.2 内页波浪（壹梦 .lang 双层流动波浪，图片已本地化到 assets/images） */
.ymwl-lang {
    position: relative;
    width: 100%;
    height: 60px;
    margin-top: -55px;
    overflow: hidden;
    z-index: 2;
    pointer-events: none;
}
.ymwl-lang__3,
.ymwl-lang__4 {
    position: absolute;
    left: 0;
    top: 0;
    width: 4500px;
    height: 60px;
    background-repeat: repeat-x;
    animation-name: ymwlLangs;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}
.ymwl-lang__3 {
    background-image: url(../images/wave-lang-1.png);
    animation-duration: 18s;
}
.ymwl-lang__4 {
    background-image: url(../images/wave-lang-2.png);
    animation-duration: 12s;
}
html[data-bs-theme="dark"] .ymwl-lang__3 {
    background-image: url(../images/wave-lang-1-dark.png);
}
html[data-bs-theme="dark"] .ymwl-lang__4 {
    background-image: url(../images/wave-lang-2-dark.png);
}
@keyframes ymwlLangs {
    0% {
        margin-left: 0;
    }
    100% {
        margin-left: -1938px;
    }
}

/* 7.3 顶部节日灯笼（壹梦 .deng-box/.deng/.shui 原版结构与配色） */
.ymwl-deng-wrap {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1040;
}
.ymwl-deng-box {
    position: absolute;
}
/* p1 最左 → p4 最右，与后台字段顺序一致 */
.ymwl-deng-p1 {
    top: 30px;
    left: 10px;
}
.ymwl-deng-p2 {
    top: 45px;
    left: 150px;
}
.ymwl-deng-p3 {
    top: 45px;
    right: 150px;
}
.ymwl-deng-p4 {
    top: 30px;
    right: 10px;
}
.ymwl-deng {
    position: relative;
    width: 120px;
    height: 90px;
    margin: 50px;
    background: rgba(216, 0, 15, .8);
    border-radius: 50% 50%;
    transform-origin: 50% -100px;
    animation: ymwlSwing 3s infinite ease-in-out;
    box-shadow: -5px 5px 50px 4px rgba(250, 108, 0, .8);
}
/* 最外侧两个（p1/p4）摆幅周期更长、光晕更小，与内侧错开 */
.ymwl-deng-p1 .ymwl-deng,
.ymwl-deng-p4 .ymwl-deng {
    animation-duration: 5s;
    box-shadow: -5px 5px 30px 4px rgba(252, 144, 61, .8);
}
.ymwl-deng-line {
    position: absolute;
    top: -20px;
    left: 60px;
    width: 2px;
    height: 20px;
    background: #dc8f03;
}
.ymwl-deng-a {
    width: 100px;
    height: 90px;
    margin: 12px 8px 8px 10px;
    border-radius: 50% 50%;
    border: 2px solid #dc8f03;
    background: rgba(216, 0, 15, .1);
}
.ymwl-deng-b {
    width: 45px;
    height: 90px;
    margin: -4px 8px 8px 26px;
    border-radius: 50% 50%;
    border: 2px solid #dc8f03;
    background: rgba(216, 0, 15, .1);
}
.ymwl-deng:before,
.ymwl-deng:after {
    position: absolute;
    left: 29px;
    height: 12px;
    width: 60px;
    content: "";
    display: block;
    border: solid 1px #dc8f03;
    background: linear-gradient(to right, #dc8f03, #ffa500, #dc8f03, #ffa500, #dc8f03);
}
.ymwl-deng:before {
    top: -7px;
    border-radius: 5px 5px 0 0;
}
.ymwl-deng:after {
    bottom: -7px;
    left: 10px;
    margin-left: 20px;
    border-radius: 0 0 5px 5px;
}
.ymwl-deng-t {
    font-family: "华文行楷", "STXingkai", Arial, sans-serif;
    font-size: 2.5rem;
    color: #dc8f03;
    font-weight: 700;
    line-height: 85px;
    text-align: center;
}
.ymwl-shui-a {
    position: relative;
    width: 5px;
    height: 20px;
    margin: -5px 0 0 59px;
    background: #ffa500;
    border-radius: 0 0 5px 5px;
    animation: ymwlSwing 4s infinite ease-in-out;
    transform-origin: 50% -45px;
}
.ymwl-shui-b {
    position: absolute;
    top: 14px;
    left: -2px;
    width: 10px;
    height: 10px;
    background: #dc8f03;
    border-radius: 50%;
}
.ymwl-shui-c {
    position: absolute;
    top: 18px;
    left: -2px;
    width: 10px;
    height: 35px;
    background: #ffa500;
    border-radius: 0 0 0 5px;
}
@keyframes ymwlSwing {
    0% {
        transform: rotate(-10deg);
    }
    50% {
        transform: rotate(10deg);
    }
    100% {
        transform: rotate(-10deg);
    }
}

/* 7.4 页面底部登录栏（壹梦 .wic_slogin 原版样式 1:1 移植：大字居中排版 + 滚动下滑收起/上滑弹出） */
.ymwl-loginbar {
    position: fixed;
    z-index: 1030;
    left: 0;
    bottom: 0;
    width: 100%;
    padding: 20px 0;
    text-align: center;
    height: auto;
    line-height: 45px;
    background: #fff;
    border-top: 1px solid #e6e6e6;
    font-family: "Microsoft YaHei", Arial, sans-serif;
    -webkit-transition: all .5s ease-in-out;
    transition: all .5s ease-in-out;
}
.ymwl-loginbar-info {
    display: inline-block;
    font-size: 22px;
    color: #000;
    letter-spacing: 2px;
    height: 40px;
    line-height: 40px;
    font-weight: 300;
    vertical-align: middle;
}
.ymwl-loginbar-info a {
    color: #f44336;
}
.ymwl-loginbar-info a:hover {
    text-decoration: none;
    color: #d32f2f;
}
.ymwl-loginbar-btnw {
    display: inline-block;
    line-height: 40px;
    height: 40px;
    margin: 0 8px;
    vertical-align: middle;
}
.ymwl-loginbar-btn {
    display: block;
    background: -webkit-gradient(linear, left top, right top, from(#ed1c24), to(#ed1c24));
    background: linear-gradient(90deg, #ed1c24, #ed1c24);
    color: #fff;
    padding: 0 20px;
    border-radius: 50px;
    font-size: 16px;
}
.ymwl-loginbar-btn:hover {
    text-decoration: none;
    color: #fff;
}
.ymwl-loginbar-btn .fa-user {
    color: #fff;
    margin-right: 3px;
}
.ymwl-loginbar-line {
    display: inline-block;
    width: 1px;
    height: 10px;
    background: #ccc;
    vertical-align: middle;
}
.ymwl-loginbar-sns {
    display: inline-block;
    line-height: 40px;
    height: 40px;
    margin: 0 8px;
    white-space: nowrap;
    vertical-align: middle;
}
.ymwl-loginbar-sns a {
    display: block;
    color: #fff;
    padding: 0 20px;
    font-size: 16px;
    border-radius: 50px;
}
.ymwl-loginbar-sns a i {
    color: #fff;
    margin-right: 3px;
}
.ymwl-loginbar-sns a:hover {
    text-decoration: none;
    color: #fff;
}
.ymwl-loginbar-sns-qq a {
    background: #0486f5;
}
.ymwl-loginbar-sns-weixin a,
.ymwl-loginbar-sns-mpweixin a {
    background: #2bac19;
}
/* 壹梦原版 wic_slogin 为纯 fixed 悬浮层，body 不预留 padding（预留会在滚到底时露出空白） */
/* 深色模式适配（壹梦原版无深色，为配合 v5 深色主题补充） */
html[data-bs-theme="dark"] .ymwl-loginbar {
    background: #1f2937;
    border-top-color: #374151;
}
html[data-bs-theme="dark"] .ymwl-loginbar-info {
    color: #d1d5db;
}

/* 移动端：波浪与灯笼过挤直接隐藏；登录栏与壹梦原版一致（max-width:768px 隐藏） */
@media (max-width: 768px) {
    .ymwl-lang {
        display: none;
    }
    .ymwl-deng-wrap {
        display: none;
    }
    .ymwl-loginbar {
        display: none;
    }
}


/* ============ 壹梦彩色标签（壹梦内容页设置 → 文章标签） ============ */
/* 类名 ymwl-post-tags：与侧栏标签云小工具的 .ymwl-tags 区分，避免其素色规则 :not(.is-colorful)（特异性更高）覆盖五色 */
.ymwl-post-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin: 10px 0;
}

.ymwl-post-tags a {
    padding: 4px 10px;
    margin: 0 5px 5px 0;
    font-size: 12px;
    line-height: 16px;
    font-weight: 400;
    color: #fff;
    background-color: #19B5FE;
    border-radius: 2px;
    display: inline-block;
    text-decoration: none;
    transition: opacity .2s, transform .2s;
}

.ymwl-post-tags a:hover {
    color: #fff;
    opacity: .88;
    transform: translateY(-1px);
}

.ymwl-post-tags a:nth-child(5n) {
    background-color: #4A4A4A;
}

.ymwl-post-tags a:nth-child(5n+1) {
    background-color: #ff5e5c;
}

.ymwl-post-tags a:nth-child(5n+2) {
    background-color: #ffbb50;
}

.ymwl-post-tags a:nth-child(5n+3) {
    background-color: #1ac756;
}

.ymwl-post-tags a:nth-child(5n+4) {
    background-color: #19B5FE;
}


/* ============ 面包屑（壹梦风格：当前位置：站点名 > 分类 > 标题，灰底纯文字） ============ */
.ymwl-crumb-wrap {
    padding: 14px 0;
}

.ymwl-breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
    min-width: 0;
    font-size: 13px;
    line-height: 1.9;
    color: #9a9a9a;
}

.ymwl-breadcrumbs .ymwl-crumb-label {
    margin-right: 2px;
    color: #9a9a9a;
}

.ymwl-breadcrumbs a {
    color: #9a9a9a;
    text-decoration: none;
    transition: color .2s;
    white-space: nowrap;
}

.ymwl-breadcrumbs a:hover {
    color: #1d68fc;
    text-decoration: none;
}

.ymwl-breadcrumbs small {
    margin: 0 4px;
    font-size: 12px;
    color: #b5b5b5;
}

.ymwl-breadcrumbs .ymwl-crumb-current {
    min-width: 0;
    max-width: 560px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #9a9a9a;
    font-weight: 400;
}

html[data-bs-theme="dark"] .ymwl-breadcrumbs {
    color: #8c8c8c;
}

html[data-bs-theme="dark"] .ymwl-breadcrumbs a {
    color: #a8aeb8;
}

html[data-bs-theme="dark"] .ymwl-breadcrumbs a:hover {
    color: #4c9cff;
}

html[data-bs-theme="dark"] .ymwl-breadcrumbs small {
    color: #4a4d52;
}

html[data-bs-theme="dark"] .ymwl-breadcrumbs .ymwl-crumb-current {
    color: #d8d8d8;
}

html[data-bs-theme="dark"] .ymwl-breadcrumbs .ymwl-crumb-label {
    color: #8c8c8c;
}

html[data-bs-theme="dark"] .ymwl-breadcrumbs .ymwl-crumb-current {
    color: #9a9a9a;
}

@media (max-width: 768px) {
    .ymwl-breadcrumbs {
        font-size: 12px;
    }

    .ymwl-breadcrumbs .ymwl-crumb-current {
        max-width: 220px;
    }
}
