/* style.css */

/* xChina Template Styles */
:root {
    --primary-color: #d32f2f;
    --primary-hover: #c62828;
    --header-bg: #2f2f2f;
    --hero-bg: #2f2f2f;
    --bg-color: #f7f7f7;
    --text-color: #333;
    --text-light: #666;
    --text-lighter: #999;
    --card-bg: #fff;
    --sidebar-bg: #fafafa;
    --border-color: #eee;
    --border-light: #e5e5e5;
    --nav-text: #f5f5f5;
    --nav-hover: #fff;
    --hero-text: #cccccc;
    --hero-text-light: #bdbdbd;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
}

a {
    text-decoration: none;
    color: inherit;
}

.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header & Nav */
.topMenu {
    background: var(--header-bg);
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

.logo img {
    height: 36px;
}

.logo-text {
    font-size: 24px;
    font-weight: 600;
    background: linear-gradient(135deg, #fff 0%, #f5f5f5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    letter-spacing: 0.5px;
}

.logo a {
    text-decoration: none;
}

.logo a:hover .logo-text {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.menu {
    background: var(--header-bg);
    color: var(--nav-text);
    padding: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
}

.menu li {
    margin: 0;
}

.menu li a {
    display: block;
    padding: 12px 18px;
    color: var(--nav-text);
    font-size: 14px;
    transition: all 0.2s ease;
    position: relative;
}

.menu li a:hover {
    color: var(--nav-hover);
    background: rgba(255, 255, 255, 0.05);
}

.menu li a.active {
    color: var(--nav-hover);
}

.menu li a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
}

/* 移动端菜单按钮 */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--nav-text);
    cursor: pointer;
    padding: 5px 10px;
    transition: color 0.2s ease;
}

.mobile-menu-toggle:hover {
    color: var(--nav-hover);
}

/* 移动端遮罩层 */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
}

/* Hero Section */
.hero-section {
    background: var(--hero-bg);
    background: linear-gradient(180deg, var(--hero-bg) 0%, #353535 100%);
    color: #fff;
    padding: 28px 0;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.hero-section h1 {
    font-size: 28px;
    font-weight: 600;
    margin: 0 0 10px 0;
    color: #fff;
    letter-spacing: 0.5px;
}

.hero-section p {
    font-size: 14px;
    color: var(--hero-text);
    margin: 0 0 8px 0;
    line-height: 1.5;
}

.hero-section .stats {
    color: var(--hero-text-light);
    font-size: 13px;
    margin: 0;
}

.hero-section .stats strong {
    color: var(--primary-color);
    font-weight: 500;
    margin: 0 4px;
}

/* Layout */
.layout-lr {
    display: flex;
    margin-top: 20px;
    gap: 20px;
}

.left-1 {
    width: 260px;
    flex-shrink: 0;
}

.left-1 .content-box {
    background: var(--sidebar-bg);
    border: 1px solid var(--border-light);
}

.right-5 {
    flex: 1;
    min-width: 0;
}

/* Content Box */
.content-box {
    background: var(--card-bg);
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--border-color);
}

.content-box h3 {
    color: var(--text-color);
    font-size: 18px;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

/* Video Grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.video-item {
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.video-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.video-thumb {
    position: relative;
    padding-top: 56.25%;
    background: #e5e5e5;
    overflow: hidden;
}

.video-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.video-item:hover .video-thumb img {
    transform: scale(1.05);
}

.video-info {
    padding: 12px;
}

.video-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color);
    margin: 0 0 8px 0;
    height: 40px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.4;
}

/* Novel Grid */
.novel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
}

.novel-item {
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.novel-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

.novel-thumb {
    position: relative;
    padding-top: 150%;
    background: #fff;
    overflow: hidden;
}

.novel-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform 0.3s ease;
}

.novel-item:hover .novel-thumb img {
    transform: scale(1.05);
}

.novel-info {
    padding: 10px;
}

.novel-title {
    font-size: 14px;
    margin: 5px 0;
    height: 40px;
    overflow: hidden;
}

.novel-meta {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

.novel-chapter {
    font-size: 12px;
    color: #666;
    margin-top: 3px;
}

.novel-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    font-size: 11px;
    color: #999;
}

/* Comic Grid */
.comic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
}

.comic-item {
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.comic-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

.comic-thumb {
    position: relative;
    padding-top: 150%;
    background: #fff;
    overflow: hidden;
}

.comic-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform 0.3s ease;
}

