/**
 * 起点中文网风格主题样式
 * 主色调：蓝色 #3B82F6
 */

/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

a {
    color: #3B82F6;
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: #2563EB;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.clear {
    clear: both;
}

/* 容器 */
.qd-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 头部导航 */
.qd-header {
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.qd-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 60px;
    padding: 10px 0;
    flex-wrap: wrap;
    gap: 15px;
    position: relative;
}

.qd-header-inner > * {
    display: flex;
    align-items: center;
}

.qd-logo {
    flex-shrink: 0;
}

.qd-logo a {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
    white-space: nowrap;
}

.qd-logo a:hover {
    color: #E0E7FF;
}

.qd-nav {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    flex: 1;
    justify-content: center;
    min-width: 0;
}

.qd-nav-item {
    padding: 6px 12px;
    color: #fff;
    border-radius: 4px;
    transition: background 0.3s;
    white-space: nowrap;
    font-size: 14px;
}

.qd-nav-item:hover,
.qd-nav-item.active {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

.qd-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.qd-header-link {
    color: #fff;
    font-size: 14px;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 4px;
    transition: background 0.3s;
    white-space: nowrap;
}

.qd-header-link:hover {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

/* 手机端搜索按钮样式 */
#qd-search-open {
    background: #3B82F6;
    color: #fff;
    border: 1px solid #3B82F6;
    border-radius: 4px;
}

#qd-search-open:hover {
    background: #2563EB;
    border-color: #2563EB;
    color: #fff;
}

.qd-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 28px;
    height: 28px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1002;
    position: relative;
    pointer-events: auto;
}

.qd-menu-toggle span {
    width: 100%;
    height: 3px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.3s;
    transform-origin: center;
}

.qd-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.qd-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.qd-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.qd-search-box {
    display: flex;
    gap: 0;
}
/* 让头部搜索表单在桌面端水平对齐 */
.qd-search-box form { display:flex; align-items: stretch; }

.qd-search-box-mobile {
    display: none;
}

.qd-search-input {
    padding: 0 10px;
    height: 36px;
    border: none;
    border-radius: 4px 0 0 4px;
    width: 160px;
    outline: none;
    font-size: 13px;
}

.qd-search-btn {
    padding: 0 12px;
    height: 36px;
    background: #3b82f6;
    color: #fff;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: background 0.3s;
    font-size: 13px;
    white-space: nowrap;
}

.qd-search-btn:hover {
    background: #1D4ED8;
}

.qd-user-info {
    color: #fff;
    font-size: 12px;
    white-space: nowrap;
}

.qd-user-info a {
    color: #fff;
    margin: 0 4px;
}

.qd-user-info a:hover {
    text-decoration: underline;
}

.qd-user-name {
    color: #E0E7FF;
    font-weight: 600;
    margin-right: 5px;
}

/* 主内容区 */
.qd-main {
    min-height: 600px;
    padding: 20px 0;
}

/* 面包屑导航 */
.qd-breadcrumb {
    padding: 10px 0;
    font-size: 13px;
    color: #666;
}

.qd-breadcrumb a {
    color: #3B82F6;
}

.qd-breadcrumb-sep {
    margin: 0 8px;
    color: #999;
}

/* 区块标题 */
.qd-section {
    margin-bottom: 30px;
}

.qd-section-title {
    font-size: 20px;
    font-weight: 600;
    color: #1F2937;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3B82F6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.qd-title-text {
    position: relative;
    padding-left: 15px;
}

.qd-title-text::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: #3B82F6;
    border-radius: 2px;
}

.qd-title-more {
    font-size: 14px;
    font-weight: 400;
}

.qd-title-more a {
    color: #666;
}

.qd-title-more a:hover {
    color: #3B82F6;
}

/* 图书网格布局 */
.qd-book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 20px;
}

/* 热门推荐网格布局 - 改为列表布局，左图片右内容 */
.qd-book-grid-recommend {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

/* 热门推荐项目 - 左图片右内容 */
.qd-book-grid-recommend .qd-book-item {
    display: flex;
    flex-direction: row;
    gap: 15px;
    padding: 15px;
    max-width: 100%;
    height: 160px;
    overflow: hidden;
}

.qd-book-grid-recommend .qd-book-cover {
    width: 100px;
    min-width: 100px;
    max-width: 100px;
    height: 133px;
    min-height: 133px;
    max-height: 133px;
    padding-top: 0 !important;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
}

.qd-book-grid-recommend .qd-book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: relative;
}

.qd-book-grid-recommend .qd-book-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
    padding: 0;
    overflow: hidden;
}

