/* =========================================================
   51漫画 新增模块样式
   - .oct-ip-library   IP合作资源库
   - .oct-cooperation  合作需求对接
   独立命名，避免与原有样式冲突
   ========================================================= */

/* ---------- 通用 ---------- */
.oct-ip-library,
.oct-cooperation {
    padding: 80px 0;
    overflow: hidden;
}

.oct-ip-library .pagewidth,
.oct-cooperation .pagewidth {
    width: 1300px;
    margin: 0 auto;
    position: relative;
}

/* 标题区：沿用现有 .title 结构 */
.oct-ip-library .oct-title,
.oct-cooperation .oct-title {
    text-align: center;
    margin-bottom: 60px;
}
.oct-ip-library .oct-title .h1,
.oct-cooperation .oct-title .h1 {
    font-size: 36px;
    color: #333;
    font-weight: bold;
    letter-spacing: 2px;
}
.oct-ip-library .oct-title h2,
.oct-cooperation .oct-title h2 {
    font-size: 14px;
    color: #446199;
    font-weight: normal;
    letter-spacing: 6px;
    margin-top: 8px;
    text-transform: uppercase;
}
.oct-ip-library .oct-title p,
.oct-cooperation .oct-title p {
    font-size: 16px;
    color: #666;
    margin-top: 18px;
    line-height: 1.8;
}

/* =========================================================
   模块一：IP合作资源库
   ========================================================= */
.oct-ip-library {
    background: #fff;
}

/* 筛选器 */
.oct-ip-filter {
    text-align: center;
    margin-bottom: 40px;
}
.oct-ip-filter ul {
    display: inline-block;
}
.oct-ip-filter ul li {
    display: inline-block;
    margin: 0 8px;
}
.oct-ip-filter ul li button {
    background: none;
    border: 1px solid #e0e0e0;
    color: #666;
    padding: 8px 22px;
    font-size: 14px;
    cursor: pointer;
    border-radius: 2px;
    transition: all 0.3s ease;
    -webkit-transition: all 0.3s ease;
    font-family: inherit;
}
.oct-ip-filter ul li button:hover {
    border-color: #446199;
    color: #446199;
}
.oct-ip-filter ul li button.oct-active {
    background: #446199;
    border-color: #446199;
    color: #fff;
}

/* IP卡片网格 */
.oct-ip-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
}
.oct-ip-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 4px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    -webkit-transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}
.oct-ip-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    border-color: #446199;
}
.oct-ip-card-hidden {
    display: none;
}

/* 卡片图片 */
.oct-ip-card .oct-ip-img {
    position: relative;
    width: 100%;
    padding-top: 66%;
    overflow: hidden;
    background: #f5f5f5;
}
.oct-ip-card .oct-ip-img img {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    -webkit-transition: transform 0.4s ease;
}
.oct-ip-card:hover .oct-ip-img img {
    transform: scale(1.05);
}

/* 卡片信息 */
.oct-ip-card .oct-ip-info {
    padding: 20px 22px 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.oct-ip-card .oct-ip-info h3 {
    font-size: 18px;
    color: #333;
    font-weight: bold;
    margin-bottom: 8px;
}
.oct-ip-card .oct-ip-info .oct-ip-en {
    font-size: 12px;
    color: #999;
    letter-spacing: 2px;
    margin-bottom: 12px;
}
.oct-ip-card .oct-ip-info .oct-ip-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.7;
    margin-bottom: 14px;
    flex: 1;
}

/* 标签 */
.oct-ip-card .oct-ip-tags {
    margin-bottom: 18px;
}
.oct-ip-card .oct-ip-tags span {
    display: inline-block;
    font-size: 12px;
    color: #446199;
    background: rgba(68,97,153,0.08);
    padding: 3px 10px;
    border-radius: 2px;
    margin-right: 6px;
    margin-bottom: 6px;
}

/* 按钮 */
.oct-ip-card .oct-ip-btns {
    display: flex;
    gap: 10px;
}
.oct-ip-card .oct-ip-btns a {
    display: inline-block;
    flex: 1;
    text-align: center;
    padding: 10px 0;
    font-size: 14px;
    border-radius: 2px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.25s ease;
    -webkit-transition: all 0.25s ease;
    font-family: inherit;
    line-height: 1;
}
.oct-ip-card .oct-ip-btns .oct-btn-primary {
    background: #446199;
    color: #fff;
    border: 1px solid #446199;
}
.oct-ip-card .oct-ip-btns .oct-btn-primary:hover {
    background: #36507d;
    text-decoration: none;
}
.oct-ip-card .oct-ip-btns .oct-btn-ghost {
    background: #fff;
    color: #446199;
    border: 1px solid #446199;
}
.oct-ip-card .oct-ip-btns .oct-btn-ghost:hover {
    background: #446199;
    color: #fff;
    text-decoration: none;
}

/* 空结果提示 */
.oct-ip-empty {
    text-align: center;
    padding: 60px 0;
    color: #999;
    font-size: 15px;
    grid-column: 1 / -1;
}

/* =========================================================
   模块二：合作需求对接（联系信息 + 流程）
   ========================================================= */
.oct-cooperation {
    background: #f7f8fa;
}
.oct-cooperation .oct-title {
    text-align: center;
    margin-bottom: 50px;
}
.oct-coop-main {
    display: flex;
    gap: 80px;
    align-items: flex-start;
    justify-content: center;
    max-width: 1100px;
    margin: 0 auto;
}

