* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
    background: linear-gradient(135deg, #fff7fb 0%, #f3f7ff 45%, #fffdf4 100%);
    color: #222;
    min-height: 100vh;
}

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

img {
    max-width: 100%;
    display: block;
}

.container {
    width: min(1180px, calc(100% - 28px));
    margin: 0 auto;
}

/* 头部 */
.site-header {
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.7);
    position: sticky;
    top: 0;
    z-index: 20;
}

.header-inner {
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 24px;
    font-weight: 900;
    background: linear-gradient(135deg, #ff4da6, #7c5cff, #00bcd4);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: 1px;
}

.header-text {
    font-size: 14px;
    color: #777;
}

/* 主体 */
.main-box {
    padding: 28px 0 48px;
}

.hero {
    margin-bottom: 28px;
    padding: 28px;
    border-radius: 28px;
    background: linear-gradient(135deg, #ff7ab6, #7c5cff);
    color: #fff;
    box-shadow: 0 18px 45px rgba(124, 92, 255, 0.25);
}

.hero h1 {
    font-size: 32px;
    margin-bottom: 8px;
}

.hero p {
    opacity: 0.92;
}

/* 漫画网格 */
.comic-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 22px;
}

.comic-card {
    background: rgba(255, 255, 255, 0.86);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 12px 32px rgba(80, 80, 120, 0.12);
    transition: 0.25s ease;
}

.comic-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 42px rgba(80, 80, 120, 0.2);
}