.qd-book-grid-recommend .qd-book-name {
    height: auto;
    margin-bottom: 8px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.qd-book-grid-recommend .qd-book-author {
    margin-bottom: 6px;
    flex-shrink: 0;
}

.qd-book-grid-recommend .qd-book-desc {
    flex: 1;
    height: auto;
    line-height: 1.5;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    margin: 0;
}

.qd-book-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.qd-book-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

/* 热门推荐项目悬停效果 */
.qd-book-grid-recommend .qd-book-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.qd-book-cover {
    width: 100%;
    padding-top: 140%;
    position: relative;
    background: #f0f0f0;
    overflow: hidden;
    height: 0;
}

.qd-book-cover img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.qd-book-info {
    padding: 10px;
}

.qd-book-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
    line-height: 1.4;
    height: 40px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.qd-book-name a {
    color: #1F2937;
}

.qd-book-name a:hover {
    color: #3B82F6;
}

.qd-book-author {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.qd-book-author a {
    color: #666;
}

.qd-book-desc {
    font-size: 12px;
    color: #999;
    line-height: 1.5;
    height: 36px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* 列表样式布局 */
.qd-book-grid-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.qd-book-item-list {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 20px;
    padding: 20px;
    background: #fff;
    border-bottom: 1px solid #E5E7EB;
    transition: background-color 0.2s;
}

.qd-book-item-list:last-child {
    border-bottom: none;
}

.qd-book-item-list:hover {
    background-color: #F9FAFB;
}

.qd-book-item-list .qd-book-cover {
    width: 120px;
    min-width: 120px;
    max-width: 120px;
    height: 160px;
    min-height: 160px;
    max-height: 160px;
    padding-top: 0 !important;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
    border-radius: 4px;
}

.qd-book-item-list .qd-book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.qd-book-info-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.qd-book-info-list .qd-book-name {
    height: auto;
    margin: 0;
    font-size: 18px;
    line-height: 1.4;
}

.qd-book-info-list .qd-book-name a {
    color: #1F2937;
    text-decoration: none;
    transition: color 0.2s;
}

.qd-book-info-list .qd-book-name a:hover {
    color: #3B82F6;
}

.qd-book-info-list .qd-book-author {
    font-size: 14px;
    color: #6B7280;
    margin: 0;
}

.qd-book-info-list .qd-book-author a {
    color: #6B7280;
    text-decoration: none;
}

.qd-book-info-list .qd-book-author a:hover {
    color: #3B82F6;
}

.qd-book-meta {
    font-size: 13px;
    color: #6B7280;
    margin: 0;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.qd-book-meta span {
    margin: 0;
}

.qd-book-last {
    font-size: 13px;
    color: #6B7280;
    margin: 0;
}

.qd-book-last a {
    color: #3B82F6;
    text-decoration: none;
}

.qd-book-last a:hover {
    text-decoration: underline;
}

.qd-book-info-list .qd-book-desc {
    font-size: 14px;
    color: #4B5563;
    line-height: 1.6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.qd-book-info-list .qd-btn-read {
    align-self: flex-start;
    margin-top: 8px;
}

/* 按钮 */
.qd-btn {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
}

.qd-btn-primary {
    background: #3B82F6;
    color: #fff;
}

.qd-btn-primary:hover {
    background: #2563EB;
    color: #fff;
}

.qd-btn-secondary {
    background: #fff;
    color: #3B82F6;
    border: 1px solid #3B82F6;
}

.qd-btn-secondary:hover {
    background: #3B82F6;
    color: #fff;
}

.qd-btn-small {
    padding: 6px 15px;
    font-size: 12px;
}

.qd-btn-read {
    padding: 6px 20px;
    font-size: 13px;
    background: #3B82F6;
    color: #fff;
    margin-top: 10px;
    display: inline-block;
}

.qd-btn-read:hover {
    background: #2563EB;
    color: #fff;
}

.qd-btn-nav {
    padding: 10px 20px;
    margin: 0 5px;
    background: #fff;
    color: #3B82F6;
    border: 1px solid #3B82F6;
}

.qd-btn-nav:hover {
    background: #3B82F6;
    color: #fff;
}

.qd-btn-disabled {
    background: #f0f0f0;
    color: #999;
    border-color: #ddd;
    cursor: not-allowed;
}

.qd-btn-disabled:hover {
    background: #f0f0f0;
    color: #999;
}

/* 小说详情页 */
.qd-book-detail {
    background: #fff;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.qd-book-main {
    display: flex;
    gap: 25px;
    margin-bottom: 25px;
}

.qd-book-cover-large {
    width: 180px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    aspect-ratio: 3 / 4; /* 固定纵横比，避免容器高于图片 */
    background: #f0f0f0;
}

.qd-book-cover-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.qd-book-meta {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.qd-book-title {
    font-size: 28px;
    font-weight: 700;
    color: #1F2937;
    margin: 0 0 15px 0;
    line-height: 1.3;
}

.qd-book-tags {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.qd-tag {
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
}

.qd-tag-category {
    background: #DBEAFE;
    color: #1E40AF;
}

.qd-tag-status {
    background: #FEE2E2;
    color: #991B1B;
}

.qd-book-info {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.qd-info-item {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.qd-info-label {
    color: #6B7280;
    margin-right: 8px;
    flex-shrink: 0;
}

.qd-info-value {
    color: #1F2937;
}

.qd-info-value a {
    color: #3B82F6;
    text-decoration: none;
    transition: color 0.2s;
}

.qd-info-value a:hover {
    color: #2563EB;
    text-decoration: underline;
}

.qd-book-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: auto;
}

.qd-book-intro {
    border-top: 1px solid #E5E7EB;
    padding-top: 20px;
}

.qd-book-intro h3 {
    font-size: 16px;
    margin-bottom: 10px;
    color: #1F2937;
}

.qd-intro-content {
    line-height: 1.8;
    color: #666;
    text-indent: 2em;
}

.qd-related-tags {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #E5E7EB;
}

/* 相关推荐文字样式 */
.qd-related-text {
    font-size: 14px;
    line-height: 2;
    color: #374151;
    padding: 15px 0;
}

.qd-related-label {
    color: #666;
    margin-right: 10px;
    font-weight: 500;
}

.qd-related-text a {
    color: #3B82F6;
    margin: 0 3px;
}

.qd-related-text a:hover {
    color: #2563EB;
    text-decoration: underline;
}

.qd-related-sep {
    color: #9CA3AF;
    margin: 0 2px;
}

.qd-related-tag {
    display: inline-block;
    padding: 4px 10px;
    margin: 5px 5px 0 0;
    background: #F3F4F6;
    color: #666;
    border-radius: 4px;
    font-size: 12px;
}

.qd-related-tag:hover {
    background: #DBEAFE;
    color: #3B82F6;
}

/* 章节列表 */
.qd-chapter-section {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.qd-chapter-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    list-style: none;
}

.qd-chapter-item {
    padding: 8px 12px;
    background: #F9FAFB;
    border-radius: 4px;
    transition: background 0.3s;
    overflow: hidden;
}

.qd-chapter-item:hover {
    background: #E5E7EB;
}

.qd-chapter-item a {
    color: #1F2937;
    font-size: 13px;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.qd-chapter-item a:hover {
    color: #3B82F6;
}

.qd-chapter-list-all {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

/* 阅读页 */
.qd-reader-header {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.qd-chapter-title {
    font-size: 24px;
    font-weight: 600;
    color: #1F2937;
}

.qd-reader-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.qd-reader-settings {
    display: flex;
    gap: 5px;
    align-items: center;
    position: relative;
}

.qd-bg-color-selector {
    position: relative;
    display: inline-block;
}

.qd-color-panel {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 5px;
    background: #fff;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 8px;
    z-index: 1000;
    min-width: 120px;
}

.qd-color-panel.show {
    display: block;
}

.qd-color-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.qd-color-option:hover {
    background-color: #F3F4F6;
}

.qd-color-option.active {
    background-color: #EBF4FF;
}

.qd-color-preview {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    display: inline-block;
    border: 1px solid #D1D5DB;
}

.qd-color-name {
    font-size: 14px;
    color: #374151;
}

.qd-btn-icon {
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    border: 1px solid #D1D5DB;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    color: #374151;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.qd-btn-icon:hover {
    background: #F3F4F6;
    border-color: #9CA3AF;
}

.qd-btn-icon:active {
    background: #E5E7EB;
}

#btn-font-minus {
    font-weight: bold;
}

#btn-font-reset {
    font-weight: bold;
}

#btn-font-plus {
    font-weight: bold;
}

#btn-bg-color {
    font-size: 16px;
}

.qd-reader-content {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    min-height: 400px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.qd-content-text {
    font-size: 18px;
    line-height: 2;
    color: #1F2937;
    text-align: justify;
    word-wrap: break-word;
    transition: font-size 0.2s ease, color 0.3s ease;
}

.qd-content-text p {
    margin-bottom: 1.5em;
    text-indent: 2em;
}

.qd-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    padding: 40px 20px;
}

.qd-loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3B82F6;
    border-radius: 50%;
    animation: qd-spin 1s linear infinite;
}

@keyframes qd-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.qd-reader-nav {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.qd-nav-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

/* 更新列表 */
.qd-update-items {
    list-style: none;
    background: #fff;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.qd-update-item {
    padding: 10px;
    border-bottom: 1px solid #F3F4F6;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.3s;
}

.qd-update-item:hover {
    background: #F9FAFB;
}

.qd-update-item:last-child {
    border-bottom: none;
}

.qd-category-tag {
    padding: 2px 8px;
    background: #DBEAFE;
    color: #1E40AF;
    border-radius: 4px;
    font-size: 12px;
    flex-shrink: 0;
}

.qd-book-link {
    flex: 1;
    color: #1F2937;
    font-weight: 500;
}

.qd-book-link:hover {
    color: #3B82F6;
}

.qd-chapter-link {
    color: #666;
    font-size: 13px;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.qd-chapter-link:hover {
    color: #3B82F6;
}

.qd-author-link {
    color: #666;
    font-size: 13px;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.qd-author-link:hover {
    color: #3B82F6;
}

.qd-update-time {
    color: #999;
    font-size: 12px;
    flex-shrink: 0;
}

/* 首页最新入库-限制书名长度，仅作用于右侧最新入库块 */
.qd-new-list-right .qd-update-item .qd-book-link {
    min-width: 0; /* 允许在flex中收缩以出现省略号 */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 排行榜 */
.qd-rank-list {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.qd-rank-items {
    list-style: none;
}

.qd-rank-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #F3F4F6;
    transition: background 0.3s;
}

.qd-rank-item:hover {
    background: #F9FAFB;
}

.qd-rank-item:last-child {
    border-bottom: none;
}

.qd-rank-num {
    width: 24px;
    height: 24px;
    background: #3B82F6;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    margin-right: 10px;
    flex-shrink: 0;
}

.qd-rank-item:nth-child(1) .qd-rank-num,
.qd-rank-item:nth-child(2) .qd-rank-num,
.qd-rank-item:nth-child(3) .qd-rank-num {
    background: #EF4444;
}

.qd-rank-book {
    flex: 1;
    color: #1F2937;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.qd-rank-book:hover {
    color: #3B82F6;
}

/* 分类导航 */
.qd-category-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 15px;
    background: #fff;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.qd-category-item {
    padding: 8px 16px;
    background: #F9FAFB;
    color: #666;
    border-radius: 4px;
    transition: all 0.3s;
}

.qd-category-item:hover,
.qd-category-item.active {
    background: #3B82F6;
    color: #fff;
}

/* 搜索页 */
.qd-search-page {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.qd-search-form-large {
    display: flex;
    gap: 0;
    margin-bottom: 30px;
    max-width: 600px;
}

.qd-search-input-large {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #3B82F6;
    border-radius: 4px 0 0 4px;
    font-size: 16px;
    outline: none;
}

.qd-search-btn-large {
    padding: 12px 30px;
    background: #3B82F6;
    color: #fff;
    border: 2px solid #3B82F6;
    border-left: none;
    border-radius: 0 4px 4px 0;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

.qd-search-btn-large:hover {
    background: #2563EB;
}

.qd-search-no-results {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

/* 搜索结果列表 - 横向布局 */
.qd-search-results .qd-book-grid-list { grid-template-columns: 1fr; }
.qd-search-results .qd-book-item-list { display: flex; flex-direction: row; align-items: flex-start; }
.qd-search-results .qd-book-item-list .qd-book-cover { margin: 0; }

@media (max-width: 768px) {
    /* 在手机上保持搜索结果为横向布局 */
    .qd-search-results .qd-book-item-list { flex-direction: row; }
    .qd-search-results .qd-book-item-list .qd-book-cover { width: 80px; min-width: 80px; max-width: 80px; height: 106px; min-height: 106px; max-height: 106px; margin: 0; }
    .qd-search-results .qd-book-info-list { padding-right: 4px; }
}

/* 作者页 */
.qd-author-header {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    text-align: center;
}

.qd-author-name {
    font-size: 28px;
    font-weight: 700;
    color: #1F2937;
    margin-bottom: 10px;
}

.qd-author-count {
    color: #666;
    font-size: 14px;
}

/* 分页 */
.qd-pagination {
    text-align: center;
    padding: 20px 0;
}

/* 分类/列表页分页 - 通用按钮风格 */
.qd-pagination a,
.qd-pagination span,
.qd-pagination strong {
    display: inline-block;
    min-width: 36px;
    height: 36px;
    line-height: 34px;
    padding: 0 12px;
    margin: 0 4px;
    border: 1px solid #D1D5DB;
    border-radius: 6px;
    background: #fff;
    color: #374151;
    font-size: 14px;
    vertical-align: middle;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
    transition: all 0.2s ease;
}

.qd-pagination a:hover {
    border-color: #3B82F6;
    color: #3B82F6;
    box-shadow: 0 2px 6px rgba(59,130,246,0.12);
}

/* 当前页 */
.qd-pagination .current,
.qd-pagination span.current,
.qd-pagination strong {
    background: #3B82F6;
    border-color: #3B82F6;
    color: #fff;
    font-weight: 600;
}

/* 禁用态（无链接） */
.qd-pagination .disabled,
.qd-pagination span.disabled {
    background: #F3F4F6;
    color: #9CA3AF;
    border-color: #E5E7EB;
    cursor: not-allowed;
    box-shadow: none;
}

/* 更紧凑的上一页/下一页宽度 */
.qd-pagination a.prev,
.qd-pagination a.next,
.qd-pagination span.prev,
.qd-pagination span.next {
    min-width: 64px;
}

/* 手机端分页布局 */
@media (max-width: 768px) {
    .qd-pagination {
        padding: 16px 0;
    }
    .qd-pagination a,
    .qd-pagination span,
    .qd-pagination strong {
        min-width: 32px;
        height: 32px;
        line-height: 30px;
        padding: 0 10px;
        margin: 3px;
        font-size: 13px;
        border-radius: 6px;
    }
    .qd-pagination a.prev,
    .qd-pagination a.next,
    .qd-pagination span.prev,
    .qd-pagination span.next {
        min-width: 56px;
    }
}

/* 首页顶部布局（热门推荐和排行榜） */
.qd-home-top-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
    margin-bottom: 30px;
}

.qd-sidebar-rank {
    min-width: 0;
}

/* 首页底部布局（最近更新和最新入库） */
.qd-home-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

.qd-main-content {
    min-width: 0;
}

.qd-sidebar {
    min-width: 0;
}

/* 广告位 */
.qd-ad-home-top,
.qd-ad-home-middle,
.qd-ad-category-top,
.qd-ad-info-top,
.qd-ad-info-bottom,
.qd-ad-reader-top,
.qd-ad-reader-middle,
.qd-ad-reader-bottom,
.qd-ad-sidebar {
    text-align: center;
    margin: 20px 0;
    padding: 15px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* 页脚 */
.qd-footer {
    background: #1F2937;
    color: #9CA3AF;
    padding: 30px 0;
    margin-top: 40px;
}

.qd-footer-links {
    margin-bottom: 20px;
}

.qd-footer-section h3 {
    color: #fff;
    font-size: 16px;
    margin-bottom: 15px;
}

.qd-footer-link-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.qd-footer-link-list a {
    color: #9CA3AF;
}

.qd-footer-link-list a:hover {
    color: #fff;
}

.qd-footer-copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #374151;
    font-size: 12px;
    line-height: 1.8;
}

/* 登录注册页面样式 */
.qd-login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 40px 20px;
}

.qd-login-box {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.qd-login-title {
    font-size: 28px;
    font-weight: 600;
    color: #1F2937;
    text-align: center;
    margin-bottom: 30px;
}

.qd-form-group {
    margin-bottom: 20px;
}

.qd-form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
}

.qd-form-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #D1D5DB;
    border-radius: 6px;
    font-size: 14px;
    color: #1F2937;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.qd-form-input:focus {
    outline: none;
    border-color: #3B82F6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.qd-form-hint {
    display: block;
    font-size: 12px;
    color: #6B7280;
    margin-top: 5px;
}

.qd-captcha-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.qd-captcha-group .qd-form-input {
    flex: 1;
}

.qd-captcha-img {
    width: 100px;
    height: 40px;
    border: 1px solid #D1D5DB;
    border-radius: 6px;
    cursor: pointer;
    flex-shrink: 0;
}

.qd-btn-block {
    width: 100%;
    display: block;
}

.qd-login-links {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #E5E7EB;
}

.qd-login-links a {
    color: #3B82F6;
    font-size: 14px;
    text-decoration: none;
}

.qd-login-links a:hover {
    text-decoration: underline;
}

/* 书架和阅读历史样式 */
.qd-bookcase-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.qd-bookcase-item {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: box-shadow 0.3s;
}

.qd-bookcase-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.qd-bookcase-cover {
    flex-shrink: 0;
    width: 80px;
    height: 106px;
}

.qd-bookcase-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.qd-bookcase-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.qd-bookcase-name {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.qd-bookcase-name a {
    color: #1F2937;
    text-decoration: none;
}

.qd-bookcase-name a:hover {
    color: #3B82F6;
}

.qd-bookcase-author,
.qd-bookcase-update,
.qd-bookcase-chapter {
    font-size: 14px;
    color: #6B7280;
    margin: 0;
}

.qd-bookcase-author a {
    color: #6B7280;
    text-decoration: none;
}

.qd-bookcase-author a:hover {
    color: #3B82F6;
}

.qd-bookcase-time {
    margin-left: 10px;
    color: #9CA3AF;
}

.qd-bookcase-empty {
    color: #9CA3AF;
    font-style: italic;
}

.qd-bookcase-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
    align-items: stretch;
}

.qd-btn-small {
    padding: 6px 15px;
    font-size: 13px;
}

.qd-btn-danger {
    background: #EF4444;
    color: #fff;
}

.qd-btn-danger:hover {
    background: #DC2626;
    color: #fff;
}

.qd-empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 8px;
}

.qd-empty-text {
    font-size: 16px;
    color: #6B7280;
    margin-bottom: 20px;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .qd-search-input {
        width: 120px;
    }
    
    .qd-nav-item {
        padding: 6px 10px;
        font-size: 13px;
    }
}

@media (max-width: 768px) {
    .qd-login-box {
        padding: 30px 20px;
    }
    
    .qd-login-title {
        font-size: 24px;
    }
    
    .qd-captcha-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .qd-captcha-img {
        width: 100%;
        height: 50px;
    }
    .qd-header-inner {
        flex-wrap: wrap;
        min-height: auto;
        padding: 10px 0;
    }
    
    .qd-logo {
        order: 1;
        flex: 0 0 auto;
    }
    
    .qd-nav {
        order: 2;
    }
    
    .qd-header-right {
        order: 3;
        flex: 0 0 auto;
        position: relative;
        z-index: 1002;
    }
    
    .qd-menu-toggle {
        display: flex;
        position: relative;
        z-index: 1002;
        pointer-events: auto;
    }
    
    .qd-nav {
        order: 3;
        width: 100%;
        display: none;
        flex-direction: column;
        gap: 0;
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        background: rgba(59, 130, 246, 0.98);
        border-radius: 0 0 8px 8px;
        padding: 8px 10px;
        box-shadow: 0 8px 16px rgba(0,0,0,0.15);
        max-height: 70vh;
        overflow-y: auto;
    }
    
    .qd-nav.active {
        display: flex;
    }
    
    .qd-nav-item {
        width: 100%;
        padding: 10px 15px;
        border-radius: 4px;
        margin-bottom: 5px;
        text-align: left;
    }
    
    .qd-nav-item:hover,
    .qd-nav-item.active {
        background: rgba(255,255,255,0.2);
    }
    
    .qd-search-box-desktop {
        display: none;
    }
    
    .qd-search-box-mobile {
        display: flex !important;
        width: 100%;
        margin-top: 10px;
        padding: 0;
    }
    
    .qd-search-box-mobile .qd-search-input {
        flex: 1;
        width: 100%;
    }
    
    .qd-header-link {
        font-size: 12px;
        padding: 6px 10px;
    }
    
    .qd-home-top-layout {
        grid-template-columns: 1fr;
    }
    
    .qd-sidebar-rank,
    .qd-rank-list {
        display: none;
    }
    
    .qd-home-layout {
        grid-template-columns: 1fr;
    }
    
    .qd-update-list-left {
        display: block;
    }
    
    .qd-new-list-right {
        display: none;
    }
    
    /* 手机端最近更新样式优化 */
    .qd-update-items {
        padding: 10px;
    }
    
    .qd-update-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 12px;
        border-bottom: 1px solid #F3F4F6;
    }
    
    .qd-update-item:last-child {
        border-bottom: none;
    }
    
    .qd-update-item .qd-category-tag {
        margin-bottom: 0;
    }
    
    .qd-update-item .qd-book-link {
        width: 100%;
        font-size: 15px;
        font-weight: 600;
        line-height: 1.5;
        margin-bottom: 4px;
        word-break: break-all;
    }
    
    .qd-update-item .qd-chapter-link {
        max-width: 100%;
        font-size: 13px;
        color: #666;
        line-height: 1.4;
        margin-bottom: 4px;
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .qd-update-item .qd-update-time {
        align-self: flex-end;
        font-size: 11px;
        color: #999;
        margin-top: 4px;
    }
    
    /* 热门推荐在手机端保持2列布局，左图片右内容 */
    .qd-book-grid-recommend {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px;
    }
    
    .qd-book-grid-recommend .qd-book-item {
        height: 140px;
        padding: 10px;
        gap: 10px;
    }
    
    .qd-book-grid-recommend .qd-book-cover {
        width: 80px;
        min-width: 80px;
        max-width: 80px;
        height: 106px;
        min-height: 106px;
        max-height: 106px;
        padding-top: 0 !important;
    }
    
    .qd-book-grid-recommend .qd-book-cover img {
        width: 80px;
        height: 106px;
    }
    
    .qd-book-grid-recommend .qd-book-info {
        padding: 0;
    }
    
    .qd-book-grid-recommend .qd-book-name {
        font-size: 13px;
        height: auto;
        margin-bottom: 4px;
        -webkit-line-clamp: 2;
    }
    
    .qd-book-grid-recommend .qd-book-author {
        font-size: 11px;
        margin-bottom: 4px;
    }
    
    .qd-book-grid-recommend .qd-book-desc {
        font-size: 11px;
        height: auto;
        line-height: 1.4;
        color: #999;
        -webkit-line-clamp: 2;
    }
    
    .qd-book-main {
        flex-direction: column;
        gap: 20px;
    }
    
    .qd-book-cover-large {
        width: 120px;
        margin: 0 auto;
    }
    
    .qd-book-meta {
        width: 100%;
    }
    
    .qd-book-title {
        font-size: 22px;
        margin-bottom: 12px;
        text-align: center;
    }
    
    .qd-book-tags {
        justify-content: center;
        margin-bottom: 15px;
    }
    
    .qd-book-info {
        margin-bottom: 15px;
    }
    
    .qd-info-item {
        font-size: 13px;
        justify-content: center;
    }
    
    .qd-book-actions {
        justify-content: center;
        width: 100%;
    }
    
    .qd-book-actions .qd-btn {
        flex: 1;
        min-width: 120px;
        max-width: 200px;
    }
    
    .qd-bookcase-item {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }
    
    .qd-bookcase-cover {
        width: 100px;
        height: 133px;
        margin: 0 auto;
    }
    
    .qd-bookcase-info {
        width: 100%;
        text-align: center;
    }
    
    .qd-bookcase-name {
        text-align: center;
    }
    
    .qd-bookcase-author,
    .qd-bookcase-update,
    .qd-bookcase-chapter {
        text-align: center;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 5px;
    }
    
    .qd-bookcase-actions {
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .qd-bookcase-actions .qd-btn {
        flex: 1 1 calc(50% - 4px);
        min-width: calc(50% - 4px);
        max-width: calc(50% - 4px);
        box-sizing: border-box;
        text-align: center;
    }
    
    /* 书架页面有4个按钮时的布局 */
    .qd-bookcase-actions .qd-btn-danger:nth-last-child(1):nth-child(4) {
        flex: 1 1 100%;
        min-width: 100%;
        max-width: 100%;
        margin-top: 0;
    }
    
    /* 阅读历史页面只有2个按钮时，保持在同一行 */
    .qd-bookcase-actions .qd-btn:nth-child(1):nth-last-child(2),
    .qd-bookcase-actions .qd-btn:nth-child(2):nth-last-child(1) {
        flex: 1 1 calc(50% - 4px) !important;
        min-width: calc(50% - 4px) !important;
        max-width: calc(50% - 4px) !important;
        margin-top: 0 !important;
    }
    
    .qd-bookcase-time {
        display: block;
        width: 100%;
        margin-left: 0;
        margin-top: 5px;
    }
    
    .qd-book-cover-large {
        width: 120px;
        margin: 0 auto;
        aspect-ratio: 3 / 4;
    }
}

/* 阅读历史样式 - 类似 xbiquge 布局 */
#tempBookcase .recentread-main {
    display: flex;
    flex-direction: column;
    padding: .75rem;
    margin: 0 0 .75rem 0;
    border-bottom: 1px solid #E5E7EB;
    font-size: .875rem;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

#tempBookcase .recentread-main:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

#tempBookcase .recentread-main > a {
    display: flex;
    align-items: center;
    color: #1F2937;
    min-width: 0;
    overflow: hidden;
    text-decoration: none;
}

#tempBookcase .recentread-main > a:first-child {
    width: 100%;
    margin-bottom: .5rem;
}

#tempBookcase .recentread-main > a:hover {
    color: #3B82F6;
}

#tempBookcase .recentread-main > a span {
    display: inline-block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#tempBookcase .recentread-main > a span:first-child {
    width: 1.75rem;
    text-align: center;
    color: #9CA3AF;
    flex-shrink: 0;
    margin-right: .5rem;
    font-size: .8125rem;
}

#tempBookcase .recentread-main > a span:nth-child(2) {
    flex: 1;
    min-width: 0;
    font-weight: 600;
    color: #1F2937;
    margin-right: .5rem;
    font-size: .9375rem;
}

#tempBookcase .recentread-main > a span:nth-child(3) {
    flex: 1;
    min-width: 0;
    color: #6B7280;
    font-size: .8125rem;
    margin-right: .5rem;
}

#tempBookcase .recentread-main > a span:nth-child(4),
#tempBookcase .recentread-main > a span:nth-child(5) {
    display: none;
}

/* 移除按钮通用样式 */
#tempBookcase .recentread-main .recentread-remove-btn,
#tempBookcase .recentread-main .recentread-remove-btn-pc {
    flex-shrink: 0;
    width: 2.5rem;
    padding: .375rem .5rem;
    background: #F3F4F6;
    border-radius: 6px;
    color: #6B7280;
    font-size: .75rem;
    white-space: nowrap;
    text-align: center;
    box-sizing: border-box;
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid #E5E7EB;
}

#tempBookcase .recentread-main .recentread-remove-btn:hover,
#tempBookcase .recentread-main .recentread-remove-btn-pc:hover {
    background: #EF4444;
    color: #fff;
    border-color: #EF4444;
}

