/* ========== 基础重置 ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
    background: #1a1a2e;
    color: #e0e0e0;
    min-height: 100vh;
    line-height: 1.7;
}

/* ========== 顶栏 ========== */
.topbar {
    position: fixed; top: 0; left: 0; right: 0;
    height: 56px;
    background: #16213e;
    border-bottom: 1px solid #2a2a4a;
    z-index: 100;
    backdrop-filter: blur(12px);
}
.topbar-inner {
    max-width: 1100px; margin: 0 auto;
    display: flex; align-items: center;
    height: 100%; padding: 0 24px;
}
.logo {
    font-size: 22px; font-weight: 700;
    background: linear-gradient(135deg, #e94560, #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 2px;
    margin-right: 40px;
}
.nav { display: flex; gap: 8px; }
.nav-item {
    color: #888; text-decoration: none;
    padding: 8px 16px; border-radius: 6px;
    font-size: 14px; transition: all 0.2s;
}
.nav-item:hover { color: #fff; background: rgba(255,255,255,0.06); }
.nav-item.active { color: #fff; background: rgba(233,69,96,0.15); }
.tagline {
    font-size: 12px; color: #666;
    margin-left: auto;
}

/* ========== 主容器 ========== */
#app { padding-top: 56px; max-width: 1100px; margin: 0 auto; }

/* ========== 页面切换 ========== */
.page { display: none; padding: 24px; }
.page.active { display: block; }

/* ========== Banner ========== */
.banner {
    background: linear-gradient(135deg, #16213e 0%, #1a1a2e 50%, #0f3460 100%);
    border-radius: 16px; padding: 48px 40px; margin-bottom: 32px;
    border: 1px solid #2a2a4a;
    position: relative; overflow: hidden;
}
.banner::before {
    content: ''; position: absolute;
    top: -50%; right: -20%;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(233,69,96,0.08) 0%, transparent 70%);
    border-radius: 50%;
}
.banner-content { position: relative; z-index: 1; }
.banner h1 {
    font-size: 36px; font-weight: 700;
    background: linear-gradient(135deg, #e94560, #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}
.banner p { color: #888; font-size: 16px; }

/* ========== 区块标题 ========== */
.section-header {
    display: flex; align-items: baseline;
    gap: 12px; margin-bottom: 24px;
}
.section-header h2 { font-size: 20px; font-weight: 600; }
.section-sub { font-size: 13px; color: #666; }

/* ========== 书架网格 ========== */
.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}
.book-card {
    background: #16213e;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #2a2a4a;
    cursor: pointer;
    transition: all 0.25s;
}
.book-card:hover {
    border-color: #e94560;
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(233,69,96,0.12);
}
.book-cover {
    width: 100%; aspect-ratio: 3/4;
    background: linear-gradient(135deg, #0f3460, #1a1a2e);
    border-radius: 8px; margin-bottom: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 32px; color: #e94560;
    border: 1px solid #2a2a4a;
}
.book-title { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.book-author { font-size: 12px; color: #888; }
.book-desc {
    font-size: 12px; color: #666;
    margin-top: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.book-chapters {
    font-size: 11px; color: #555;
    margin-top: 8px;
}

/* ========== 功法页 ========== */
.gongfa-hero {
    text-align: center;
    padding: 48px 24px;
    background: linear-gradient(135deg, #2d1b00 0%, #1a1a2e 50%, #0f3460 100%);
    border-radius: 16px;
    border: 1px solid #3d2b10;
    margin-bottom: 32px;
}
.gongfa-hero h1 {
    font-size: 32px; font-weight: 700;
    color: #ffa940;
    margin-bottom: 8px;
}
.gongfa-sub { color: #888; font-size: 16px; }

.gongfa-section {
    margin-bottom: 32px;
}
.gongfa-section h2 {
    font-size: 20px; font-weight: 600;
    margin-bottom: 12px;
    color: #ffa940;
}
.section-desc { color: #888; font-size: 14px; margin-bottom: 20px; }

.dark-section {
    background: #16213e;
    border-radius: 16px; padding: 32px;
    border: 1px solid #2a2a4a;
}

.gongfa-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}
.gongfa-card-inner {
    background: #16213e;
    border-radius: 12px; padding: 24px;
    border: 1px solid #2a2a4a;
    text-align: center;
    transition: border-color 0.2s;
}
.gongfa-card-inner:hover { border-color: #ffa940; }
.card-icon {
    font-size: 36px; margin-bottom: 12px;
}
.gongfa-card-inner h3 { font-size: 16px; margin-bottom: 8px; }
.gongfa-card-inner p { font-size: 13px; color: #888; }

.gongfa-about p {
    font-size: 14px; color: #999;
    margin-bottom: 12px;
}

.gongfa-articles {
    display: flex; flex-direction: column;
    gap: 16px;
}
.gongfa-article {
    background: #16213e;
    border-radius: 12px; padding: 20px 24px;
    border: 1px solid #2a2a4a;
}
.gongfa-article h3 { font-size: 16px; margin-bottom: 4px; }
.article-meta { font-size: 12px; color: #666; margin-bottom: 8px; }
.article-preview { font-size: 13px; color: #999; }
.coming-soon { font-size: 12px; color: #ffa940; margin-top: 8px; display: inline-block; }

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}
.product-card {
    background: #1a1a2e;
    border-radius: 12px; padding: 20px;
    border: 1px solid #2a2a4a;
}
.product-card h3 { font-size: 15px; margin-bottom: 8px; }
.product-card p { font-size: 13px; color: #999; margin-bottom: 12px; }
.price {
    font-size: 13px; color: #ffa940;
    font-weight: 600;
}

/* ========== 关于页 ========== */
.about-card {
    background: #16213e;
    border-radius: 16px; padding: 32px;
    border: 1px solid #2a2a4a;
    display: flex; gap: 28px; align-items: flex-start;
    margin-bottom: 32px;
}
.about-avatar {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e94560, #ff6b6b);
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; font-weight: 700; color: #fff;
    flex-shrink: 0;
}
.about-text h3 { font-size: 20px; margin-bottom: 12px; }
.about-text p { font-size: 14px; color: #999; margin-bottom: 12px; }
.about-text blockquote {
    border-left: 3px solid #e94560;
    padding-left: 16px; color: #e94560;
    font-style: italic; margin-top: 16px;
}

/* ========== 赞赏区 ========== */
.donation-section {
    background: #16213e;
    border-radius: 16px; padding: 32px;
    border: 1px solid #2a2a4a;
    text-align: center;
}
.donation-section h3 {
    font-size: 20px; margin-bottom: 8px;
    color: #e94560;
}
.donation-section > p {
    font-size: 14px; color: #999;
    margin-bottom: 24px;
}
.donation-methods {
    display: flex; gap: 24px;
    justify-content: center; margin-bottom: 16px;
}
.donation-item {
    display: flex; flex-direction: column;
    align-items: center; gap: 8px;
}
.donation-qr-placeholder {
    width: 100px; height: 100px;
    background: linear-gradient(135deg, #0f3460, #1a1a2e);
    border-radius: 12px;
    border: 1px dashed #2a2a4a;
    display: flex; align-items: center; justify-content: center;
    font-size: 36px;
    transition: border-color 0.2s;
}
.donation-item:hover .donation-qr-placeholder {
    border-color: #e94560;
}
.donation-item span {
    font-size: 13px; color: #888;
}
.donation-note {
    font-size: 12px; color: #555;
    font-style: italic;
}

/* ========== 阅读器浮层 ========== */
.reader-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.85);
    z-index: 200;
    display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(4px);
}
.reader-overlay.hidden { display: none; }
.reader-container {
    background: #1a1a2e;
    width: 90%; max-width: 720px;
    max-height: 85vh;
    border-radius: 16px;
    border: 1px solid #2a2a4a;
    display: flex; flex-direction: column;
    overflow: hidden;
}
.reader-header {
    display: flex; align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid #2a2a4a;
    gap: 16px;
}
.reader-back {
    background: none; border: none;
    color: #e94560; cursor: pointer;
    font-size: 14px; padding: 4px 8px;
    border-radius: 4px; transition: background 0.2s;
}
.reader-back:hover { background: rgba(233,69,96,0.1); }
.reader-title {
    font-size: 16px; font-weight: 600;
    flex: 1;
}
.reader-share {
    background: none; border: none;
    font-size: 18px; cursor: pointer;
    padding: 4px 8px; border-radius: 4px;
    transition: background 0.2s;
}
.reader-share:hover { background: rgba(255,255,255,0.06); }
.reader-content {
    padding: 32px 40px;
    overflow-y: auto;
    flex: 1;
    font-size: 16px;
    line-height: 1.9;
    color: #ccc;
}
.reader-content p { margin-bottom: 16px; text-indent: 2em; }
.reader-footer {
    border-top: 1px solid #2a2a4a;
    padding: 12px 24px;
    text-align: center;
}
.reader-donate-btn {
    background: linear-gradient(135deg, #e94560, #ff6b6b);
    border: none; color: #fff;
    padding: 8px 24px; border-radius: 20px;
    cursor: pointer; font-size: 13px;
    transition: opacity 0.2s;
}
.reader-donate-btn:hover { opacity: 0.85; }

/* ========== Footer ========== */
.footer {
    text-align: center; padding: 32px;
    color: #444; font-size: 12px;
    border-top: 1px solid #2a2a4a;
    margin-top: 40px;
}
.footer-small { margin-top: 4px; }

/* ========== 滚动条 ========== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #555; }