.cover-box {
    width: 100%;
    aspect-ratio: 3 / 4;
    background: linear-gradient(135deg, #ffe4f0, #e9e5ff);
    overflow: hidden;
}

.cover-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-cover {
    width: 100%;
    height: 100%;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 14px;
}

.comic-info {
    padding: 14px;
}

.comic-info h2 {
    font-size: 16px;
    line-height: 1.35;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.comic-info span {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    background: #fff0f7;
    color: #ff4da6;
    font-size: 12px;
}

/* 空状态 */
.empty-box {
    padding: 50px 20px;
    text-align: center;
    color: #888;
    background: rgba(255, 255, 255, 0.78);
    border-radius: 24px;
    box-shadow: 0 12px 32px rgba(80, 80, 120, 0.1);
}

/* 页脚 */
.site-footer {
    text-align: center;
    color: #999;
    font-size: 13px;
    padding: 30px 0;
}

/* 漫画详情页 */
.detail-card {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 28px;
    padding: 28px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 16px 42px rgba(80, 80, 120, 0.14);
    margin-bottom: 28px;
}

.detail-cover {
    width: 100%;
    aspect-ratio: 3 / 4;
    border-radius: 22px;
    overflow: hidden;
    background: linear-gradient(135deg, #ffe4f0, #e9e5ff);
}

.detail-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-info h1 {
    font-size: 32px;
    margin-bottom: 12px;
}

.status-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 999px;
    background: #fff0f7;
    color: #ff4da6;
    font-size: 13px;
    margin-bottom: 18px;
}

.detail-info p {
    color: #666;
    line-height: 1.8;
    font-size: 15px;
}

.chapter-box {
    padding: 26px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 16px 42px rgba(80, 80, 120, 0.12);
}

.chapter-box h2 {
    font-size: 22px;
    margin-bottom: 18px;
}

.chapter-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.chapter-list a {
    display: block;
    padding: 14px 16px;
    border-radius: 16px;
    background: linear-gradient(135deg, #fff7fb, #f3f7ff);
    color: #333;
    font-size: 14px;
    transition: 0.2s ease;
}

.chapter-list a:hover {
    background: linear-gradient(135deg, #ff7ab6, #7c5cff);
    color: #fff;
    transform: translateY(-2px);
}

/* 阅读页 */
.reader-body {
    background: #111;
    color: #fff;
}

.reader-header {
    position: sticky;
    top: 0;
    z-index: 30;
    height: 54px;
    padding: 0 18px;
    background: rgba(17, 17, 17, 0.88);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.reader-header a {
    color: #fff;
    font-size: 14px;
}

.reader-header span {
    font-size: 14px;
    color: #ddd;
}

.reader-container {
    width: min(900px, 100%);
    margin: 0 auto;
    padding: 0 0 20px;
}

.reader-img {
    width: 100%;
    margin: 0 auto;
    display: block;
}

.reader-nav {
    width: min(900px, calc(100% - 20px));
    margin: 20px auto 35px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.reader-nav a,
.reader-nav span {
    text-align: center;
    padding: 13px 10px;
    border-radius: 999px;
    background: #222;
    color: #fff;
    font-size: 14px;
}

.reader-nav a {
    background: linear-gradient(135deg, #ff7ab6, #7c5cff);
}

/* 平板 */
@media (max-width: 980px) {
    .comic-grid {
        grid-template-columns: repeat(4, 1fr);
    }

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

/* 手机 */
@media (max-width: 720px) {
    .container {
        width: min(100% - 20px, 1180px);
    }

    .header-inner {
        height: 60px;
    }

    .logo {
        font-size: 21px;
    }

    .header-text {
        font-size: 12px;
    }

    .hero {
        padding: 22px;
        border-radius: 22px;
    }

    .hero h1 {
        font-size: 26px;
    }

    .comic-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .comic-info {
        padding: 11px;
    }

    .comic-info h2 {
        font-size: 14px;
    }

    .detail-card {
        grid-template-columns: 120px 1fr;
        gap: 16px;
        padding: 18px;
        border-radius: 22px;
    }

    .detail-cover {
        border-radius: 16px;
    }

    .detail-info h1 {
        font-size: 22px;
    }

    .detail-info p {
        font-size: 13px;
        line-height: 1.65;
    }

    .chapter-box {
        padding: 18px;
        border-radius: 22px;
    }

    .chapter-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .chapter-list a {
        padding: 12px;
        font-size: 13px;
    }

    .reader-header {
        height: 50px;
    }
}

/* 公告 / 横幅广告 / 友情链接 */
.site-notice {
    margin-bottom: 22px;
    padding: 15px 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.82);
    box-shadow: 0 10px 26px rgba(80, 80, 120, 0.08);
    color: #666;
    line-height: 1.7;
}

.site-banner-ad {
    margin: 0 0 24px;
    padding: 10px;
    border-radius: 26px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 247, 251, 0.86));
    border: 1px solid rgba(255, 255, 255, 0.86);
    box-shadow: 0 16px 38px rgba(80, 80, 120, 0.12);
    overflow: hidden;
}

.banner-ad-list {
    display: grid;
    gap: 12px;
}

.site-banner-ad + .site-friend-links {
    margin-top: 0;
    margin-bottom: 24px;
}

.site-notice + .site-banner-ad {
    margin-top: 0;
}

.site-banner-ad a,
.site-banner-ad .banner-static,
.site-banner-ad picture,
.site-banner-ad img {
    display: block;
    width: 100%;
}

.site-banner-ad a {
    border-radius: 20px;
    overflow: hidden;
}

.site-banner-ad img {
    height: auto;
    border-radius: 20px;
    object-fit: contain;
}

.ad-box,
.reader-ad-box {
    margin: 0 0 24px;
    padding: 14px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.82);
    box-shadow: 0 12px 30px rgba(80, 80, 120, 0.1);
    overflow: hidden;
    text-align: center;
}

.ad-box img,
.ad-box iframe,
.ad-box video,
.reader-ad-box img,
.reader-ad-box iframe,
.reader-ad-box video {
    max-width: 100%;
}

.ad-box img,
.reader-ad-box img {
    height: auto;
    margin: 0 auto;
    border-radius: 14px;
}

.site-friend-links {
    margin-top: 28px;
    padding: 24px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(255, 255, 255, 0.82);
    box-shadow: 0 16px 42px rgba(80, 80, 120, 0.12);
}

.section-head.compact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.section-head.compact h2 {
    font-size: 21px;
    color: #242424;
}

.friend-link-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
    gap: 12px;
}

.friend-link-list a {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 16px;
    background: linear-gradient(135deg, #fff7fb, #f3f7ff);
    border: 1px solid rgba(124, 92, 255, 0.09);
    color: #444;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    transition: 0.2s ease;
    word-break: break-all;
}

.friend-link-list a:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #ff7ab6, #7c5cff);
    color: #fff;
    box-shadow: 0 12px 24px rgba(124, 92, 255, 0.18);
}

.reader-notice,
.reader-banner-ad,
.reader-ad-box,
.reader-friend-links {
    width: min(900px, calc(100% - 20px));
    margin-left: auto;
    margin-right: auto;
}

.reader-notice {
    margin-top: 14px;
    margin-bottom: 14px;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
    color: #f3f3f3;
    box-shadow: none;
}

.reader-banner-ad {
    margin-top: 14px;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: none;
}

.reader-ad-box {
    margin-top: 14px;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: none;
}

.reader-friend-links {
    margin-top: 0;
    margin-bottom: 36px;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: none;
}

.reader-friend-links .section-head.compact h2 {
    color: #fff;
}

.reader-friend-links .friend-link-list a {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
    color: #f3f3f3;
}

.reader-friend-links .friend-link-list a:hover {
    background: linear-gradient(135deg, #ff7ab6, #7c5cff);
    color: #fff;
}

@media (max-width: 720px) {
    .site-notice {
        margin-bottom: 16px;
        padding: 13px 14px;
        border-radius: 16px;
        font-size: 13px;
    }

    .site-banner-ad {
        margin-bottom: 18px;
        padding: 7px;
        border-radius: 20px;
    }

    .banner-ad-list {
        gap: 8px;
    }

    .site-banner-ad a,
    .site-banner-ad img {
        border-radius: 15px;
    }

    .ad-box,
    .reader-ad-box {
        margin-bottom: 18px;
        padding: 10px;
        border-radius: 18px;
    }

    .site-friend-links {
        margin-top: 22px;
        padding: 18px;
        border-radius: 22px;
    }

    .section-head.compact h2 {
        font-size: 18px;
    }

    .friend-link-list {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .friend-link-list a {
        min-height: 40px;
        padding: 8px 7px;
        border-radius: 13px;
        font-size: 12px;
        line-height: 1.35;
    }
}

@media (max-width: 380px) {
    .friend-link-list {
        grid-template-columns: repeat(2, 1fr);
    }
}
