/* ============================================================
   来源：views/theme/board.html 内联 <style> 第 1 块（原位抽离，327 行）
   说明：在原位置以 <link rel="stylesheet"> 引入，来源顺序不变，
        层叠结果与抽离前逐字一致，不会引起样式变化。
   ============================================================ */
.doc-card {
    display: flex;
    align-items: stretch;
    gap: 12px;
    padding: 14px 18px;
    background: #fff;
    border: 1px solid #e9ecf0;
    border-left: 3px solid transparent;
    border-radius: 8px;
    margin-bottom: 12px;
    transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
    cursor: pointer;
}
.doc-card:hover {
    box-shadow: 0 6px 18px rgba(20, 30, 50, 0.10);
    border-color: #c0c8d4;
    border-left-color: #eb1313;
    transform: translateY(-2px);
}
.doc-card .doc-left {
    display: flex;
    gap: 14px;
    flex: 1;
    min-width: 0;
    align-items: flex-start;
}
.doc-card .doc-icon {
    font-size: 32px;
    flex-shrink: 0;
    width: 44px;
    text-align: center;
    line-height: 1.2;
    margin-top: 2px;
}
.doc-card .doc-body {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}
.doc-card .doc-title {
    font-size: 16px;
    font-weight: 600;
    color: #1f2a3a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
    transition: color 0.2s;
}
.doc-card:hover .doc-title {
    color: #eb1313;
}
.doc-card .doc-meta-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    font-size: 14px;
    color: #7a8a9e;
    line-height: 1.6;
}
.doc-card .doc-summary {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #647288;
    font-size: 13.5px;
    line-height: 1.65;
    word-break: break-word;
}
.doc-card .doc-stats {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 12px;
    font-size: 13px;
    padding-top: 2px;
}
.doc-card .doc-stats .divider {
    color: #d0d7e0;
    flex-shrink: 0;
}
.doc-card .doc-stats .rating {
    display: flex;
    align-items: center;
    gap: 2px;
    color: #f5a623;
    /* 覆盖 common.css 全局 .stat-item 的 flex:1（basis:0 均分行宽会把内容挤重叠） */
    flex: 0 0 auto;
}
.doc-card .doc-stats .rating .star {
    font-size: 15px;
}
.doc-card .doc-stats .rating .star.empty {
    color: #d0d7e0;
}
.doc-card .doc-stats .stat-item {
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    /* 覆盖 common.css 全局 .stat-item 的 flex:1 / min-width:120px，按内容自适应，避免文字重叠 */
    flex: 0 0 auto;
    min-width: 0;
}
.doc-card .doc-side {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    flex-shrink: 0;
    gap: 6px;
    padding-left: 12px;
    border-left: 1px solid #f0f2f5;
    min-width: 116px;
    width: 116px;
}
.doc-card .doc-side .top-row {
    display: flex;
    width: 100%;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}
.doc-card .doc-side .top-row > * {
    flex: 0 0 auto;
    text-align: center;
}
.doc-card .doc-side .file-type {
    font-size: 12px;
    color: #7a8a9e;
    background: #f0f2f5;
    padding: 0 4px;
    border-radius: 12px;
    line-height: 22px;
    white-space: nowrap;
}
.doc-card .doc-side .price-tag {
    font-size: 14px;
    font-weight: 600;
    color: #e05a2a;
    white-space: nowrap;
}
.doc-card .doc-side .price-tag.free {
    color: #2d7eff;
}
/* 会员专属：金色徽标，和「免费 / ¥价格」区分开 */
.doc-card .doc-side .price-tag.vip {
    font-size: 12px;
    color: #a5701a;
    background: linear-gradient(135deg, #fff6e0, #ffe6ab);
    border: 1px solid #f0d68a;
    border-radius: 12px;
    line-height: 20px;
    padding: 0 8px;
}
.doc-card .doc-side .btn-download {
    padding: 5px 14px;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s;
    background: #eb1313;
    color: #fff;
    width: 100%;
}
.doc-card .doc-side .btn-download:hover {
    background: #c00;
}

.theme-header-wrapper {
    display: flex;
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e9ecf0;
    border-radius: 8px;
    padding: 12px 20px;
    margin-bottom: 20px;
    gap: 20px;
    flex-wrap: wrap;
}
.theme-header-wrapper .left {
    display: flex;
    gap: 16px;
    flex: 1;
    min-width: 0;
    align-items: center;
}
.theme-header-wrapper .left .cover {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    background: #f0f2f5;
}
.theme-header-wrapper .left .cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.theme-header-wrapper .left .cover .placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 2rem;
    color: #adb5bd;
}
.theme-header-wrapper .left .info {
    flex: 1;
    min-width: 0;
}
.theme-header-wrapper .left .info h2,
.theme-header-wrapper .left .info h1 {
    font-size: 18px;
    margin: 0 0 2px 0;
    color: #1f2a3a;
}
.theme-header-wrapper .left .info .desc {
    font-size: 14px;
    color: #5a6b7c;
    margin-bottom: 2px;
}
.theme-header-wrapper .left .info .stats {
    display: flex;
    gap: 14px;
    font-size: 14px;
    color: #7a8a9e;
}
.theme-header-wrapper .left .info .stats strong {
    color: #eb1313;
    font-weight: bold;
}
.theme-header-wrapper .right {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    flex-shrink: 0;
    gap: 8px;
    padding-left: 16px;
    border-left: 1px solid #d0d7e0;
    min-width: 160px;
}
.theme-header-wrapper .right .top-numbers {
    display: flex;
    gap: 12px;
    font-size: 14px;
    color: #7a8a9e;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.theme-header-wrapper .right .top-numbers strong {
    color: #eb1313;
    font-weight: bold;
}
.theme-header-wrapper .right .top-numbers .sep {
    color: #d0d7e0;
}
.theme-header-wrapper .right .divider-line {
    width: 100%;
    height: 1px;
    background: #e9ecf0;
    margin: 2px 0;
}
.theme-header-wrapper .right .actions {
    display: flex;
    gap: 8px 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
    font-size: 14px;
}
.theme-header-wrapper .right .actions a {
    color: #5a6b7c;
    text-decoration: none;
    transition: color 0.2s;
}
.theme-header-wrapper .right .actions a:hover {
    color: #eb1313;
}
.theme-header-wrapper .right .actions .btn-special {
    background: #eb1313;
    color: #fff !important;
    padding: 3px 14px;
    border-radius: 4px;
    font-size: 13px;
}
.theme-header-wrapper .right .actions .btn-special:hover {
    background: #c00;
}
.theme-header-wrapper .right .actions .sep {
    color: #d0d7e0;
}