.comic-item:hover .comic-thumb img {
    transform: scale(1.05);
}

.comic-info {
    padding: 10px;
}

.comic-title {
    font-size: 14px;
    margin: 5px 0;
    height: 40px;
    overflow: hidden;
}

.comic-meta {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

.comic-chapter {
    font-size: 12px;
    color: #666;
    margin-top: 3px;
}

.comic-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    font-size: 11px;
    color: #999;
}

/* Player */
.player-container {
    background: #000;
    width: 100%;
    aspect-ratio: 16/9;
    margin-bottom: 20px;
}

/* Pagination */
.pagination-wrapper {
    margin: 30px 0;
    display: flex;
    justify-content: center;
}

.pagination {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    width: 100%;
    max-width: 800px;
    position: relative;
}

/* 首页按钮 - 固定在左侧 */
.pagination > .page-item:first-child {
    margin-right: auto;
}

/* 页码按钮组 - 居中显示 */
.pagination > .page-item:not(:first-child):not(:nth-last-child(2)):not(:last-child) {
    /* 页码按钮保持自然排列 */
}

/* 上一页和下一页按钮组 - 固定在右侧 */
.pagination > .page-item:nth-last-child(2) {
    margin-left: auto;
    margin-right: 0;
}

.pagination > .page-item:last-child {
    margin-left: 0;
}

.page-item {
    display: inline-block;
}

.page-link {
    display: inline-block;
    padding: 8px 14px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
    min-width: 40px;
    text-align: center;
    font-size: 14px;
}

.page-link:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.page-item.active .page-link {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    cursor: default;
}

.page-item.disabled .page-link {
    background: #f5f5f5;
    color: #999;
    border-color: #e0e0e0;
    cursor: not-allowed;
    pointer-events: none;
}

.page-item.disabled .page-link:hover {
    background: #f5f5f5;
    color: #999;
    border-color: #e0e0e0;
}

/* ============================================
   移动端响应式设计 (< 768px)
   ============================================ */
