/* 内容页面样式 */

/* 面包屑导航 */
.breadcrumb {
    background: linear-gradient(135deg, #ffffff, #f8f8f8);
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.unlock-panel {
    border: 1px dashed #f3c07b;
    background: #fff7ea;
    padding: 18px;
    border-radius: 10px;
    text-align: center;
}

.unlock-panel h4 {
    margin: 0 0 6px;
    color: #b25c00;
    font-weight: 600;
}

.unlock-panel p {
    margin: 0 0 12px;
    color: #8a6b3a;
    font-size: 14px;
}

.unlock-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.unlock-code-box {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.unlock-code-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.unlock-code-input {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #f0d9b5;
    min-width: 200px;
}

.unlock-code-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.unlock-code-tip {
    margin-top: 8px;
    font-size: 12px;
    color: #8a6b3a;
}

.unlock-free-tip {
    margin-top: 8px;
    font-size: 13px;
    color: #b25c00;
    font-weight: 600;
}

.unlock-miniapp {
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.unlock-miniapp-qr img {
    width: 120px;
    height: 120px;
    border-radius: 8px;
    border: 1px solid #f0d9b5;
    background: #fff;
}

.unlock-miniapp-text {
    font-size: 12px;
    color: #8a6b3a;
}

.btn-unlock {
    padding: 8px 16px;
    border-radius: 20px;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.btn-unlock-points {
    background: #ffe4b3;
    color: #8a4b00;
}

.btn-unlock-pay {
    background: #ffd86f;
    color: #5c3d00;
}

.btn-open-miniapp {
    background: linear-gradient(135deg, #ffcc33, #ff9f1c);
    color: #5c3d00;
    font-weight: 700;
    box-shadow: 0 6px 16px rgba(255, 159, 28, 0.35);
    border: 1px solid rgba(255, 159, 28, 0.4);
}

.btn-open-miniapp:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(255, 159, 28, 0.45);
}

.content-description {
    margin: 16px 20px 20px;
    padding: 14px 20px;
    border-radius: 10px;
    background: #f6f8fb;
    border: 1px solid #e6eef7;
    color: #4a4f55;
    font-size: 14px;
    line-height: 1.7;
    white-space: normal;
    word-break: break-word;
}

.pay-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.pay-modal.show {
    display: flex;
}

.pay-modal-dialog {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    width: 92%;
    max-width: 420px;
    position: relative;
    text-align: center;
}

.pay-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    border: none;
    background: transparent;
    font-size: 22px;
    cursor: pointer;
}

.pay-modal-title {
    margin: 0 0 4px;
}

.pay-modal-subtitle {
    margin: 0 0 12px;
    color: #666;
    font-size: 14px;
}

.pay-modal-amount {
    font-size: 26px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #b25c00;
}

.pay-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 16px;
}

.pay-method-btn {
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 10px 16px;
    background: #f8f8f8;
    cursor: pointer;
}

.pay-modal-qr img {
    width: 180px;
    height: 180px;
}

.pay-modal-link a {
    display: inline-block;
    padding: 10px 18px;
    background: #ffd86f;
    border-radius: 20px;
    color: #5c3d00;
    text-decoration: none;
}

.pay-modal-status {
    margin-top: 12px;
    color: #888;
    font-size: 13px;
}

.qr-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.announcement-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 11000;
    padding: 16px;
}

.announcement-overlay.show {
    display: flex;
}

.announcement-card {
    background: #fff;
    border-radius: 16px;
    max-width: 520px;
    width: 100%;
    padding: 32px;
    position: relative;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
    text-align: left;
}

.announcement-close {
    position: absolute;
    top: 12px;
    right: 12px;
    border: none;
    background: transparent;
    font-size: 22px;
    cursor: pointer;
    color: #555;
}

.announcement-title {
    margin: 0;
    font-size: 20px;
    color: #1c1c1c;
}

.announcement-popup-content {
    margin-top: 16px;
    font-size: 15px;
    line-height: 1.8;
    color: #3c3c3c;
    max-height: 270px;
    overflow: auto;
}

.announcement-popup-meta {
    margin-top: 12px;
    font-size: 13px;
    color: #888;
}

.announcement-actions {
    margin-top: 20px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.announcement-btn {
    padding: 8px 20px;
    border-radius: 999px;
    border: 1px solid transparent;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s, color 0.2s;
}

.announcement-btn-muted {
    background: #f5f5f5;
    color: #333;
}

.announcement-btn-muted:hover {
    background: #eaeaea;
}

.announcement-btn-primary {
    background: #1a73e8;
    color: #fff;
}

.announcement-btn-primary:hover {
    background: #1666c1;
}

body.announcement-popup-open {
    overflow: hidden;
}

.qr-modal.show {
    display: flex;
}

.qr-modal-dialog {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    width: 90%;
    max-width: 360px;
    text-align: center;
    position: relative;
}

.qr-modal-dialog img {
    width: 240px;
    height: 240px;
    border-radius: 12px;
    border: 1px solid #eee;
}

.qr-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    border: none;
    background: transparent;
    font-size: 22px;
    cursor: pointer;
}

.breadcrumb ul {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.breadcrumb li {
    margin-right: 10px;
    color: #666;
    font-size: 14px;
}

.breadcrumb li a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumb li a:hover {
    color: #FFD700;
}

.breadcrumb li i {
    margin-right: 5px;
    font-size: 12px;
}

.breadcrumb li.current {
    color: #333;
    font-weight: 500;
}

/* 内容主体 */
.content-main {
    padding: 30px 0;
    background: #f9f9f9;
}

.content-wrapper {
    display: flex;
    gap: 30px;
}

.content-primary {
    flex: 1;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.content-sidebar {
    width: 320px;
}

.sidebar-sticky {
    position: sticky;
    top: 90px;
    align-self: flex-start;
}

/* 内容标题区 */
.content-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.content-title {
    font-size: 28px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    line-height: 1.4;
}

.content-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.meta-item {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #666;
}

.meta-item i {
    margin-right: 5px;
    color: #FFD700;
}

.meta-item a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s;
}

.meta-item a:hover {
    color: #FFD700;
}

.meta-tags {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.meta-tags i {
    color: #FFD700;
    margin-right: 4px;
    font-size: 13px;
}

.content-meta .tag {
    font-size: 11px;
    padding: 1px 8px;
    min-height: 16px;
}

/* 内容预览图 */
.content-preview {
    position: relative;
    overflow: hidden;
}

.content-preview img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s;
}

.content-preview:hover img {
    transform: scale(1.02);
}

.content-preview .vip-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #FFD700, #FFC700);
    color: #fff;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 14px;
    box-shadow: 0 2px 10px rgba(255, 215, 0, 0.3);
}

/* 内容描述 */
.content-description {
    padding: 30px;
    border-bottom: 1px solid #eee;
}

.content-description h3 {
    font-size: 20px;
    color: #333;
    margin-bottom: 15px;
    position: relative;
    padding-bottom: 10px;
}

.content-description h3:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background: linear-gradient(90deg, #FFD700, #FFC700);
}

.content-description p {
    font-size: 16px;
    line-height: 1.8;
    color: #555;
    margin-bottom: 15px;
}

/* 资源标签 */
.content-tags {
    padding: 30px;
    border-bottom: 1px solid #eee;
}

.content-tags h3 {
    font-size: 20px;
    color: #333;
    margin-bottom: 15px;
    position: relative;
    padding-bottom: 10px;
}

.content-tags h3:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background: linear-gradient(90deg, #FFD700, #FFC700);
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 215, 0, 0.1);
    color: #B8860B;
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 12px;
    line-height: 1;
    min-height: 18px;
    text-decoration: none;
    transition: all 0.3s;
    border: 1px solid rgba(255, 215, 0, 0.2);
    box-sizing: border-box;
}

.tag:hover {
    background: rgba(255, 215, 0, 0.2);
    color: #B8860B;
    transform: translateY(-2px);
}

/* 下载区域 */
.content-download {
    padding: 30px;
    border-bottom: 1px solid #eee;
}

.content-download h3 {
    font-size: 20px;
    color: #333;
    margin-bottom: 15px;
    position: relative;
    padding-bottom: 10px;
}

.content-download h3:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background: linear-gradient(90deg, #FFD700, #FFC700);
}

.download-box {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.05), rgba(255, 199, 0, 0.02));
    border-radius: 10px;
    padding: 20px;
    border: 1px solid rgba(255, 215, 0, 0.2);
}

