/* ===== 全局重置 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { width: 100%; min-height: 100%; overflow-x: hidden; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f0f2f5; color: #333; line-height: 1.6;
    padding-bottom: 60px;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

.loading { position: fixed; inset: 0; background: #fff; display: flex; align-items: center; justify-content: center; z-index: 9999; transition: opacity 0.3s ease; }
.loading.done { opacity: 0; pointer-events: none; }
.loading-spinner { width: 32px; height: 32px; border: 2px solid #e5e7eb; border-top-color: #3b82f6; border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== 顶部导航 ===== */
.header {
    position: fixed; top: 16px; left: 16px; right: 16px; height: 56px;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 16px; z-index: 10000;
    background: rgba(255, 255, 255, 0.75); backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px); border-radius: 12px;
    transition: left 0.5s cubic-bezier(0.4, 0, 0.2, 1), border-radius 0.5s ease;
}
.header.sidebar-active { left: 0; border-top-left-radius: 0; border-bottom-left-radius: 0; }
.menu-btn, .search-btn-top { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: none; border: none; cursor: pointer; color: #333; flex-shrink: 0; }
.menu-btn svg, .search-btn-top svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.logo { flex: 1; display: flex; justify-content: center; align-items: center; }
.logo a { display: flex; align-items: center; }
.logo img { height: 30px; object-fit: contain; display: block; }
.desktop-nav { display: none; align-items: center; gap: 16px; flex: 1; justify-content: center; overflow-x: auto; white-space: nowrap; scrollbar-width: none; -ms-overflow-style: none; }
.desktop-nav::-webkit-scrollbar { display: none; }
.nav-link { font-size: 15px; font-weight: 600; color: #1a1a2e; transition: color 0.2s; white-space: nowrap; flex-shrink: 0; }
.nav-link:hover { color: #007bff; }

/* ===== 侧边栏 ===== */
.sidebar-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); z-index: 9980; opacity: 0; visibility: hidden; transition: opacity 0.5s ease, visibility 0.5s ease; }
.sidebar-overlay.active { opacity: 1; visibility: visible; }
.tumeng-sidebar { position: fixed; top: 0; left: 0; width: 65%; max-width: 300px; height: 100vh; background: #ffffff; box-shadow: 2px 0 10px rgba(0,0,0,0.1); z-index: 9990; transform: translateX(-100%); transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1); display: flex; flex-direction: column; padding-top: 70px; overflow-y: auto; padding-left: 15px; padding-right: 15px; box-sizing: border-box; }
.tumeng-sidebar.open { transform: translateX(0); }
.sidebar-menu { list-style: none; margin: 0; padding: 0; width: 100%; }
.sidebar-menu-item-home { margin-bottom: 4px; width: 100%; }
.sidebar-menu-item-home a { display: flex; align-items: center; justify-content: flex-start; padding: 12px 0; color: #333333; text-decoration: none; font-size: 16px; font-weight: 600; transition: color 0.2s; width: 100%; }
.sidebar-menu-item-home a::before { content: "•"; font-size: 20px; font-weight: bold; margin-right: 8px; color: inherit; line-height: 1; }
.sidebar-menu-item-home.active a { color: #007bff; }

.hero-bg {
    padding: 100px 0 10px;
    background: transparent;
}

/* ===== 封面区域 ===== */
.cover-section {
    position: relative;
    z-index: 5;
    margin: -20px 16px 0;
}
.cover-img-wrap {
    position: relative;
    width: 100%;
    height: 260px;
    border-radius: 8px;
    overflow: hidden;
    background: #f0f2f5;
}
.cover-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.cover-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0.05) 60%, transparent 85%);
    pointer-events: none;
}
.cover-stats {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: rgba(0,0,0,0.25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 50px;
    z-index: 3;
    font-size: 10px;
    color: rgba(255,255,255,0.95);
    font-weight: 500;
    height: 24px;
    box-sizing: border-box;
}
.cover-stats svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    opacity: 0.9;
}
.cover-stats .stat-sep {
    color: rgba(255,255,255,0.4);
    margin: 0 2px;
}
.cover-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 18px;
    z-index: 2;
}
.cover-title {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    line-height: 1.4;
    margin-bottom: 6px;
    word-break: break-all;
}
.cover-title-bar {
    width: 32px;
    height: 3px;
    background: #0066ff;
    border-radius: 999px;
    margin-bottom: 8px;
}
.cover-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
}
.cover-tags {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}
.cover-tag {
    font-size: 12px;
    font-weight: 500;
    color: rgba(255,255,255,0.9);
}
.cover-tag-sep {
    color: rgba(255,255,255,0.4);
    font-size: 10px;
}
.cover-time {
    font-size: 11px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}
