/* ============================================================
   小说系统 - 移动端响应式适配 V2 (App-like Experience)
   川渝中文网
   ============================================================ */

/* ============================================================
   0. CSS 变量 - 移动端主题
   ============================================================ */
:root {
    --mobile-safe-top: env(safe-area-inset-top, 0px);
    --mobile-safe-bottom: env(safe-area-inset-bottom, 0px);
    --mobile-tab-height: 56px;
    --mobile-header-height: 48px;
    --mobile-primary: #e65540;
    --mobile-bg: #f5f5f5;
    --mobile-card-bg: #ffffff;
    --mobile-text: #333333;
    --mobile-text-secondary: #999999;
    --mobile-border: #eeeeee;
    --mobile-radius: 12px;
    --mobile-touch-highlight: rgba(230, 85, 64, 0.08);
}

/* ============================================================
   1. 基础移动端重置
   ============================================================ */
@media (max-width: 768px) {
    html {
        -webkit-text-size-adjust: 100%;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
    
    body {
        padding-bottom: calc(var(--mobile-tab-height) + var(--mobile-safe-bottom));
        -webkit-overflow-scrolling: touch;
        overflow-x: hidden;
    }
    
    .container {
        max-width: 100%;
        padding: 0 12px;
    }
    
    /* 隐藏桌面端顶部栏 */
    .novel-topbar { display: none !important; }
    
    /* 隐藏桌面端导航 */
    .header-nav { display: none !important; }
    
    /* 隐藏排行榜侧边栏 */
    .rank-sidebar { display: none !important; }
    
    /* 隐藏快捷操作 */
    .quick-actions { display: none !important; }
}

/* ============================================================
   2. 移动端顶部栏
   ============================================================ */
@media (max-width: 768px) {
    .header {
        position: sticky;
        top: 0;
        z-index: 100;
        background: var(--mobile-primary);
        border-bottom: none;
        padding: var(--mobile-safe-top) 0 0;
    }
    
    .header-inner {
        flex-wrap: nowrap;
        padding: 8px 0;
        gap: 10px;
        align-items: center;
    }
    
    .logo {
        flex-shrink: 0;
        font-size: 18px;
    }
    
    .logo-text {
        font-size: 16px;
        white-space: nowrap;
    }
    
    .logo-icon {
        font-size: 22px;
    }
    
    /* 移动端搜索框 */
    .search-box {
        flex: 1;
        max-width: none;
        order: 0;
    }
    
    .search-box input {
        height: 34px;
        border-radius: 17px;
        padding: 0 38px 0 14px;
        font-size: 13px;
        background: rgba(255,255,255,0.95);
        border: none;
    }
    
    .search-box input:focus {
        box-shadow: none;
    }
    
    .search-box button {
        width: 30px;
        height: 30px;
        right: 2px;
        top: 2px;
        font-size: 14px;
    }
    
    /* 移动端搜索建议 */
    .search-suggest {
        border-radius: 8px;
        margin-top: 4px;
        box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    }
    
    .search-suggest-item {
        padding: 12px 16px;
        font-size: 14px;
    }
}

/* ============================================================
   3. 移动端分类导航
   ============================================================ */
@media (max-width: 768px) {
    .category-nav {
        background: var(--mobile-card-bg);
        border-bottom: 1px solid var(--mobile-border);
        position: sticky;
        top: var(--mobile-header-height);
        z-index: 99;
    }
    
    .category-list {
        display: flex;
        overflow-x: auto;
        gap: 0;
        padding: 0;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        scroll-snap-type: x mandatory;
    }
    
    .category-list::-webkit-scrollbar { display: none; }
    
    .category-item {
        flex-shrink: 0;
        padding: 10px 14px;
        font-size: 13px;
        color: var(--mobile-text-secondary);
        white-space: nowrap;
        border-bottom: 2px solid transparent;
        transition: all 0.2s;
        scroll-snap-align: start;
        border-radius: 0;
        background: none;
    }
    
    .category-item:active,
    .category-item.active {
        color: var(--mobile-primary);
        border-bottom-color: var(--mobile-primary);
        background: none;
    }
    
    .cat-icon { font-size: 14px; }
}

/* ============================================================
   4. 移动端底部导航栏 (Tab Bar) V2
   ============================================================ */
.mobile-tabbar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(var(--mobile-tab-height) + var(--mobile-safe-bottom));
    padding-bottom: var(--mobile-safe-bottom);
    background: var(--mobile-card-bg);
    border-top: 1px solid var(--mobile-border);
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}

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

.tabbar-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    text-decoration: none;
    color: var(--mobile-text-secondary);
    font-size: 10px;
    transition: color 0.2s;
    position: relative;
    -webkit-tap-highlight-color: transparent;
    min-height: 44px;
}

.tabbar-item:active {
    background: var(--mobile-touch-highlight);
}

.tabbar-item.active {
    color: var(--mobile-primary);
}

/* 活跃指示器 */
.tabbar-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    background: var(--mobile-primary);
    border-radius: 0 0 3px 3px;
}

.tabbar-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tabbar-icon svg {
    width: 22px;
    height: 22px;
    transition: transform 0.2s;
}

.tabbar-item:active .tabbar-icon svg {
    transform: scale(0.85);
}

.tabbar-label {
    line-height: 1;
    font-size: 10px;
    transition: all 0.2s;
}

.tabbar-item.active .tabbar-label {
    font-weight: 600;
}

/* 角标 */
.tabbar-badge {
    position: absolute;
    top: 2px;
    right: calc(50% - 16px);
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: #ff4d4f;
    color: #fff;
    font-size: 10px;
    line-height: 16px;
    text-align: center;
    border-radius: 8px;
    display: none;
    font-weight: 600;
    box-shadow: 0 1px 4px rgba(255, 77, 79, 0.4);
    animation: badgePop 0.3s ease;
}

@keyframes badgePop {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* 阅读器专用导航 */
.reader-tabbar .tabbar-icon {
    font-size: 20px;
}

/* 快捷操作菜单 */
.tabbar-quick-menu {
    animation: menuIn 0.2s ease;
}

@keyframes menuIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
}

.quick-action-item:active {
    background: var(--mobile-touch-highlight) !important;
}

/* ============================================================
   5. 移动端轮播区域
   ============================================================ */
