﻿/* ================================================
   纯样式重写 - 不修改任何 Dede 标签与 HTML 结构
   ================================================ */

   :root {
    --primary: #4f8cff;
    --secondary: #ff6bcb;
    --accent: #a855f7;
    --gradient-main: linear-gradient(135deg, #4f8cff 0%, #a855f7 50%, #ff6bcb 100%);
    --dark: #0f172a;
    --text-1: #1e293b;
    --text-2: #475569;
    --text-3: #94a3b8;
    --bg: #f8fafc;
    --card: #ffffff;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 16px 40px rgba(15, 23, 42, 0.12);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* 全局重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    list-style: none;
    text-decoration: none;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text-1);
    background-color: var(--bg);
    line-height: 1.6;
    padding-bottom: 100px;
    -webkit-font-smoothing: antialiased;
}

/* 通用容器 */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 70px 0;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-1);
    text-align: center;
    margin-bottom: 50px;
    position: relative;
    padding-bottom: 16px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--gradient-main);
    border-radius: 4px;
}

.module-subtitle {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-1);
    margin-bottom: 24px;
    position: relative;
    padding-left: 12px;
}

.module-subtitle::before {
    content: '';
    position: absolute;
    left: 0;
    top: 4px;
    width: 4px;
    height: 20px;
    background: var(--gradient-main);
    border-radius: 2px;
}

/* ========== 顶部 LOGO 改成导航栏效果 ========== */
main > a:first-child {
    display: block !important;
    margin: 0 auto !important;
    width: 100% !important;
    max-width: 100%;
    padding: 18px 20px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border);
}

main > a:first-child img {
    max-height: 44px;
    width: auto;
    margin: 0 auto;
    display: block;
}

/* ========== 关于我们模块 ========== */
.about-section {
    position: relative;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    padding: 0;
    background: linear-gradient(135deg, #4f8cff 0%, #7c3aed 100%);
    overflow: hidden;
}

.about-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(255,255,255,0.15) 0, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(255,107,203,0.2) 0, transparent 45%);
    z-index: 0;
}

.about-shadow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: transparent;
    z-index: 1;
}

.about-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 800px;
    padding: 80px 20px;
    text-align: center;
}

.about-content h2 {
    color: #fff;
    margin-bottom: 24px;
    font-size: 2.4rem;
}

.about-content h2::after {
    background: rgba(255,255,255,0.6);
}

.about-content p {
    font-size: 1.05rem;
    font-weight: 400;
    line-height: 1.8;
    text-shadow: 0 2px 8px rgba(0,0,0,0.15);
    max-width: 600px;
    margin: 0 auto;
    opacity: 0.95;
}

/* ========== 漫画列表模块 ========== */
.comic-section {
    background-color: var(--bg);
}

.comic-card-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 28px;
}

.comic-card {
    background-color: var(--card);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s var(--ease);
    cursor: pointer;
    border: 1px solid var(--border);
}

.comic-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.comic-cover {
    width: 100%;
    height: 340px;
    overflow: hidden;
    position: relative;
}

.comic-cover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s;
}

.comic-card:hover .comic-cover::after {
    opacity: 1;
}

.comic-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--ease);
}

.comic-card:hover .comic-cover img {
    transform: scale(1.08);
}

.comic-info {
    padding: 18px 20px 22px;
}

.comic-name {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-1);
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.comic-author {
    font-size: 0.875rem;
    color: var(--text-3);
    margin-bottom: 12px;
}

.comic-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(79,140,255,0.1), rgba(168,85,247,0.1));
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 500;
    margin-top: 0;
}

/* ========== 协议中心+联系我们 ========== */
.service-section {
    background-color: #fff;
}

.service-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.protocol-center, .contact-us {
    background-color: var(--bg);
    padding: 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: box-shadow 0.3s;
}

.protocol-center:hover, .contact-us:hover {
    box-shadow: var(--shadow-md);
}

.protocol-item {
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 16px;
}