.cover-time svg {
    width: 12px;
    height: 12px;
    opacity: 0.9;
}

/* ===== 内容卡片 ===== */
.content-card {
    background: #ffffff;
    border-radius: 8px;
    padding: 16px;
    margin: 16px 16px 16px;
    z-index: 5;
}
.card-title {
    font-size: 18px;
    font-weight: 700;
    color: #555;
    margin-bottom: 16px;
    line-height: 1.4;
}

/* ===== 作者栏 ===== */
.author-bar { margin-bottom: 16px; }
.author-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.author-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}
.author-avatar img { width: 100%; height: 100%; object-fit: cover; }
.author-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}
.author-name-wrap {
    display: flex;
    align-items: center;
    gap: 4px;
}
.author-name {
    font-size: 13px;
    font-weight: 400;
    color: #666;
    white-space: nowrap;
}
.author-verified-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 13px;
    height: 13px;
    background: #0066ff;
    border-radius: 50%;
    flex-shrink: 0;
}
.author-verified-badge .v {
    color: #fff;
    font-size: 8px;
    font-weight: 700;
    line-height: 1;
}
.author-time-ago {
    font-size: 12px;
    color: #999;
    margin-top: 0;
    line-height: 1.2;
}

.author-divider {
    display: flex;
    align-items: center;
    gap: 0;
    margin-top: 8px;
}
.divider-line {
    flex: 1;
    height: 1px;
    background: #f0f0f0;
}
.view-card {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 1px 8px;
    background: #f0f2f5;
    border-radius: 50px;
    font-size: 10px;
    color: #333;
    flex-shrink: 0;
    white-space: nowrap;
    height: 24px;
    line-height: 1;
}
.view-card svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}
.view-card .sep {
    color: #ccc;
    margin: 0 2px;
}

/* ===== 底部栏 ===== */
.bottom-bar {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 56px;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 16px;
    z-index: 9970;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.06);
}
.bottom-bar-left {
    display: flex; align-items: center;
    justify-content: space-evenly;
    flex: 1;
}
.bottom-bar .bottom-icon-btn {
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    background: none; border: none; cursor: pointer; padding: 0;
    border-radius: 50%; transition: background 0.2s; color: #4D4D4D;
    flex-shrink: 0;
}
.bottom-bar .bottom-icon-btn svg {
    display: block;
    width: 28px;
    height: 28px;
}
/* 立即购买按钮 - 暖杏沙丘黄 */
.bottom-buy-btn {
    height: 38px;
    padding: 0 36px;
    margin-left: 12px;
    background: #E8A87C;
    color: #ffffff;
    border: none;
    border-radius: 19px;
    font-size: 13px;
    font-weight: 400;
    cursor: pointer;
    flex-shrink: 0;
    transition: opacity 0.2s;
    letter-spacing: 1px;
}
.bottom-buy-btn:active { opacity: 0.85; }