/* 手机端：两行布局 - 第一行书名，第二行章节名和移除按钮 */
@media screen and (max-width: 767px) {
    #tempBookcase .recentread-main > a:first-child {
        width: 100%;
        margin-bottom: .5rem;
    }
    
    #tempBookcase .recentread-main > a:first-child span:nth-child(3) {
        display: none;
    }
    
    #tempBookcase .recentread-main .recentread-second-line {
        display: flex;
        align-items: center;
        width: 100%;
        margin-top: .5rem;
        padding-left: 2.25rem;
        justify-content: space-between;
        box-sizing: border-box;
        padding-right: .5rem;
    }
    
    #tempBookcase .recentread-main .recentread-second-line span {
        flex: 1;
        min-width: 0;
        color: #6B7280;
        font-size: .8125rem;
        margin-right: .5rem;
    }
    
    #tempBookcase .recentread-main .recentread-remove-btn-pc {
        display: none;
    }
}

/* PC端：一行布局，显示所有信息 */
@media screen and (min-width: 768px) {
    #tempBookcase .recentread-main {
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        padding: 1rem;
    }
    
    #tempBookcase .recentread-main > a:first-child {
        flex: 1;
        width: auto;
        margin-bottom: 0;
    }
    
    #tempBookcase .recentread-main > a:first-child span:nth-child(3) {
        display: inline-block;
    }
    
    #tempBookcase .recentread-main > a span:nth-child(4),
    #tempBookcase .recentread-main > a span:nth-child(5) {
        display: inline-block;
        flex: 0 0 auto;
        color: #6B7280;
        font-size: .8125rem;
        margin-right: .75rem;
        max-width: 6rem;
    }
    
    #tempBookcase .recentread-main .recentread-remove-btn-pc {
        display: block;
        margin-left: .75rem;
        margin-top: 0;
        align-self: center;
    }
    
    #tempBookcase .recentread-main .recentread-second-line {
        display: none;
    }
    
    #tempBookcase .recentread-main .recentread-remove-btn {
        display: none;
    }
    
    .qd-book-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 15px;
    }
    
    /* 确保热门推荐在手机端强制为2列 */
    .qd-book-grid.qd-book-grid-recommend {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px;
    }
    
    .qd-book-item-list {
        flex-direction: row;
        gap: 15px;
        padding: 15px;
    }
    
    .qd-book-item-list .qd-book-cover {
        width: 90px;
        min-width: 90px;
        max-width: 90px;
        height: 120px;
        min-height: 120px;
        max-height: 120px;
        padding-top: 0 !important;
        flex-shrink: 0;
    }
    
    .qd-book-item-list .qd-book-cover img {
        width: 100%;
        height: 100%;
    }
    
    .qd-book-info-list {
        flex: 1;
        min-width: 0;
        gap: 6px;
    }
    
    .qd-book-info-list .qd-book-name {
        font-size: 16px;
        margin: 0;
    }
    
    .qd-book-info-list .qd-book-author {
        font-size: 13px;
        margin: 0;
    }
    
    .qd-book-info-list .qd-book-meta,
    .qd-book-info-list .qd-book-last {
        font-size: 12px;
        margin: 0;
    }
    
    .qd-book-info-list .qd-book-desc {
        font-size: 13px;
        line-height: 1.5;
        margin: 0;
        -webkit-line-clamp: 2;
    }
    
    .qd-book-info-list .qd-btn-read {
        margin-top: 6px;
        padding: 6px 16px;
        font-size: 13px;
    }
    
    .qd-chapter-list {
        grid-template-columns: 1fr;
    }
    
    .qd-nav-buttons {
        flex-direction: column;
    }
    
    .qd-btn-nav {
        width: 100%;
        margin: 5px 0;
    }
    
    /* 手机端阅读页头部布局 - 分成两行 */
    .qd-reader-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        padding: 15px;
    }
    
    .qd-chapter-title {
        font-size: 18px;
        width: 100%;
        word-break: break-word;
    }
    
    .qd-reader-actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}