@media (max-width: 768px) {
    /* ===== 移动端分页样式 ===== */
    .pagination {
        flex-wrap: nowrap !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 6px;
        padding: 10px 0;
        justify-content: flex-start;
    }
    
    .pagination > .page-item:first-child {
        margin-right: 0;
        flex-shrink: 0;
    }
    
    .pagination > .page-item:last-child {
        margin-left: 0;
        flex-shrink: 0;
    }
    
    .page-item {
        flex-shrink: 0;
    }
    
    .page-link {
        padding: 6px 12px;
        min-width: 36px;
        font-size: 13px;
        white-space: nowrap;
    }
    
    /* 显示移动端菜单按钮 */
    .mobile-menu-toggle {
        display: block;
    }
    
    /* ===== 左侧抽屉式菜单 ===== */
    .menu {
        position: fixed;
        top: 0;
        left: -300px;
        width: 300px;
        height: 100vh;
        background: #fff;
        z-index: 999;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
        overflow-x: hidden;
        box-shadow: 2px 0 12px rgba(0, 0, 0, 0.15);
        -webkit-overflow-scrolling: touch;
    }
    
    .menu.active {
        left: 0;
    }
    
    .menu .main-container {
        padding: 0;
        max-width: 100%;
    }
    
    /* 菜单顶部关闭区域 */
    .menu::before {
        content: '✕';
        position: sticky;
        top: 0;
        display: block;
        padding: 15px 20px;
        background: #f8f8f8;
        color: #666;
        font-size: 20px;
        text-align: right;
        border-bottom: 1px solid #eee;
        z-index: 10;
    }
    
    /* 主菜单列表 */
    .menu ul {
        flex-direction: column;
        padding: 0;
        margin: 0;
    }
    
    .menu li {
        margin: 0;
        border-bottom: 1px solid #f0f0f0;
    }
    
    /* 菜单链接样式 */
    .menu li a {
        display: flex;
        align-items: center;
        padding: 16px 20px;
        color: #333;
        font-size: 16px;
        font-weight: 500;
        transition: background 0.2s ease;
    }
    
    /* 菜单图标 */
    .menu li a i {
        margin-right: 12px;
        width: 20px;
        font-size: 16px;
        display: inline-block;
        text-align: center;
    }
    
    /* Active 状态 */
    .menu li a.active {
        color: var(--primary-color);
        background: rgba(255, 153, 0, 0.08);
    }
    
    /* ===== 布局调整 ===== */
    .layout-lr {
        flex-direction: column;
    }
    
    /* 移动端隐藏侧边栏 */
    .left-1 {
        display: none !important;
    }
    
    /* 移动端隐藏面包屑和栏目标题（重复信息） */
    .hide-mobile {
        display: none !important;
    }
    
    /* ===== 详情页和播放页移动端优化 ===== */
    
    /* 面包屑在详情页/播放页移动端也隐藏 */
    .breadcrumb {
        display: none !important;
    }
    
    /* 主容器 */
    .main-container {
        padding: 10px !important;
    }
    
    /* 内容盒子 */
    .content-box {
        padding: 15px !important;
    }
    
    /* H1 标题 */
    .content-box h1 {
        font-size: 18px !important;
        margin-bottom: 12px !important;
    }
    
    /* 文章信息栏 */
    .content-box > div[style*="font-size:13px"] {
        font-size: 12px !important;
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .content-box > div[style*="font-size:13px"] span {
        margin-left: 0 !important;
    }
    
    /* 封面和基本信息区域 - 改为纵向布局 */
    .content-box > div[style*="display:flex"] {
        flex-direction: column !important;
        gap: 15px !important;
    }
    
    .content-box > div[style*="display:flex"] > div[style*="width:200px"] {
        width: 100% !important;
        max-width: 300px;
        margin: 0 auto;
    }
    
    .content-box > div[style*="display:flex"] > div[style*="flex:1"] {
        width: 100% !important;
    }
    
    /* 信息表格 - 移动端2列布局 */
    .video-info-table,
    .novel-info-table,
    .comic-info-table {
        display: block !important;
        margin: 0 10px !important;
    }
    
    .video-info-table tbody,
    .novel-info-table tbody,
    .comic-info-table tbody {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 12px 15px !important;
    }
    
    .video-info-table tr,
    .novel-info-table tr,
    .comic-info-table tr {
        display: block !important;
        border: none !important;
        padding: 0 !important;
    }
    
    .video-info-table td,
    .novel-info-table td,
    .comic-info-table td {
        display: inline !important;
        padding: 0 !important;
        border: none !important;
        width: auto !important;
        font-size: 13px !important;
        line-height: 1.8 !important;
    }
    
    .video-info-table td:first-child,
    .novel-info-table td:first-child,
    .comic-info-table td:first-child {
        font-weight: 500 !important;
        color: #666 !important;
        margin-right: 0 !important;
    }
    
    .video-info-table td:first-child::after,
    .novel-info-table td:first-child::after,
    .comic-info-table td:first-child::after {
        content: '：' !important;
    }
    
    .video-info-table td:last-child,
    .novel-info-table td:last-child,
    .comic-info-table td:last-child {
        color: #333 !important;
        word-break: break-all !important;
    }
    
    .video-info-table td a,
    .novel-info-table td a,
    .comic-info-table td a {
        font-size: 13px !important;
        margin-right: 6px !important;
    }
    
    /* 播放按钮组 */
    .content-box a[style*="background:#e74c3c"],
    .content-box a[style*="background:var(--primary-color)"] {
        padding: 10px 15px !important;
        font-size: 14px !important;
        white-space: nowrap;
    }
    
    /* 章节选集区域 */
    .content-box > div[style*="max-height"] {
        max-height: 300px !important;
    }
    
    /* 章节按钮 */
    .content-box a[style*="padding:8px 12px"] {
        padding: 6px 10px !important;
        font-size: 12px !important;
        margin: 3px !important;
    }
    
    /* 内容区域 */
    .novel-content,
    .comic-content {
        padding: 15px 10px !important;
        font-size: 16px !important;
    }
    
    /* ===== 章节导航容器 - 强制一行显示 ===== */
    /* 匹配所有包含border-top和border-bottom的flex容器（章节导航） */
    .content-box div[style*="border-top"][style*="border-bottom"] {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 5px !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 8px 5px !important;
        margin: 10px 0 !important;
    }
    
    /* 匹配包含margin:20px 0的导航容器 */
    .content-box div[style*="margin:20px 0"][style*="display:flex"] {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 5px !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 8px 5px !important;
    }
    
    /* 章节导航内的所有链接和span */
    .content-box div[style*="border-top"] a,
    .content-box div[style*="border-top"] span,
    .content-box div[style*="margin:20px 0"] a,
    .content-box div[style*="margin:20px 0"] span {
        padding: 6px 10px !important;
        font-size: 12px !important;
        flex-shrink: 0 !important;
        white-space: nowrap !important;
        display: inline-block !important;
    }
    
    /* 章节目录按钮 */
    .chapterCatalogBtn {
        padding: 6px 10px !important;
        font-size: 12px !important;
        flex-shrink: 0 !important;
        white-space: nowrap !important;
        display: inline-block !important;
    }
    
    /* 隐藏导航图标节省空间 */
    .content-box div[style*="border-top"] i,
    .content-box div[style*="margin:20px 0"] i {
        display: none !important;
    }
    
    /* 简介/描述区域 */
    .content-box p,
    .content-box > div[style*="line-height:1.8"] {
        font-size: 14px !important;
        line-height: 1.7 !important;
    }
    
    /* H3 小标题 */
    .content-box h3 {
        font-size: 16px !important;
        margin-top: 15px !important;
        margin-bottom: 10px !important;
    }
    
    /* 上一部/下一部导航 */
    div[style*="justify-content:space-between"] a {
        font-size: 13px !important;
        padding: 8px 12px !important;
    }
    
    /* ===== 章节目录模态框移动端优化 ===== */
    #chapterCatalogModal {
        padding: 10px !important;
    }
    
    #chapterCatalogModal > div {
        max-width: 100% !important;
        width: 95% !important;
        max-height: 80vh !important;
        margin: 10vh auto !important;
    }
    
    #chapterCatalogModal h3 {
        font-size: 16px !important;
        padding: 12px 15px !important;
    }
    
    #chapterCatalogModal .close {
        top: 12px !important;
        right: 15px !important;
        font-size: 24px !important;
    }
    
    /* 章节列表 */
    #chapterList {
        padding: 10px !important;
        max-height: calc(80vh - 120px) !important;
    }
    
    #chapterList > div {
        margin-bottom: 15px !important;
    }
    
    #chapterList h4 {
        font-size: 14px !important;
        padding: 8px 10px !important;
        margin-bottom: 8px !important;
    }
    
    #chapterList a {
        padding: 8px 10px !important;
        font-size: 13px !important;
        margin: 4px 3px !important;
    }
    
    /* 章节分页 */
    .chapter-pagination {
        padding: 10px !important;
        gap: 5px !important;
    }
    
    .chapter-pagination button {
        padding: 6px 12px !important;
        font-size: 12px !important;
        min-width: 32px !important;
    }
    
    /* ===== 视频播放器移动端优化 ===== */
    .player-container {
        border-radius: 0 !important;
        margin-bottom: 15px !important;
        margin-left: -15px !important;
        margin-right: -15px !important;
        width: calc(100% + 30px) !important;
    }
    
    /* ===== 漫画内容移动端优化 ===== */
    .comic-content {
        margin-left: -15px !important;
        margin-right: -15px !important;
        width: calc(100% + 30px) !important;
    }
    
    .comic-content img {
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    /* ===== 小说内容移动端优化 ===== */
    .novel-content {
        font-size: 16px !important;
        line-height: 1.8 !important;
        padding: 15px 10px !important;
    }
    
    .novel-content p {
        margin-bottom: 1em !important;
        text-indent: 2em !important;
    }
    
    /* 主内容区占满宽度 */
    .right-5 {
        width: 100% !important;
        margin: 0 !important;
        flex: none !important;
    }
    
    /* ===== 移动端筛选菜单 ===== */
    /* 显示移动端子栏目筛选 */
    .mobile-subchannel-filter {
        display: block !important;
    }
    
    /* 移动端横向滚动筛选容器 */
    .mobile-scroll-filter {
        display: flex !important;
        align-items: flex-start;
        margin-bottom: 12px !important;
    }
    
    .mobile-scroll-filter .filter-label {
        flex-shrink: 0;
        padding-top: 6px;
        min-width: 60px !important;
        width: auto !important;
    }
    
    .mobile-scroll-filter .filter-scroll-wrapper {
        flex: 1;
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE/Edge */
        padding-bottom: 2px;
    }
    
    .mobile-scroll-filter .filter-scroll-wrapper::-webkit-scrollbar {
        display: none; /* Chrome/Safari */
    }
    
    .mobile-scroll-filter .filter-option {
        display: inline-block !important;
        white-space: nowrap;
        font-size: 13px !important;
        padding: 6px 12px !important;
        margin-right: 8px !important;
        margin-bottom: 0 !important;
    }
    
    /* 统一移动端所有筛选项样式（包括类型、地区等） */
    .filter-section .filter-group {
        display: flex !important;
        align-items: flex-start;
        margin-bottom: 12px !important;
    }
    
    .filter-section .filter-label {
        flex-shrink: 0;
        padding-top: 6px;
        min-width: 60px !important;
        width: 60px !important;
        font-weight: 500;
    }
    
    .filter-section .filter-options {
        flex: 1;
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        padding-bottom: 2px;
    }
    
    .filter-section .filter-options::-webkit-scrollbar {
        display: none;
    }
    
    .filter-section .filter-option {
        display: inline-block !important;
        white-space: nowrap;
        margin-bottom: 0 !important;
    }
    
    /* 网格布局调整 */
    .video-grid,
    .novel-grid,
    .comic-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }
    
    /* Logo 调整 */
    .logo-text {
        font-size: 20px;
    }
    
    .logo img {
        height: 30px;
    }
    
    /* Hero 区域调整 */
    .hero-section {
        padding: 20px 0;
    }
    
    .hero-section h1 {
        font-size: 22px;
        margin-bottom: 8px;
    }
    
    .hero-section p {
        font-size: 13px;
        margin-bottom: 6px;
    }
    
    .hero-section .stats {
        font-size: 12px;
    }
}

