@media screen and (max-width: 768px) {
    html, body {
        font-size: 4vw;
        width: 100%;
        -webkit-tap-highlight-color:transparent
    }
    a:hover {
      color: inherit;
    }
    .headerBox,.headerKox{
        height: 15vw;
    }
    
    .headerBox .box {
        width: 100%;
        padding: 0 3vw;
    }
    .headerBox .box .logoBox .logo {
        height: 10vw;
    }
    .headerBox .box .logoBox .title {
        margin-left: 3vw;
        font-size: 4.8vw;
    }
    .headerBox .box .search {
        display: none;
    }
    .headerBox .box .navs .item,.headerBox .box .navs .btns {
        display: none;
    }
    .headerBox .box .navs .iconfont {
        display: block;
        font-weight: bold;
        font-size: 20px;
    }
    .drawer .item{
        font-size: 4vw;
        color: var(--theme-color);
    }
    .drawer .item,.drawer a{
        display: block;
        height: 10vw;
        line-height: 10vw;
        font-size: 4vw;
        color: var(--theme-color);
        text-align: center;
    }
    .searchBox .search {
        margin-top: 5vw;
        height: 12.5vw;
        border-radius: 12.5vw;
    }
    .searchBox .search input {
        border-radius: 12.5vw;
        font-size: 4.2vw;
        padding-left: 5vw;
    }
    .searchBox .search .btn {
        width: 15vw;
        height: 12.5vw;
    }
    .searchBox .search .btn .iconfont{
        font-size: 5.8vw;
    }
    .home {
        flex-wrap: wrap;
        margin-top: 10vw;
    }
    .home .nav{
        font-size: 4.2vw;
        padding: 0 3vw 2vw;
    }
    .home .nav img {
        width: 6vw;
        height: 6vw;
        margin-right: 2.6vw;
    }
    .home .content {
        min-height: auto;
    }
    
    .home .content .list{
        padding: 0 0 2vw 2vw;
    }
    .home .content .list .item {
        width: 26.8vw;
        margin: 1vw;
        padding: 1vw 0;
    }
    
    .home .content .list .item .img {
        height: 40vw;
    }
    .home .content .list .item p{
        margin-top: 2vw;
    }
    
    
    .home .content .list .item:hover{
        transform: translateY(0);
    }
    
    .home.homeNO .block {
        margin: 0;
        margin-bottom: 5vw;
        width: 100%;
        flex: auto;
    }
    
    .home.homeNO .content .list {
        padding: 0 3vw 3vw;
    }
    .home.homeNO .content .list .item{
        max-width: 100%;
    }
    
    
    .footerBox {
        padding: 5vw;
    }
    .footerBox .box {
        width: 100%;
    }
    .footerBox .box p {
        font-size: 11px;
        padding: 3px 0;
    }
    
    
    .listBox {
        width: 100%;
        min-height: calc(100vh - 60vw);
        display: flex;
        flex-wrap: wrap;
        align-content: flex-start;
    }
    .listBox .screen{
        width: 100%;
        margin: 0 3vw;
    }
    .listBox .screen .fixed h3{
        display: none;
    }
    
    .listBox .right {
        display: none;
    }
    .listBox .left {
        padding: 0 4vw;
    }
    
    .listBox h3 {
        position: relative;
        padding: 20.4vw 0 0;
        font-size: 3.8vw;
        text-align: center;
    }
    .listBox h3:after {
        display: none;
    }
    .listBox .box {
        padding: 0 4vw 6vw;
        margin-top: 4vw;
        text-align: justify;
        min-height: calc(100% - 50vw);
    }
    .listBox .Ebox{
        padding: 0 4vw 5vw;
        margin-top: 4vw;
        margin-bottom: 4vw;
        text-align: justify;
    }
    .listBox .left .Ebox .list .item:last-child{
        padding: 5vw 0 0;
    }
    .Qloading {
        padding-top: 6vw;
    }
    .Qtips{
        padding-top: 5.6vw;
    }
    .loader{
        font-size: 18px;
    }
    .Qbtn{
        padding-top: 5vw;
    }

    .listBox .left .list {
        padding: 0;
    }
    .listBox .left .list .item {
        padding: 5vw 0;
    }
    .listBox .left .list .item .title {
        font-size: 4.6vw;
        padding-bottom: 1.2vw;
    }
    .listBox .left .list .item .btns{
        justify-content: space-between;
    }
        
    .listBox .left .list .item .btns .btn{
        margin-right: 0;    
    }
    .listBox .left .list .item .btns .btn .iconfont{
        font-size: 4.5vw;
        margin-right: 1vw;
    }
    .listBox .left .list .item .btns .btn .icon{
        width: 4.6vw;
        margin-right: 1vw;
    }
    .listBox .left .list .item .type{
        margin-top: 2vw;
    }
    .listBox .left .list .item .type::after{
    	top: -1vw;
    	font-size: 5.3vw;
    }
    
    
    .listBox .details{
        padding-top: 5vw;
    }
    .details .title {
        font-size: 4.8vw;
        margin-bottom: 4vw;
    }
    .details .cat {
        display: flex;
        font-size: 4.2vw;
    }
    .details .pic {
        width: 30vw;
        height: 40vw;
        margin: 2vw auto 5vw;
    }
    
    
    .searchList{
        position: fixed;
        left: 0;
        right: 0;
        z-index: 10;
        padding: 0 5vw 2vw;
        display: block;
        background-color: var(--theme-background);
    }
    .searchList .search {
        margin-top: 3vw;
    }
    .searchList .search .select{
        font-size: 3.8vw;
        line-height: 13.2vw;
        height: 12.5vw;
        width: 20vw;
        text-align: center;
        opacity: .8;
    }
    .searchList .search input {
        padding-left: 3vw;
    }
    
    .listBox .screen .box{
        padding: 0 4vw 6vw;
        margin-top: 17.5vw;
        display: none;
    }
    
    
    .searchDetail{
        position: fixed;
        left: 0;
        right: 0;
        z-index: 10;
        padding: 0 5vw 2vw;
        display: block;
        background-color: var(--theme-background);
    }
    .searchDetail .search {
        margin-top: 3vw;
    }
    .searchDetail .search input {
        padding-left: 5vw;
    }
    .detailBox{
        min-height: inherit;
    }
    .detailBox h3{
        display: none;
    }
    .detailBox .details {
        padding-top: 5vw;
        margin-top: 20vw;
        min-height: inherit;
    }
    .listBox .details.samelistBox{
        padding: 3vw;
        margin-top: 0;
    }
    .detailBox h3.samelistNav{
        display: block;
        position: relative;
        padding: 30px 0 17px 15px;
        font-size: 4.2vw;
        text-align: left;
    }
    .detailBox h3.samelistNav:after {
        display: block;
    }
    .samelist .item {
        width: 100%;
    }
    .samelist .item p {
        padding: 4px 6px;
    }
        
    
    .switch-items {
        gap: 4.2vw;
        padding-top: 20vw;
    }
    .switch-items a {
        font-size: 3.8vw;
    }

    .btns2 {
        height: 8.2vw;
        line-height: 8.2vw;
        font-size: 3.4vw;
        width: 25vw;
        bottom: 4vw;
    }
    .listBox .left .Ebox .list .item:last-child .btns2{
        bottom: 0;
    }

    .dialogUrlBox{
        width: 90vw;
        background: #fff !important;
    }
    .el-dialog.dialogUrlBox{
        background: #fff !important;
    }
    .dialogUrlBox .el-dialog{
        background: #fff !important;
    }
    .dialogUrlBox .el-dialog__header{
        background: #fff !important;
    }
    .dialogUrlBox .el-dialog__body{
        background: #fff !important;
    }
    .dialogUrlBox .dialogUrl{
        background: #fff !important;
    }
    .el-overlay .el-dialog.dialogUrlBox{
        background: #fff !important;
    }
    .el-overlay-dialog .dialogUrlBox{
        background: #fff !important;
    }
    .el-overlay-dialog .el-dialog{
        background: #fff !important;
    }

    /* 分类页面移动端样式 */
    .categoryBox {
        padding: 3vw;
    }

    .categoryHeader {
        padding: 5vw 0;
        margin-bottom: 5vw;
    }

    .categoryHeader h1 {
        font-size: 6vw;
    }

    .categoryHeader .total {
        font-size: 3.5vw;
    }

    .categoryContent {
        flex-direction: column;
        gap: 5vw;
    }

    .categoryLeft {
        width: 100%;
    }

    .categoryMenu {
        position: static;
        padding: 4vw;
    }

    .menuTitle {
        font-size: 4.5vw;
        margin-bottom: 3vw;
        padding-bottom: 2.5vw;
    }

    .menuList {
        gap: 1.5vw;
    }

    .menu-item {
        padding: 3vw 4vw;
        font-size: 3.8vw;
    }

    .menu-item .iconfont {
        font-size: 4vw;
        margin-right: 2vw;
    }

    .categoryRight {
        width: 100%;
    }

    .resourceList {
        padding: 4vw;
    }

    .resourceList .list {
        gap: 4vw;
    }

    .resourceList .item {
        padding: 4vw;
    }

    .resourceList .item .title {
        font-size: 4.5vw;
        margin-bottom: 2.5vw;
    }

    .resourceList .item .description {
        font-size: 3.5vw;
        margin-bottom: 3vw;
    }

    .resourceList .item .meta {
        gap: 3vw;
        font-size: 3.2vw;
        margin-bottom: 3vw;
    }

    .resourceList .item .meta .iconfont {
        font-size: 3.2vw;
    }

    .resourceList .item .actions {
        flex-direction: column;
        gap: 2vw;
    }

    .resourceList .item .actions .btn {
        padding: 2.5vw 4vw;
        font-size: 3.5vw;
        width: 100%;
    }

    .resourceList .item .actions .btn .iconfont {
        font-size: 3.5vw;
        margin-right: 1.5vw;
    }

    .resourceList .pagination {
        margin-top: 5vw;
        padding-top: 4vw;
    }

    .resourceList .empty {
        padding: 15vw 4vw;
    }
}
/* ===== 移动端底部 Tab（首页 / 分类 / 我的） ===== */
.mobile-tabbar {
    display: none;
}

