body {
    margin: 0;
    font: 14px/1.6 Arial, sans-serif;
    background: #f9f9f9;
    color: #333;
}

a {
    color: #007bff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0;
    font-weight: normal;
}

p{
    margin: 0;
}

.mt-20{
    margin-top: 20px;
}

.box{
    padding: 15px;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.box .title{
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 20px;
}

.box .hd{
    margin-bottom: 20px;    
    overflow: hidden;
}

.box .hd h2, .box .hd h3{
    float: left;
    font-size: 18px;
    font-weight: bold;
}

.box .hd .more{
    float: right;
}

.header, .footer {
    width: 100%;
    background: #313035;
    color: #fff;
}

.header-inner, .footer-inner, .main {
    max-width: 1200px;
    margin: 0 auto;
}

.header-inner, .footer-inner {
    display: flex;
    align-items: center;
}

.header-inner {
    padding: 10px 15px;
    justify-content: space-between;
}

.header .logo {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    text-align: center;
}

.header .logo a{
    font-size: 22px;
    color: #fff;
}

.header .logo span {
    font-size: 14px;
    color: #bbb;
}

.footer{
    margin-top: 20px;
    color: #999;
}

.footer-inner{
    padding: 20px 15px;
    flex-direction: column;
}

.comic-detail {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    background: #fff;
    padding: 15px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
}

.comic-detail img {
    width: 200px;
    height: auto;
}

.comic-detail .info {
    flex: 1;
}

.comic-detail .info h1 {
    margin: 0 0 10px;
}

.comic-detail .info .meta {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    column-gap: 20px;
    row-gap: 5px;
}

.comic-detail .info .meta .full {
    grid-column: 1 / -1;
}

.comic-detail .info .meta .desc {
    margin-top: 10px;
    line-height: 1.6;
    color: #777;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    line-clamp: 3;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.read-btn {
    display: inline-block;
    margin-top: 15px;
    padding: 8px 15px;
    background: #007bff;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
}

.chapter-list {
    margin-top: 20px;
    background: #fff;
    padding: 15px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.chapter-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.chapter-list-header h2 {
    font-size: 18px;
    font-weight: bold;
}

.order-toggle {
  cursor: pointer;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  width: 20px;
  margin-left: 10px;
}

.order-toggle .arrow {
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  margin: 2px 0;
  transition: border-color 0.3s;
}

.order-toggle .arrow.up {
  border-bottom: 8px solid #ccc;
}

.order-toggle .arrow.down {
  border-top: 8px solid #ccc;
}

.order-toggle.desc .arrow.down {
  border-top-color: #007bff;
}

.order-toggle.asc .arrow.up {
  border-bottom-color: #007bff;
}

.chapter-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    max-height: calc(40px * 10 + 9 * 10px);
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.chapter-list.expanded ul {
    max-height: none;
}

.chapter-list li {
    height: 40px;
    background: #f6f6f6;
    text-align: center;
    line-height: 40px;
    overflow: hidden;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.chapter-list a {
    display: block;
    text-decoration: none;
    color: #252525;
    padding: 0 5px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.chapter-list a:hover {
    background: #007bff;
    color: #fff;
}

.show-more {
    display: block;
    text-align: center;
    padding: 20px 0 10px;
    color: #007bff;
    cursor: pointer;
    user-select: none;
}

.chapter-detail{
    margin-top: 20px;
    padding: 15px;
    background: #fff;
}

.chapter-title{
    padding: 10px 10px 20px 10px;
    font-size: 22px;
    text-align: center;
}

.chapter-images img{
    display: block;
    max-width: 1200px;
}

.chapter-next{
    width: 100%;
    margin-top: 20px;
    font-size: 20px;
    text-align: center;
}

.bottom-bar {
    display: none;
}

#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.2);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

#overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* ----------------------------- */
/* 相关情报区域 */
/* ----------------------------- */
.rel-news-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.rel-news-item {
    display: flex;
    width: calc(50% - 10px);
    box-sizing: border-box;
}

.rel-news-item .thumb img {
    width: 180px;
    height: 120px;
    border-radius: 4px;
    object-fit: cover;
}

.rel-news-item .info {
    flex: 1;
    padding-left: 12px;
    overflow: hidden;
}

.rel-news-item .name {
    display: block;
    font-size: 18px;
    /* font-weight: bold; */
    color: #333;
    margin-bottom: 10px;
}

.rel-news-item .desc {
    font-size: 14px;
    color: #9e9e9e;
    line-height: 1.6;
    height: 42px;
    overflow: hidden;
    margin-bottom: 10px;
}

.rel-news-item .meta {
    font-size: 13px;
    color: #999;
}

.rel-news-item .meta span{
    margin-left: 5px;
}

.rel-news-item .meta span:first-child{
    margin-left: 0;
}

.rel-news-item .meta .tag {
    display: inline-block;
    padding: 0px 6px;
    font-size: 12px;
    border-radius: 3px;
    background: #ff6f00;
    color: #fff;
    margin-right: 5px;
}

/* ----------------------------- */
/* 相关漫画标签区域 */
/* ----------------------------- */
.rel-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.rel-tag-list .tag {
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 14px;
    background: #409eff;
    color: #fff;
    text-decoration: none;
}

.rel-tag-list .tag:nth-child(2n) {
    background-color: #67c23a
}

.rel-tag-list .tag:nth-child(3n) {
    background-color: #e6a23c
}

.rel-tag-list .tag:nth-child(4n) {
    background-color: #f56c6c
}

.rel-tag-list .tag:nth-child(5n) {
    background-color: #909399
}

/* ----------------------------- */
/* 文章列表区域 */
/* ----------------------------- */
.news-list{
    background:#fff;
    margin-top: 20px;
}

.news-item {
    display: flex;
    box-sizing: border-box;
    padding: 15px;
    border-bottom: 1px solid #efefef
}

.news-item .thumb img {
    width: 180px;
    height: 120px;
    border-radius: 4px;
    object-fit: cover;
}

.news-item .info {
    flex: 1;
    padding-left: 12px;
    overflow: hidden;
}

.news-item .name {
    display: block;
    font-size: 18px;
    /* font-weight: bold; */
    color: #333;
    margin-bottom: 10px;
}

.news-item .desc {
    font-size: 14px;
    color: #9e9e9e;
    line-height: 1.6;
    height: 42px;
    overflow: hidden;
    margin-bottom: 10px;
}

.news-item .meta {
    font-size: 13px;
    color: #999;
}

.news-item .meta span{
    margin-left: 5px;
}

.news-item .meta span:first-child{
    margin-left: 0;
}

.news-item .meta .tag {
    display: inline-block;
    padding: 0px 6px;
    font-size: 12px;
    border-radius: 3px;
    background: #ff6f00;
    color: #fff;
    margin-right: 5px;
}

@media (max-width: 768px) {
    .article-item .media-left {
        width: 120px;
    }
    .article-item .title {
        margin: 0 0 5px;
    }
    .article-item .intro {
        display: none;
    }
}

/* ----------------------------- */
/* 文章详情区域 */
/* ----------------------------- */
.article-detail {
    background: #fff;
    padding: 20px;
    margin-top: 20px;
}

.article-title {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    line-height: 1.4;
}

.article-meta {
    margin-top: 10px;
    color: #777;
    font-size: 14px;
}

.meta-tag {
    background: #ff6600;
    color: #fff;
    padding: 2px 6px;
    border-radius: 3px;
    margin-right: 10px;
}

.meta-time, .meta-view {
    margin-right: 10px;
}

.article-cover img {
    width: 100%;
    border-radius: 6px;
    margin: 20px 0;
}

.article-content {
    margin-top: 15px;
    font-size: 16px;
    color: #444;
    line-height: 1.8;
}

.article-content p {
    margin: 15px 0;
}

.article-content img {
    max-width: 100%;
    border-radius: 6px;
}

.article-content h2 {
    font-size: 20px;
    margin: 25px 0 10px;
    color: #222;
}

.article-nav {
    margin-top: 30px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
}

.article-nav a {
    color: #0077ff;
    font-size: 15px;
}

/* ----------------------------- */
/* 其他 */
/* ----------------------------- */
.position{
    margin-top: 20px;
}

.position a{
    color: #333;
}

/*page*/
.pages {
    padding: 28px 0 38px;
    text-align: center;
    height: 39px;
    line-height: 32px;
    color: #666;
    margin-top: 05px;
}

.pages ul {
    float: left;
    position: relative;
    width: 100%;
    text-align: center;
}

.pages li {
    display: inline-block;
    margin: 0 3px;
}

.pages a {
    display: inline-block;
    height: 32px;
    text-align: center;
    margin: 0 3px;
    padding: 0 14px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 2px;
    color: #666;
}

.pages .active,
.pages a.on {
    border-color: #ff6600;
    background: #ff6600;
    color: #fff;
    filter: none;
    font-weight: bold
}

.pages a:hover {
    border-color: #ff6600;
    background: #ff6600;
    color: #ffffff
}

.pages .active:hover,
.pages .thisclass a:hover {
    border-color: #ff6600;
    background: #ff6600;
    color: #fff;
}

@media (max-width: 768px) {
    .header-inner, .footer-inner, .main {
        max-width: none;
    }

    .header .logo a{
        font-size: 16px;
    }

    .header .logo span {
        font-size: 12px;
    }

    .footer{
        background: none;
        margin-top: 5px;
        padding-bottom: 60px;
    }

    .footer-inner{
        padding: 15px;
    }

    .comic-detail {
        gap: 10px;
        flex-direction: column;
        align-items: center;
        margin-top: 0;
    }

    .comic-detail img {
        width: 100%;
        max-width: 200px;
    }

    .comic-detail .info h1{
        font-size: 24px;
        text-align: center;
    }

    .comic-detail .info .meta {
        grid-template-columns: 1fr;
    }

    .comic-detail .info .read-btn {
        display: none;
    }

    .chapter-list ul {
        grid-template-columns: repeat(3, 1fr);
        max-height: calc(40px * 5 + 4 * 10px);
    }

    .chapter-detail{
        margin-top: 0;
        padding: 0;
    }

    .chapter-title{
        padding: 15px 10px;
    }

    .bottom-bar {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: rgba(49, 48, 53, 0.95);
        display: grid;
        grid-template-columns: 1fr;
        text-align: center;
        align-items: center;
        height: 52px;
        box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.1);
        z-index: 9999;
    }

    .bottom-bar a {
        display: block;
        line-height: 52px;
        color: #fff;
        text-decoration: none;
        font-weight: 500;
    }

    .chapter-page .bottom-bar {
        grid-template-columns: repeat(3, 1fr);
    }

    .rel-news-item{
        width: 100%;
        padding-bottom: 10px;
        border-bottom: solid 1px #efefef;
    }

    .rel-news-item:last-child{
        padding-bottom: 0;
        border-bottom: none;
    }

    .rel-news-item .thumb img {
        width: 110px;
        height: 70px;
    }

    .rel-news-item .name{
        height: 40px;
        line-height: 20px;
        font-size: 16px;
        margin-bottom: 5px;
    }

    .rel-news-item .desc {
        display: none;
    }

    .rel-tag-list .tag {    
        padding: 4px 12px;
        font-size: 12px;
    }
    
    .article-title {
        font-size: 20px;
    }

    .article-content img {
        border-radius: 4px;
    }

    .article-nav {
        flex-direction: column;
        gap: 10px;
    }

    .news-list{
        margin-top: 15px;
    }

    .news-item{
        width: 100%;
        padding-bottom: 10px;
        border-bottom: solid 1px #efefef;
    }

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

    .news-item .thumb img {
        width: 110px;
        height: 70px;
    }

    .news-item .name{
        height: 40px;
        line-height: 20px;
        font-size: 16px;
        margin-bottom: 5px;
    }

    .news-item .desc {
        display: none;
    }

    .position{
        margin-top: 15px;
        padding: 0 15px;
    }
}