/* ============================================
   Novel Content Styles (play_novel.html)
   ============================================ */
.novel-content {
    font-family: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'WenQuanYi Micro Hei', sans-serif;
    font-size: 18px;
    line-height: 1.6;
    color: #2c3e50;
    text-align: justify;
    word-wrap: break-word;
    word-break: break-word;
    min-height: 400px;
    padding: 30px 10px;
    position: relative;
}

.novel-content p {
    margin: 0.6em 0;
    text-indent: 2em;
    word-spacing: 0.1em;
    letter-spacing: 0.05em;
    line-height: 1.6;
}

.novel-content p:first-child {
    margin-top: 0;
}

.novel-content p:last-child {
    margin-bottom: 0;
}

.novel-content p:first-child::first-letter {
    float: left;
    font-size: 3em;
    line-height: 1;
    margin: 0.1em 0.15em 0 0;
    color: var(--primary-color, #667eea);
    font-weight: bold;
}

.novel-content div {
    margin: 0.5em 0;
}

/* ============================================
   Comic Content Styles (play_cartoon.html)
   ============================================ */
.comic-content {
    width: 100%;
    min-height: 400px;
    padding: 20px 0;
    text-align: center;
    line-height: 0;
    -webkit-overflow-scrolling: touch;
}

.comic-content p {
    margin: 0;
    padding: 0;
    line-height: 0;
}

.comic-content img {
    max-width: 100%;
    width: 100%;
    height: auto;
    min-height: 200px;
    display: block;
    margin: 5px auto;
    border-radius: 4px;
    vertical-align: top;
    background: #f5f5f5;
}

/* ============================================
   Chapter Navigation & Catalog
   ============================================ */
.chapterCatalogBtn:hover,
.chapterCatalogBtn:focus {
    background: #f5f5f5 !important;
    border-color: #999;
}

.chapterCatalogBtn:active {
    background: #e8e8e8 !important;
}

/* ============================================
   Common Utility Classes
   ============================================ */
.breadcrumb {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-light);
    padding: 12px 0;
}

.breadcrumb a {
    color: var(--text-light);
    transition: color 0.2s ease;
}

.breadcrumb a:hover {
    color: var(--primary-color);
}

/* Search Page Hot Tags */
.hot-search-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-link {
    display: inline-block;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 20px;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s;
}

.tag-link:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    filter: brightness(1.1);
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 768px) {
    .novel-content {
        font-size: 16px;
        line-height: 1.6;
        padding: 20px 5px;
    }
    
    .novel-content p {
        margin: 0.5em 0;
        line-height: 1.6;
        word-spacing: 0.05em;
        letter-spacing: 0.02em;
    }
    
    .novel-content p:first-child::first-letter {
        font-size: 2.5em;
        margin: 0.05em 0.1em 0 0;
    }
    
    .comic-content {
        padding: 15px 0;
    }
    
    .comic-content img {
        margin: 3px auto;
    }
}