.download-link-item {
    padding: 15px 0;
    border-bottom: 1px dashed rgba(255, 215, 0, 0.4);
}

.download-link-item:last-child {
    border-bottom: none;
}

.download-link-title {
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.download-link-title i {
    color: #FFD700;
}

.download-link-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.download-link-actions .download-btn {
    padding: 8px 18px;
    font-size: 14px;
    min-width: auto;
}

.download-password {
    font-size: 14px;
    color: #666;
}

.download-password code {
    background: #f8f8f8;
    border: 1px dashed #ddd;
    border-radius: 4px;
    padding: 2px 6px;
    color: #b8860b;
}

.vip-notice {
    display: flex;
    align-items: center;
    padding: 20px;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 8px;
    color: #B8860B;
}

.vip-notice i {
    font-size: 24px;
    margin-right: 15px;
    color: #FFD700;
}

.vip-notice p {
    margin: 0;
    font-size: 16px;
}

.vip-link {
    color: #B8860B;
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px solid #B8860B;
}

.vip-link:hover {
    color: #FFD700;
    border-bottom-color: #FFD700;
}

.download-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.file-info {
    display: flex;
    align-items: center;
}

.file-info i {
    font-size: 40px;
    color: #FFD700;
    margin-right: 15px;
}

.file-details p {
    margin: 0;
}

.file-name {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin-bottom: 5px;
}

.file-size {
    font-size: 14px;
    color: #666;
}

.download-btn {
    display: flex;
    align-items: center;
    padding: 12px 25px;
    font-size: 16px;
    font-weight: 500;
}

.download-btn i {
    margin-right: 8px;
}

/* 操作按钮 */
.content-actions {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    gap: 15px;
}

.action-btn {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 25px;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.action-btn i {
    margin-right: 8px;
    font-size: 16px;
}

.action-btn:hover {
    background: rgba(255, 215, 0, 0.1);
    border-color: rgba(255, 215, 0, 0.3);
    color: #B8860B;
    transform: translateY(-2px);
}

.action-btn.favorited {
    background: rgba(255, 215, 0, 0.1);
    border-color: rgba(255, 215, 0, 0.3);
    color: #B8860B;
}

.content-actions .action-btn.share-btn {
    background: rgba(0, 0, 0, 0.04);
    color: #555;
}

.content-actions .action-btn.share-btn:hover {
    background: rgba(0, 0, 0, 0.08);
    border-color: #ccc;
    color: #333;
}

.content-actions .action-btn.share-btn.shared {
    background: rgba(255, 215, 0, 0.12);
    border-color: rgba(255, 215, 0, 0.3);
    color: #B8860B;
}

.content-actions .action-btn.share-btn i {
    color: inherit;
}

/* 评论区 */
.content-comments {
    padding: 20px;
}

.content-comments h3 {
    font-size: 20px;
    color: #333;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.content-comments h3:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background: linear-gradient(90deg, #FFD700, #FFC700);
}

.comment-form {
    margin-bottom: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.comment-form textarea {
    width: 100%;
    height: 100px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    resize: vertical;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
}

.comment-form textarea:focus {
    outline: none;
    border-color: #FFD700;
    box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.2);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 15px;
}

.comment-notice {
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 30px;
}

.comment-notice p {
    margin: 0;
    font-size: 16px;
    color: #666;
}

.login-link {
    color: #FFD700;
    text-decoration: none;
    font-weight: 500;
}

.login-link:hover {
    text-decoration: underline;
}

.comment-list {
    margin-top: 20px;
}

.no-comments {
    text-align: center;
    padding: 30px;
    color: #999;
}

.comment-item {
    display: flex;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-avatar {
    margin-right: 15px;
}

.comment-avatar img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    gap: 10px;
}

.comment-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.comment-author {
    font-weight: 500;
    color: #333;
}

.comment-time {
    font-size: 14px;
    color: #999;
}

.comment-text {
    font-size: 15px;
    line-height: 1.6;
    color: #555;
}

.reply-btn {
    border: none;
    background: transparent;
    color: #B8860B;
    cursor: pointer;
    font-size: 13px;
}
.reply-btn:hover {
    text-decoration: underline;
}

.comment-children {
    margin-top: 12px;
    padding-left: 18px;
    border-left: 2px solid #f0f0f0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.comment-item.child .comment-avatar img {
    width: 40px;
    height: 40px;
}

/* 侧边栏 */
.sidebar-widget {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
    overflow: hidden;
}

.sidebar-widget h3 {
    font-size: 18px;
    color: #333;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    position: relative;
}

.sidebar-widget h3:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20px;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, #FFD700, #FFC700);
}

/* 作者信息 */
.author-info {
    display: flex;
    padding: 20px;
}

.author-avatar {
    margin-right: 15px;
}

.author-avatar img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.author-details h4 {
    font-size: 16px;
    color: #333;
    margin-bottom: 5px;
}

.author-details p {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.author-stats {
    display: flex;
    gap: 15px;
}

.author-stats span {
    font-size: 13px;
    color: #888;
    display: flex;
    align-items: center;
}

.author-stats span i {
    margin-right: 5px;
    color: #FFD700;
}

/* 相关推荐 */
.related-list {
    padding: 20px;
}

.related-item {
    display: flex;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.related-item.simple h4,
.related-item.simple h4 a {
    font-weight: 400;
    color: #B8860B;
}

.related-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.related-image {
    margin-right: 15px;
    flex-shrink: 0;
}

.related-image img {
    width: 80px;
    height: 60px;
    border-radius: 5px;
    object-fit: cover;
}

.related-info {
    flex: 1;
}

.related-info h4 {
    font-size: 14px;
    margin-bottom: 5px;
    line-height: 1.4;
}

.related-info h4 {
    font-weight: 400;
}

.related-info h4 a {
    color: #B8860B;
    text-decoration: none;
    transition: color 0.3s;
}

.related-info h4 a:hover {
    color: #FFD700;
}

.related-meta {
    display: flex;
    gap: 10px;
    font-size: 12px;
    color: #888;
}

.related-meta span {
    display: flex;
    align-items: center;
}

.related-meta span i {
    margin-right: 3px;
    color: #FFD700;
}

/* 热门标签 */
.tag-cloud {
    padding: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-cloud .tag {
    font-size: 13px;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .content-wrapper {
        flex-direction: column;
    }
    
    .content-sidebar {
        width: 100%;
    }

    .sidebar-sticky {
        position: static;
        top: auto;
    }
    
    .content-meta {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 12px;
        overflow-x: auto;
        white-space: nowrap;
    }

    .content-meta .meta-item {
        white-space: nowrap;
        order: 1;
    }

    .content-meta .meta-tags {
        display: flex;
        flex: 0 0 100%;
        order: 2;
        white-space: normal;
    }
    
    .content-actions {
        flex-wrap: wrap;
        gap: 10px;
    }
}

@media (max-width: 576px) {
    .content-header {
        padding: 20px;
    }
    
    .content-title {
        font-size: 22px;
    }
    
    .content-description,
    .content-tags,
    .content-download,
    .content-actions,
    .content-comments {
        padding: 20px;
    }
    .rating-card {
        margin: 0 0 14px 0;
        padding: 14px 16px;
    }
    .comment-list {
        padding: 0;
    }
    .comment-item {
        padding: 10px 0;
    }
    .comment-avatar img {
        width: 40px;
        height: 40px;
    }
    .comment-item.child .comment-avatar img {
        width: 32px;
        height: 32px;
    }
    .comment-children {
        padding-left: 12px;
        gap: 10px;
    }
    
    .download-info {
        flex-direction: column;
        gap: 15px;
    }
    
    .file-info {
        width: 100%;
    }
    
    .download-btn {
        width: 100%;
        justify-content: center;
    }
    
    .comment-form {
        padding: 15px;
    }
    
    .comment-item {
        padding: 15px 0;
    }
}
