/* 用户评论 · 前台样式（类名前缀 nc-，避免与主题冲突） */

.nc-card {
    margin: 20px 0 0;
    padding: 20px 22px 22px;
    background: var(--bg-card, #fff);
    border: 1px solid var(--border-light, #e8e8e8);
    border-radius: var(--radius-md, 12px);
    box-shadow: var(--shadow-sm, 0 1px 3px rgba(0, 0, 0, .04));
    color: var(--text-primary, #1e293b);
}

/* 复位主题对 form / submit 的全局样式（zhumo 等主题把 form 限制为 500px 居中、submit 拉通栏） */

.nc-card form {
    max-width: none;
    margin: 0 0 18px;
    padding: 12px;
    background: var(--bg-sidebar, #f8fafc);
    border: 1px solid var(--border-light, #e8e8e8);
    border-radius: 10px;
    box-shadow: none;
}

.nc-card form div {
    margin-bottom: 0;
}

.nc-card button[type="submit"] {
    width: auto;
    padding: 8px 20px;
    border: 0;
    border-radius: 8px;
    background: var(--accent, #16a34a);
    color: #fff;
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.4;
    cursor: pointer;
}

.nc-card button[type="submit"]:hover:not(:disabled) {
    filter: brightness(1.08);
}

.nc-card button[type="submit"].nc-submit--sm {
    padding: 6px 16px;
    font-size: 12.5px;
}

.nc-card form[hidden],
.nc-card .nc-reply-form[hidden] {
    display: none;
}

.nc-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 14px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-light, #eee);
}

.nc-head h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary, #1e293b);
}

.nc-head h3 i {
    color: var(--accent, #16a34a);
}

.nc-total {
    font-size: 13px;
    font-weight: 400;
    color: var(--text-muted, #94a3b8);
}

.nc-sort {
    font-size: 12.5px;
    color: var(--text-muted, #94a3b8);
}

/* 编辑器 */

.nc-editor,
.nc-reply-form {
    display: block;
    margin-bottom: 18px;
    padding: 12px;
    background: var(--bg-sidebar, #f8fafc);
    border: 1px solid var(--border-light, #e8e8e8);
    border-radius: 10px;
}

.nc-editor textarea,
.nc-reply-form textarea {
    display: block;
    width: 100%;
    box-sizing: border-box;
    min-height: 74px;
    padding: 10px 12px;
    border: 1px solid var(--border-light, #e2e8f0);
    border-radius: 8px;
    background: #fff;
    color: inherit;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.7;
    resize: vertical;
    outline: none;
}

.nc-editor textarea:focus,
.nc-reply-form textarea:focus {
    border-color: var(--accent, #16a34a);
    box-shadow: 0 0 0 3px rgba(184, 134, 11, .08);
}

.nc-form-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
}

.nc-form-left,
.nc-form-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nc-emoji-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border: 1px solid var(--border-light, #e2e8f0);
    border-radius: 16px;
    background: #fff;
    color: var(--text-secondary, #475569);
    font-size: 12.5px;
    font-family: inherit;
    cursor: pointer;
    transition: all .15s ease;
}

.nc-emoji-btn:hover {
    color: var(--accent, #16a34a);
    border-color: var(--accent, #16a34a);
}

.nc-emoji-btn i {
    font-size: 14px;
}

.nc-counter {
    font-size: 12px;
    color: var(--text-muted, #94a3b8);
}

.nc-submit {
    padding: 8px 20px;
    border: 0;
    border-radius: 8px;
    background: var(--accent, #16a34a);
    color: #fff;
    font-size: 13.5px;
    font-family: inherit;
    cursor: pointer;
    transition: filter .2s ease;
}

.nc-submit:hover:not(:disabled) {
    filter: brightness(1.08);
}

.nc-submit:disabled {
    opacity: .6;
    cursor: not-allowed;
}

.nc-submit--sm {
    padding: 6px 16px;
    font-size: 12.5px;
}

/* 发布提示（禁止广告 / 网址） */
.nc-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 8px 2px 0;
    font-size: 12px;
    line-height: 1.6;
    color: var(--text-muted, #94a3b8);
}

.nc-hint i {
    font-size: 12px;
    opacity: .8;
}

.nc-cancel {
    padding: 6px 14px;
    border: 1px solid var(--border-light, #e2e8f0);
    border-radius: 8px;
    background: #fff;
    color: var(--text-secondary, #475569);
    font-size: 12.5px;
    font-family: inherit;
    cursor: pointer;
}

/* 未登录 / 非会员提示 */

.nc-login-tip {
    margin-bottom: 16px;
    padding: 12px 14px;
    border: 1px dashed var(--border-medium, #cbd5e1);
    border-radius: 10px;
    background: var(--bg-sidebar, #f8fafc);
    color: var(--text-secondary, #475569);
    font-size: 13px;
    line-height: 1.7;
}

.nc-login-tip a {
    color: var(--accent, #16a34a);
    font-weight: 500;
    text-decoration: none;
}

/* 列表 */

.nc-list {
    display: flex;
    flex-direction: column;
}

.nc-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 12px;
    border-radius: 12px;
    transition: background-color .18s ease;
}

.nc-list > .nc-item + .nc-item {
    border-top: 1px solid var(--border-light, #f0f2f5);
}

.nc-list > .nc-item:hover {
    background: var(--bg-sidebar, #f8fafc);
}

.nc-avatar {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background: #f1f5f9;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, .04);
}

.nc-main {
    flex: 1;
    min-width: 0;
    padding-top: 1px;
}

.nc-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 8px;
    margin-bottom: 5px;
    line-height: 1.4;
}

.nc-name {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-primary, #1e293b);
}

.nc-time {
    font-size: 12px;
    color: var(--text-muted, #94a3b8);
    font-variant-numeric: tabular-nums;
}

.nc-time::before {
    content: "·";
    margin-right: 6px;
    opacity: .6;
}

.nc-badge {
    padding: 1px 7px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 500;
    line-height: 16px;
    letter-spacing: .2px;
}

.nc-badge--author {
    background: rgba(184, 134, 11, .12);
    color: var(--accent, #16a34a);
}

.nc-badge--pending {
    background: rgba(245, 158, 11, .14);
    color: #b45309;
}

.nc-text {
    font-size: 14.5px;
    line-height: 1.78;
    color: var(--text-secondary, #334155);
    word-break: break-word;
    overflow-wrap: anywhere;
    white-space: normal;
}

.nc-at {
    margin-right: 2px;
    color: var(--accent, #16a34a);
    font-size: 13.5px;
    font-weight: 500;
}

.nc-tools {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 6px 0 0 -8px;
}

.nc-act {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    border: 0;
    border-radius: 8px;
    background: none;
    color: var(--text-muted, #94a3b8);
    font-size: 12.5px;
    font-family: inherit;
    line-height: 1.4;
    cursor: pointer;
    transition: color .15s ease, background-color .15s ease;
}

.nc-act i {
    font-size: 13px;
}

.nc-act:hover {
    color: var(--accent, #16a34a);
    background: rgba(184, 134, 11, .08);
}

.nc-act.is-liked {
    color: #e0245e;
    background: rgba(224, 36, 94, .08);
}

.nc-act--danger:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, .08);
}

/* 回复 */

.nc-replies {
    margin: 12px 0 0;
    padding: 4px 14px 4px 12px;
    background: rgba(15, 23, 42, .022);
    border-left: 3px solid rgba(184, 134, 11, .45);
    border-radius: 4px 10px 10px 4px;
}

.nc-replies .nc-item {
    padding: 11px 0;
    border-top: 1px dashed var(--border-light, #e8eef5);
    border-radius: 0;
    background: none;
}

.nc-replies .nc-item:first-child {
    border-top: 0;
}

.nc-item--reply {
    gap: 10px;
}

.nc-item--reply .nc-avatar {
    width: 28px;
    height: 28px;
}

.nc-item--reply .nc-meta {
    margin-bottom: 3px;
}

.nc-item--reply .nc-name {
    font-size: 13px;
}

.nc-item--reply .nc-time {
    font-size: 11.5px;
}

.nc-item--reply .nc-text {
    font-size: 13.5px;
    line-height: 1.72;
}

.nc-item--reply .nc-tools {
    margin-top: 5px;
}

.nc-card .nc-reply-form {
    margin: 12px 0 0;
    padding: 10px;
}

.nc-reply-form textarea {
    min-height: 58px;
    font-size: 13.5px;
}

/* 加载更多 / 空状态 */

.nc-more-wrap {
    display: flex;
    justify-content: center;
    margin-top: 14px;
}

.nc-more {
    padding: 8px 24px;
    border: 1px solid var(--border-medium, #cbd5e1);
    border-radius: 18px;
    background: #fff;
    color: var(--text-secondary, #475569);
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    transition: all .15s ease;
}

.nc-more:hover:not(:disabled) {
    border-color: var(--accent, #16a34a);
    color: var(--accent, #16a34a);
}

.nc-more:disabled {
    opacity: .6;
    cursor: default;
}

.nc-empty {
    padding: 28px 0 18px;
    text-align: center;
    color: var(--text-muted, #94a3b8);
    font-size: 13px;
}

.nc-empty i {
    margin-right: 6px;
    font-size: 16px;
}

/* 表情面板（微信经典表情：8 列方形格子） */

.nc-emoji-panel {
    position: fixed;
    z-index: 9998;
    width: 360px;
    max-width: calc(100vw - 24px);
    max-height: 296px;
    overflow-y: auto;
    padding: 8px 6px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, .16);
}

.nc-emoji-group + .nc-emoji-group {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #eef0f3;
}

.nc-emoji-label {
    margin-bottom: 4px;
    font-size: 11.5px;
    color: #94a3b8;
}

.nc-emoji-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 0;
}

.nc-emoji {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: none;
    font-family: inherit;
    font-size: 23px;
    line-height: 1;
    cursor: pointer;
    transition: background .1s ease;
}

.nc-emoji:hover {
    background: #f2f3f5;
}

/* 提示条 */

.nc-toast {
    position: fixed;
    left: 50%;
    bottom: 84px;
    z-index: 99999;
    max-width: 78vw;
    padding: 10px 18px;
    border-radius: 20px;
    background: rgba(0, 0, 0, .82);
    color: #fff;
    font-size: 13px;
    line-height: 1.5;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(10px);
    transition: opacity .25s ease, transform .25s ease;
}

.nc-toast.nc-toast--show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

@media (max-width: 768px) {
    .nc-card {
        padding: 16px 14px 18px;
    }

    .nc-item {
        gap: 10px;
        padding: 14px 8px;
    }

    .nc-avatar {
        width: 34px;
        height: 34px;
    }

    .nc-text {
        font-size: 14px;
    }

    .nc-tools {
        margin-left: -6px;
    }

    .nc-replies {
        padding: 2px 10px;
    }

    .nc-item--reply .nc-avatar {
        width: 26px;
        height: 26px;
    }

    .nc-emoji-panel {
        width: 304px;
        max-height: 264px;
    }

    .nc-emoji {
        height: 36px;
        font-size: 21px;
    }
}