/* ===== 文章内容 ===== */
.article-content {
    font-size: 15px; line-height: 1.8; color: #333;
    word-wrap: break-word; overflow-wrap: break-word;
    padding: 0 2px;
}
.article-content * { max-width: 100%; box-sizing: border-box; }
.article-content p { margin: 16px 0; }
.article-content h1, .article-content h2, .article-content h3,
.article-content h4, .article-content h5, .article-content h6 {
    margin: 16px 0; font-weight: 700; color: #1a1a2e;
}
.article-content h1 { font-size: 20px; }
.article-content h2 { font-size: 18px; padding-left: 10px; border-left: 3px solid #0066ff; }
.article-content h3 { font-size: 16px; padding-left: 10px; border-left: 3px solid #0066ff; }
.article-content img {
    max-width: 100%; height: auto; max-height: 260px;
    object-fit: contain; display: block; margin: 16px 0;
    border-radius: 4px; cursor: pointer; background: #f5f5f5;
}
.article-content blockquote, .article-content .highlight-box {
    position: relative; background: #f8f9fa; border-left: 3px solid #1677FF;
    border-radius: 0; padding: 4px 50px 4px 12px; margin: 16px 0;
    font-size: 14px; color: #4E5969; line-height: 1.8;
}
.article-content code {
    background: #f4f4f5; border-radius: 3px; padding: 2px 6px;
    font-family: 'Courier New', Consolas, monospace; font-size: 13px; color: #e83e8c;
}
.article-content pre {
    position: relative; background: #1e293b; color: #e2e8f0;
    padding: 16px 50px 16px 16px; border-radius: 4px; overflow-x: auto;
    font-family: 'Courier New', monospace; font-size: 14px; line-height: 1.5;
    margin: 16px 0; white-space: pre-wrap; word-break: break-word;
}
.article-content pre code { background: transparent; padding: 0; color: inherit; font-size: inherit; }
.article-content pre .code-copy-btn {
    position: absolute; top: 8px; right: 8px;
    background: rgba(255,255,255,0.15); color: #e2e8f0; border: none;
    border-radius: 4px; padding: 4px 10px; font-size: 12px;
    cursor: pointer; transition: background 0.2s; z-index: 2;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.article-content pre .code-copy-btn:hover { background: rgba(255,255,255,0.25); }
.article-content pre .code-copy-btn.copied { background: rgba(34,197,94,0.3); color: #4ade80; }
.article-content ul, .article-content ol { margin: 16px 0; padding-left: 24px; }
.article-content li { margin: 8px 0; }
.article-content table {
    width: 100%; max-width: 100%; border-collapse: collapse;
    table-layout: auto; min-width: 100%; margin: 16px 0;
}
.article-content table th, .article-content table td {
    border: 1px solid #ddd; padding: 8px 12px; text-align: left;
    white-space: normal; word-break: break-word; vertical-align: top;
}
.article-content table th { background: #f8f9fa; font-weight: 600; white-space: nowrap; }
.table-scroll-wrapper {
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    margin: 14px 0; position: relative;
}
.table-scroll-wrapper table { margin: 0 !important; }
.article-content video, .article-content audio, .article-content iframe {
    max-width: 100%; height: auto; margin: 16px 0; border-radius: 0;
}
.article-content iframe { width: 100%; aspect-ratio: 16/9; height: auto; max-height: 350px; }
.article-content hr { border: none; border-top: 2px solid #E5E6EB; margin: 16px 0; }
.article-content s, .article-content del { text-decoration: line-through; }
.article-content u { text-decoration: underline; }
.article-content strong { font-weight: 700; }
.article-content em { font-style: italic; }
.article-content mark { background: #ffeb3b; padding: 2px 4px; border-radius: 2px; }
.article-content a { color: #1677FF; text-decoration: underline; }

/* ===== 密码保护 ===== */
.password-protected-area {
    border: 1px dashed #1677FF;
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
    background: transparent;
    text-align: center;
    position: relative;
}
.password-protected-area .password-lock-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 4px;
}
.password-protected-area .password-lock-icon svg {
    width: 44px;
    height: 44px;
    fill: #1677FF;
}
.password-message {
    color: #999;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.6;
    margin-bottom: 10px;
}
.password-form {
    display: flex;
    gap: 8px;
    align-items: center;
    max-width: 400px;
    margin: 0 auto;
}
.password-form input[type="password"] {
    flex: 1;
    height: 36px;
    padding: 0 12px;
    background: #f5f5f5;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    outline: none;
    box-shadow: none;
}
.password-form input[type="password"]:focus {
    background: #f5f5f5;
    border: none;
    box-shadow: none;
}
.password-form button {
    height: 36px;
    padding: 0 16px;
    background: #E6F2FF;
    color: #3388EE;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s;
}
.password-form button:hover { background: #d4e6ff; }
.password-error {
    color: #ff4d4f;
    margin-top: 6px;
    font-size: 13px;
}

/* ===== 付费卡片 ===== */
.paid-content-card {
    background: #ffffff;
    border-radius: 8px;
    padding: 34px 12px 12px;
    margin: 16px 0;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    position: relative;
    text-align: center;
}
.paid-content-card .paid-tag {
    position: absolute;
    top: 0;
    left: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(90deg, #FF7E5F, #FF4D6D);
    color: #ffffff;
    font-size: 12px;
    font-weight: 400;
    padding: 4px 10px;
    border-radius: 8px 0 8px 0;
    line-height: 1.4;
    z-index: 2;
}
.paid-content-card .paid-tag svg {
    width: 14px;
    height: 14px;
    fill: #ffffff;
    flex-shrink: 0;
}
.paid-content-card .paid-tag.purchased-tag {
    background: linear-gradient(90deg, #52c41a, #73d13d);
}
.paid-content-card .paid-title {
    font-size: 14px;
    font-weight: 700;
    color: #555;
    margin: 0 0 4px 0;
    line-height: 1.4;
    text-align: left;
}
.paid-content-card .paid-description {
    text-align: left;
    color: #999;
    font-size: 12px;
    margin: 4px 0 8px 0;
}
.paid-content-card .paid-price-row {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 18px;
    margin-bottom: 12px;
}
.paid-content-card .paid-price-wrapper {
    display: inline-flex;
    align-items: baseline;
    gap: 2px;
}
.paid-content-card .paid-price {
    font-size: 40px;
    font-weight: bold;
    color: #FF6B81;
    line-height: 1;
}
.paid-content-card .paid-currency {
    font-size: 14px;
    color: #FF6B81;
    font-weight: bold;
    vertical-align: baseline;
}
.paid-content-card .paid-right-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}
.paid-content-card .price-label-badge {
    background: #FF4D6D;
    color: #fff;
    font-size: 11px;
    font-weight: 400;
    padding: 1px 10px;
    border-radius: 999px;
    line-height: 1.4;
    white-space: nowrap;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.paid-content-card .paid-original-price {
    font-size: 13px;
    color: #FF6B81;
    text-decoration: line-through;
    display: inline-block;
}
/* 立即购买按钮 - 暖杏沙丘黄 */
.paid-content-card .paid-buy-btn {
    background: #E8A87C;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 10px 0;
    font-size: 13px;
    font-weight: 400;
    cursor: pointer;
    transition: opacity 0.2s;
    width: 100%;
    display: block;
}
.paid-content-card .paid-buy-btn:active { opacity: 0.85; }
.paid-content-card .detail-toggle-btn {
    background: #ededed;
    color: #888888;
    border: none;
    border-radius: 4px;
    padding: 8px 0;
    font-size: 13px;
    font-weight: 400;
    cursor: pointer;
    transition: background 0.2s;
    width: 100%;
    display: block;
    margin-top: 8px;
}
.paid-content-card .detail-toggle-btn:active { background: #d9d9d9; }

/* ===== 评论卡片 ===== */
.comments-card {
    background: #ffffff;
    border-radius: 8px;
    padding: 16px;
    margin: 0 16px 16px;
    z-index: 5;
}
.comments-title {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 14px;
}
.comment-list { display: flex; flex-direction: column; gap: 14px; }
.comment-item { display: flex; gap: 10px; }
.comment-item-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}
.comment-item-avatar img { width: 100%; height: 100%; object-fit: cover; }
.comment-item-body { flex: 1; min-width: 0; }
.comment-item-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 4px;
}
.comment-item-name { font-size: 14px; font-weight: 600; color: #1a1a2e; }
.comment-item-time { font-size: 12px; color: #999; }
.comment-item-text { font-size: 14px; color: #444; line-height: 1.6; word-break: break-all; }
.no-comments { text-align: center; color: #999; padding: 20px 0; font-size: 14px; }

/* ===== 版权 ===== */
.copyright-box {
    background:#f8f9fa; border-radius:8px; padding:14px;
    margin-top:20px; font-size:13px; color:#666; line-height:1.8;
}
.copyright-box h4 {
    font-size:14px; font-weight:700; color:#1a1a2e;
    margin-bottom:8px; display:flex; align-items:center; gap:6px;
}
.copyright-box h4 svg { width:16px; height:16px; stroke:#E8A87C; fill:none; stroke-width:2; }
.copyright-box p { margin-bottom:6px; }

/* ===== 分享弹窗 ===== */
.share-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 10008; opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease; }
.share-overlay.active { opacity: 1; visibility: visible; }
.share-drawer {
    position: fixed; left: 16px; right: 16px; bottom: 16px;
    background: #ffffff; border-radius: 10px; z-index: 10010;
    transform: translateY(120%); opacity: 0;
    transition: transform 0.5s cubic-bezier(0.4,0,0.2,1), opacity 0.4s ease;
    display: flex; flex-direction: column;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    max-width: 800px; margin: 0 auto; height: 260px; overflow: visible;
}
.share-drawer.open { transform: translateY(0); opacity: 1; }
.share-drawer::before {
    content: '';
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    width: 48px;
    height: 6px;
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 3px;
    z-index: 10012;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
.share-drawer-top {
    background: #E8A87C; /* 暖杏沙丘黄 */
    flex: 1;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 8px;
    padding: 16px 12px;
    border-radius: 10px 10px 0 0;
    position: relative; overflow: hidden;
}
.share-icon-wrap {
    width: 48px; height: 48px;
    display: flex; align-items: center; justify-content: center;
    z-index: 2;
}
.share-icon-wrap svg {
    width: 44px; height: 44px;
    fill: #ffffff; stroke: none;
}
.share-drawer-top p {
    color: #ffffff;
    font-weight: 400;
    font-size: 16px;
    z-index: 2; margin: 0;
}
.share-drawer-bottom {
    background: #ffffff;
    flex: 1;
    display: flex; justify-content: space-around; align-items: center;
    padding: 16px;
    border-radius: 0 0 10px 10px;
}
.share-item { display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; }
.share-circle { width: 48px; height: 48px; background: #f5f5f5; border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: background 0.2s; }
.share-circle:active { background: #e0e0e0; }
.share-circle svg { width: 28px; height: 28px; }
.share-item span { font-size: 12px; font-weight: 700; color: #333; }

/* ===== 购买确认弹窗 ===== */
.buy-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 10008; opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease; }
.buy-overlay.active { opacity: 1; visibility: visible; }
.buy-drawer {
    position: fixed; left: 16px; right: 16px; bottom: 16px;
    background: #ffffff; border-radius: 10px; z-index: 10010;
    transform: translateY(120%); opacity: 0;
    transition: transform 0.5s cubic-bezier(0.4,0,0.2,1), opacity 0.4s ease;
    display: flex; flex-direction: column;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    max-width: 800px; margin: 0 auto;
    max-height: 90vh;
    overflow: visible;
}
.buy-drawer.open { transform: translateY(0); opacity: 1; }
.buy-drawer::before {
    content: '';
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    width: 48px;
    height: 6px;
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 3px;
    z-index: 10012;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
.buy-drawer-top {
    background: #E8A87C; /* 暖杏沙丘黄 */
    flex: 0 0 130px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 8px;
    padding: 16px 12px;
    border-radius: 10px 10px 0 0;
    position: relative; overflow: hidden;
}
.buy-icon-wrap {
    width: 48px; height: 48px;
    display: flex; align-items: center; justify-content: center;
    z-index: 2;
}
.buy-icon-wrap svg {
    width: 44px; height: 44px;
    fill: #ffffff; stroke: none;
}
.buy-title {
    color: #ffffff;
    font-size: 16px;
    font-weight: 400;
    z-index: 2; margin: 0;
}
.buy-drawer-bottom {
    background: #ffffff;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-radius: 0 0 10px 10px;
    overflow-y: auto;
    flex: 1;
}
.buy-article-title {
    font-size: 15px;
    font-weight: 500;
    color: #333;
    line-height: 1.6;
    word-break: break-word;
    margin-top: 0;
}
.buy-article-title .buy-tag {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    background: linear-gradient(90deg, #FF7E5F, #FF4D6D);
    color: #fff;
    font-size: 9px;
    padding: 1px 4px;
    border-radius: 4px;
    margin-right: 4px;
    vertical-align: middle;
}
.buy-article-title .buy-tag svg {
    width: 10px;
    height: 10px;
    fill: #fff;
    flex-shrink: 0;
}
.buy-price-card {
    background: #f5f5f5;
    border-radius: 4px;
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.buy-price-card .price-label { color: #999; font-size: 13px; }
.buy-price-card .price-value-wrap {
    display: flex;
    align-items: baseline;
    gap: 10px;
}
.buy-price-card .price-original {
    color: #aaa;
    font-size: 12px;
    text-decoration: line-through;
    text-decoration-color: #FF6B81;
    -webkit-text-decoration-color: #FF6B81;
}
.buy-price-card .price-value { color: #555; font-size: 20px; font-weight: 400; }
.buy-price-card .price-value .currency { font-size: 14px; font-weight: 400; margin-right: 2px; }

.buy-payment-title { font-size: 13px; color: #999; }

.payment-methods {
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 8px;
    width: 100%;
}
.pay-method-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 18px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
    font-size: 15px;
    color: #333;
    transition: background 0.2s, border-color 0.2s;
    background: #fff;
    flex: 1;
    justify-content: center;
    white-space: nowrap;
}
.pay-method-item.selected { border-color: #1677FF; background: #f0f7ff; }
.pay-method-item svg { width: 28px; height: 28px; flex-shrink: 0; }
.pay-method-item[data-method="wechat"] svg { transform: scale(1.07); }
.pay-method-item[data-method="balance"] svg { transform: scale(1.35); }
.pay-method-item.disabled { opacity: 0.5; cursor: not-allowed; }

/* 余额卡片 */
.balance-card {
    background: #f5f5f5;
    border-radius: 4px;
    padding: 10px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #333;
}
.balance-card .balance-label { color: #999; }
.balance-card .balance-amount { font-weight: 500; }
.balance-card .balance-insufficient { color: #ff4d4f; font-weight: 500; }

/* 立即支付按钮 - 暖杏沙丘黄 */
.buy-pay-btn {
    background: #E8A87C;
    border: none;
    border-radius: 4px;
    padding: 13px 0;
    width: 100%;
    font-size: 13px;
    font-weight: 400;
    color: #ffffff;
    cursor: pointer;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    letter-spacing: 0.5px;
}
.buy-pay-btn:active { opacity: 0.85; }
.buy-pay-btn .pay-btn-price { color: #ffffff; font-size: 13px; font-weight: 400; }

/* ===== 详情弹窗 ===== */
.detail-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.5);
    z-index: 10008; opacity: 0; visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.detail-overlay.active { opacity: 1; visibility: visible; }
.detail-drawer {
    position: fixed; left: 16px; right: 16px; bottom: 16px;
    background: #ffffff; border-radius: 10px; z-index: 10010;
    transform: translateY(120%); opacity: 0;
    transition: transform 0.5s cubic-bezier(0.4,0,0.2,1), opacity 0.4s ease;
    display: flex; flex-direction: column;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    max-width: 800px; margin: 0 auto;
    max-height: 80vh;
    overflow: visible;
}
.detail-drawer.open { transform: translateY(0); opacity: 1; }
.detail-drawer::before {
    content: '';
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    width: 48px;
    height: 6px;
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 3px;
    z-index: 10012;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
.detail-drawer-top {
    background: #E8A87C; /* 暖杏沙丘黄 */
    flex: 0 0 130px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 8px;
    padding: 16px 12px;
    border-radius: 10px 10px 0 0;
    position: relative; overflow: hidden;
}
.detail-icon-wrap {
    width: 48px; height: 48px;
    display: flex; align-items: center; justify-content: center;
    z-index: 2;
}
.detail-icon-wrap svg {
    width: 44px; height: 44px;
    fill: #ffffff;
    stroke: none;
}
.detail-title {
    color: #ffffff;
    font-size: 16px;
    font-weight: 400;
    z-index: 2; margin: 0;
}
.detail-drawer-bottom {
    background: #ffffff;
    padding: 18px;
    flex: 1;
    overflow-y: auto;
    border-radius: 0 0 10px 10px;
    max-height: 55vh;
}
.detail-content {
    font-size: 14px;
    line-height: 1.8;
    color: #333;
    word-wrap: break-word;
}
.detail-content * { max-width: 100%; box-sizing: border-box; }

/* ===== 评论抽屉 ===== */
.drawer-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 10001; opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease; }
.drawer-overlay.active { opacity: 1; visibility: visible; }
.drawer-handle-wrap { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10002; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; pointer-events: none; padding-bottom: 8px; }
.drawer-handle { width: 40px; height: 4px; background: rgba(255,255,255,0.8); border-radius: 2px; margin-bottom: 4px; opacity: 0; transition: opacity 0.3s ease; }
.drawer-handle.visible { opacity: 1; }
.comment-drawer { position: fixed; left: 0; right: 0; bottom: 0; background: #ffffff; border-radius: 8px 8px 0 0; z-index: 10002; transform: translateY(100%); transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1); padding: 16px 16px 24px; max-height: 55vh; display: flex; flex-direction: column; }
.comment-drawer.open { transform: translateY(0); }
.drawer-title { font-size: 16px; font-weight: 700; color: #1a1a2e; margin-bottom: 12px; text-align: center; }
.drawer-input-wrap { background: #f5f5f5; border-radius: 4px; padding: 12px 16px; flex: 1; display: flex; flex-direction: column; min-height: 80px; }
.drawer-textarea { width: 100%; flex: 1; min-height: 60px; background: transparent; border: none; outline: none; font-size: 15px; line-height: 1.6; color: #333; font-family: inherit; resize: none; }
.drawer-footer { display: flex; justify-content: flex-end; margin-top: 10px; padding-top: 8px; border-top: none; }
.drawer-submit-btn { padding: 6px 16px; background: #0066ff; color: #fff; border: none; border-radius: 4px; font-size: 13px; font-weight: 600; cursor: pointer; }
.drawer-loading { position: absolute; inset: 0; background: rgba(255,255,255,0.95); border-radius: 8px 8px 0 0; display: flex; align-items: center; justify-content: center; z-index: 10; opacity: 1; transition: opacity 0.3s ease; }
.drawer-loading.hide { opacity: 0; pointer-events: none; }
.drawer-loading-spinner { width: 30px; height: 30px; border: 3px solid #e0e0e0; border-top-color: #0066ff; border-radius: 50%; animation: spin 0.8s linear infinite; }

/* ===== Toast & 图片模态 ===== */
.toast-wrap { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 10020; pointer-events: none; opacity: 0; visibility: hidden; transition: all 0.3s ease; }
.toast-wrap.show { opacity: 1; visibility: visible; }
.toast { background: rgba(0,0,0,0.8); color: #fff; padding: 12px 24px; border-radius: 8px; font-size: 14px; }
.img-modal { display: none; position: fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.9); z-index:10003; align-items:center; justify-content:center; padding:20px; }
.img-modal.active { display: flex; }
.img-modal img { max-width:100%; max-height:100%; border-radius:0; }
.img-modal .close-btn { position:absolute; top:20px; right:20px; width:40px; height:40px; background:rgba(255,255,255,0.2); border:none; border-radius:50%; color:#fff; font-size:24px; cursor:pointer; display:flex; align-items:center; justify-content:center; }

/* ===== 响应式 ===== */
@media (max-width:480px) {
    .header { top: 10px; left: 10px; right: 10px; height: 48px; padding: 0 12px; }
    .header.sidebar-active { left: 0; border-top-left-radius: 0; border-bottom-left-radius: 0; }
    .tumeng-sidebar { width: 70%; max-width: 260px; padding-left: 12px; padding-right: 12px; }
    .hero-bg { padding: 80px 0 10px; }
    .cover-section { margin: -20px 10px 0; }
    .cover-img-wrap { height: 180px; }
    .cover-title { font-size: 16px; }
    .cover-info { padding: 16px 14px 18px 14px; }
    .content-card { margin: 16px 10px; padding: 12px; }
    .comments-card { margin: 0 10px 16px; padding: 12px; }
    .bottom-bar { height: 50px; padding: 0 12px; }
    .bottom-bar-left { justify-content: space-between; margin-right: 8px; }
    .bottom-bar .bottom-icon-btn { height: 38px; width: 38px; }
    .bottom-bar .bottom-icon-btn svg { width: 26px; height: 26px; }
    .bottom-buy-btn { height: 32px; padding: 0 28px; font-size: 13px; border-radius: 16px; }
    .share-drawer { left: 10px; right: 10px; bottom: 10px; height: 250px; }
    .share-drawer-top { padding: 14px 10px; }
    .share-icon-wrap { width: 44px; height: 44px; }
    .share-icon-wrap svg { width: 40px; height: 40px; }
    .share-circle svg { width: 26px; height: 26px; }
    .share-drawer::before { top: -12px; width: 40px; height: 5px; }
    .buy-drawer { left: 10px; right: 10px; bottom: 10px; }
    .buy-drawer-top { flex: 0 0 120px; padding: 14px 10px; }
    .buy-icon-wrap { width: 44px; height: 44px; }
    .buy-icon-wrap svg { width: 40px; height: 40px; }
    .buy-title { font-size: 16px; }
    .buy-drawer-bottom { padding: 16px; max-height: 60vh; }
    .buy-article-title { font-size: 14px; }
    .buy-price-card { padding: 6px 10px; }
    .buy-price-card .price-value { font-size: 18px; }
    .buy-price-card .price-original { font-size: 11px; }
    .buy-pay-btn { padding: 12px 0; font-size: 13px; border-radius: 4px; }
    .buy-pay-btn .pay-btn-price { font-size: 13px; }
    .payment-methods { gap: 4px; }
    .pay-method-item { padding: 10px 14px; font-size: 13px; }
    .pay-method-item svg { width: 24px; height: 24px; }
    .pay-method-item[data-method="wechat"] svg { transform: scale(1.07); }
    .pay-method-item[data-method="balance"] svg { transform: scale(1.35); }
    .buy-drawer::before { top: -12px; width: 40px; height: 5px; }
    .detail-drawer { left: 10px; right: 10px; bottom: 10px; }
    .detail-drawer-top { flex: 0 0 120px; padding: 12px 10px; }
    .detail-icon-wrap { width: 40px; height: 40px; }
    .detail-icon-wrap svg { width: 36px; height: 36px; }
    .detail-title { font-size: 15px; }
    .detail-drawer-bottom { padding: 14px; max-height: 50vh; }
    .detail-drawer::before { top: -12px; width: 40px; height: 5px; }
    .balance-card { font-size: 13px; padding: 8px 10px; }
}