@media screen and (max-width: 768px) {
    body {
        padding-bottom: calc(60px + env(safe-area-inset-bottom));
    }

    .mobile-tabbar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 998;
        display: flex;
        align-items: center;
        height: calc(60px + env(safe-area-inset-bottom));
        padding-bottom: env(safe-area-inset-bottom);
        background: #121c2a;
        border-top: 1px solid var(--theme-border);
        touch-action: manipulation;
    }

    [data-theme="light"] .mobile-tabbar {
        background: #ffffff;
        border-top-color: rgba(0, 0, 0, 0.08);
        box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.06);
    }

    .mobile-tabbar .tab-item {
        flex: 1 1 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        padding: 8px 0 4px;
        color: var(--theme-text-secondary);
        text-decoration: none;
        font-size: 12px;
        line-height: 1;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
        -webkit-user-select: none;
        user-select: none;
        transition: opacity .08s linear;
    }

    .mobile-tabbar .tab-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 28px;
        height: 28px;
        border-radius: 9px;
        transition: transform .16s ease, background .16s ease;
    }

    .mobile-tabbar .tab-icon svg {
        width: 21px;
        height: 21px;
    }

    .mobile-tabbar .tab-item.is-active {
        color: var(--theme-primary);
        font-weight: 600;
    }

    .mobile-tabbar .tab-item.is-active .tab-icon {
        background: var(--theme-primary-gradient);
        box-shadow: 0 6px 16px rgba(232, 165, 71, 0.32);
        transform: translateY(-1px);
    }

    .mobile-tabbar .tab-item.is-active .tab-icon svg {
        stroke: #1B1206;
    }
}


