
:root {
    --primary: #409eff;
    --primary-light: #ecf5ff;
    --primary-hover: #66b1ff;
    --gray-light: #f8f9fa;
    --gray-border: #e5e6eb;
    --gray-hover: #f0f2f5;
    --text-main: #333;
    --text-secondary: #666;
    --text-light: #999;
    --white: #ffffff;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --menu-width: 280px; /* 侧边菜单宽度 */
}

html, body {
    height: auto !important;
    min-height: 100%;
    overflow: visible !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    font-family: "PingFang SC", "Microsoft Yahei", sans-serif;
    background-color: var(--gray-light);
    color: var(--text-main);
    line-height: 1.6;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
a {
    text-decoration: none;
    color: var(--primary);
    transition: all 0.2s ease;
}
a:hover {
    color: #337ecc;
}
ul, li {
    list-style: none;
}
.container {
    max-width: 750px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 顶部导航 */
.header {
    position: sticky;
    top: 0;
    background: #fff;
    padding: 10px 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    z-index: 999;
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 15px;
    max-width: 750px;
    margin: 0 auto;
}
.menu-btn {
    width: 42px;
    height: 42px;
    border: none;
    background: var(--primary-light);
    border-radius: 50%;
    font-size: 18px;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

/* 搜索框样式 */
.search-wrap {
    flex: 1;
    height: 42px;
    background: #f5f5f5;
    border-radius: 21px;
    border: 1px solid #ddd;
    display: flex;
    align-items: center;
    position: relative;
}
.search-form {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
}
.search-input {
    flex: 1;
    height: 100%;
    padding: 0 15px;
    border: none;
    outline: none;
    font-size: 16px !important;
    background: transparent;
    -webkit-appearance: none;
}
.search-input:focus {
    background: transparent;
}
.search-btn {
    position: absolute;
    right: 3px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: none;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}
.search-btn:hover {
    background: #337ecc;
}

/* ========== 侧边导航样式（图标一对一绑定） ========== */
.category-menu {
    position: fixed;
    top: 0;
    left: calc(-1 * var(--menu-width));
    width: var(--menu-width);
    height: 100%;
    background: var(--white);
    z-index: 1000;
    transition: left 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 2px 0 15px rgba(0,0,0,0.1);
    overflow-y: auto;
    padding-bottom: 20px;
}
.category-menu.show {
    left: 0;
    box-shadow: 5px 0 20px rgba(0,0,0,0.15);
}

/* 菜单头部 */
.menu-header {
    height: 60px;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    color: white;
    font-size: 18px;
    font-weight: 600;
}
.close-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    color: white;
    border: none;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 菜单分类标题 */
.menu-category-title {
    padding: 12px 20px;
    font-size: 12px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
    background: var(--gray-light);
}

/* 菜单项样式 - 图标固定宽度 */
.category-item {
    padding: 0;
    border-bottom: none;
}
.category-item a {
    color: var(--text-main);
    font-size: 15px;
    display: flex;
    align-items: center;
    padding: 14px 20px;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}
/* 图标固定盒子 - 核心：宽度固定+禁止收缩 */
.category-item .icon {
    display: inline-block;
    width: 24px;
    height: 24px;
    text-align: center;
    line-height: 24px;
    margin-right: 10px;
    font-size: 18px;
    flex-shrink: 0; /* 禁止收缩，保证宽度不变 */
}

/* hover效果 */
.category-item a:hover {
    color: var(--primary);
    background: var(--primary-light);
    border-left-color: var(--primary);
    padding-left: 22px;
}

/* 遮罩层 */
.mask {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.3);
    z-index: 998;
    display: none;
    backdrop-filter: blur(1px);
    transition: opacity 0.3s ease;
}
.mask.show {
    display: block;
}

/* 面包屑 */
.breadcrumb {
    padding: 10px 15px;
    font-size: 13px;
    color: var(--text-secondary);
}

/* 小说列表 */
.novel-list {
    background: #fff;
    border-radius: 6px;
    padding: 8px 0;
    margin: 0 15px 20px;
}
.novel-item {
    padding: 10px 15px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 16px;
}
.novel-item:last-child { 
    border-bottom: none;
}
.novel-item a {
    color: var(--text-main);
}
.novel-item a:hover {
    color: var(--primary);
}

/* 分页 */
.pagination-container {
    width: 100%;
    text-align: center;
    padding: 20px 0;
    font-size: 14px;
}
.pagination-box {
    display: inline-flex;
    align-items: center;
    background: var(--white);
    padding: 8px 16px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    gap: 26px;
}
.pagination a, 
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-secondary);
    text-decoration: none;
}
.pagination .thisclass {
    background: var(--primary);
    color: #fff;
}
.pagination a:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.pagination-jump {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 6px;
}
.pagination-jump-text {
    color: var(--text-secondary);
    font-size: 14px;
}
#page-num {
    width: 46px;
    height: 38px;
    text-align: center;
    border: 1px solid var(--gray-border);
    border-radius: 6px;
    outline: none;
    font-size: 16px !important;
}
.jump-btn {
    height: 38px;
    padding: 0 12px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

/* 底部 */
.footer {
    text-align: center;
    font-size: 12px;
    color: var(--text-light);
    padding: 15px 10px;
}