/* 搜索弹窗 */
.qd-search-modal { display:none; }
.qd-search-modal.show { display:block; }
.qd-search-backdrop {
    position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 1100;
}
.qd-search-dialog {
    position: fixed; left: 50%; top: 15%; transform: translateX(-50%);
    width: min(640px, 92%); background: #fff; border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2); z-index: 1101; padding: 14px;
}
.qd-search-form-modal { display: flex; gap: 8px; align-items: center; }
.qd-search-input-modal {
    flex: 1; padding: 10px 12px; border: 1px solid #D1D5DB; border-radius: 6px; font-size: 14px;
}
.qd-search-btn-modal {
    padding: 10px 16px; background: #3B82F6; color: #fff; border: none; border-radius: 6px; font-size: 14px;
}
.qd-search-close {
    background: transparent; border: none; font-size: 22px; color: #6B7280; margin-left: 4px; cursor: pointer;
}

@media (max-width: 768px) {
    .qd-search-box-desktop { display: none; }
    #qd-search-open { display: inline-block; }
}

@media (min-width: 769px) {
    #qd-search-open { display: none; 
    }
}

/* 小尺寸图书 */
.qd-book-grid-small {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 15px;
}

.qd-book-item-small .qd-book-cover {
    padding-top: 133%;
}

.qd-book-item-small .qd-book-info {
    padding: 8px;
}

.qd-book-item-small .qd-book-name {
    font-size: 12px;
    height: 32px;
}