@media (max-width: 768px) {
    .banner-section { padding: 12px 0; }
    .banner-section .container { display: block; }
    
    .banner-wrapper { width: 100%; border-radius: 8px; }
    .banner-slider { height: 160px; }
    .banner-slide { border-radius: 8px; overflow: hidden; }
    
    .banner-content h2 {
        font-size: 20px;
        margin-bottom: 10px;
    }
    
    .btn-read {
        padding: 8px 20px;
        font-size: 13px;
        border-radius: 20px;
    }
    
    .banner-dots { bottom: 10px; }
    .dot { width: 6px; height: 6px; }
    .dot.active { width: 16px; border-radius: 3px; }
}

/* ============================================================
   6. 移动端书籍卡片
   ============================================================ */
@media (max-width: 768px) {
    .book-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
    
    .book-grid-6 {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 8px !important;
    }
    
    .book-card {
        border-radius: 8px;
        overflow: hidden;
        background: var(--mobile-card-bg);
        box-shadow: 0 1px 4px rgba(0,0,0,0.06);
        transition: transform 0.15s;
    }
    
    .book-card:active {
        transform: scale(0.97);
    }
    
    .book-card:hover {
        transform: none;
        box-shadow: none;
    }
    
    .book-info { padding: 8px; }
    .book-title { font-size: 14px; margin-bottom: 4px; }
    .book-author { font-size: 11px; margin-bottom: 4px; }
    .book-intro { display: none; }
    .book-meta { margin-top: 6px; font-size: 11px; }
    
    /* 小卡片 */
    .book-card-sm .book-info { padding: 6px; }
    .book-card-sm .book-title { font-size: 13px; }
    .book-card-sm .book-intro { display: none; }
    
    /* 列表模式 */
    .book-list { gap: 8px; }
    .book-list-item {
        flex-direction: row;
        padding: 10px;
        border-radius: 8px;
        gap: 10px;
    }
    
    .book-cover-sm {
        width: 70px;
        height: 93px;
        border-radius: 6px;
        flex-shrink: 0;
    }
    
    .book-list-title { font-size: 15px; margin-bottom: 4px; }
    .book-list-author { font-size: 12px; margin-bottom: 4px; }
    .book-list-intro {
        -webkit-line-clamp: 2;
        font-size: 12px;
        margin-bottom: 6px;
    }
    .book-list-meta { flex-wrap: wrap; }
    .tag { font-size: 11px; padding: 2px 8px; }
}

/* ============================================================
   7. 移动端区块
   ============================================================ */