/* 流程图 */
.oct-flow {
    list-style: none;
    counter-reset: oct-step;
    flex: 0 0 380px;
}
.oct-flow li {
    position: relative;
    padding: 20px 0 20px 60px;
    border-left: 1px solid #e0e0e0;
}
.oct-flow li:first-child { padding-top: 0; }
.oct-flow li:last-child { border-left-color: transparent; }
.oct-flow li::before {
    counter-increment: oct-step;
    content: counter(oct-step);
    position: absolute;
    left: -18px;
    top: 16px;
    width: 36px;
    height: 36px;
    background: #446199;
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    line-height: 36px;
    text-align: center;
    border-radius: 50%;
}
.oct-flow li h4 {
    font-size: 18px;
    color: #333;
    font-weight: bold;
    margin-bottom: 6px;
}
.oct-flow li p {
    font-size: 14px;
    color: #888;
    line-height: 1.7;
}

/* 联系卡 */
.oct-contact-card {
    flex: 1;
    max-width: 480px;
    background: #fff;
    border-radius: 6px;
    padding: 40px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.05);
    text-align: center;
}
.oct-contact-email {
    margin-bottom: 28px;
}
.oct-contact-label {
    font-size: 14px;
    color: #999;
    margin-bottom: 10px;
    letter-spacing: 1px;
}
.oct-contact-value {
    display: block;
    font-size: 26px;
    color: #446199;
    font-weight: bold;
    text-decoration: none;
    letter-spacing: 1px;
    word-break: break-all;
}
.oct-contact-value:hover {
    color: #36507d;
    text-decoration: underline;
}
.oct-contact-tip {
    font-size: 12px;
    color: #aaa;
    margin-top: 8px;
}
.oct-contact-actions {
    margin-bottom: 24px;
}
.oct-contact-actions .oct-btn-primary {
    display: inline-block;
    background: #446199;
    color: #fff;
    border: 1px solid #446199;
    padding: 14px 48px;
    font-size: 16px;
    border-radius: 2px;
    text-decoration: none;
    letter-spacing: 2px;
    transition: background 0.25s ease;
    -webkit-transition: background 0.25s ease;
    cursor: pointer;
    font-family: inherit;
}
.oct-contact-actions .oct-btn-primary:hover {
    background: #36507d;
    text-decoration: none;
}
.oct-contact-note {
    font-size: 13px;
    color: #888;
    line-height: 1.8;
    padding-top: 20px;
    border-top: 1px dashed #e0e0e0;
    text-align: left;
}

/* IP详情弹窗 */
.oct-modal-backdrop {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9998;
    justify-content: center;
    align-items: center;
}
.oct-modal-backdrop.oct-show {
    display: flex;
}
.oct-modal {
    background: #fff;
    border-radius: 6px;
    max-width: 500px;
    width: 90%;
    padding: 30px;
    position: relative;
}
.oct-modal-close {
    position: absolute;
    top: 12px; right: 16px;
    font-size: 24px;
    color: #999;
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
    font-family: inherit;
}
.oct-modal h4 {
    font-size: 18px;
    color: #333;
    margin-bottom: 14px;
    padding-right: 30px;
}
.oct-modal p {
    font-size: 14px;
    color: #666;
    line-height: 1.8;
}

/* toast */
.oct-toast {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.8);
    color: #fff;
    padding: 12px 28px;
    border-radius: 4px;
    font-size: 14px;
    z-index: 9999;
}
.oct-toast.oct-show {
    display: block;
}

/* =========================================================
   响应式
   ========================================================= */
@media screen and (max-width: 1112px) {
    .oct-ip-library .pagewidth,
    .oct-cooperation .pagewidth {
        width: auto;
        margin: 0 20px;
    }
    .oct-ip-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
    .oct-coop-main {
        gap: 50px;
    }
    .oct-coop-main .oct-flow {
        flex: 0 0 320px;
    }
}

@media screen and (max-width: 1024px) {
    .oct-coop-main {
        flex-direction: column;
        gap: 50px;
        align-items: center;
    }
    .oct-coop-main .oct-flow {
        flex: none;
        width: 100%;
        max-width: 480px;
    }
    .oct-contact-card {
        max-width: 100%;
    }
}

@media screen and (max-width: 768px) {
    .oct-ip-library,
    .oct-cooperation {
        padding: 50px 0;
    }
    .oct-ip-library .oct-title,
    .oct-cooperation .oct-title {
        margin-bottom: 40px;
    }
    .oct-ip-library .oct-title .h1,
    .oct-cooperation .oct-title .h1 {
        font-size: 26px;
    }
    .oct-ip-filter ul li {
        margin: 0 4px 8px;
    }
    .oct-ip-filter ul li button {
        padding: 6px 14px;
        font-size: 13px;
    }
    .oct-ip-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    .oct-ip-card .oct-ip-info {
        padding: 14px 14px 18px;
    }
    .oct-ip-card .oct-ip-info h3 {
        font-size: 16px;
    }
    .oct-ip-card .oct-ip-info .oct-ip-desc {
        font-size: 13px;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        display: -webkit-box;
        overflow: hidden;
    }
    .oct-ip-card .oct-ip-btns a {
        padding: 8px 0;
        font-size: 13px;
    }
    .oct-flow li h4 {
        font-size: 16px;
    }
    .oct-flow li p {
        font-size: 13px;
    }
    .oct-contact-card {
        padding: 28px 20px;
    }
    .oct-contact-value {
        font-size: 20px;
    }
    .oct-contact-actions .oct-btn-primary {
        padding: 12px 32px;
        font-size: 14px;
    }
}

@media screen and (max-width: 414px) {
    .oct-ip-grid {
        grid-template-columns: 1fr;
    }
}
