@charset "UTF-8";

/* 手机端（768以下）首页样式 */

/* 显示/隐藏类 */
.book-card.visible {
    display: flex;
}

.book-card.hidden {
    display: none;
}

/* 首页内容区居中显示 */
.home-content {
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
    width: 100%;
    box-sizing: border-box;
}

/* 手机端最近看过的图书样式 */

/* 移动端首页容器 */
.mobile-home-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
    width: 100%;
    background-color: #f5f7fa;
    box-sizing: border-box;
}

/* 内容区单数栏和双数栏不同背景色 */
.mobile-home-container .mobile-section.mb-xl:nth-child(odd),
.mobile-home-container .mb-xl:nth-child(odd) {
    background-color: #f5f7fa !important;
    border: none !important;
    margin: 0 !important;
    padding: 25px 16px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.mobile-home-container .mobile-section.mb-xl:nth-child(even),
.mobile-home-container .mb-xl:nth-child(even) {
    background-color: #ffffff !important;
    border: none !important;
    margin: 0 !important;
    padding: 25px 16px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* 移动端站点标题 */
.mobile-site-title {
    display: none;
    visibility: hidden;
    opacity: 0;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* 移动端章节样式 */
.mobile-section {
    margin-bottom: 20px;
    padding: 0 10px;
}



/* 移动端章节标题容器 */
.mobile-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding: 0;
}

/* 移动端章节链接 */
.mobile-section-link {
    font-size: 14px;
    color: #07c160;
    text-decoration: none;
    margin: 0;
    padding: 0;
}

/* 移动端图书滑动容器 */
.mobile-books-slider {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin: 0;
    padding: 0;
}

/* 隐藏滚动条 */
.mobile-books-slider::-webkit-scrollbar {
    display: none;
}

/* 调整滑动容器的父元素，确保滚动行为正确 */
.mobile-books-slider {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin: 0;
    padding: 0;
    position: relative;
    width: 100%;
    box-sizing: border-box;
    overflow-clip-margin: content-box;
}

/* 移动端图书滑动内部容器 */
.mobile-books-slider-inner {
    display: flex;
    gap: 15px;
    margin: 0 -15px 0 0;
    padding: 0;
    width: auto;
    min-width: 100%;
    box-sizing: border-box;
}

/* 移动端图书卡片 - 统一大小，确保卡片宽度一致 */
.mobile-book-card {
    flex: 0 0 auto;
    width: 100px;
    min-width: 100px;
    max-width: 100px;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: relative;
}

/* 移动端图书封面 - 自适应卡片宽度 */
.mobile-book-cover {
    width: 100%;
    height: auto;
    aspect-ratio: 2/3;
    overflow: hidden;
    background: linear-gradient(135deg, #f8f8f8 0%, #e0e0e0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    border: 1px solid #e0e0e0;
    margin: 0 0 10px 0;
    padding: 0;
    position: relative;
}

/* 移动端默认封面 - 自适应卡片宽度 */
.mobile-default-cover {
    font-size: 24px;
    font-weight: bold;
    color: #666666;
    text-align: center;
    line-height: normal;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f0f0;
}

/* 移动端图书封面图片 */
.mobile-book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: all 0.3s ease;
    margin: 0;
    padding: 0;
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
    display: block;
    border-radius: 8px;
}

/* 移动端图书信息 */
.mobile-book-info {
    padding: 0;
    background-color: transparent;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    margin: 0;
    text-align: left;
    width: 100%;
}

/* 移动端书名 */
.mobile-book-title {
    margin: 0 0 5px 0;
    font-size: 14px;
    font-weight: 600;
    color: #333333;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-align: left;
    padding: 0;
    background-color: transparent;
}

/* 移动端作者 */
.mobile-book-author {
    margin: 0;
    font-size: 12px;
    color: #666666;
    line-height: 1.3;
    text-align: left;
    padding: 0;
    background-color: transparent;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 移动端图书链接 */
.mobile-book-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    background: transparent;
    margin: 0;
    padding: 0;
}

/* 移动端分类网格 */
.mobile-categories-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 0 10px;
    margin: 0 auto;
    max-width: 100%;
    box-sizing: border-box;
}

/* 移动端分类项 */
.mobile-category-item {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    transition: all 0.2s ease;
    position: relative;
}

/* 移动端分类名称 */
.mobile-category-name {
    font-size: 14px;
    font-weight: 600;
    color: #333333;
    margin: 0 0 5px 0;
    padding: 0;
}

/* 移动端分类数量 */
.mobile-category-count {
    font-size: 12px;
    color: #666666;
    margin: 0;
    padding: 0;
}

/* 移动端分类链接 */
.mobile-category-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    background: transparent;
    margin: 0;
    padding: 0;
}

/* 移动端刷新按钮 */
.mobile-refresh-btn {
    font-size: 14px;
    color: #666666;
    background: none;
    border: none;
    margin: 0;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 热门阅读榜样式 */
.hot-reading-list {
    list-style: none;
    padding: 0 10px;
    margin: 0;
}

.hot-reading-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #e5e7eb;
}

.hot-reading-item:last-child {
    border-bottom: none;
}

.rank-number {
    font-size: 16px;
    font-weight: bold;
    color: #ff6b6b;
    margin-right: 12px;
    width: 20px;
    text-align: center;
}

.book-info-list {
    flex: 1;
    overflow: hidden;
}

.book-title-list {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 600;
    color: #333333;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.book-title-list a {
    color: #333333;
    text-decoration: none;
}

.book-title-list a:hover {
    color: #07c160;
    text-decoration: underline;
}

.book-views-list {
    margin: 0;
    font-size: 12px;
    color: #999999;
    line-height: 1.3;
}

/* 淡入动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 深色模式支持 */
html.dark-mode .mobile-home-container {
    background-color: #1a1a1a !important;
}

html.dark-mode .mobile-home-container .mobile-section.mb-xl:nth-child(odd),
html.dark-mode .mobile-home-container .mb-xl:nth-child(odd) {
    background-color: #1a1a1a !important;
}

html.dark-mode .mobile-home-container .mobile-section.mb-xl:nth-child(even),
html.dark-mode .mobile-home-container .mb-xl:nth-child(even) {
    background-color: #2d2d2d !important;
}

html.dark-mode .mobile-section-link {
    color: #07c160 !important;
}

html.dark-mode .mobile-section-title {
    color: #e5e7eb !important;
}

html.dark-mode .mobile-refresh-btn {
    color: #999999 !important;
}

html.dark-mode .mobile-book-cover {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border-color: #333;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

html.dark-mode .mobile-book-title {
    color: #e5e7eb;
}

html.dark-mode .mobile-book-author {
    color: #666;
}

html.dark-mode .mobile-category-item {
    background-color: #1f2937;
    border-color: #374151;
}

html.dark-mode .mobile-category-name {
    color: #e5e7eb;
}

html.dark-mode .mobile-category-count {
    color: #666;
}

html.dark-mode .hot-reading-item {
    border-bottom-color: #374151;
}

html.dark-mode .book-title-list {
    color: #e5e7eb;
}

html.dark-mode .book-title-list a {
    color: #e5e7eb;
}

html.dark-mode .book-title-list a:hover {
    color: #07c160;
}

html.dark-mode .book-views-list {
    color: #666;
}