.protocol-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.protocol-title {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 0;
    transition: color 0.3s;
}

.protocol-title:hover {
    color: var(--primary);
}

.protocol-title::after {
    content: '+';
    font-size: 1.3rem;
    color: var(--text-3);
    transition: all 0.3s ease;
    font-weight: 300;
}

.protocol-title.active::after {
    transform: rotate(45deg);
    color: var(--primary);
}

.protocol-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    margin-top: 0;
    font-size: 0.875rem;
    color: var(--text-2);
    line-height: 1.8;
}

.protocol-content.active {
    max-height: 500px;
    margin-top: 12px;
    padding-top: 4px;
}

.contact-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 0.95rem;
    color: var(--text-1);
    padding: 12px;
    border-radius: var(--radius-sm);
    transition: all 0.3s;
}

.contact-item:hover {
    background: #fff;
    transform: translateX(4px);
}

.contact-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #fff;
    position: relative;
    flex-shrink: 0;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.contact-item:hover .contact-icon {
    background: var(--gradient-main);
}

.contact-icon::before, .contact-icon::after {
    content: '';
    position: absolute;
    background-color: var(--text-2);
    transition: all 0.3s ease;
}

.contact-item:hover .contact-icon::before,
.contact-item:hover .contact-icon::after {
    background-color: #fff;
}

/* 微信图标 */
.wechat::before {
    width: 18px;
    height: 14px;
    border-radius: 8px 8px 2px 2px;
    top: 13px;
    left: 11px;
}
.wechat::after {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    bottom: 9px;
    right: 10px;
}

/* QQ图标 */
.qq::before {
    width: 20px;
    height: 20px;
    border-radius: 50% 50% 40% 40%;
    top: 10px;
    left: 10px;
}

/* 邮箱图标 */
.email::before {
    width: 20px;
    height: 14px;
    border: 2px solid var(--text-2);
    border-radius: 3px;
    background: transparent;
    top: 11px;
    left: 10px;
}
.email::after {
    width: 8px;
    height: 8px;
    border-left: 2px solid var(--text-2);
    border-bottom: 2px solid var(--text-2);
    transform: rotate(-45deg);
    top: 14px;
    left: 16px;
    background: transparent;
}
.contact-item:hover .email::before,
.contact-item:hover .email::after {
    border-color: #fff;
}

/* 电话图标 */
.phone::before {
    width: 18px;
    height: 18px;
    border: 2px solid var(--text-2);
    border-radius: 50% 50% 30% 30%;
    top: 9px;
    left: 11px;
    background: transparent;
}
.phone::after {
    width: 8px;
    height: 2px;
    top: 20px;
    left: 16px;
}
.contact-item:hover .phone::before {
    border-color: #fff;
}

/* ========== 页脚 ========== */
.site-footer {
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    color: var(--text-3);
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.col2 .copyright {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 8px;
}

.col2 .icp {
    font-size: 0.85rem;
    opacity: 0.7;
}

.col2 .icp a {
    color: #fff;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.col2 .icp a:hover {
    opacity: 1;
}

.col2 .update-tip {
    font-size: 0.9rem;
    color: var(--secondary);
    margin-top: 8px;
}

.col-title {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.service-tips li, .friend-link li {
    font-size: 0.875rem;
    opacity: 0.8;
    transition: all 0.3s ease;
    padding: 3px 0;
}

.friend-link a {
    color: var(--text-3);
    transition: all 0.3s ease;
}

.service-tips li:hover, .friend-link a:hover {
    color: var(--secondary);
    transform: translateX(4px);
    opacity: 1;
}

.footer-divider {
    width: 100%;
    height: 1px;
    background: rgba(255,255,255,0.08);
    margin: 0 auto;
}

/* ========== 底部导航 ========== */
.bottom-nav {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    height: auto;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    border-radius: 999px;
    box-shadow: 0 8px 32px rgba(15,23,42,0.3);
    z-index: 999;
}

.nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-3);
    font-size: 0.85rem;
    font-weight: 500;
    width: auto;
    height: auto;
    padding: 10px 18px;
    border-radius: 999px;
    background: transparent;
    transition: all 0.3s var(--ease);
    position: relative;
    overflow: hidden;
}