@media (max-width: 768px) {
    .theme-header-wrapper {
        flex-direction: column;
        align-items: stretch;
    }
    .theme-header-wrapper .right {
        border-left: none;
        border-top: 1px solid #d0d7e0;
        padding-left: 0;
        padding-top: 10px;
        align-items: flex-start;
    }
    .theme-header-wrapper .right .top-numbers {
        justify-content: flex-start;
    }
    .theme-header-wrapper .right .actions {
        justify-content: flex-start;
    }
}
@media (max-width: 640px) {
    .doc-card .doc-left {
        flex-wrap: wrap;
    }
    .doc-card .doc-side {
        border-left: none;
        padding-left: 0;
        align-items: flex-start;
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px 12px;
        border-top: 1px solid #f0f2f5;
        padding-top: 8px;
        margin-top: 4px;
        min-width: unset;
    }
    .doc-card .doc-side .top-row {
        width: auto;
        justify-content: flex-start;
        gap: 12px;
    }
    .doc-card .doc-side .top-row > * {
        flex: 0 1 auto;
        text-align: left;
    }
    .doc-card .doc-side .btn-download {
        width: auto;
        margin-left: auto;
    }
}

/* ============================================================================
   ★文档质量评分模块（2026-10-06 新增，列表底部）
   星星可点：hover 预览、点击打分/改分（同一账号只记最后一票）。
   ============================================================================ */
.doc-rating-card {
    margin-top: 18px;
    background: #fff;
    border: 1px solid #eef0f2;
    border-radius: 12px;
    padding: 16px 18px 12px;
}

.doc-rating-card .dr-head { margin-bottom: 10px; }
.doc-rating-card .dr-title { font-size: 1rem; font-weight: 700; color: #2c2b28; }
.doc-rating-card .dr-sub { font-size: 0.78rem; color: #98a2b3; margin-top: 2px; }

.dr-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-top: 1px dashed #f1f2f4;
}
.dr-item:first-child { border-top: none; }

.dr-item .dr-name {
    flex: 1 1 auto;
    min-width: 0;
    color: #2c3b4e;
    font-size: 0.86rem;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dr-item .dr-name:hover { color: var(--sun-red, #eb1313); }

.dr-stars { flex: 0 0 auto; cursor: pointer; user-select: none; line-height: 1; }
.dr-stars.busy { opacity: .55; pointer-events: none; }
.dr-star {
    display: inline-block;
    font-size: 1.05rem;
    color: #dcdfe6;
    transition: color .12s, transform .12s;
}
.dr-star.on { color: #f7b500; }
.dr-stars:not(.busy) .dr-star:hover { transform: scale(1.12); }

.dr-item .dr-summary {
    flex: 0 0 auto;
    min-width: 112px;
    text-align: right;
    font-size: 0.78rem;
    color: #667085;
}
.dr-item .dr-avg { color: #eb1313; font-weight: 700; font-size: 0.92rem; }
.dr-item .dr-count { color: #98a2b3; }

.doc-rating-card .dr-tip {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #f4f5f7;
    font-size: 0.72rem;
    color: #b0b8c4;
}

@media (max-width: 640px) {
    .dr-item { flex-wrap: wrap; }
    .dr-item .dr-summary { min-width: auto; }
}
