/* =========================================================
   网盘资源库 —— 前台 + 后台样式
   ========================================================= */

.nd-wrap {
    color: var(--mn-text, #1f2937);
    font-size: 14px; line-height: 1.6;
    padding: 24px 16px 32px;
    box-sizing: border-box;
}
@media (min-width: 768px) { .nd-wrap { padding: 28px 24px 40px; } }

.nd-admin {
    max-width: 1200px;
    padding: 20px 20px 48px;
    box-sizing: border-box;
    color: var(--mn-text, #1f2937);
    font-size: 14px; line-height: 1.6;
    background: transparent;
}
@media (min-width: 768px) { .nd-admin { padding: 20px 24px 48px; } }

.nd-title, .nd-admin-title { margin: 0 0 6px; font-size: 22px; font-weight: 600; color: var(--mn-text, #111827); }
.nd-desc, .nd-hint { margin: 0 0 16px; font-size: 13px; color: var(--mn-text-muted, #6b7280); }
.nd-sec { margin: 0 0 12px; font-size: 15px; font-weight: 600; color: var(--mn-text, #111827); }
.nd-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; color: var(--mn-text-muted, #6b7280); }
.nd-link { color: var(--mn-primary, #0066cc); text-decoration: none; }
.nd-link:hover { text-decoration: underline; }
.nd-text-muted { color: var(--mn-text-muted, #9ca3af); font-size: 12px; }

.nd-flash {
    padding: 10px 14px; margin: 0 0 16px;
    background: var(--mn-comp-alert-success-bg, #ecfdf5);
    border: 1px solid var(--mn-comp-alert-success-border, #a7f3d0);
    border-radius: 6px; color: var(--mn-success, #16a34a); font-size: 13px;
}

.nd-header { margin: 0 0 20px; }
.nd-admin-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin: 0 0 20px; }
.nd-admin-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.nd-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; align-items: center; }

.nd-select, .nd-input, .nd-textarea {
    box-sizing: border-box;
    padding: 8px 12px;
    font-family: inherit; font-size: 13px;
    color: var(--mn-text, #111827);
    background: var(--mn-bg-input, #fff);
    border: 1px solid var(--mn-border-strong, #d1d5db);
    border-radius: 6px; outline: none;
    transition: border-color .15s, box-shadow .15s;
    -webkit-appearance: none; appearance: none;
}
.nd-input    { width: 100%; min-width: 0; }
.nd-textarea { width: 100%; resize: vertical; min-height: 64px; }
.nd-select   { min-width: 120px; }
.nd-input-inline { width: auto; min-width: 120px; margin-right: 6px; }
.nd-select:focus, .nd-input:focus, .nd-textarea:focus {
    border-color: var(--mn-primary, #0066cc);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, .14);
}
.nd-filter .nd-select, .nd-filter .nd-input { width: auto; flex: 0 1 auto; min-width: 160px; }
.nd-filter .nd-input { flex: 1 1 220px; min-width: 200px; }

.nd-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 8px 16px; font-family: inherit; font-size: 13px; font-weight: 500;
    line-height: 1.4; border: 1px solid transparent; border-radius: 6px;
    cursor: pointer; text-decoration: none; white-space: nowrap;
    transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
    -webkit-appearance: none; appearance: none;
}
.nd-btn-primary { background: var(--mn-primary, #0066cc); border-color: var(--mn-primary, #0066cc); color: #fff; }
.nd-btn-primary:hover { background: var(--mn-primary-hover, #0052a3); }
.nd-btn-secondary { background: var(--mn-bg-card, #fff); border-color: var(--mn-border-strong, #d1d5db); color: var(--mn-text, #374151); }
.nd-btn-secondary:hover { background: var(--mn-bg-soft, #f9fafb); border-color: #9ca3af; }
.nd-btn-danger { background: transparent; border-color: #fca5a5; color: var(--mn-error, #dc2626); }
.nd-btn-danger:hover { background: var(--mn-comp-alert-error-bg, #fef2f2); border-color: var(--mn-error, #dc2626); }
.nd-btn-mini { padding: 4px 10px; font-size: 12px; }
.nd-btn-sm { padding: 6px 14px; font-size: 12px; }

.nd-inline { display: inline-block; margin: 0; }
.nd-inline-form { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.nd-hidden-form { display: none; }

.nd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin: 0 0 20px; }
.nd-card { background: var(--mn-bg-card, #fff); border: 1px solid var(--mn-border, #e5e7eb); border-radius: 10px; overflow: hidden; transition: box-shadow .2s, transform .2s; }
.nd-card:hover { box-shadow: 0 4px 12px rgba(0, 0, 0, .06); transform: translateY(-1px); }
.nd-card-link { display: block; color: inherit; text-decoration: none; }
.nd-card-thumb { height: 130px; background-size: cover; background-position: center; background-color: var(--mn-bg-soft, #f3f4f6); }
.nd-card-thumb-plain { display: flex; align-items: center; justify-content: center; }
.nd-card-thumb-icon { font-size: 42px; color: var(--mn-text-muted, #cbd5e1); }
.nd-card-body { padding: 12px 14px 14px; }
.nd-card-title { font-size: 14px; font-weight: 600; color: var(--mn-text, #111827); margin: 0 0 8px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.4; }
.nd-card-meta { display: flex; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--mn-text-muted, #6b7280); margin-bottom: 8px; }
.nd-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.nd-drive { display: inline-block; padding: 1px 8px; border-radius: 4px; background: var(--mn-primary-subtle, #e6f0fa); color: var(--mn-primary, #0066cc); font-size: 12px; }
.nd-size { font-size: 12px; color: var(--mn-text-muted, #6b7280); }
.nd-views, .nd-time { font-size: 12px; color: var(--mn-text-muted, #6b7280); }

.nd-badge { display: inline-block; padding: 2px 9px; border-radius: 10px; font-size: 12px; font-weight: 500; line-height: 18px; white-space: nowrap; }
.nd-badge-ok    { background: rgba(22, 163, 74, .12);  color: var(--mn-success, #16a34a); }
.nd-badge-fail  { background: rgba(220, 38, 38, .12);  color: var(--mn-error, #dc2626); }
.nd-badge-lock  { background: rgba(245, 158, 11, .15); color: var(--mn-warning, #d97706); }
.nd-badge-unk   { background: transparent; border: 1px dashed var(--mn-border-strong, #d1d5db); color: var(--mn-text-muted, #6b7280); }

.nd-flag { display: inline-block; margin-right: 4px; padding: 1px 6px; border-radius: 4px; font-size: 11px; line-height: 16px; }
.nd-flag-top { background: rgba(220, 38, 38, .12); color: var(--mn-error, #dc2626); }
.nd-flag-rec { background: rgba(245, 158, 11, .15); color: var(--mn-warning, #d97706); }

.nd-pager { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0; justify-content: center; }
.nd-page { display: inline-block; min-width: 32px; padding: 6px 10px; text-align: center; color: var(--mn-text, #374151); background: var(--mn-bg-card, #fff); border: 1px solid var(--mn-border, #e5e7eb); border-radius: 6px; text-decoration: none; font-size: 13px; }
.nd-page:hover { border-color: var(--mn-primary, #0066cc); color: var(--mn-primary, #0066cc); }
.nd-page.active { background: var(--mn-primary, #0066cc); color: #fff; border-color: var(--mn-primary, #0066cc); }

.nd-detail-head { margin: 0 0 20px; }
.nd-detail-title { margin: 0 0 8px; font-size: 22px; font-weight: 600; color: var(--mn-text, #111827); }
.nd-detail-meta { display: flex; flex-wrap: wrap; gap: 12px; font-size: 13px; color: var(--mn-text-muted, #6b7280); }
.nd-preview { margin: 0 0 20px; border-radius: 10px; overflow: hidden; border: 1px solid var(--mn-border, #e5e7eb); }
.nd-preview img { max-width: 100%; display: block; }
.nd-intro { margin: 0 0 20px; }
.nd-intro p { margin: 0; color: var(--mn-text, #374151); }
.nd-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 20px; }
.nd-tag { display: inline-block; padding: 2px 9px; border-radius: 10px; background: var(--mn-bg-soft, #f3f4f6); color: var(--mn-text-muted, #6b7280); font-size: 12px; }
.nd-disclaimer { margin-top: 30px; padding: 12px 16px; border-radius: 8px; font-size: 12px; line-height: 1.6; background: var(--mn-bg-soft, #f9fafb); color: var(--mn-text-muted, #6b7280); border: 1px dashed var(--mn-border, #e5e7eb); }

.nd-sec-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 12px; }
.nd-sec-row .nd-sec { margin: 0; }
.nd-feedback-link { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 6px; font-size: 12px; color: var(--mn-text-muted, #6b7280); text-decoration: none; border-radius: 999px; border: 1px solid var(--mn-border, #e5e7eb); background: var(--mn-bg-card, #fff); cursor: pointer; white-space: nowrap; transition: color .15s, background .15s, border-color .15s; }
.nd-feedback-link:hover { color: var(--mn-error, #dc2626); background: var(--mn-comp-alert-error-bg, #fef2f2); border-color: #fca5a5; }
.nd-feedback-dot { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%; background: var(--mn-warning, #d97706); color: #fff; font-size: 11px; font-weight: 700; line-height: 1; }
.nd-feedback-link:hover .nd-feedback-dot { background: var(--mn-error, #dc2626); }
.nd-feedback-disabled { cursor: not-allowed; opacity: .55; }
.nd-feedback-disabled:hover { color: var(--mn-text-muted, #6b7280); background: var(--mn-bg-card, #fff); border-color: var(--mn-border, #e5e7eb); }
.nd-feedback-disabled:hover .nd-feedback-dot { background: var(--mn-warning, #d97706); }

body.nd-modal-open { overflow: hidden; }
.nd-modal { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; }
.nd-modal[hidden] { display: none; }
.nd-modal-mask { position: absolute; inset: 0; background: rgba(15, 23, 42, .48); backdrop-filter: blur(2px); animation: ndFadeIn .18s ease; }
@keyframes ndFadeIn { from { opacity: 0; } to { opacity: 1; } }
.nd-modal-dialog { position: relative; width: 100%; max-width: 480px; margin: 20px; background: var(--mn-bg-card, #fff); border-radius: 12px; box-shadow: 0 20px 48px rgba(0, 0, 0, .22); animation: ndSlideIn .2s ease; overflow: hidden; }
@keyframes ndSlideIn { from { transform: translateY(10px); opacity: .8; } to { transform: translateY(0); opacity: 1; } }
.nd-modal-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--mn-border, #e5e7eb); }
.nd-modal-title { margin: 0; font-size: 15px; font-weight: 600; color: var(--mn-text, #111827); }
.nd-modal-close { flex: 0 0 auto; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border: none; background: transparent; border-radius: 6px; color: var(--mn-text-muted, #6b7280); font-size: 20px; line-height: 1; cursor: pointer; transition: background .15s, color .15s; }
.nd-modal-close:hover { background: var(--mn-bg-soft, #f3f4f6); color: var(--mn-text, #111827); }
.nd-modal-body { padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 14px; }
.nd-modal-body .nd-textarea { min-height: 110px; }
.nd-modal-footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; }

.nd-related { margin: 24px 0; }
.nd-related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.nd-related-card { display: block; padding: 10px 12px; background: var(--mn-bg-card, #fff); border: 1px solid var(--mn-border, #e5e7eb); border-radius: 8px; text-decoration: none; color: inherit; transition: border-color .15s, box-shadow .15s; }
.nd-related-card:hover { border-color: var(--mn-primary, #0066cc); box-shadow: 0 2px 8px rgba(0, 102, 204, .08); }
.nd-related-title { font-size: 13px; font-weight: 600; color: var(--mn-text, #111827); margin: 0 0 6px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.4; }
.nd-related-meta { display: flex; flex-wrap: wrap; gap: 6px; font-size: 11px; color: var(--mn-text-muted, #6b7280); }

.nd-recent { margin: 24px 0; }
.nd-recent-list { list-style: none; margin: 0; padding: 0; }
.nd-recent-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px; border-bottom: 1px solid var(--mn-border, #f3f4f6); }
.nd-recent-item:last-child { border-bottom: none; }
.nd-recent-item:hover { background: var(--mn-bg-soft, #f9fafb); }
.nd-recent-link { flex: 1; color: var(--mn-text, #374151); text-decoration: none; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nd-recent-link:hover { color: var(--mn-primary, #0066cc); }
.nd-recent-drive { font-size: 11px; color: var(--mn-text-muted, #6b7280); flex: 0 0 auto; }

.nd-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0 0 20px; }
.nd-stats-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 640px) { .nd-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.nd-stat { background: #ffffff !important; border: 1px solid var(--mn-border, #e5e7eb); border-radius: 10px; padding: 16px 12px; text-align: center; }
.nd-stat-num { font-size: 24px; font-weight: 700; line-height: 1.2; color: var(--mn-primary, #0066cc); font-variant-numeric: tabular-nums; }
.nd-stat-num.nd-num-ok { color: var(--mn-success, #16a34a); }
.nd-stat-num.nd-num-fail { color: var(--mn-error, #dc2626); }
.nd-stat-label { margin-top: 4px; font-size: 12px; color: var(--mn-text-muted, #6b7280); }

.nd-chart { display: flex; align-items: flex-end; gap: 4px; height: 180px; padding: 12px 4px 0; border-bottom: 1px solid var(--mn-border, #e5e7eb); overflow-x: auto; }
.nd-chart-bar { flex: 1 0 28px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; position: relative; }
.nd-chart-fill { width: 100%; height: var(--nd-h, 0%); min-height: 2px; background: var(--mn-primary, #0066cc); border-radius: 3px 3px 0 0; transition: height .3s; }
.nd-chart-label { margin-top: 6px; font-size: 10px; color: var(--mn-text-muted, #6b7280); white-space: nowrap; }
.nd-chart-num { position: absolute; top: -14px; font-size: 10px; color: var(--mn-text-muted, #9ca3af); font-variant-numeric: tabular-nums; }

.nd-card { background: #ffffff !important; border: 1px solid var(--mn-border, #e5e7eb); border-radius: 10px; padding: 20px 24px; margin: 0 0 16px; }
.nd-form { max-width: 780px; }
.nd-field { margin-bottom: 18px; }
.nd-field:last-of-type { margin-bottom: 0; }
.nd-label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: var(--mn-text, #374151); }
.nd-field-checkbox { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; }
.nd-checkbox { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; color: var(--mn-text, #374151); }
.nd-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
.nd-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
@media (max-width: 640px) { .nd-grid-2, .nd-grid-3 { grid-template-columns: 1fr; } }
.nd-grid-2 .nd-field, .nd-grid-3 .nd-field { margin-bottom: 0; }
.nd-form-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 0; padding: 18px 0 0; border-top: 1px solid var(--mn-border, #f3f4f6); }

.nd-table-wrap { overflow-x: auto; background: #ffffff !important; border: 1px solid #e5e7eb !important; border-radius: 8px; margin-bottom: 16px; box-shadow: 0 1px 3px rgba(17, 24, 39, .04) !important; }
.nd-table { width: 100%; border-collapse: collapse; font-size: 13px; background: #ffffff !important; }
.nd-table thead tr { background: #f9fafb !important; }
.nd-table th, .nd-table td { padding: 12px 12px; text-align: left; vertical-align: middle; border-bottom: 1px solid #f3f4f6 !important; }
.nd-table th { background: #f9fafb !important; border-bottom: 2px solid #e5e7eb !important; font-size: 12px; font-weight: 600; color: var(--mn-text-muted, #6b7280); white-space: nowrap; }
.nd-table td { background: #ffffff !important; }
.nd-table tbody tr:last-child td { border-bottom: none; }
.nd-table tbody tr:hover td { background: #f9fafb !important; }
.nd-table .nd-col-check { width: 32px; text-align: center; }
.nd-table .nd-col-id      { width: 56px; }
.nd-table .nd-col-drive   { width: 180px; }
.nd-table .nd-col-status  { width: 90px; }
.nd-table .nd-col-flags   { width: 90px; }
.nd-table .nd-col-visible { width: 64px; }
.nd-table .nd-col-views   { width: 60px; }
.nd-table .nd-col-updated { width: 130px; }
.nd-table .nd-col-actions { width: 230px; }
.nd-table .nd-col-title   { min-width: 220px; }
.nd-empty { padding: 28px 0; text-align: center; color: var(--mn-text-muted, #6b7280); }
.nd-actions-cell { white-space: nowrap; }
.nd-actions-cell .nd-btn-mini { margin-right: 4px; vertical-align: middle; }
.nd-actions-cell .nd-btn-mini:last-child { margin-right: 0; }
.nd-select-mini { padding: 3px 6px; font-size: 12px; border: 1px solid var(--mn-border, #d1d5db); border-radius: 4px; background: var(--mn-bg-input, #fff); color: var(--mn-text, #374151); }
.nd-title-link { display: inline-block; max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; font-weight: 500; color: var(--mn-primary, #0066cc); }
.nd-title-link:hover { text-decoration: underline; }

.nd-drive-cell { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 3px; border-radius: 999px; background: var(--mn-bg-soft, #f3f4f6); font-size: 12px; }
.nd-drive-mini { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; color: #fff; font-size: 10px; font-weight: 700; background: linear-gradient(135deg, #9ca3af, #b8bdc4); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); flex: 0 0 auto; user-select: none; }
.nd-drive-cell-name { color: var(--mn-text, #374151); white-space: nowrap; }
.nd-drive-cell-more { color: var(--mn-primary, #0066cc); font-size: 11px; font-weight: 600; padding: 0 4px; }
.nd-vis-badge { display: inline-block; padding: 2px 9px; border-radius: 10px; font-size: 12px; font-weight: 500; line-height: 18px; white-space: nowrap; }
.nd-vis-on  { background: rgba(22, 163, 74, .12); color: var(--mn-success, #16a34a); }
.nd-vis-off { background: var(--mn-bg-soft, #f3f4f6); color: var(--mn-text-muted, #6b7280); }

.nd-batch-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 14px; margin: 0 0 12px; background: var(--mn-bg-soft, #f9fafb); border: 1px solid var(--mn-border, #e5e7eb); border-radius: 8px; opacity: .6; transition: opacity .2s; }
.nd-batch-bar.nd-batch-active { opacity: 1; background: var(--mn-primary-subtle, #e6f0fa); border-color: var(--mn-primary, #0066cc); }
.nd-batch-info { font-size: 13px; color: var(--mn-text, #374151); margin-right: 8px; }
.nd-batch-info strong { color: var(--mn-primary, #0066cc); }
.nd-list { margin: 0 0 12px; padding-left: 20px; font-size: 13px; color: var(--mn-text, #374151); line-height: 1.8; }
.nd-list-err { color: var(--mn-error, #dc2626); }

.nd-shortbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 14px; margin: 0 0 20px; background: var(--mn-bg-soft, #f9fafb); border: 1px solid var(--mn-border, #e5e7eb); border-radius: 8px; font-size: 13px; }
.nd-shortbar-label { color: var(--mn-text-muted, #6b7280); }
.nd-shortbar-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; padding: 2px 8px; background: var(--mn-bg-card, #fff); border: 1px solid var(--mn-border, #e5e7eb); border-radius: 4px; color: var(--mn-text, #111827); word-break: break-all; }

.nd-preview-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 4px; }
.nd-preview-row .nd-input { flex: 1 1 320px; width: auto; min-width: 0; }
.nd-upload-btn { cursor: pointer; }
.nd-preview-thumb { max-width: 240px; margin-top: 10px; border-radius: 8px; overflow: hidden; border: 1px solid var(--mn-border, #e5e7eb); }
.nd-preview-thumb img { max-width: 100%; display: block; }
.nd-preview-thumb[hidden] { display: none; }

.nd-links-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.nd-link-row { margin-bottom: 10px; }
.nd-link-grid { display: grid; grid-template-columns: 120px minmax(0, 1fr) 110px 110px 120px 36px; gap: 8px; align-items: center; }
@media (max-width: 900px) { .nd-link-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.nd-link-grid .nd-input, .nd-link-grid .nd-select { width: 100%; min-width: 0; }
.nd-input-s, .nd-select-s { min-width: 0; }

.nd-links-box { margin: 0 0 24px; }
.nd-link-list { display: flex; flex-direction: column; gap: 10px; }
.nd-link-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--mn-bg-card, #fff); border: 1px solid var(--mn-border, #e5e7eb); border-radius: 12px; transition: border-color .18s, box-shadow .18s, transform .18s; }
.nd-link-card:hover { border-color: var(--mn-primary, #0066cc); box-shadow: 0 4px 14px rgba(0, 102, 204, .08); transform: translateY(-1px); }
.nd-link-icon { flex: 0 0 auto; width: 46px; height: 46px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 17px; font-weight: 700; letter-spacing: -.5px; border-radius: 11px; box-shadow: 0 3px 8px rgba(0, 0, 0, .12); user-select: none; background: linear-gradient(135deg, #9ca3af, #b8bdc4); }
.nd-link-card[data-drive="baidu"] .nd-link-icon        { background: linear-gradient(135deg, #2932e1, #5b66f0); }
.nd-link-card[data-drive="aliyun"] .nd-link-icon       { background: linear-gradient(135deg, #1677ff, #4b9dff); }
.nd-link-card[data-drive="quark"] .nd-link-icon        { background: linear-gradient(135deg, #4f5df7, #7c85f8); }
.nd-link-card[data-drive="cloud189"] .nd-link-icon     { background: linear-gradient(135deg, #0066cc, #1a8cff); }
.nd-link-card[data-drive="xunlei"] .nd-link-icon       { background: linear-gradient(135deg, #1e6ce0, #3e8af0); }
.nd-link-card[data-drive="115"] .nd-link-icon          { background: linear-gradient(135deg, #2f97ff, #58b1ff); font-size: 14px; }
.nd-link-card[data-drive="lanzou"] .nd-link-icon       { background: linear-gradient(135deg, #36a9ee, #5fc1f5); }
.nd-link-card[data-drive="weiyun"] .nd-link-icon       { background: linear-gradient(135deg, #35b6ff, #5fc8ff); }
.nd-link-card[data-drive="123pan"] .nd-link-icon       { background: linear-gradient(135deg, #ff6b35, #ff9a5b); font-size: 14px; }
.nd-link-card[data-drive="uc"] .nd-link-icon           { background: linear-gradient(135deg, #ff7e2f, #ffa35c); font-size: 13px; }
.nd-link-card[data-drive="ct"] .nd-link-icon           { background: linear-gradient(135deg, #2b6cb0, #4a8fd6); }
.nd-link-card[data-drive="jianguo"] .nd-link-icon      { background: linear-gradient(135deg, #22c55e, #4ade80); }
.nd-link-card[data-drive="mobile139"] .nd-link-icon    { background: linear-gradient(135deg, #0ea5e9, #38bdf8); }
.nd-link-card[data-drive="onedrive"] .nd-link-icon     { background: linear-gradient(135deg, #0364b8, #0a8ad6); font-size: 13px; }
.nd-link-card[data-drive="googledrive"] .nd-link-icon  { background: linear-gradient(135deg, #1a73e8, #4285f4); font-size: 13px; }
.nd-link-card[data-drive="mega"] .nd-link-icon         { background: linear-gradient(135deg, #d9272e, #ef4444); font-size: 13px; }
.nd-link-card[data-drive="dropbox"] .nd-link-icon      { background: linear-gradient(135deg, #0061ff, #3385ff); font-size: 13px; }
.nd-link-card[data-drive="huang1111"] .nd-link-icon    { background: linear-gradient(135deg, #fbbf24, #fcd34d); color: #78350f; }
.nd-link-card[data-drive="cow"] .nd-link-icon          { background: linear-gradient(135deg, #06b6d4, #22d3ee); }
.nd-link-card[data-drive="other"] .nd-link-icon        { background: linear-gradient(135deg, #9ca3af, #b8bdc4); }

.nd-link-info { flex: 1 1 auto; min-width: 0; }
.nd-link-drive { font-size: 15px; font-weight: 600; color: var(--mn-text, #111827); margin-bottom: 4px; }
.nd-link-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12px; color: var(--mn-text-muted, #6b7280); }
.nd-link-size { font-size: 12px; color: var(--mn-text-muted, #6b7280); }
.nd-link-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; flex: 0 0 auto; }
@media (max-width: 640px) { .nd-link-card { flex-wrap: wrap; } .nd-link-actions { width: 100%; justify-content: flex-end; } }

.nd-drive-cell[data-drive="baidu"] .nd-drive-mini    { background: linear-gradient(135deg, #2932e1, #5b66f0); }
.nd-drive-cell[data-drive="aliyun"] .nd-drive-mini   { background: linear-gradient(135deg, #1677ff, #4b9dff); }
.nd-drive-cell[data-drive="quark"] .nd-drive-mini    { background: linear-gradient(135deg, #4f5df7, #7c85f8); }
.nd-drive-cell[data-drive="cloud189"] .nd-drive-mini { background: linear-gradient(135deg, #0066cc, #1a8cff); }
.nd-drive-cell[data-drive="xunlei"] .nd-drive-mini   { background: linear-gradient(135deg, #1e6ce0, #3e8af0); }
.nd-drive-cell[data-drive="115"] .nd-drive-mini      { background: linear-gradient(135deg, #2f97ff, #58b1ff); font-size: 9px; }
.nd-drive-cell[data-drive="lanzou"] .nd-drive-mini   { background: linear-gradient(135deg, #36a9ee, #5fc1f5); }
.nd-drive-cell[data-drive="weiyun"] .nd-drive-mini   { background: linear-gradient(135deg, #35b6ff, #5fc8ff); }
.nd-drive-cell[data-drive="123pan"] .nd-drive-mini   { background: linear-gradient(135deg, #ff6b35, #ff9a5b); font-size: 9px; }
.nd-drive-cell[data-drive="uc"] .nd-drive-mini        { background: linear-gradient(135deg, #ff7e2f, #ffa35c); font-size: 9px; }
.nd-drive-cell[data-drive="ct"] .nd-drive-mini        { background: linear-gradient(135deg, #2b6cb0, #4a8fd6); }
.nd-drive-cell[data-drive="jianguo"] .nd-drive-mini   { background: linear-gradient(135deg, #22c55e, #4ade80); }
.nd-drive-cell[data-drive="mobile139"] .nd-drive-mini { background: linear-gradient(135deg, #0ea5e9, #38bdf8); }
.nd-drive-cell[data-drive="onedrive"] .nd-drive-mini  { background: linear-gradient(135deg, #0364b8, #0a8ad6); font-size: 9px; }
.nd-drive-cell[data-drive="googledrive"] .nd-drive-mini { background: linear-gradient(135deg, #1a73e8, #4285f4); font-size: 9px; }
.nd-drive-cell[data-drive="mega"] .nd-drive-mini      { background: linear-gradient(135deg, #d9272e, #ef4444); font-size: 9px; }
.nd-drive-cell[data-drive="dropbox"] .nd-drive-mini   { background: linear-gradient(135deg, #0061ff, #3385ff); font-size: 9px; }
.nd-drive-cell[data-drive="huang1111"] .nd-drive-mini { background: linear-gradient(135deg, #fbbf24, #fcd34d); color: #78350f; }
.nd-drive-cell[data-drive="cow"] .nd-drive-mini       { background: linear-gradient(135deg, #06b6d4, #22d3ee); }

.nd-comments { margin: 24px 0; }
.nd-comment-list { list-style: none; margin: 0 0 16px; padding: 0; }
.nd-comment { padding: 10px 12px; margin-bottom: 8px; background: var(--mn-bg-card, #fff); border: 1px solid var(--mn-border, #e5e7eb); border-radius: 8px; }
.nd-comment-head { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--mn-text-muted, #6b7280); margin-bottom: 6px; }
.nd-comment-user { font-weight: 600; color: var(--mn-text, #374151); }
.nd-comment-time { font-size: 11px; }
.nd-comment-body { font-size: 13px; color: var(--mn-text, #374151); line-height: 1.6; word-break: break-word; }
.nd-comment-form { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.nd-comment-form textarea { width: 100%; }

/* ---------- 帖子内嵌网盘面板 ---------- */
.nd-embed-panel { margin: 20px 0; padding: 0; background: var(--mn-bg-card, #fff); border: 1px solid var(--mn-border, #e5e7eb); border-left: 4px solid var(--mn-primary, #0066cc); border-radius: 12px; font-size: 13px; line-height: 1.5; overflow: hidden; box-shadow: 0 2px 8px rgba(0, 0, 0, .04); }
.nd-embed-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; background: var(--mn-bg-soft, #f9fafb); border-bottom: 1px solid var(--mn-border, #e5e7eb); }
.nd-embed-panel-title { display: inline-flex; align-items: center; font-size: 13px; font-weight: 600; color: var(--mn-text, #111827); }
.nd-embed-panel-count { display: inline-block; padding: 2px 8px; font-size: 11px; color: var(--mn-primary, #0066cc); background: var(--mn-primary-subtle, #e6f0fa); border-radius: 10px; font-weight: 500; }
.nd-embed-panel-list { display: flex; flex-direction: column; padding: 6px; }
.nd-embed-card { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; text-decoration: none; color: inherit; transition: background .15s, transform .15s; }
.nd-embed-card + .nd-embed-card { border-top: 1px dashed var(--mn-border, #f3f4f6); }
.nd-embed-card:hover { background: var(--mn-bg-soft, #f9fafb); transform: translateX(2px); }
.nd-embed-icon { flex: 0 0 auto; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 13px; font-weight: 700; letter-spacing: -.5px; border-radius: 9px; background: linear-gradient(135deg, #9ca3af, #b8bdc4); box-shadow: 0 2px 5px rgba(0, 0, 0, .1); user-select: none; }
.nd-embed-info { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.nd-embed-title-row { display: flex; align-items: center; gap: 8px; }
.nd-embed-title { flex: 1 1 auto; font-size: 13px; font-weight: 600; color: var(--mn-text, #111827); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.nd-embed-tag { display: inline-block; padding: 1px 7px; border-radius: 4px; font-size: 11px; line-height: 16px; background: var(--mn-bg-soft, #f3f4f6); color: var(--mn-text-muted, #6b7280); white-space: nowrap; flex: 0 0 auto; }
.nd-embed-tag-matched   { background: var(--mn-primary-subtle, #e6f0fa); color: var(--mn-primary, #0066cc); }
.nd-embed-tag-unmatched { background: rgba(245, 158, 11, .12); color: var(--mn-warning, #d97706); }
.nd-embed-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 11px; color: var(--mn-text-muted, #6b7280); }
.nd-embed-meta .nd-badge { padding: 1px 7px; font-size: 11px; line-height: 16px; }
.nd-embed-arrow { flex: 0 0 auto; color: var(--mn-text-muted, #9ca3af); font-size: 20px; line-height: 1; transition: color .15s, transform .15s; }
.nd-embed-card:hover .nd-embed-arrow { color: var(--mn-primary, #0066cc); transform: translateX(2px); }

/* 网盘下载面板（绿色主题） */
.nd-download-panel { border-left-color: #16a34a !important; }
.nd-download-panel .nd-embed-panel-head { background: linear-gradient(to right, rgba(22, 163, 74, .06), rgba(22, 163, 74, 0)); border-bottom-color: rgba(22, 163, 74, .18); }
.nd-download-panel .nd-embed-panel-count { color: #16a34a; background: rgba(22, 163, 74, .12); }
.nd-download-intro { padding: 10px 16px; font-size: 12px; color: var(--mn-text-muted, #6b7280); line-height: 1.6; border-bottom: 1px dashed var(--mn-border, #f3f4f6); white-space: pre-wrap; word-break: break-word; }
.nd-download-card { cursor: pointer; }
.nd-download-card:hover { background: linear-gradient(to right, rgba(22, 163, 74, .05), rgba(22, 163, 74, 0)) !important; }
.nd-download-cta { flex: 0 0 auto; display: inline-flex; align-items: center; padding: 6px 16px; font-size: 13px; font-weight: 600; color: #fff; background: linear-gradient(135deg, #16a34a, #22c55e); border-radius: 6px; box-shadow: 0 2px 6px rgba(22, 163, 74, .25); transition: transform .15s, box-shadow .15s; white-space: nowrap; }
.nd-download-card:hover .nd-download-cta { transform: translateX(2px); box-shadow: 0 4px 10px rgba(22, 163, 74, .35); }
.nd-download-card:active .nd-download-cta { transform: translateX(1px) scale(.98); }
.nd-download-foot { padding: 8px 16px; font-size: 11px; color: var(--mn-text-muted, #9ca3af); text-align: center; background: var(--mn-bg-soft, #f9fafb); border-top: 1px dashed var(--mn-border, #e5e7eb); }

/* =========================================================
   发帖/编辑帖：网盘投稿区块（美化版）
   ========================================================= */
.nd-post-form {
    margin: 20px 0;
    padding: 18px 20px 20px;
    background: linear-gradient(135deg, #f8fbff 0%, #f0f7ff 100%);
    border: 1px solid #d6e6ff;
    border-left: 4px solid #0066cc;
    border-radius: 12px;
    font-size: 13px;
    box-shadow: 0 2px 8px rgba(0, 102, 204, .06);
    box-sizing: border-box;
}
.nd-post-form * { box-sizing: border-box; }
.nd-post-form-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.nd-post-form-icon { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; font-size: 15px; background: #fff; border-radius: 8px; box-shadow: 0 1px 3px rgba(0, 102, 204, .15); flex: 0 0 auto; }
.nd-post-form-title { font-size: 14px; font-weight: 600; color: #0f172a; flex: 1 1 auto; min-width: 0; }
.nd-post-form-badge { display: inline-block; padding: 2px 10px; font-size: 11px; color: #0066cc; background: rgba(0, 102, 204, .1); border-radius: 10px; line-height: 16px; font-weight: 500; flex: 0 0 auto; }
.nd-post-form-desc { margin: 0 0 14px; padding-left: 34px; font-size: 12px; color: #6b7280; line-height: 1.6; }

.nd-post-form-row { display: grid; gap: 10px; margin-bottom: 10px; }
.nd-post-form-row-url   { grid-template-columns: 180px 1fr; }
.nd-post-form-row-meta  { grid-template-columns: 1fr 1fr; }
.nd-post-form-row-intro { grid-template-columns: 1fr; }
@media (max-width: 640px) {
    .nd-post-form-row-url { grid-template-columns: 1fr; }
    .nd-post-form-row-meta { grid-template-columns: 1fr 1fr; }
}

.nd-post-form-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.nd-post-form-label { font-size: 12px; font-weight: 500; color: #374151; line-height: 1.4; }
.nd-post-form-opt { color: #9ca3af; font-weight: 400; font-size: 11px; }

.nd-post-form .nd-select,
.nd-post-form .nd-input,
.nd-post-form .nd-textarea {
    width: 100%;
    min-width: 0;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 13px;
    line-height: 1.5;
    color: #111827;
    transition: border-color .15s, box-shadow .15s;
    box-sizing: border-box;
}
.nd-post-form .nd-select { padding-right: 30px; cursor: pointer; }
.nd-post-form .nd-input:focus,
.nd-post-form .nd-select:focus,
.nd-post-form .nd-textarea:focus {
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, .12);
    outline: none;
}
.nd-post-form .nd-textarea { resize: vertical; min-height: 56px; font-family: inherit; }

.nd-post-form-hint { margin: 10px 0 0; padding: 8px 12px; font-size: 12px; color: #0066cc; background: rgba(0, 102, 204, .06); border-left: 2px solid #0066cc; border-radius: 4px; line-height: 1.5; }

#nd-embed-badge { animation: ndBadgeIn .25s ease; }
@keyframes ndBadgeIn { from { transform: translateY(10px); opacity: 0; } to { transform: translateY(0); opacity: .95; } }

/* =========================================================
   发帖/编辑帖：多网盘投稿行
   ========================================================= */

.nd-post-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 12px;
}

.nd-post-link-row {
    position: relative;
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr) 110px 110px;
    gap: 10px;
    padding: 14px 14px 12px;
    background: #ffffff;
    border: 1px solid #dbeafe;
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(0, 102, 204, .04);
    transition: border-color .15s, box-shadow .15s;
}
.nd-post-link-row:hover {
    border-color: #93c5fd;
    box-shadow: 0 2px 6px rgba(0, 102, 204, .08);
}

.nd-post-link-row-head {
    position: absolute;
    top: -10px;
    left: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    pointer-events: none;
}
.nd-post-link-row-num {
    display: inline-block;
    padding: 1px 8px;
    font-size: 11px;
    font-weight: 600;
    color: #0066cc;
    background: #e6f0fa;
    border-radius: 10px;
    line-height: 16px;
    pointer-events: auto;
}
.nd-post-link-row-del {
    pointer-events: auto;
    width: 22px;
    height: 22px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    line-height: 1;
    color: #9ca3af;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 50%;
    cursor: pointer;
    transition: all .15s;
}
.nd-post-link-row-del:hover {
    color: #dc2626;
    background: #fef2f2;
    border-color: #fca5a5;
}

.nd-post-link-row .nd-post-form-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

/* 添加按钮 */
.nd-post-add-row {
    display: flex;
    justify-content: center;
    margin: 4px 0 14px;
}
.nd-post-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 500;
    color: #0066cc;
    background: #ffffff;
    border: 1px dashed #93c5fd;
    border-radius: 8px;
    cursor: pointer;
    transition: all .15s;
    font-family: inherit;
}
.nd-post-add-btn:hover {
    background: #e6f0fa;
    border-color: #0066cc;
    border-style: solid;
}
.nd-post-add-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #0066cc, #4b9dff);
    border-radius: 50%;
    line-height: 1;
}

/* 窄屏：两列 */
@media (max-width: 900px) {
    .nd-post-link-row {
        grid-template-columns: 140px minmax(0, 1fr) 100px 100px;
    }
}
@media (max-width: 640px) {
    .nd-post-link-row {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        padding: 16px 12px 12px;
    }
    .nd-post-link-row .nd-post-link-url {
        grid-column: 1 / -1;
    }
    .nd-post-link-row .nd-post-link-drive {
        grid-column: 1 / -1;
    }
}