/* ===== 移动端页面切换顺滑化（2026-11-21 第二版） =====
   放弃跨文档 View Transition：整页快照在手机上反而会顿一下，
   固定底栏还会在快照里重影。改用「骨架先出 + 内容直接呈现」，
   动画只保留骨架淡出，主线程不再被整页透明动画拖住。 */


@media screen and (max-width: 768px) {
    .mobile-tabbar .tab-item {
        transition: opacity .12s ease;
    }

    .mobile-tabbar .tab-item:active {
        opacity: .55;
    }

    .mobile-tabbar .tab-item .tab-icon {
        transition: transform .12s ease, background .16s ease;
    }

    .mobile-tabbar .tab-item:active .tab-icon {
        transform: scale(.9);
    }
}


/* ===== 首屏骨架（2026-11-20 补）=====
   跨页面切换时，新页面 HTML 一到达就先画一层内容骨架，
   Vue 挂载完成后再淡出，避免"整块空白 -> 内容整块跳出"的突兀感 */
.boot-skeleton {
    position: fixed;
    inset: 0 0 64px 0;
    z-index: 9;
    padding: 76px 16px 0;
    box-sizing: border-box;
    background: var(--bs-bg, #0E1620);
    pointer-events: none;
    opacity: 1;
    transition: opacity .2s ease;
}

[data-theme="light"] .boot-skeleton {
    --bs-bg: #F5F2EA;
}

.boot-skeleton.is-done {
    opacity: 0;
}

@media screen and (min-width: 769px) {
    .boot-skeleton {
        display: none !important;
    }
}

.bs-head,
.bs-hero,
.bs-title {
    border-radius: 14px;
    background: var(--bs-fill, rgba(255, 255, 255, .07));
}

[data-theme="light"] .boot-skeleton { --bs-fill: rgba(17, 17, 17, .06); }

.bs-head { height: 26px; width: 42%; margin-bottom: 18px; }
.bs-hero { height: 92px; margin-bottom: 18px; }
.bs-title { height: 18px; width: 30%; margin-bottom: 14px; }

.bs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.bs-card {
    height: 168px;
    border-radius: 14px;
    background: var(--bs-fill, rgba(255, 255, 255, .07));
}

.bs-head, .bs-hero, .bs-title, .bs-card {
    animation: bsPulse 1.4s linear infinite;
}

@keyframes bsPulse {
    0%, 100% { opacity: .55; }
    50% { opacity: .95; }
}

/* Vue 挂载完成（v-cloak 被移除）后骨架自动让位，支持 :has 的浏览器零延迟隐藏 */
body:has(#app:not([v-cloak])) .boot-skeleton {
    opacity: 0;
}

/* ===== 底栏样式隔离（2026-11-21） =====
   index.css 里给排行榜切换用的通用 .tab-item 规则（圆角、内边距、激活底色）
   会串到手机底部导航，把整条底栏撑成两个橙色圆角色块。这里用高优先级把底栏复位。 */
.mobile-tabbar .tab-item {
    flex: 1 1 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    background: transparent !important;
    background-image: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 8px 0 4px !important;
    margin: 0 !important;
    width: auto !important;
    min-width: 0 !important;
    height: auto !important;
    font-size: 12px !important;
    line-height: 1 !important;
    text-decoration: none !important;
}

.mobile-tabbar .tab-item.is-active,
.mobile-tabbar .tab-item:active {
    background: transparent !important;
    background-image: none !important;
}

.mobile-tabbar .tab-item .tab-icon {
    background: transparent !important;
    background-image: none !important;
}

.mobile-tabbar .tab-item.is-active .tab-icon {
    background: var(--theme-primary-gradient) !important;
}

.mobile-tabbar .tab-item.is-active {
    color: var(--theme-primary) !important;
}
