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;
}

.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;
}

.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-info {
    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-info img {
    width: 200px;
    height: auto;
}

.info {
    flex: 1;
}

.info h1 {
    margin: 0 0 10px;
}

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

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

.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 {
    margin: 0;
    font-size: 20px;
}

.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;
    /* margin-top: 10px; */
    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;
}

@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-info {
        gap: 10px;
        flex-direction: column;
        align-items: center;
        margin-top: 0;
    }

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

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

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

    .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-title {
    font-size: 16px;
    font-weight: bold;
    border-left: 4px solid #f60;
    padding-left: 10px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
}

.rel-title .more {
    font-size: 14px;
    color: #999;
    text-decoration: none;
}

/* ----------------------------- */
/* 相关文章区域 */
/* ----------------------------- */
.rel-article-box {
    background: #fff;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 25px;
}

.rel-article-list .rel-item {
    display: flex;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.rel-article-list .rel-item:last-child {
    border-bottom: none;
}

.rel-item .pic {
    width: 170px;
    height: 110px;
    overflow: hidden;
    border-radius: 4px;
    margin-right: 15px;
}

.rel-item .pic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rel-item .info .title {
    font-size: 16px;
    margin: 0 0 8px;
}

.rel-item .meta {
    font-size: 12px;
    color: #888;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.rel-item .tag {
    padding: 2px 6px;
    border-radius: 3px;
    color: #fff;
}

.tag.ai { background: #ff6633; }
.tag.comic { background: #ff9900; }


/* ----------------------------- */
/* 相关漫画标签区域 */
/* ----------------------------- */
.rel-comic-box {
    background: #fff;
    padding: 20px;
    border-radius: 5px;
}

.rel-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

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

/* 不同颜色标签 */
.tag.green { background: #4caf50; }
.tag.yellow { background: #f0ad4e; }
.tag.red { background: #d9534f; }
.tag.blue { background: #5bc0de; }
.tag.pink { background: #e83e8c; }
.tag.gray { background: #737373; }
.tag.orange { background: #ff8800; }
.tag.green2 { background: #8bc34a; }


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

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

.rel-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.rel-item {
    display: flex;
    width: calc(50% - 10px); /* PC 两列 */
    /* background: #fafafa; */
    /* padding: 10px; */
    border-radius: 6px;
    box-sizing: border-box;
}

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

.rel-info {
    flex: 1;
    padding-left: 12px;
}

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

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

.rel-tag {
    font-size: 13px;
    color: #999;
}

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

.tag.ai {
    background: #ff6f00;
}

.time, .view {
    margin-left: 5px;
}

/* -------------------
   📱 移动端
------------------- */
@media (max-width: 768px) {
    .rel-item {
        width: 100%;     /* 一行一列 */
    }

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

    .rel-desc {
        height: auto;  /* 手机允许撑开，不裁切 */
    }
}







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

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

/* meta 信息 */
.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;
}

/* H2 标题 */
.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;
}

/* -----------------------
   📱 移动端适配
------------------------ */
@media (max-width: 768px) {

    .article-title {
        font-size: 20px;
    }

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

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