/* AiStoryer 网站源码系统 V6.0 */
/* 🟡 联动级 - AiStoryer V6.0：修改后全站手机版刷新即生效。 */

/* ==== 手机版特有样式 ==== */

/* 底部导航栏 — 仅移动端显示（桌面端由 style.css .mobile-only 隐藏） */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: #fff;
    border-top: 1px solid #eee;
    display: none;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

@media (max-width: 768px) {
    .bottom-nav.mobile-only {
        display: flex;
    }
}

@media (min-width: 769px) {
    .bottom-nav,
    nav.bottom-nav,
    .bottom-nav.mobile-only {
        display: none !important;
        visibility: hidden !important;
        pointer-events: none !important;
        height: 0 !important;
        overflow: hidden !important;
    }
}

.bottom-nav .tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 10px;
    color: #999;
    text-decoration: none;
}

.bottom-nav .tab.active {
    color: #2196F3;
}

.bottom-nav .tab .icon {
    font-size: 22px;
    margin-bottom: 2px;
}

/* 顶部搜索栏（移动端） */
.top-search {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 45px;
    background: #fff;
    padding: 6px 15px;
    z-index: 1000;
    border-bottom: 1px solid #eee;
    padding-top: env(safe-area-inset-top, 0px);
}

.top-search .search-box {
    display: block;
    width: 100%;
    height: 33px;
    border-radius: 16px;
    background: #f5f5f5;
    line-height: 33px;
    padding: 0 15px;
    color: #d4d4d4;
    font-size: 14px;
    text-decoration: none;
}

/* 移动端页面内容区域补偿 */
body {
    padding-top: 0;
    padding-bottom: 0;
}

@media screen and (max-width: 768px) {
    body {
        padding-top: 45px;
        padding-bottom: 50px;
    }
    
    .desktop-only {
        display: none !important;
    }
    
    .site-header {
        display: none; /* 移动端使用底部导航，隐藏PC头 */
    }
    
    /* 当有顶部搜索栏时，header隐藏 */
    .top-search {
        display: block;
    }
    
    /* 频道切换Tab */
    .channel-tabs {
        display: flex;
        background: #fff;
        padding: 10px 0;
        border-bottom: 1px solid #eee;
    }
    
    .channel-tabs .channel-tab {
        flex: 1;
        text-align: center;
        font-size: 16px;
        font-weight: bold;
        color: #666;
        padding: 8px 0;
        border-bottom: 2px solid transparent;
        cursor: pointer;
    }
    
    .channel-tabs .channel-tab.active {
        color: #2196F3;
        border-bottom-color: #2196F3;
    }
    
    /* 子分类横向滑动 */
    .sub-category-scroll {
        display: flex;
        overflow-x: auto;
        white-space: nowrap;
        padding: 10px 15px;
        background: #fff;
        border-bottom: 1px solid #eee;
        -webkit-overflow-scrolling: touch;
    }
    
    .sub-category-scroll::-webkit-scrollbar {
        display: none;
    }
    
    .sub-category-scroll a {
        display: inline-block;
        padding: 6px 14px;
        margin-right: 8px;
        background: #f0f0f0;
        border-radius: 16px;
        font-size: 13px;
        color: #666;
        text-decoration: none;
    }
    
    .sub-category-scroll a.active {
        background: #2196F3;
        color: #fff;
    }
    
    /* 横向滑动卡片 */
    .horizontal-scroll {
        overflow-x: auto;
        white-space: nowrap;
        padding: 10px 0;
        -webkit-overflow-scrolling: touch;
    }
    
    .horizontal-scroll::-webkit-scrollbar {
        display: none;
    }
    
    .scroll-cards {
        display: inline-flex;
        gap: 12px;
    }
    
    .scroll-cards .card {
        width: 120px;
        display: inline-block;
        white-space: normal;
    }
    
    .card .card-cover {
        width: 120px;
        height: 160px;
        background: #ddd;
        border-radius: 6px;
        margin-bottom: 6px;
    }
    
    .card .card-title {
        font-size: 14px;
        font-weight: bold;
        line-height: 1.35;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        word-break: break-word;
        overflow-wrap: anywhere;
    }
    
    .card .card-author {
        font-size: 12px;
        color: #999;
    }
    
    /* 文章列表调整 */
    .article-card {
        padding: 15px;
        margin-bottom: 10px;
    }
    
    .article-card h3 {
        font-size: 18px;
    }
    
    /* 阅读页调整 */
    .article-content {
        margin: 0;
        border-radius: 0;
        box-shadow: none;
        padding: 15px;
    }
    
    .article-title {
        font-size: 22px;
    }
    
    .article-body {
        font-size: 16px;
        line-height: 1.8;
    }
    
    /* 分类网格手机端 */
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .category-item {
        padding: 15px 10px;
        font-size: 14px;
    }
    
    /* 我的页面 */
    .profile-header {
        padding: 30px 15px;
        background: #fff;
        text-align: center;
        margin-bottom: 15px;
    }
    
    .menu-list {
        background: #fff;
        margin-bottom: 15px;
    }
    
    .menu-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 15px;
        border-bottom: 1px solid #f5f5f5;
    }
    
    .menu-item:last-child {
        border-bottom: none;
    }
}