@media (max-width: 768px) {
    .section { padding: 16px 0; }
    .section-gray { background: #f0f0f0; }
    
    .section-header {
        margin-bottom: 12px;
        padding: 0 2px;
    }
    
    .section-title { font-size: 17px; }
    .more-link { font-size: 13px; }
}

/* ============================================================
   8. 移动端书籍详情页
   ============================================================ */
@media (max-width: 768px) {
    .book-info-section { padding: 12px 0; }
    
    .book-info-main {
        display: flex;
        flex-direction: row;
        gap: 12px;
    }
    
    .book-cover-lg {
        width: 120px;
        height: 160px;
        flex-shrink: 0;
        border-radius: 8px;
        overflow: hidden;
    }
    
    .book-cover-lg img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    .book-detail { flex: 1; min-width: 0; }
    
    .book-name {
        font-size: 18px;
        margin-bottom: 6px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .book-meta-bar {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        margin-bottom: 6px;
    }
    
    .meta-tag {
        font-size: 11px;
        padding: 2px 8px;
        border-radius: 10px;
    }
    
    .book-author-name {
        font-size: 13px;
        margin-bottom: 8px;
    }
    
    .book-stats {
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
        margin-bottom: 12px;
    }
    
    .stat-item {
        text-align: center;
    }
    
    .stat-num {
        font-size: 15px;
        font-weight: 600;
        display: block;
    }
    
    .stat-label {
        font-size: 11px;
        color: var(--mobile-text-secondary);
    }
    
    /* 移动端操作按钮 */
    .book-actions {
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
    }
    
    .book-actions .btn {
        flex: 1;
        min-width: 0;
        padding: 10px 8px;
        font-size: 13px;
        text-align: center;
        border-radius: 20px;
    }
    
    /* 互动区域 */
    .book-interact {
        margin-top: 12px;
        gap: 8px;
    }
    
    .interact-section {
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .interact-label {
        font-size: 12px;
    }
    
    .interact-buttons {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .btn-sm {
        padding: 5px 10px;
        font-size: 12px;
        border-radius: 14px;
    }
    
    /* 简介 */
    .book-intro-section { padding: 12px 0; }
    .intro-box { padding: 12px; border-radius: 8px; }
    .intro-title { font-size: 15px; margin-bottom: 8px; }
    .intro-content {
        font-size: 14px;
        line-height: 1.8;
    }
    
    /* 最近更新 */
    .book-latest-section { padding: 12px 0; }
    .latest-chapters { display: flex; flex-direction: column; gap: 6px; }
    .latest-chapter-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 12px;
        background: var(--mobile-card-bg);
        border-radius: 8px;
        font-size: 13px;
    }
    
    .lc-title {
        flex: 1;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .lc-meta {
        font-size: 11px;
        color: var(--mobile-text-secondary);
        flex-shrink: 0;
        margin-left: 8px;
    }
    
    /* 目录 */
    .book-catalog-section { padding: 12px 0; }
    .chapter-list {
        display: grid;
        grid-template-columns: 1fr !important;
        gap: 4px;
    }
    
    .chapter-item {
        padding: 10px 12px;
        font-size: 13px;
        border-radius: 6px;
        background: var(--mobile-card-bg);
    }
    
    /* 相关推荐 */
    .book-related-section { padding: 12px 0; }
    
    /* 评论区 */
    .book-comment-section { padding: 12px 0; }
    .comment-form textarea {
        min-height: 80px;
        font-size: 14px;
        border-radius: 8px;
    }
    
    .comment-item {
        padding: 12px 0;
        border-bottom: 1px solid var(--mobile-border);
    }
    
    .comment-header { margin-bottom: 6px; }
    .comment-user { font-size: 13px; }
    .comment-time { font-size: 11px; }
    .comment-content { font-size: 14px; line-height: 1.7; }
    .comment-footer { gap: 12px; margin-top: 6px; }
}

/* ============================================================
   9. 移动端阅读器增强
   ============================================================ */
@media (max-width: 768px) {
    .reader-body {
        background: #f5f0e8;
        font-size: 16px;
    }
    
    .reader-header {
        padding-top: var(--mobile-safe-top);
        min-height: var(--mobile-header-height);
    }
    
    .reader-header-inner {
        padding: 8px 12px;
        gap: 8px;
    }
    
    .reader-back { font-size: 13px; }
    .reader-book-title { font-size: 13px; }
    .reader-chapter-title { font-size: 12px; }
    .reader-tools { gap: 4px; }
    .tool-btn {
        padding: 4px 8px;
        font-size: 12px;
        border-radius: 12px;
    }
    
    /* 阅读内容 */
    .reader-content {
        padding: calc(var(--mobile-header-height) + 12px) 16px 80px;
        max-width: 100%;
    }
    
    .reader-container {
        padding: 24px 16px;
        border-radius: 0;
        box-shadow: none;
        min-height: calc(100vh - var(--mobile-header-height));
    }
    
    .chapter-title {
        font-size: 20px;
        margin-bottom: 12px;
    }
    
    .chapter-meta {
        font-size: 12px;
        margin-bottom: 20px;
        padding-bottom: 12px;
    }
    
    .chapter-body {
        font-size: 17px;
        line-height: 1.9;
    }
    
    .content-paragraph {
        text-indent: 2em;
        margin-bottom: 1em;
        padding: 2px 0;
    }
    
    /* 设置面板 - 底部弹出 */
    .reader-settings {
        width: 100%;
        bottom: 0;
        top: auto;
        border-radius: 16px 16px 0 0;
        max-height: 65vh;
    }
    
    .settings-panel {
        padding: 16px;
        border-radius: 16px 16px 0 0;
    }
    
    .settings-panel h4 { font-size: 15px; }
    
    /* 目录面板 - 全屏 */
    .reader-catalog {
        width: 100%;
        right: 0;
    }
    
    .catalog-panel {
        width: 100%;
        max-width: 100%;
    }
    
    /* 章节导航 */
    .chapter-nav {
        flex-direction: row;
        gap: 8px;
        padding: 16px 0;
    }
    
    .nav-btn {
        padding: 12px;
        font-size: 14px;
        border-radius: 8px;
    }
    
    .nav-catalog { order: -1; flex: 0 0 auto; padding: 12px 16px; }
    
    /* 章节互动 */
    .chapter-actions {
        gap: 0;
        padding: 16px 0;
    }
    
    .action-btn {
        flex: 1;
        padding: 8px 4px;
    }
    
    .action-icon { font-size: 20px; }
    .action-text { font-size: 11px; }
    
    /* 段评弹窗 */
    .segment-popup {
        min-width: auto;
        max-width: calc(100vw - 24px);
        left: 12px !important;
        right: 12px !important;
        border-radius: 12px;
    }
    
    /* 底部栏 */
    .reader-footer {
        padding-bottom: var(--mobile-safe-bottom);
    }
    
    .reader-footer-inner {
        padding: 8px 16px;
    }
    
    .footer-nav-btn {
        font-size: 13px;
        padding: 6px 12px;
    }
    
    /* 阅读进度条 */
    #readingProgressBar {
        height: 2px;
    }
}

/* ============================================================
   10. 移动端书架
   ============================================================ */
@media (max-width: 768px) {
    .shelf-section { padding: 12px 0; }
    
    .shelf-header {
        margin-bottom: 12px;
    }
    
    .shelf-header h2 {
        font-size: 18px;
    }
    
    /* 工具栏 */
    .shelf-toolbar {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
        padding: 10px;
        background: var(--mobile-card-bg);
        border-radius: 8px;
        margin-bottom: 12px;
        align-items: center;
    }
    
    .shelf-select-all {
        font-size: 13px;
    }
    
    .shelf-toolbar .btn {
        padding: 6px 12px;
        font-size: 12px;
        border-radius: 14px;
    }
    
    .shelf-view-toggle {
        margin-left: auto;
    }
    
    /* 书架网格 */
    .shelf-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
    
    .shelf-card {
        position: relative;
        padding: 0;
        border-radius: 8px;
        overflow: hidden;
        background: var(--mobile-card-bg);
        box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    }
    
    .shelf-card:active {
        transform: scale(0.97);
    }
    
    .shelf-checkbox {
        position: absolute;
        top: 6px;
        left: 6px;
        width: 20px;
        height: 20px;
        border-radius: 50%;
        border: 2px solid #ccc;
        background: rgba(255,255,255,0.8);
        z-index: 2;
        display: none;
    }
    
    .shelf-checkbox.checked {
        background: var(--mobile-primary);
        border-color: var(--mobile-primary);
    }
    
    .shelf-checkbox.checked::after {
        content: '✓';
        color: #fff;
        font-size: 12px;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }
    
    .shelf-remove {
        position: absolute;
        top: 6px;
        right: 6px;
        width: 24px;
        height: 24px;
        border-radius: 50%;
        background: rgba(0,0,0,0.5);
        color: #fff;
        border: none;
        font-size: 12px;
        z-index: 2;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* 阅读历史 */
    .history-section { margin-top: 16px; }
    .history-list {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    
    .history-item {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 10px;
        background: var(--mobile-card-bg);
        border-radius: 8px;
    }
    
    .history-cover {
        width: 50px;
        height: 67px;
        border-radius: 6px;
        overflow: hidden;
        flex-shrink: 0;
    }
    
    .history-info { flex: 1; min-width: 0; }
    .history-title {
        font-size: 14px;
        font-weight: 500;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .history-chapter {
        font-size: 12px;
        color: var(--mobile-text-secondary);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        margin-top: 2px;
    }
}

/* ============================================================
   11. 移动端搜索页
   ============================================================ */
@media (max-width: 768px) {
    .search-page-header {
        padding: 12px 0;
    }
    
    .search-page-input {
        height: 40px;
        border-radius: 20px;
        font-size: 14px;
        padding: 0 40px 0 16px;
    }
    
    .search-filters {
        flex-direction: column;
        gap: 8px;
        padding: 12px 0;
    }
    
    .filter-group {
        width: 100%;
        min-width: 0;
    }
    
    .filter-group select {
        width: 100%;
        height: 36px;
        font-size: 13px;
        border-radius: 8px;
    }
    
    /* 搜索历史 */
    .search-history {
        padding: 12px 0;
    }
    
    .search-history-title {
        font-size: 14px;
        margin-bottom: 10px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .search-history-tags {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .search-history-tag {
        padding: 6px 14px;
        background: var(--mobile-card-bg);
        border-radius: 16px;
        font-size: 13px;
        color: var(--mobile-text);
        box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    }
    
    .search-history-tag:active {
        background: var(--mobile-touch-highlight);
    }
    
    /* 热门搜索 */
    .search-hot {
        padding: 12px 0;
    }
    
    .search-hot-title {
        font-size: 14px;
        margin-bottom: 10px;
    }
    
    .search-hot-list {
        display: flex;
        flex-direction: column;
        gap: 2px;
    }
    
    .search-hot-item {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 10px 12px;
        font-size: 14px;
        border-radius: 8px;
    }
    
    .search-hot-item:active {
        background: var(--mobile-touch-highlight);
    }
    
    .hot-rank {
        width: 22px;
        height: 22px;
        border-radius: 6px;
        background: #f0f0f0;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 12px;
        font-weight: 600;
        flex-shrink: 0;
    }
    
    .hot-rank.top { background: var(--mobile-primary); color: #fff; }
    
    .hot-text { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .hot-count { font-size: 12px; color: var(--mobile-text-secondary); }
}

/* ============================================================
   12. 移动端分类/排行榜页
   ============================================================ */
@media (max-width: 768px) {
    .category-page { padding: 12px 0; }
    
    .category-tabs {
        display: flex;
        overflow-x: auto;
        gap: 0;
        padding: 0;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        border-bottom: 1px solid var(--mobile-border);
    }
    
    .category-tabs::-webkit-scrollbar { display: none; }
    
    .category-tab {
        flex-shrink: 0;
        padding: 10px 16px;
        font-size: 14px;
        color: var(--mobile-text-secondary);
        border-bottom: 2px solid transparent;
        white-space: nowrap;
    }
    
    .category-tab.active {
        color: var(--mobile-primary);
        border-bottom-color: var(--mobile-primary);
    }
    
    /* 排行榜 */
    .rank-page-tabs {
        display: flex;
        gap: 0;
        padding: 12px 0;
        overflow-x: auto;
    }
    
    .rank-page-tab {
        flex-shrink: 0;
        padding: 8px 16px;
        font-size: 13px;
        border-radius: 16px;
        background: var(--mobile-card-bg);
        color: var(--mobile-text-secondary);
        box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    }
    
    .rank-page-tab.active {
        background: var(--mobile-primary);
        color: #fff;
    }
}

/* ============================================================
   13. 移动端用户中心
   ============================================================ */
@media (max-width: 768px) {
    .profile-header {
        padding: 20px 16px;
        background: linear-gradient(135deg, var(--mobile-primary), #ff7a66);
        color: #fff;
        border-radius: 0;
    }
    
    .profile-avatar {
        width: 64px;
        height: 64px;
        font-size: 28px;
    }
    
    .profile-name { font-size: 18px; }
    .profile-stats {
        display: flex;
        gap: 20px;
        margin-top: 12px;
    }
    
    .profile-stat-item { text-align: center; }
    .profile-stat-num { font-size: 18px; font-weight: 600; }
    .profile-stat-label { font-size: 12px; opacity: 0.8; }
    
    /* 菜单列表 */
    .profile-menu {
        padding: 0;
    }
    
    .profile-menu-item {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 14px 16px;
        background: var(--mobile-card-bg);
        border-bottom: 1px solid var(--mobile-border);
        font-size: 15px;
    }
    
    .profile-menu-item:active {
        background: var(--mobile-touch-highlight);
    }
    
    .profile-menu-icon { font-size: 18px; }
    .profile-menu-arrow {
        margin-left: auto;
        color: var(--mobile-text-secondary);
    }
}

/* ============================================================
   14. 移动端分页
   ============================================================ */
@media (max-width: 768px) {
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
        padding: 20px 0;
        gap: 4px;
    }
    
    .pagination a,
    .pagination span {
        min-width: 34px;
        height: 34px;
        padding: 0 10px;
        font-size: 13px;
        border-radius: 8px;
    }
}

/* ============================================================
   15. 移动端页脚
   ============================================================ */
@media (max-width: 768px) {
    .footer {
        padding: 20px 0;
        margin-top: 0;
        border-top: none;
        background: var(--mobile-card-bg);
    }
    
    .footer-hot-words {
        flex-wrap: wrap;
        gap: 6px;
        margin-bottom: 12px;
        padding-bottom: 12px;
    }
    
    .footer-hot-label { font-size: 12px; }
    
    .footer-hot-words a {
        font-size: 12px;
        padding: 3px 8px;
    }
    
    .footer-links {
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
    }
    
    .footer-links a { font-size: 12px; }
    .footer-copyright { font-size: 11px; }
}

/* ============================================================
   16. 移动端弹窗/Modal
   ============================================================ */
@media (max-width: 768px) {
    .modal-overlay {
        align-items: flex-end;
        background: rgba(0,0,0,0.6);
    }
    
    .modal-box {
        width: 100%;
        max-width: 100%;
        max-height: 85vh;
        border-radius: 16px 16px 0 0;
        animation: modalSlideUp 0.3s ease;
    }
    
    @keyframes modalSlideUp {
        from { transform: translateY(100%); opacity: 0; }
        to { transform: translateY(0); opacity: 1; }
    }
    
    .modal-header { padding: 16px 16px 0; }
    .modal-header h3 { font-size: 16px; }
    .modal-body { padding: 12px 16px 24px; }
    
    /* 打赏弹窗 */
    .reward-presets {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    
    .reward-preset-btn { padding: 10px 6px; }
    .reward-preset-btn .amount { font-size: 16px; }
    
    /* 月票弹窗 */
    .ticket-quick-btns { gap: 8px; }
    .ticket-quick-btn { padding: 10px 6px; }
    .ticket-quick-btn .num { font-size: 18px; }
}

/* ============================================================
   17. 移动端 Toast 提示
   ============================================================ */
.mobile-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 12px 24px;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    z-index: 10000;
    text-align: center;
    max-width: 80vw;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    animation: toastIn 0.2s ease;
    pointer-events: none;
}

.mobile-toast.success { background: rgba(82, 196, 26, 0.95); }
.mobile-toast.error { background: rgba(255, 77, 79, 0.95); }
.mobile-toast.warning { background: rgba(255, 162, 0, 0.95); }
.mobile-toast.info { background: rgba(24, 144, 255, 0.95); }

@keyframes toastIn {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* ============================================================
   18. 移动端骨架屏
   ============================================================ */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeletonLoading 1.5s infinite;
    border-radius: 4px;
}

@keyframes skeletonLoading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-card {
    background: var(--mobile-card-bg);
    border-radius: 8px;
    overflow: hidden;
}

.skeleton-cover {
    width: 100%;
    padding-top: 133%;
}

.skeleton-text {
    height: 14px;
    margin: 8px 0;
    border-radius: 4px;
}

.skeleton-text.short { width: 60%; }
.skeleton-text.medium { width: 80%; }

/* ============================================================
   19. 移动端下拉刷新
   ============================================================ */
.pull-refresh-wrapper {
    position: relative;
    overflow: hidden;
}

.pull-refresh-indicator {
    position: absolute;
    top: -50px;
    left: 0;
    right: 0;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--mobile-text-secondary);
    font-size: 13px;
    transition: top 0.3s;
}

.pull-refresh-indicator.show {
    top: 0;
}

.pull-refresh-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--mobile-border);
    border-top-color: var(--mobile-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================================
   20. 移动端左滑操作
   ============================================================ */
.swipe-item {
    position: relative;
    overflow: hidden;
}

.swipe-actions {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    display: flex;
    transform: translateX(100%);
    transition: transform 0.3s;
}

.swipe-item.open .swipe-actions {
    transform: translateX(0);
}

.swipe-action-btn {
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    border: none;
    white-space: nowrap;
}

.swipe-action-btn.danger { background: #ff4d4f; }
.swipe-action-btn.warning { background: #faad14; }
.swipe-action-btn.primary { background: var(--mobile-primary); }

/* ============================================================
   21. 移动端空状态
   ============================================================ */
@media (max-width: 768px) {
    .no-result {
        padding: 40px 20px;
        text-align: center;
    }
    
    .no-result p {
        font-size: 15px;
        color: var(--mobile-text-secondary);
        margin-bottom: 8px;
    }
    
    .no-result-tip {
        font-size: 13px !important;
    }
}

/* ============================================================
   22. 移动端作者后台
   ============================================================ */
@media (max-width: 768px) {
    .author-layout {
        flex-direction: column;
    }
    
    .author-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--mobile-border);
        overflow-x: auto;
    }
    
    .author-nav-list {
        display: flex;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding: 0 12px;
    }
    
    .author-nav-list::-webkit-scrollbar { display: none; }
    
    .author-nav-item {
        padding: 12px 16px;
        flex-shrink: 0;
        font-size: 14px;
        color: var(--mobile-text-secondary);
        border-bottom: 2px solid transparent;
    }
    
    .author-nav-item.active {
        color: var(--mobile-primary);
        border-bottom-color: var(--mobile-primary);
    }
    
    .author-main { padding: 12px; }
    
    /* 统计卡片 */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }
    
    .stat-card {
        padding: 12px;
        border-radius: 8px;
    }
    
    .stat-card-value { font-size: 20px; }
    .stat-card-label { font-size: 12px; }
    
    /* 表格 */
    .data-table { font-size: 12px; }
    .data-table th, .data-table td { padding: 8px 6px; }
}

/* ============================================================
   23. 移动端后台管理
   ============================================================ */
@media (max-width: 768px) {
    .admin-container { flex-direction: column; }
    
    .admin-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--mobile-border);
        overflow-x: auto;
    }
    
    .admin-nav-list {
        display: flex;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    
    .admin-nav-list::-webkit-scrollbar { display: none; }
    
    .admin-nav-item {
        padding: 10px 14px;
        flex-shrink: 0;
        font-size: 13px;
        color: var(--mobile-text-secondary);
        border-bottom: 2px solid transparent;
    }
    
    .admin-nav-item.active {
        color: var(--mobile-primary);
        border-bottom-color: var(--mobile-primary);
    }
    
    .admin-main { padding: 12px; }
    
    .stats-cards {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }
}

/* ============================================================
   24. 移动端私信/聊天
   ============================================================ */
@media (max-width: 768px) {
    .chat-layout {
        flex-direction: column;
    }
    
    .chat-sidebar {
        display: none !important;
    }
    
    .chat-main { width: 100%; }
    
    .chat-messages {
        padding: 12px;
    }
    
    .msg-content {
        max-width: 80%;
        padding: 10px 14px;
        font-size: 14px;
        border-radius: 12px;
    }
    
    .chat-input-bar {
        padding: 8px 10px;
        gap: 8px;
    }
    
    .chat-input {
        flex: 1;
        height: 36px;
        border-radius: 18px;
        padding: 0 14px;
        font-size: 14px;
    }
    
    .chat-send-btn {
        padding: 8px 16px;
        border-radius: 18px;
        font-size: 14px;
    }
}

/* ============================================================
   25. 触摸优化 (所有触屏设备)
   ============================================================ */
@media (hover: none) and (pointer: coarse) {
    /* 增大触摸区域 */
    a, button, .book-card, .conv-item, .rank-item,
    .tabbar-item, .category-item, .chapter-item {
        min-height: 44px;
    }
    
    /* 移除 hover 效果，使用 active */
    .book-card:hover { transform: none; }
    .book-card:active { transform: scale(0.97); }
    
    /* 防止双击缩放 */
    * { touch-action: manipulation; }
    
    /* 移除焦点框 */
    input:focus, textarea:focus, select:focus {
        outline: none;
    }
    
    /* 优化滚动 */
    .category-list, .author-nav-list, .admin-nav-list {
        -webkit-overflow-scrolling: touch;
    }
}

/* ============================================================
   26. 小屏手机 (< 375px)
   ============================================================ */
@media (max-width: 375px) {
    .book-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 8px !important; }
    .book-card { padding: 0; }
    .book-info { padding: 6px; }
    .book-title { font-size: 13px; }
    .book-meta { font-size: 10px; }
    .book-grid-6 { grid-template-columns: repeat(2, 1fr) !important; }
    .section-title { font-size: 15px; }
    .reader-body { font-size: 15px; }
    .reader-container { padding: 20px 12px; }
    .chapter-body { font-size: 16px; }
    
    .tabbar-icon { font-size: 20px; }
    .tabbar-label { font-size: 9px; }
    
    .banner-slider { height: 130px; }
    .banner-content h2 { font-size: 17px; }
}

/* ============================================================
   27. 平板适配 (769px - 1024px)
   ============================================================ */
@media (min-width: 769px) and (max-width: 1024px) {
    .container { max-width: 100%; padding: 0 20px; }
    .book-grid { grid-template-columns: repeat(4, 1fr) !important; }
    .book-grid-6 { grid-template-columns: repeat(4, 1fr) !important; }
}

/* ============================================================
   28. 暗色模式移动端适配
   ============================================================ */
@media (max-width: 768px) {
    .dark-mode .header { background: #1a1a2e; }
    .dark-mode .category-nav { background: #1a1a2e; border-color: #2a2a3e; }
    .dark-mode .category-item { color: #999; }
    .dark-mode .book-card { background: #1a1a2e; }
    .dark-mode .section-gray { background: #0f0f1e; }
    .dark-mode .mobile-tabbar { background: #1a1a2e; border-color: #2a2a3e; }
    .dark-mode .mobile-tabbar .tabbar-item { color: #999; }
    .dark-mode .mobile-tabbar .tabbar-item.active { color: var(--mobile-primary); }
    .dark-mode .mobile-tabbar .tabbar-item.active::before { background: var(--mobile-primary); }
    .dark-mode .search-box input { background: #2a2a3e; color: #fff; }
    .dark-mode .search-suggest { background: #1a1a2e; }
    .dark-mode .search-suggest-item { color: #fff; border-color: #2a2a3e; }
    .dark-mode .shelf-card { background: #1a1a2e; }
    .dark-mode .history-item { background: #1a1a2e; }
    .dark-mode .footer { background: #1a1a2e; }
    .dark-mode .modal-box { background: #1a1a2e; }
    .dark-mode .reader-container { background: #1a1a2e; }
    .dark-mode .tabbar-quick-menu { background: #1a1a2e; }
    .dark-mode .quick-action-item { color: #ddd; }
}

/* ============================================================
   29. 移动端通知列表
   ============================================================ */
@media (max-width: 768px) {
    .notif-list { padding: 0; }
    
    .notif-item {
        display: flex;
        gap: 10px;
        padding: 12px 16px;
        border-bottom: 1px solid var(--mobile-border);
        font-size: 14px;
    }
    
    .notif-item:active {
        background: var(--mobile-touch-highlight);
    }
    
    .notif-item.unread {
        background: rgba(230, 85, 64, 0.04);
    }
    
    .notif-avatar {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: var(--mobile-primary);
        color: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 18px;
        flex-shrink: 0;
    }
    
    .notif-content { flex: 1; min-width: 0; }
    .notif-text { line-height: 1.5; }
    .notif-time { font-size: 12px; color: var(--mobile-text-secondary); margin-top: 4px; }
}

/* ============================================================
   30. 移动端任务/成就页
   ============================================================ */
@media (max-width: 768px) {
    .task-list { padding: 0; }
    
    .task-item {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 12px 16px;
        background: var(--mobile-card-bg);
        border-radius: 8px;
        margin-bottom: 8px;
    }
    
    .task-icon { font-size: 24px; flex-shrink: 0; }
    .task-info { flex: 1; min-width: 0; }
    .task-name { font-size: 14px; font-weight: 500; }
    .task-desc { font-size: 12px; color: var(--mobile-text-secondary); margin-top: 2px; }
    .task-reward { font-size: 13px; color: var(--mobile-primary); font-weight: 500; }
    
    .task-btn {
        padding: 6px 14px;
        font-size: 12px;
        border-radius: 14px;
        flex-shrink: 0;
    }
}

/* ============================================================
   31. 移动端签到日历
   ============================================================ */
@media (max-width: 768px) {
    .checkin-calendar {
        padding: 12px;
        border-radius: 8px;
    }
    
    .checkin-header {
        font-size: 16px;
        margin-bottom: 12px;
    }
    
    .checkin-grid {
        display: grid;
        grid-template-columns: repeat(7, 1fr);
        gap: 4px;
    }
    
    .checkin-day {
        aspect-ratio: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 12px;
        border-radius: 6px;
        background: var(--mobile-card-bg);
    }
    
    .checkin-day.checked {
        background: var(--mobile-primary);
        color: #fff;
    }
    
    .checkin-day.today {
        border: 2px solid var(--mobile-primary);
    }
}

/* ============================================================
   32. 移动端加载动画
   ============================================================ */
.mobile-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 0;
    color: var(--mobile-text-secondary);
    font-size: 13px;
}

.mobile-loading-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid var(--mobile-border);
    border-top-color: var(--mobile-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
}

.mobile-loading-more {
    text-align: center;
    padding: 16px 0;
    color: var(--mobile-text-secondary);
    font-size: 13px;
}

/* ============================================================
   33. 移动端浮动操作按钮 (FAB)
   ============================================================ */
.mobile-fab {
    position: fixed;
    right: 16px;
    bottom: calc(var(--mobile-tab-height) + var(--mobile-safe-bottom) + 16px);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--mobile-primary);
    color: #fff;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 4px 12px rgba(230, 85, 64, 0.4);
    z-index: 999;
    border: none;
    cursor: pointer;
    transition: transform 0.2s;
}

.mobile-fab:active {
    transform: scale(0.9);
}

@media (max-width: 768px) {
    .mobile-fab.show { display: flex; }
}

/* ============================================================
   34. 移动端安全区域适配 (刘海屏)
   ============================================================ */
@supports (padding: max(0px)) {
    @media (max-width: 768px) {
        .header {
            padding-top: max(var(--mobile-safe-top), 0px);
        }
        
        .mobile-tabbar {
            padding-bottom: max(var(--mobile-safe-bottom), 0px);
        }
        
        .reader-header {
            padding-top: max(var(--mobile-safe-top), 0px);
        }
        
        .reader-footer {
            padding-bottom: max(var(--mobile-safe-bottom), 0px);
        }
    }
}

/* ============================================================
   35. 排行榜 Tab 栏 - 移动端
   ============================================================ */
@media (max-width: 768px) {
    .shelf-tabs {
        display: flex;
        overflow-x: auto;
        gap: 0;
        padding: 10px 0;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        border-bottom: 1px solid var(--mobile-border);
        margin-bottom: 12px;
    }
    
    .shelf-tabs::-webkit-scrollbar { display: none; }
    
    .shelf-tab {
        flex-shrink: 0;
        padding: 8px 14px;
        font-size: 13px;
        color: var(--mobile-text-secondary);
        border-bottom: 2px solid transparent;
        white-space: nowrap;
        text-decoration: none;
        transition: all 0.2s;
    }
    
    .shelf-tab.active {
        color: var(--mobile-primary);
        border-bottom-color: var(--mobile-primary);
        font-weight: 600;
    }
    
    .shelf-tab:active {
        background: var(--mobile-touch-highlight);
    }
}

/* ============================================================
   36. 搜索结果列表 - 移动端
   ============================================================ */
@media (max-width: 768px) {
    .result-list {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    
    .result-item {
        display: flex;
        gap: 10px;
        padding: 10px;
        background: var(--mobile-card-bg);
        border-radius: 8px;
        box-shadow: 0 1px 4px rgba(0,0,0,0.06);
        text-decoration: none;
        color: inherit;
        transition: all 0.15s;
    }
    
    .result-item:active {
        transform: scale(0.98);
        background: var(--mobile-touch-highlight);
    }
    
    .result-cover {
        width: 70px;
        height: 93px;
        border-radius: 6px;
        overflow: hidden;
        flex-shrink: 0;
    }
    
    .result-cover img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    .result-info {
        flex: 1;
        min-width: 0;
    }
    
    .result-title {
        font-size: 15px;
        font-weight: 600;
        margin-bottom: 6px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .result-meta {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        margin-bottom: 6px;
        align-items: center;
    }
    
    .meta-item {
        font-size: 12px;
        color: var(--mobile-text-secondary);
    }
    
    .meta-tag {
        font-size: 11px;
        padding: 1px 6px;
        border-radius: 8px;
        background: #fff0ed;
        color: var(--mobile-primary);
    }
    
    .result-intro {
        font-size: 12px;
        color: var(--mobile-text-secondary);
        line-height: 1.5;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        margin-bottom: 6px;
    }
    
    .result-stats {
        display: flex;
        gap: 12px;
        font-size: 11px;
        color: var(--mobile-text-secondary);
    }
}

/* ============================================================
   37. 筛选栏 - 移动端
   ============================================================ */
@media (max-width: 768px) {
    .search-filter {
        background: var(--mobile-card-bg);
        border-bottom: 1px solid var(--mobile-border);
        position: sticky;
        top: calc(var(--mobile-header-height) + 37px);
        z-index: 98;
    }
    
    .filter-row {
        display: flex;
        align-items: center;
        gap: 0;
        padding: 8px 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    
    .filter-row::-webkit-scrollbar { display: none; }
    
    .filter-label {
        font-size: 12px;
        color: var(--mobile-text-secondary);
        flex-shrink: 0;
        padding: 0 8px;
        white-space: nowrap;
    }
    
    .filter-group {
        display: flex;
        gap: 0;
        flex-shrink: 0;
    }
    
    .filter-item {
        padding: 5px 12px;
        font-size: 13px;
        color: var(--mobile-text-secondary);
        white-space: nowrap;
        text-decoration: none;
        border-radius: 14px;
        transition: all 0.2s;
    }
    
    .filter-item.active {
        background: var(--mobile-primary);
        color: #fff;
    }
    
    .filter-item:active {
        background: var(--mobile-touch-highlight);
    }
}

/* ============================================================
   38. 目录页 - 移动端
   ============================================================ */
@media (max-width: 768px) {
    .catalog-section { padding: 12px 0; }
    
    .catalog-header {
        margin-bottom: 12px;
        padding: 0 2px;
    }
    
    .catalog-header h2 {
        font-size: 17px;
    }
    
    .catalog-info {
        font-size: 12px;
        color: var(--mobile-text-secondary);
        margin-top: 4px;
    }
    
    .catalog-grid {
        display: grid;
        grid-template-columns: 1fr !important;
        gap: 4px;
    }
    
    .catalog-chapter {
        display: flex;
        align-items: center;
        padding: 10px 12px;
        background: var(--mobile-card-bg);
        border-radius: 6px;
        font-size: 13px;
        color: var(--mobile-text);
        box-shadow: 0 1px 3px rgba(0,0,0,0.04);
        position: relative;
        text-decoration: none;
        transition: all 0.15s;
    }
    
    .catalog-chapter:active {
        background: var(--mobile-touch-highlight);
        transform: scale(0.98);
    }
    
    .catalog-chapter .vip-badge {
        position: static;
        transform: none;
        margin-left: auto;
        flex-shrink: 0;
    }
}

/* ============================================================
   39. 通知页 - 移动端
   ============================================================ */
@media (max-width: 768px) {
    .notif-section { padding: 12px 0; }
    
    .notif-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 12px;
    }
    
    .notif-header h2 { font-size: 17px; }
    
    .notif-actions { width: 100%; }
    .notif-btn { width: 100%; padding: 10px; font-size: 14px; }
    
    .notif-list { gap: 8px; }
    
    .notif-item {
        padding: 12px;
        border-radius: 8px;
        flex-direction: row;
    }
    
    .notif-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .notif-title { font-size: 14px; }
    .notif-text { font-size: 13px; }
    .notif-meta { flex-wrap: wrap; gap: 8px; }
    
    .notif-actions-col {
        flex-direction: row;
        width: 100%;
        justify-content: flex-end;
        margin-top: 8px;
        gap: 12px;
    }
}

/* ============================================================
   40. 搜索筛选结果页头部
   ============================================================ */
@media (max-width: 768px) {
    .search-results { padding: 12px 0; }
    
    .search-header {
        margin-bottom: 12px;
        padding: 0 2px;
    }
    
    .search-header h2 {
        font-size: 16px;
    }
    
    .shelf-header {
        margin-bottom: 12px;
        padding: 0 2px;
    }
    
    .shelf-header h2 {
        font-size: 17px;
    }
}

/* ============================================================
   41. 移动端搜索欢迎页
   ============================================================ */
@media (max-width: 768px) {
    .search-welcome {
        padding: 20px 0;
        text-align: center;
    }
    
    .search-welcome h2 {
        font-size: 20px;
        margin-bottom: 20px;
    }
    
    .history-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 10px;
    }
    
    .history-label {
        font-size: 14px;
        font-weight: 500;
    }
    
    .history-clear {
        font-size: 12px;
        color: var(--mobile-primary);
        text-decoration: none;
    }
    
    .history-list {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .history-item {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 6px 14px;
        background: var(--mobile-card-bg);
        border-radius: 16px;
        font-size: 13px;
        color: var(--mobile-text);
        text-decoration: none;
        box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    }
    
    .history-item:active {
        background: var(--mobile-touch-highlight);
    }
    
    .history-remove {
        color: var(--mobile-text-secondary);
        font-size: 16px;
        line-height: 1;
    }
    
    .hot-words {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        justify-content: center;
        margin-top: 20px;
    }
    
    .hot-word {
        padding: 8px 16px;
        background: var(--mobile-card-bg);
        border-radius: 16px;
        font-size: 14px;
        color: var(--mobile-text);
        text-decoration: none;
        box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    }
    
    .hot-word:active {
        background: var(--mobile-touch-highlight);
    }
}

/* ============================================================
   42. 移动端 VIP/充值页
   ============================================================ */
@media (max-width: 768px) {
    .vip-section { padding: 12px 0; }
    
    .vip-header {
        text-align: center;
        padding: 20px 16px;
        background: linear-gradient(135deg, #f5af19, #f12711);
        color: #fff;
        border-radius: 0;
        margin-bottom: 12px;
    }
    
    .vip-title { font-size: 20px; margin-bottom: 8px; }
    .vip-desc { font-size: 13px; opacity: 0.9; }
    
    .vip-levels {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    
    .vip-level-card {
        padding: 14px;
        background: var(--mobile-card-bg);
        border-radius: 8px;
        box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    }
    
    .vip-level-name {
        font-size: 16px;
        font-weight: 600;
        margin-bottom: 6px;
    }
    
    .vip-level-price {
        font-size: 22px;
        font-weight: 700;
        color: var(--mobile-primary);
        margin-bottom: 6px;
    }
    
    .vip-level-price span {
        font-size: 13px;
        font-weight: 400;
        color: var(--mobile-text-secondary);
    }
    
    .vip-level-features {
        display: flex;
        flex-direction: column;
        gap: 4px;
        margin-bottom: 10px;
    }
    
    .vip-feature {
        font-size: 13px;
        color: var(--mobile-text-secondary);
    }
    
    .vip-feature::before {
        content: '✓ ';
        color: #52c41a;
    }
    
    .vip-buy-btn {
        width: 100%;
        padding: 12px;
        border: none;
        border-radius: 20px;
        background: linear-gradient(135deg, #f5af19, #f12711);
        color: #fff;
        font-size: 15px;
        font-weight: 600;
        cursor: pointer;
    }
    
    .vip-buy-btn:active {
        transform: scale(0.97);
    }
}

/* ============================================================
   43. 移动端任务/签到页
   ============================================================ */
@media (max-width: 768px) {
    .task-section { padding: 12px 0; }
    
    .task-header {
        text-align: center;
        padding: 16px;
        margin-bottom: 12px;
    }
    
    .task-header h2 { font-size: 18px; }
    
    .task-card {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 12px;
        background: var(--mobile-card-bg);
        border-radius: 8px;
        margin-bottom: 8px;
        box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    }
    
    .task-card-icon {
        font-size: 24px;
        flex-shrink: 0;
    }
    
    .task-card-info { flex: 1; min-width: 0; }
    .task-card-title { font-size: 14px; font-weight: 500; }
    .task-card-desc { font-size: 12px; color: var(--mobile-text-secondary); margin-top: 2px; }
    
    .task-card-progress {
        height: 6px;
        background: #e0e0e0;
        border-radius: 3px;
        margin-top: 6px;
        overflow: hidden;
    }
    
    .task-card-progress-fill {
        height: 100%;
        background: linear-gradient(90deg, var(--mobile-primary), #f5af19);
        border-radius: 3px;
        transition: width 0.4s;
    }
    
    .task-card-action {
        flex-shrink: 0;
    }
    
    .task-card-btn {
        padding: 6px 14px;
        border: none;
        border-radius: 14px;
        background: linear-gradient(135deg, var(--mobile-primary), #f5af19);
        color: #fff;
        font-size: 12px;
        font-weight: 600;
        cursor: pointer;
    }
    
    .task-card-btn:disabled {
        opacity: 0.6;
        cursor: default;
    }
    
    .task-card-btn:active {
        transform: scale(0.95);
    }
}

/* ============================================================
   44. 移动端页面过渡动画
   ============================================================ */
@media (max-width: 768px) {
    .section {
        animation: fadeInUp 0.3s ease;
    }
    
    @keyframes fadeInUp {
        from {
            opacity: 0;
            transform: translateY(10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    .book-card {
        animation: fadeInUp 0.3s ease backwards;
    }
    
    .book-card:nth-child(1) { animation-delay: 0.05s; }
    .book-card:nth-child(2) { animation-delay: 0.1s; }
    .book-card:nth-child(3) { animation-delay: 0.15s; }
    .book-card:nth-child(4) { animation-delay: 0.2s; }
    .book-card:nth-child(5) { animation-delay: 0.25s; }
    .book-card:nth-child(6) { animation-delay: 0.3s; }
    
    .result-item {
        animation: fadeInUp 0.3s ease backwards;
    }
    
    .result-item:nth-child(1) { animation-delay: 0.05s; }
    .result-item:nth-child(2) { animation-delay: 0.1s; }
    .result-item:nth-child(3) { animation-delay: 0.15s; }
    .result-item:nth-child(4) { animation-delay: 0.2s; }
    .result-item:nth-child(5) { animation-delay: 0.25s; }
}

/* ============================================================
   45. 移动端 Rank Badge 样式
   ============================================================ */
@media (max-width: 768px) {
    .rank-badge {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 22px;
        height: 22px;
        border-radius: 4px;
        background: #f0f0f0;
        font-size: 12px;
        margin-right: 6px;
        flex-shrink: 0;
    }
    
    .rank-1 { background: var(--mobile-primary); color: #fff; }
    .rank-2 { background: #ff9900; color: #fff; }
    .rank-3 { background: #ffcc00; color: #fff; }
}