.nav-link:hover {
    color: #fff;
    background: rgba(255,255,255,0.1);
    transform: translateY(-2px);
}

.nav-link:active {
    transform: translateY(0);
}

.nav-link:focus-visible {
    box-shadow: 0 0 0 2px rgba(255,255,255,0.3);
}

#_userlogin {
    display: flex;
    gap: 4px;
}

/* ========== 滚动条美化 ========== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb {
    background: var(--gradient-main);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #3b7cf0, #9333ea);
}

/* ========== 懒加载占位 ========== */
.lazy-load {
    background-color: #f1f5f9;
    background-image: linear-gradient(45deg, #e2e8f0 25%, transparent 25%, transparent 75%, #e2e8f0 75%, #e2e8f0);
    background-size: 20px 20px;
    animation: placeholder-loading 1s linear infinite;
}

@keyframes placeholder-loading {
    0% { background-position: 0 0; }
    100% { background-position: 20px 20px; }
}

/* ========== 响应式适配 ========== */
@media (max-width: 992px) {
    .section {
        padding: 50px 0;
    }
    .section-title {
        font-size: 1.6rem;
        margin-bottom: 36px;
    }
    .footer-content {
        grid-template-columns: 1.2fr 1fr;
        gap: 30px;
    }
    .col4 {
        grid-column: 1 / 3;
        margin-top: 10px;
    }
    .comic-cover {
        height: 300px;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 15px;
    }
    .service-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .comic-card-list {
        gap: 20px;
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
    .about-content {
        padding: 60px 20px;
    }
    .protocol-center, .contact-us {
        padding: 24px;
    }
    .bottom-nav {
        width: calc(100% - 32px);
        justify-content: space-around;
        padding: 8px;
    }
    .nav-link {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    body {
        padding-bottom: 90px;
    }
    .comic-cover {
        height: 240px;
    }
    .about-section {
        min-height: 400px;
    }
}

@media (max-width: 576px) {
    .section {
        padding: 36px 0;
    }
    .section-title {
        font-size: 1.4rem;
        margin-bottom: 28px;
    }
    .footer-content {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .col4 {
        grid-column: 1 / 2;
        margin-top: 0;
    }
    .comic-cover {
        height: 220px;
    }
    main > a:first-child img {
        max-height: 36px;
    }
}


/* 协议标题 */
.protocol-title {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-1);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0;
  transition: color 0.3s;
  user-select: none;
}

.protocol-title:hover {
  color: var(--primary);
}

.protocol-title::after {
  content: '+';
  font-size: 1.3rem;
  color: var(--text-3);
  transition: all 0.3s ease;
  font-weight: 300;
}

.protocol-title.active::after {
  transform: rotate(45deg);
  color: var(--primary);
}

/* 协议内容 - 修复展开不全问题 */
.protocol-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  margin-top: 0;
  font-size: 0.875rem;
  color: var(--text-2);
  line-height: 1.8;
}

.protocol-content.active {
  max-height: 4000px; /* 大幅提升高度上限，适配超长协议 */
  margin-top: 12px;
  padding-top: 4px;
  padding-right: 8px;
  overflow-y: auto; /* 内容超高时自动出现滚动条 */
}

/* 优化协议内文本排版 - 解决原生div无段落间距问题 */
.protocol-content > div > div,
.protocol-content > div > div > div {
  margin-bottom: 8px;
}

.protocol-content > div > div:empty,
.protocol-content > div > div > div:empty {
  margin-bottom: 4px;
  height: 0.6em;
}

/* 协议内标题加粗 */
.protocol-content > div > div:first-child,
.protocol-content > div > div > div:first-child {
  font-weight: 500;
  color: var(--text-1);
}
